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

Copter: RTL returns at incorrect altitude if EKF origin alt different from Home alt #13441

Closed
rmackay9 opened this issue Feb 1, 2020 · 2 comments

Comments

@rmackay9
Copy link
Contributor

rmackay9 commented Feb 1, 2020

During Copter-4.0.2 testing I noticed that my vehicle was descending a couple of meters in the first stage of RTL. The vehicle should never descend when it enters RTL, it should always return at the current altitude or climb to the greater of RTL_ALT and (current altitude + RTL_CLIMB_MIN).

This can be reproduced in SITL by doing the following:

  • wait until the, "EK2 IMU0 origin set" message is displayed
  • param set GND_ALT_OFFSET -3
  • param set RTL_ALT 500
  • loiter
  • arm throttle
  • increase throttle and forward pitch to fly the vehicle to at least 10m above and away from home
  • RTL

The vehicle will descend 3m and return home.

Here is a graph of CTUN.Alt from the above test.
image

@rmackay9
Copy link
Contributor Author

rmackay9 commented Feb 1, 2020

For accountability this is probably the PR that caused the issue by chaning current_loc.alt to be an altitude above origin instead of an altitude above home. #10587

@rmackay9
Copy link
Contributor Author

rmackay9 commented Feb 5, 2020

This is fixed in master and the fix will also go out with Copter-4.0.2-rc4

@rmackay9 rmackay9 closed this as completed Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant