-
Notifications
You must be signed in to change notification settings - Fork 1
SurfacePosition #51
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
SurfacePosition #51
Conversation
Initial attempt at implementing SurfacePosition. Algorithm is mostly shared with AirbornePosition, so the common elements are moved to the PositionUpdate class, which maintains a cache of even/odd frames, decides whether Global or Local calculation can be used, and generally contains the complexity of the CPR system. Some further sanity checks are required, and also a way to choose between multiple possible solutions for lat/lon for Surface data.
|
||
public void validateSurface() { | ||
// For SurfacePositions we get 8 possible solutions: 2x latitude, 4x longitude zones at 90 degree increments | ||
// TODO Could use receiver/reference lat/lon to chose which possibile solution is closest... or build-up an average over data received to-date |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Closest to the reference point for the first decoding then for the second decoding the reference point should change to the previous position. This will be I think the most complete solution
Revised SurfacePosition decoding to pick the lat/lon quadrant closest to the current active position. This initialises at the receiver lat/lon argument (if supplied), and updates a rolling-average with each global position update (this may not be strictly necessary... may revise later to just use the first N updates received).
Small changes were made mainly pre calculating the track and velocity information. Then uses the pre-calculated values to assign them to the track object when available |
…Local position updates, both Airborne and Surface.
SurfacePositionUpdates should now be working correctly, and AirbornePositionUpdates now correctly work for both Global and Local updates. Tests have been provided, but may not cover all edge-cases. |
Looking good @IDBeswick thanks for the contribution! |
Started by @IDBeswick
Initial attempt at implementing SurfacePosition. Algorithm is mostly shared with AirbornePosition, so the common elements are moved to the PositionUpdate class, which maintains a cache of even/odd frames, decides whether Global or Local calculation can be used, and generally contains the complexity of the CPR system. Some further sanity checks are required, and also a way to choose between multiple possible solutions for lat/lon for Surface data.