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

Gpx month export sometimes doesn't include movement type (Arc app) #32

Open
bionicl opened this issue Jul 22, 2018 · 2 comments
Open

Gpx month export sometimes doesn't include movement type (Arc app) #32

bionicl opened this issue Jul 22, 2018 · 2 comments
Assignees

Comments

@bionicl
Copy link

bionicl commented Jul 22, 2018

I have one day fully corrected without any 'low confidence' errors and it features many car trips.
When I exported it as only one-day GPX everything was fine, but full-month GPX file lacks many of type attributes (<type>car</type>).

Checked that with a few months and every time it looks the same.

EDIT: After a few checks I'm pretty confident it only happens with the 'car' transport type

@sobri909 sobri909 self-assigned this Jul 23, 2018
@sobri909 sobri909 added the bug label Jul 23, 2018
@sobri909
Copy link
Owner

Hm. Interesting! I'll have a poke around in the GPX code soon.

I also want to get it out of Arc App and open sourced into LocoKit soon (#18). Which will make it easier for other people to spot my mistakes like this.

@sobri909
Copy link
Owner

I finally found the cause of this!

  1. https://github.com/sobri909/LocoKit/blob/develop/LocoKit/Base/Timelines/Items/ItemSegment.swift#L130-L132

  2. https://github.com/sobri909/LocoKit/blob/develop/LocoKit/Base/LocomotionSample.swift#L157-L160

If the first sample in the segment doesn’t have a confirmed type, and the classifier hasn’t been re-run on it since the last time the sample was loaded from the db, it’ll have a nil activityType.

The fix will be to make sure the classifier has been run over all unconfirmed samples before building the GPX (and JSON).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants