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

ArduPlane:make heading lock upon gnd speed consistent #29104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Hwurzburg
Copy link
Collaborator

we use GPS_GND_CRS_MIN_SPD in AUTOLAND, this makes ModeTakeoff and NAV_TAKEOFF consistent with this

@IamPete1
Copy link
Member

IamPete1 commented Jan 19, 2025

I think we need to merge #28976 first. There are is some overlap.

@Hwurzburg
Copy link
Collaborator Author

Hwurzburg commented Jan 19, 2025 via email

@Hwurzburg
Copy link
Collaborator Author

going to try to improve failsafe heading code as per Devcall

@Hwurzburg
Copy link
Collaborator Author

Hwurzburg commented Jan 24, 2025

After reviewing the code in mode_takeoff and commands_logic, and a lot of SITL takeoffs with headwinds ~ cruise speed, I do not think a failsafe for not having enough groundspeed to break out of roll limit constraints in the face of extreme headwind is required (would take an extremely reckless operator to try to take off in winds exceeding the speed of the vehicle in my opinion)....eventually the altitude target will be reached in either case, or nav will slowly yaw/turn such that grndspd suddenly increases, and the limit eliminated....no fly away will occur because the vehicle is moving VERY slowly...it will almost vertically ascend and then switch to next mission item or initiate the mode_takeoff loiter, and takeoff has to be in headwind conditions within 5m/s of cruise speed....so just capturing heading based on groundspeed is valid in my opinion....the other PR removing the mode_takeoff failsafe after LEVEL_ALT is obtained can be merged in my opinion also....currently NAV_TAKEOFF has no equivalent and requires no removal
I have changed the differing ground speed gates where its used to validate the use of GPS heading and used the common define of GPS_GND_CRS_MIN_SPD which is 5m/s currently...it replaces values ranging from 2.7m/s to 5m/s in these areas...in my opinion it could be changed to 3m/s instead of its current 5m/s without impact given modern GPS...

ArduPlane/servos.cpp Outdated Show resolved Hide resolved
ArduPlane/defines.h Outdated Show resolved Hide resolved
@@ -67,7 +67,7 @@ void ModeCruise::navigate()
plane.channel_roll->get_control_in() == 0 &&
plane.rudder_input() == 0 &&
plane.gps.status() >= AP_GPS::GPS_OK_FIX_2D &&
Copy link
Member

Choose a reason for hiding this comment

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

We don't seem to be consistent about checking for 3D vs 2D fix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

true, maybe in another PR

Copy link
Member

@IamPete1 IamPete1 left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants