mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-15 20:35:29 +03:00
Corrected heading and based off home position
This commit is contained in:
parent
4e5f86fa2d
commit
b6f8ff98c3
1 changed files with 2 additions and 2 deletions
|
@ -2151,7 +2151,7 @@ float getFinalRTHAltitude(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
/*-----------------------------------------------------------
|
/*-----------------------------------------------------------
|
||||||
* Reset home position to current position
|
* Update the RTH Altitudes
|
||||||
*-----------------------------------------------------------*/
|
*-----------------------------------------------------------*/
|
||||||
static void updateDesiredRTHAltitude(void)
|
static void updateDesiredRTHAltitude(void)
|
||||||
{
|
{
|
||||||
|
@ -2160,7 +2160,7 @@ static void updateDesiredRTHAltitude(void)
|
||||||
|| ((navGetStateFlags(posControl.navState) & NAV_AUTO_WP) && posControl.waypointList[posControl.activeWaypointIndex].action == NAV_WP_ACTION_RTH))) {
|
|| ((navGetStateFlags(posControl.navState) & NAV_AUTO_WP) && posControl.waypointList[posControl.activeWaypointIndex].action == NAV_WP_ACTION_RTH))) {
|
||||||
switch (navConfig()->general.flags.rth_climb_first_stage_mode) {
|
switch (navConfig()->general.flags.rth_climb_first_stage_mode) {
|
||||||
case NAV_RTH_CLIMB_STAGE_AT_LEAST:
|
case NAV_RTH_CLIMB_STAGE_AT_LEAST:
|
||||||
posControl.rthState.rthClimbStageAltitude = navConfig()->general.rth_climb_first_stage_altitude;
|
posControl.rthState.rthClimbStageAltitude = posControl.rthState.homePosition.pos.z + navConfig()->general.rth_climb_first_stage_altitude;
|
||||||
break;
|
break;
|
||||||
case NAV_RTH_CLIMB_STAGE_EXTRA:
|
case NAV_RTH_CLIMB_STAGE_EXTRA:
|
||||||
posControl.rthState.rthClimbStageAltitude = posControl.actualState.abs.pos.z + navConfig()->general.rth_climb_first_stage_altitude;
|
posControl.rthState.rthClimbStageAltitude = posControl.actualState.abs.pos.z + navConfig()->general.rth_climb_first_stage_altitude;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue