* Set position target used to just be used in scripting, now it's used
by DDS in external control
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
this fixes a bug where if the terrain database cache does not have the
tile for the location of a rally point then RTL to the rally point
with TERRAIN_FOLLOW=1 will not track terrain
The underlying issue is that Location::loc.change_alt_frame() will
return false if the location is not in the terrain memory cache. We
can't just extrapolate as the rally point could be in a totally
different terrain area to the current location. So instead we set it
as terrain_following_pending and fix it as soon as the terrain cache
is filled.
fixes https://github.com/ArduPilot/ardupilot/issues/25157
this fixes a bug where a change of home altitude would cause a sudden
height demand change. This copes with 3 situations:
- flying with AMSL alt demand. Changing home altitude makes for no change
- flying with AGL alt demand. Changing home altitude requires update of next_WP_loc
- flying with home relative alt demand. Changing home altitude changes demand at end of current navigation leg
The code had a bug where if GPS fix was lost, the demanded airspeed would be set to the measured or estimated airspeed causing unpredictable variations in the demanded airspeed.
This patch prevents the minimum ground speed protection speed up from running if the ground speed undershoot cannot be calculated.
This patch extends the range of conditions over which the minimum ground speed functionality can be used by enabling the ground speed undershoot to be calculated when the navigation system is able to estimate velocity.
The check for the aircraft being lined up for a tangent exit has an early breakout condition if the next waypoint is too close to the loiter circle which can prevent the required ground course to waypoint ever being achieved. This check was using the WP_LOITER_RAD parameter value, not the actual radius being used which can be set differently by the mission plan. If a large value for WP_LOITER_RAD was set and being over-written by the mission plan with a smaller value compatible with the distance to the next waypoint, the aircraft would still exit early.
remove any discrepancy which has crept in over the last few seconds
this also ensures that relative_altitude is updated, and copes with
the EKF refusing the resetHeightDatum call
clang reports this could be a problem when compiling under some EABIs. Remove it from most places as it is just noise, replace with class where we want to avoid including Location.h