[nav] use current alt in bungee ref point (#1988)

This fix is related to the following discussion on the ML:
http://lists.paparazziuav.org/Bungee-Takeoff-failure-td18223.html

It should make the bungee takeoff independent of the initial position of the bungee waypoint altitude set by the user.
This commit is contained in:
Gautier Hattenberger
2017-01-18 18:29:57 +01:00
committed by Felix Ruess
parent f1cc62c088
commit f4b50f97f4
+2 -3
View File
@@ -144,9 +144,8 @@ static void compute_points_from_bungee(void)
void nav_bungee_takeoff_setup(uint8_t bungee_wp)
{
// Store bungee point (from WP id, altitude should be ground alt)
// FIXME use current alt instead ?
VECT3_ASSIGN(bungee_point, WaypointX(bungee_wp), WaypointY(bungee_wp), WaypointAlt(bungee_wp));
// Store bungee point (from WP id, altitude is current hmsl (e.g. ground alt))
VECT3_ASSIGN(bungee_point, WaypointX(bungee_wp), WaypointY(bungee_wp), stateGetPositionUtm_f()->alt);
// Compute other points
compute_points_from_bungee();