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

FW raise min airspeed based on commanded bank #7575

Merged
merged 1 commit into from
Sep 19, 2017

Conversation

dagar
Copy link
Member

@dagar dagar commented Jul 10, 2017

Needs review and testing.

@JonReacher @Antiheavy FYI
I'll share a link to the binary once it's available.

@see3peoh
Copy link

@dagar Question about this and the math. Maybe the commit says the following but I'm couldn't get it to do so (granted its the middle of the night here).

Load factor at bank should be 1/cos(bank angle). Let's assume 45 degrees so thats a new 1.41 load factor

Isn't stall speed at bank just = level Stall speed * load factor at bank? Let's assume 10m/s stall speed so 10 *1.41 is 14.1 m/s (new stall speed at 45 deg bank)

Am I off here or does the above in the commit say this as I kept getting a different stall speed and load when following the math in the commit.

@JonReacher
Copy link

@see3peoh You're correct about formulating the load factor, but remember that stall speed increases by the square root of the load factor, not the load factor itself. So at 45 deg bank angle, you calculate a 1.41 load factor. You then find the square root of 1.41. You get ~1.19. So the new scaled stall speed is Stall speed*1.19 @ 45 degrees.

@see3peoh
Copy link

@JonReacher that makes soo much more sense. Thanks for the clarification. @dagar sorry for doubting you!

@dagar
Copy link
Member Author

dagar commented Jul 11, 2017

@see3peoh don't apologize, thanks for looking.

@JonReacher do you want a binary to test? Which board do you have?

@JonReacher
Copy link

@dagar Didn't see your question until now. I have a standard pixhawk. I'm down at the moment, need to build a new airframe for testing. It shouldn't be too long though. I'll be happy to have a binary to test.

@Antiheavy
Copy link
Contributor

I'm also willing to test this.

@LorenzMeier
Copy link
Member

@JonReacher @Antiheavy we're blocked on your tests with this PR.

@LorenzMeier LorenzMeier added this to the Release v1.7.0 milestone Aug 2, 2017
@Antiheavy
Copy link
Contributor

Got a couple flight tests done today with a build including this PR.

Survey and loiter patterns with increasing FW_AIRSPD_MIN:
https://logs.px4.io/plot_app?log=018edc80-b2ea-4707-90dd-ba899bdc0cf8

Survey and loiter patterns with increasing FW_R_LIM:
https://logs.px4.io/plot_app?log=20f8405a-ca05-441c-914b-60f9a460af8a

@dagar should take a closer look, but it seems be be behaving as intended.
image
image

@Antiheavy
Copy link
Contributor

Antiheavy commented Aug 17, 2017

More data:

Here are the airspeed and roll angle set points from a recent flight - airspeed setpoint definitely seems to increase whenever max roll angle is commanded. It seems to match the math in the PR. Airspeed setpoint is dark blue line, scaled 2x (m/s):

image

from this log:
https://review.px4.io/plot_app?log=f3da31a6-c015-4bab-ad23-8de3ccdd321b

Copy link
Member

@bresch bresch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's theoretically correct and can only help. It's fine for me to merge those modifications.

@dagar
Copy link
Member Author

dagar commented Sep 19, 2017

Thanks for the review.

@dagar dagar merged commit 9cd9159 into PX4:master Sep 19, 2017
@dagar dagar deleted the fw_min_airspeed branch September 19, 2017 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FW Minimum Airspeed scaling for banked stall avoidance
6 participants