Files
paparazzi/conf/flight_plans/demo_gvf.xml
T
Hector Garcia de Marina 2144be74be Poly survey via Guidance Vector Field addition (#2052)
* [GVF] more functions exposed to the user

* [GVF] gvf_line_xy1_xy2 added

* [GVF] segment msg added for the GCS

* poly survey with GVF

* [GVF] segment primitive added

* integrating gvf and poly survey

* [GVF] each trajectory has its own gains now

* updated settings (gains) for the GVF trajectories

* [GVF] nav_survey_polygon integrated with GVF

* [GVF] python scripts updated for the new GVF msg format

* pprz c code style

* [GVF] updated demo

* gvf demo includes poly survey

* [GVF] gvf poly survey moved to gvf module

* [GVF] nav module not necessary anymore for gvf demo

* [GVF] _gvf added for being different from others nav functions from other modules

* [GVF] description about employing gvf here has been removed

* gvf_ for not conflict with former nav module

* These definitions now have to be done in the airframe conf

* [GVF] kn is not used anymore by the gvf visualization

* [GVF] better description msg for the formation script

* [GVF] Doxygen doc

* print for python 3

* correct style

* we set up correctly the vertical control

* Doxygen

* Only for auto2. If we are in auto1, do not override the roll set point

* Circular formation now also works for counter-clockwise direction

* update pprzlink

* Gautier comments

* [GVF] more functions exposed to the user

* [GVF] gvf_line_xy1_xy2 added

* [GVF] segment msg added for the GCS

* poly survey with GVF

* [GVF] segment primitive added

* integrating gvf and poly survey

* [GVF] each trajectory has its own gains now

* updated settings (gains) for the GVF trajectories

* [GVF] nav_survey_polygon integrated with GVF

* [GVF] python scripts updated for the new GVF msg format

* pprz c code style

* [GVF] updated demo

* gvf demo includes poly survey

* [GVF] gvf poly survey moved to gvf module

* [GVF] nav module not necessary anymore for gvf demo

* [GVF] _gvf added for being different from others nav functions from other modules

* [GVF] description about employing gvf here has been removed

* gvf_ for not conflict with former nav module

* These definitions now have to be done in the airframe conf

* [GVF] kn is not used anymore by the gvf visualization

* [GVF] better description msg for the formation script

* [GVF] Doxygen doc

* print for python 3

* correct style

* we set up correctly the vertical control

* Doxygen

* Only for auto2. If we are in auto1, do not override the roll set point

* Circular formation now also works for counter-clockwise direction

* update pprzlink

* Gautier comments

* PPRZ_MODE_AUTO2 is now AP_MODE_AUTO2

* new functions for the GVF demo

* Primitives for tracking lines, segments and segment_loops

* Poly survey track the proper segment function
2017-06-19 17:43:10 -07:00

104 lines
4.3 KiB
XML

<!DOCTYPE flight_plan SYSTEM "flight_plan.dtd">
<flight_plan alt="260" ground_alt="185" lat0="43.46223" lon0="1.27289" max_dist_from_home="1500" name="Fixed wing basic (Muret)" security_height="25">
<header>
</header>
<waypoints>
<waypoint name="HOME" x="0" y="0"/>
<waypoint alt="235" name="STDBY" x="49.5" y="100.1"/>
<waypoint alt="215.0" name="AF" x="177.4" y="45.1"/>
<waypoint alt="185.0" name="TD" x="28.8" y="57.0"/>
<waypoint name="_BASELEG" x="168.8" y="-13.8"/>
<waypoint name="CLIMB" x="-114.5" y="162.3"/>
<waypoint alt="235.0" name="ELLIPSE" x="0.5" y="109.0"/>
<waypoint alt="235.0" name="S1" x="-14.8" y="157.8"/>
<waypoint alt="235.0" name="S2" x="175.7" y="85.2"/>
<waypoint alt="235.0" name="S3" x="140.0" y="-2.3"/>
<waypoint alt="235.0" name="S4" x="-49.6" y="66.3"/>
</waypoints>
<sectors>
<sector color="orange" name="Survey">
<corner name="S1"/>
<corner name="S2"/>
<corner name="S3"/>
<corner name="S4"/>
</sector>
</sectors>
<variables>
<variable var="angle_ps" init="0" min="-180" max="179" step="1"/>
</variables>
<modules>
<module name="gvf_module"/>
</modules>
<blocks>
<block name="Wait GPS">
<set value="1" var="autopilot.kill_throttle"/>
<while cond="!GpsFixValid()"/>
</block>
<block name="Geo init">
<while cond="LessThan(NavBlockTime(), 10)"/>
<call_once fun="NavSetGroundReferenceHere()"/>
</block>
<block name="Holding point">
<set value="1" var="autopilot.kill_throttle"/>
<attitude roll="0" throttle="0" vmode="throttle"/>
</block>
<block group="home" key="t" name="Takeoff" strip_button="Takeoff (wp CLIMB)" strip_icon="takeoff.png">
<exception cond="GetPosAlt() > GetAltRef()+25" deroute="Standby"/>
<set value="0" var="autopilot.kill_throttle"/>
<set value="0" var="autopilot.flight_time"/>
<go from="HOME" pitch="15" throttle="1.0" vmode="throttle" wp="CLIMB"/>
</block>
<block group="home" key="Ctrl+a" name="Standby" strip_button="Standby" strip_icon="home.png">
<call_once fun="NavVerticalAutoThrottleMode(0.0)"/>
<call_once fun="NavVerticalAltitudeMode(flight_altitude, 0.0)"/>
<call fun="gvf_ellipse_wp(WP_STDBY, nav_radius, nav_radius, 0)"/>
</block>
<block name="ellipse">
<call fun="gvf_ellipse_wp(WP_ELLIPSE, gvf_ellipse_par.a, gvf_ellipse_par.b, gvf_ellipse_par.alpha)"/>
</block>
<block name="segment_loop">
<call fun="gvf_segment_loop_wp1_wp2(WP_ELLIPSE, WP_STDBY, gvf_segment_par.d1, gvf_segment_par.d2)"/>
</block>
<block name="segment">
<call fun="gvf_segment_wp1_wp2(WP_ELLIPSE, WP_STDBY)"/>
</block>
<block name="line">
<call fun="gvf_line_wp_heading(WP_ELLIPSE, gvf_line_par.heading)"/>
</block>
<block name="Sinusoidal">
<call fun="gvf_sin_wp_alpha(WP_ELLIPSE, gvf_sin_par.alpha, gvf_sin_par.w, gvf_sin_par.off, gvf_sin_par.A)"/>
</block>
<block name="Poly Survey">
<call_once fun="gvf_nav_survey_polygon_setup(WP_S1, 4, angle_ps, 30, 30, 40, flight_altitude)"/>
<call fun="gvf_nav_survey_polygon_run()"/>
</block>
<block group="land" name="Land Right AF-TD" strip_button="Land right (wp AF-TD)" strip_icon="land-right.png">
<set value="DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
<deroute block="land"/>
</block>
<block group="land" name="Land Left AF-TD" strip_button="Land left (wp AF-TD)" strip_icon="land-left.png">
<set value="-DEFAULT_CIRCLE_RADIUS" var="nav_radius"/>
<deroute block="land"/>
</block>
<block name="land">
<call_once fun="nav_compute_baseleg(WP_AF, WP_TD, WP__BASELEG, nav_radius)"/>
<circle radius="nav_radius" until="NavCircleCount() > 0.5" wp="_BASELEG"/>
<circle radius="nav_radius" until="And(NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-(nav_radius/fabs(nav_radius))*10), 10 > fabs(GetPosAlt() - WaypointAlt(WP__BASELEG)))" wp="_BASELEG"/>
</block>
<block name="final">
<exception cond="GetAltRef() + 10 > GetPosAlt()" deroute="flare"/>
<go from="AF" hmode="route" vmode="glide" wp="TD"/>
</block>
<block name="flare">
<go approaching_time="0" from="AF" hmode="route" throttle="0.0" vmode="throttle" wp="TD"/>
<attitude roll="0.0" throttle="0.0" until="FALSE" vmode="throttle"/>
</block>
</blocks>
</flight_plan>