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

truncate tracklogs at window open #294

Open
kuaka opened this issue Jan 29, 2022 · 2 comments
Open

truncate tracklogs at window open #294

kuaka opened this issue Jan 29, 2022 · 2 comments

Comments

@kuaka
Copy link
Collaborator

kuaka commented Jan 29, 2022

There is an issue with trackers that are turned on before traveling to takeoff and pilots being given 0km. This is probably due to the flight detection algorithm (which will take the 1st 'flight' in a track log) being triggered by the height gain or ground speed of going to takeoff.
A sensible solution is probably to ignore/remove track log points before window open before running flight detection.

@biuti
Copy link
Collaborator

biuti commented Jan 31, 2022

In the library we are using (igc_lib) create_from_file method seems to be able to process only first flight, or all the remaining part of the track, so we would need to process the track file before creating the Flight object.

I created a method Track.process() that should do exactly what we need.
Have a look please, I tested it and it seems to work.

@kuaka
Copy link
Collaborator Author

kuaka commented Jan 31, 2022

looks like you have wrapped igc_lib in track.process which seems reasonable.
What happens if someone submits a track that has no points inside the time window (maybe by accident) will it remove all fixes and what is the behavior of the application? (will it crash or give back useful feedback?). If it doesn't handle it well it might be easiest to use the original track - i.e. if no fixes in time window then pass non trimmed igc to igc_lib.

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

No branches or pull requests

2 participants