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
So instead of updating plane.guided_WP_loc and then calling
set_guided_WP(void) to copy that state into plane.next_WP_loc we pass
the new location in the call to set_guided_WP(const Location &loc).
avoidance was the only place which was not entirely over-writing
plane.guided_WP_loc. However, plane.next_WP_loc was updated to be the
current location when we entered guided mode. If we update the
horizontal/vertical avoidance now it is relative to the current
location, not the guided wp location, which could be quite important.
we need to reset the takeoff target position while disarmed so we
don't use spurious position information from before we get good GPS
lock.
also remove the "Resetting previous waypoint" message as it doesn't
provide useful information and is just a distraction (it would be
printed continuously while waiting for arming with this PR)
this fixes a bug in the set of home alt while disarmed. The set had a
circular dependency which could cause a large bias to build up between
home alt and gps alt due to small fluctuations in barometer data
Thanks to Nick Allen for spotting this
if we land at a remote location with a different height we should not
update baro and home. This also prevents us updating baro and home if
we disarm in flight
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.
This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.
AVR-specific places were not changed.