mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 22:17:01 +08:00
[rotorcraft] fix takeoff-land-takeoff in nav via flightplan
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
<define name="AHRS_GRAVITY_UPDATE_NORM_HEURISTIC" value="TRUE"/>
|
||||
</subsystem>
|
||||
<subsystem name="ins"/>
|
||||
|
||||
<!--define name="KILL_ON_GROUND_DETECT" value="TRUE"/-->
|
||||
</firmware>
|
||||
|
||||
<servos driver="Pwm">
|
||||
|
||||
@@ -71,8 +71,12 @@
|
||||
</block>
|
||||
<block name="flare">
|
||||
<exception cond="NavDetectGround()" deroute="Holding point"/>
|
||||
<exception cond="!nav_is_in_flight()" deroute="landed"/>
|
||||
<call fun="NavStartDetectGround()"/>
|
||||
<stay climb="-0.8" vmode="climb" wp="TD"/>
|
||||
</block>
|
||||
<block name="landed">
|
||||
<attitude pitch="0" roll="0" throttle="0" vmode="throttle" until="FALSE"/>
|
||||
</block>
|
||||
</blocks>
|
||||
</flight_plan>
|
||||
|
||||
@@ -341,4 +341,11 @@ bool_t nav_detect_ground(void) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool_t nav_is_in_flight(void) {
|
||||
if (autopilot_in_flight)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void nav_home(void) {}
|
||||
|
||||
@@ -81,6 +81,7 @@ unit_t nav_reset_alt( void ) __attribute__ ((unused));
|
||||
void nav_periodic_task(void);
|
||||
void nav_move_waypoint(uint8_t wp_id, struct EnuCoor_i * new_pos);
|
||||
bool_t nav_detect_ground(void);
|
||||
bool_t nav_is_in_flight(void);
|
||||
|
||||
void nav_home(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user