Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kalman #742

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

kalman #742

wants to merge 8 commits into from

Conversation

robertlipe
Copy link
Collaborator

  • Add rudimentary Kalman filter. Work in progress. This is an over-simplified Kalman filter with hard-coded constants for process noise and measurement error. We could probably do better if we "knew" the input was from a logger that blindly recorded every N seconds or if we hedged measurement error based on gps_fix or nsats or some other lower level data. This is probably ineffective on better GPSes that do this before actually dropping trackpoints, so this is probably more helpful on a $4 ublox than a $700 Garmin.

* Make more string literals encoded at UTF-16 (bloaty-bytes) to
reduce conversions.
* Favor QStringView(Qt6-ism that mirrors C++ standard std::stringview)
over QStringRef (Qt5 hack).
This is an over-simplified Kalman filter with hard-coded constants
for process noise and measurement error.
We could probably do better if we "knew" the input was from a logger
that blindly recorded every N seconds or if we hedged measurement error
based on gps_fix or nsats or some other lower level data. This is probably
ineffective on better GPSes that do this before actually dropping
trackpoints, so this is probably more helpful on a $4 ublox than a $700
Garmin.
@tsteven4
Copy link
Collaborator

I think a kalman filter is a nice addition. I think access to acceleration data would help, but we don't have it.

Unfortunately the kalman branch was created from the stringview branch. I think all the stringview stuff is already merged (#722, #723) Can you sync this up so I can see what is different in the kalman branch compared to master?

// sync up your master branch
git checkout master
git remote add upstream https://github.com/gpsbabel/gpsbabel.git
git fetch upstream master
git merge upstream/master
// sync your kalman branch to the updated master branch
git checkout kalman
git merge master
// accept all the upstream files with conflicts. I don't think your kalman filter work has anything to do with these files:
git checkout --theirs defs.h garmin_tables.cc gpx.cc gpx.h lowranceusr.h osm.cc pcx.cc pocketfms_fp.cc tef_xml.cc util.cc xmlgeneric.cc
git add defs.h garmin_tables.cc gpx.cc gpx.h lowranceusr.h osm.cc pcx.cc pocketfms_fp.cc tef_xml.cc util.cc xmlgeneric.cc

git commit
git push

I tried the above (without the push) on a copy of the PR, which leads me to believe all that is left is, which seems plausible:
git diff --name-only master
GPSBabel.pro
filter_vecs.h
kalmanfilter.cc
kalmanfilter.h

@tsteven4
Copy link
Collaborator

tsteven4 commented Nov 5, 2021

I think this need nvector in front of it, and the expansion to 3 variables instead of 2 (lat, lon). I expect it will fail miserably around discontinuities (the date line) and singularities (the poles) that the lat,lon representation suffer from. I have nvector implemented and tested somewhere, replacing most of the traditional formulas we have implemented.

@GPSBabelDeveloper
Copy link
Collaborator

GPSBabelDeveloper commented Nov 7, 2021 via email

@robertlipe robertlipe marked this pull request as draft December 22, 2022 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants