-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Improve flight path calculation with loiter radius support #13328
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
base: master
Are you sure you want to change the base?
Improve flight path calculation with loiter radius support #13328
Conversation
This commit implements the adjustCoordinatesForLoiterRadius() method to correctly calculate tangent points for flight paths connecting loiter circles. The implementation: - Handles connections between two loiter circles using proper tangent calculation - Supports connections between a point and a loiter circle - Adjusts display coordinates while preserving the original waypoint positions - Uses geometric calculations based on azimuth and distance between waypoints
I assume the cmake file in the pull is a mistake? I've been playing around with this using PX4 SITL. My concern is that this kinda just draws flight paths which differ from reality in a different wrong way. For example with PX4:
Given that, I'm not sure this is really better. Just differently wrong as far as I can tell. I'm also unsure whether ArduPilot actual flight path differs from how PX4 does it? The real flight path might be firmware specific. @rubenp02? |
So I guess after playing around with ti I agree with what @rubenp02 said in the original pull: |
@DonLakeFlyer CMakePresets.json is a bug commit, please ignore it |
My idea is that in the circling mode, the ideal flight path should be accurately plotted, while the actual flight path is determined by the flight control system itself. After all, the algorithms of each simulator are different. |
What is the actual flight path for ArduPilot when coming in to and exiting a Loiter? |
Entry is straight towards the center until it gets "captured" and starts loitering. Exit can be perpendicular or tangent to the loiter path. |
@DonLakeFlyer Could you help me review the code? I don't think this implementation is the best at present.