-
Notifications
You must be signed in to change notification settings - Fork 127
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
Merging two files, but preferring data from one of those files, and interpolating the other #1260
Comments
Our members of the list surprise me with the various solutions they come up
with, but I have nothing...that'd result in a respectable map with the
resolution you'd want for HR and cadence. Just averaging lat/lons doesn't
work as at 1hz, moving a point even tens of feet is going to
scrooch instantaneous cadence, for example. Even with both units at 1hz,
they're not going to be the same samples, so you can't really just build a
giant associative array and then run a thread through them. I can't think
of ways that are mathematically sound to merge them.
You even hinted at this. "I can make two spreadsheets and with divine
knowledge about which columns are sub-awesome in each one, produce
something that may involve a loss of accuracy" is the non-programmer's way
of saying "write a custom filter".
That said, we're open source. Writing a new filter - even one that's "Tim's
special Track Wrangler" that does a crazy, but custom, thing for your own
personal use - is an option you have. Internally we "just" decompose tracks
into arrays of sequenced points. The data structures are a little more
strict than spreadsheet rows, but if you want to build up your own thing,
that's totally possible.
What works for your use of your data isn't necessarily viable for others,
though, which is the case we have to think about. See that somewhat
comical, "LOL, no, don't you EVEN contaminate my data store with this mess
of a track" response from the OSM SME in your referenced message. :-)
…On Sat, Feb 10, 2024 at 8:06 AM Tim Connors ***@***.***> wrote:
Say you are riding with two GPS trackers - one that's quite accurate, and
records temperature, cadence, but not heart rate. And the other that's not
so great on locational accuracy, but records heartrate (bonus points for
coping with the fact that it locks onto a location faster than the other
one and isn't as likely to completely drop out). I'd like to combine these
two files, preferring data over no data, but accurate data over inaccurate
data. The timestamp is accurate in both, so you should just be able to
interpolate the non lat,lon,time values from the second file into the first
file to result in the merged file (and keeping lat,lon from the second file
when it's not present in the first file).
Simply merging the files and keeping all data points does not work because
each data point is likely to have only one of (time,inaccurate
location,heart rate) or (time, accurate location, temperature, cadence).
And your track will bounce back and forth between those two types of data,
yielding quite the mess. I tested this with an invocation that looked like:
gpsbabel -t -i gpx -f Evening_Ride-20240208.gpx -i gpx -f
Evening_Ride-20240208-2.gpx -x track,merge,title="COMBINED LOG" -o gpx -F
Evening_Ride-20240208-combined.gpx and confirmed it was not really usable
without lots of manual gpspruneing (and then you're throwing away data
that was still present in the file that was ignored in any given segment).
I think I can contrive up an interpolation of both files at 1 second
accuracy, and brute force the two files together ignoring those columns I
want to discard from the second file, but that will involve large temporary
files and a loss of accuracy if the initial files have sample points more
often than once a second.
A general filter to do this would be much more useful, since it seems to
be a common requirement, eg:
https://help.openstreetmap.org/questions/54463/merge-gpx-tracks-without-losing-data
—
Reply to this email directly, view it on GitHub
<#1260>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD37GPH4XWXBZOA5K2ZLYS55GBAVCNFSM6AAAAABDCXZFYKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZDQNBXGU3DONQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
In the example you cite one method would be to augment the track with accurate position data with heart rate data from the other track.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Say you are riding with two GPS trackers - one that's quite accurate, and records temperature, cadence, but not heart rate. And the other that's not so great on locational accuracy, but records heartrate (bonus points for coping with the fact that it locks onto a location faster than the other one and isn't as likely to completely drop out). I'd like to combine these two files, preferring data over no data, but accurate data over inaccurate data. The timestamp is accurate in both, so you should just be able to interpolate the non lat,lon,time values from the second file into the first file to result in the merged file (and keeping lat,lon from the second file when it's not present in the first file).
Simply merging the files and keeping all data points does not work because each data point is likely to have only one of (time,inaccurate location,heart rate) or (time, accurate location, temperature, cadence). And your track will bounce back and forth between those two types of data, yielding quite the mess. I tested this with an invocation that looked like:
gpsbabel -t -i gpx -f Evening_Ride-20240208.gpx -i gpx -f Evening_Ride-20240208-2.gpx -x track,merge,title="COMBINED LOG" -o gpx -F Evening_Ride-20240208-combined.gpx
and confirmed it was not really usable without lots of manualgpsprune
ing (and then you're throwing away data that was still present in the file that was ignored in any given segment).I think I can contrive up an interpolation of both files at 1 second accuracy, and brute force the two files together ignoring those columns I want to discard from the second file, but that will involve large temporary files and a loss of accuracy if the initial files have sample points more often than once a second.
A general filter to do this would be much more useful, since it seems to be a common requirement, eg: https://help.openstreetmap.org/questions/54463/merge-gpx-tracks-without-losing-data
The text was updated successfully, but these errors were encountered: