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

Calc 3D distance between positions #8

Closed
luke-iqt opened this issue Mar 1, 2021 · 3 comments
Closed

Calc 3D distance between positions #8

luke-iqt opened this issue Mar 1, 2021 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@luke-iqt
Copy link
Contributor

luke-iqt commented Mar 1, 2021

Currently, the distance of different planes from the camera is calculated based solely on their 2d positions. The Altitude of the planes should also be taken into consideration.

An additional function should be added, based on coordinate_distance() that also takes in altitude and calculates the relative distance in 3 dimensional space between them.

The calls will need to be updated to use this new function:
https://github.com/IQTLabs/SkyScan/blob/main/tracker/flighttracker.py#L156
https://github.com/IQTLabs/SkyScan/blob/main/tracker/flighttracker.py#L352
https://github.com/IQTLabs/SkyScan/blob/main/tracker/flighttracker.py#L374
https://github.com/IQTLabs/SkyScan/blob/main/tracker/flighttracker.py#L413
https://github.com/IQTLabs/SkyScan/blob/main/tracker/flighttracker.py#L430

@luke-iqt luke-iqt added the enhancement New feature or request label Mar 1, 2021
@luke-iqt
Copy link
Contributor Author

This should have been addressed in commit de23e44 but we saw some issues in the field during testing. Tracking seemed to improve when 2D coordinate distance calculations were used instead. The calculation for this happens here: https://github.com/IQTLabs/SkyScan/blob/main/tracker/utils.py#L51

@luke-iqt luke-iqt added bug Something isn't working and removed enhancement New feature or request labels Apr 23, 2021
@luke-iqt
Copy link
Contributor Author

luke-iqt commented May 3, 2021

@mchadwick-iqt tested the functionality and confirmed that the calculations were correct. Closing

@luke-iqt luke-iqt closed this as completed May 3, 2021
@mchadwick-iqt
Copy link
Contributor

Test1:

  • Function computed Slant Range: 35821 meters
    • Ground Range: 34935 meters
    • Aircraft Altitude 8031 meters
    • GPS Altitude 127 meters
  • ManuallyComputed Slant Range: 35817 meters
  • 0.01% error, likely floating point precision loss

Test2:

  • Function computed Slant Range: 33127 meters
    • Ground Range: 31521 meters
    • Aircraft Altitude 10302 meters
    • GPS Altitude 127 meters
  • ManuallyComputed Slant Range: 33123 meters
  • 0.01% error, likely floating point precision loss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants