-
Notifications
You must be signed in to change notification settings - Fork 19k
ArduPlane: fix quadplane stopping speed equation #29712
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
ArduPlane: fix quadplane stopping speed equation #29712
Conversation
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.
I have done a geogebra of the change.
https://www.geogebra.org/calculator/frtg2bry
The current equation gets to 0 speed at distance threshold, the new equation gets to target speed at the distance threshold.
The change certainly makes the equation do what the comment says it should.
@eppravitra thanks! we just need to do some testing both in RealFlight and in some real vehicles, @peterbarker and I can test on 2 quadplanes at SpringValley on a weekend, likely in 2 weeks time (I will be away this weekend) |
@eppravitra I'd also note that this code is also bad if you'd like to fix it - should not depend on wp_speed
|
ca4c2b7
to
88b5469
Compare
tested on a MakeFlyEasy Hero, no issues |
88b5469
to
1d94ec2
Compare
7e84017
to
67eb20e
Compare
Hi Andrew @tridge, The ship landing test keeps failing. I wonder if it has to do with this change. I quickly looked at plane_ship_landing.lua, and I still can't spot anything obvious. Your help would be greatly appreciated. |
It's absolutely a regression as far as the autotest is concerned. I haven't seen the test fail in CI before this PR. It's also trivially reproducible locally. |
I have had a look at the failing test but I'm not that familiar with ship landing. It looks to me that its failing/passing due to mostly luck. This code change can only affect POS1. The final stage of landing is not affected. This is QPOS distance on master after POS1: For the failure: Both show a "ring down" it happens that one lands at a low point and the other lands at a high point. |
@eppravitra I think your PR has inadvertently exposed a flaw in the ship landing lua script. It does not slow down the landing if it is outside an acceptance cone for the landing on the target. We will need to fix that to get this to pass CI |
it turns out the key problem is Q_WP_SPEED=500 and the ship is moving at 5m/s |
needs to be larger than SIM_SHIP_SPEED
67eb20e
to
5b813d5
Compare
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.
Thanks!
Thanks everyone! |
I'm not sure if you are aware of this, @tridge, but I think this is the correct equation to calculate the stopping speed. From my test, I don't notice any difference. I only test using SITL with Gazebo though.