Skip to content

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

Merged
merged 8 commits into from
Apr 1, 2023
Merged

SurfacePosition #51

merged 8 commits into from
Apr 1, 2023

Conversation

Douglasdc3
Copy link
Member

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.

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
Copy link
Member Author

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

IDBeswick and others added 6 commits March 11, 2023 21:52
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).
@Douglasdc3
Copy link
Member Author

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.
@IDBeswick IDBeswick marked this pull request as ready for review March 22, 2023 02:26
@IDBeswick
Copy link
Member

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.

@Douglasdc3
Copy link
Member Author

Looking good @IDBeswick thanks for the contribution!

@Douglasdc3 Douglasdc3 merged commit 07ff26d into master Apr 1, 2023
@Douglasdc3 Douglasdc3 deleted the SurfacePosition branch April 1, 2023 09:06
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.

2 participants