fp_pitch (in deg) to control the pitch attitude from the flight plan

This commit is contained in:
Pascal Brisset
2009-01-19 13:41:42 +00:00
parent b8be87ef30
commit 08a538f7ca
4 changed files with 16 additions and 4 deletions
+10 -2
View File
@@ -76,10 +76,18 @@
<block name="Climb nav_climb m/s"> <block name="Climb nav_climb m/s">
<circle climb="nav_climb" radius="nav_radius" until="(10 > PowerVoltage()) || (estimator_z > ground_alt+ 1350)" vmode="climb" wp="1"/> <circle climb="nav_climb" radius="nav_radius" until="(10 > PowerVoltage()) || (estimator_z > ground_alt+ 1350)" vmode="climb" wp="1"/>
</block> </block>
<block name="Descent 0% throttle">
<circle pitch="-5" radius="50+(estimator_z-ground_alt)/2" throttle="0.0" until="ground_alt+50 > estimator_z" vmode="throttle" wp="1"/> <block name="Circle 0% throttle">
<circle pitch="fp_pitch" radius="nav_radius" throttle="0.0" until="ground_alt+50 > estimator_z" vmode="throttle" wp="1"/>
<deroute block="Standby"/> <deroute block="Standby"/>
</block> </block>
<block name="Oval 0% throttle">
<oval p1="1" p2="2" pitch="fp_pitch" radius="nav_radius" throttle="0.0" until="ground_alt+50 > estimator_z" vmode="throttle"/>
<deroute block="Standby"/>
</block>
<block name="Route 1-2"> <block name="Route 1-2">
<go approaching_time="0" from="1" hmode="route" wp="2"/> <go approaching_time="0" from="1" hmode="route" wp="2"/>
</block> </block>
+1
View File
@@ -93,6 +93,7 @@
<dl_setting MAX="500" MIN="-500" STEP="5" VAR="nav_radius"/> <dl_setting MAX="500" MIN="-500" STEP="5" VAR="nav_radius"/>
<dl_setting MAX="359" MIN="0" STEP="5" VAR="nav_course"/> <dl_setting MAX="359" MIN="0" STEP="5" VAR="nav_course"/>
<dl_setting MAX="5" MIN="-5" STEP="0.5" VAR="nav_climb"/> <dl_setting MAX="5" MIN="-5" STEP="0.5" VAR="nav_climb"/>
<dl_setting MAX="15" MIN="-15" STEP="1" VAR="fp_pitch"/>
<dl_setting MAX="50" MIN="-50" STEP="5" VAR="nav_shift" module="nav" handler="IncreaseShift" shortname="inc. shift"> <dl_setting MAX="50" MIN="-50" STEP="5" VAR="nav_shift" module="nav" handler="IncreaseShift" shortname="inc. shift">
</dl_setting> </dl_setting>
<dl_setting MAX="20" MIN="10" STEP="0.5" VAR="nav_ground_speed_setpoint" shortname="ground speed"/> <dl_setting MAX="20" MIN="10" STEP="0.5" VAR="nav_ground_speed_setpoint" shortname="ground speed"/>
+2 -1
View File
@@ -272,7 +272,8 @@ static inline void nav_follow(uint8_t _ac_id, float _distance, float _height) {
float nav_altitude = GROUND_ALT + MIN_HEIGHT_CARROT; float nav_altitude = GROUND_ALT + MIN_HEIGHT_CARROT;
float desired_x, desired_y; float desired_x, desired_y;
pprz_t nav_throttle_setpoint; pprz_t nav_throttle_setpoint;
float nav_pitch; float nav_pitch; /* Rad */
float fp_pitch; /* deg */
/** \brief Decide if the UAV is approaching the current waypoint. /** \brief Decide if the UAV is approaching the current waypoint.
+3 -1
View File
@@ -50,7 +50,9 @@ extern float last_x, last_y;
extern float desired_x, desired_y, nav_altitude, flight_altitude, nav_glide_pitch_trim; extern float desired_x, desired_y, nav_altitude, flight_altitude, nav_glide_pitch_trim;
extern pprz_t nav_throttle_setpoint; extern pprz_t nav_throttle_setpoint;
extern float nav_pitch, rc_pitch; extern float nav_pitch; /* Rad */
extern float rc_pitch;
extern float fp_pitch; /* Degrees */
extern float carrot_x, carrot_y; extern float carrot_x, carrot_y;