ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
11.02k stars 17.57k forks source link

Copter: let LOITER_TIME use terrain alt #13514

Open tatsuy opened 4 years ago

tatsuy commented 4 years ago

Issue details If I use LOITER_TIME command in Auto with Terrain Following, it doesn't accept terrain alt. This happens in real vehicle.

And I reproduced this in SITL. param set GND_ALT_OFFSET 3 (this creates a difference between the altitude above EKF origin and terrain altitude) image

image

I think this is close to the following PR.

11774

If I changed the 3rd argument of height_amsl from true to false, it resolved. https://github.com/ArduPilot/ardupilot/blob/Copter-4.0.1/libraries/AP_Common/Location.cpp#L122 But I don't know the right solution.

Version 4.0.2-dev

Platform [ ] All [ ] AntennaTracker [X] Copter [ ] Plane [ ] Rover [ ] Submarine

Logs 2020-02-07 14-21-27.zip

tatsuy commented 4 years ago

The solution is to use the delay (the 1st parameter) of the WAYPOINT command.

https://ardupilot.org/copter/docs/mission-command-list.html#loiter-time

This is the same as a Waypoint command.