Files
Gautier Hattenberger 321173fd32 [nav] add adaptive navigation patterns
These patterns have been developped during an atmospheric science
project to track clouds in real-time based on sensor data.
The modifications includes:
- adding adaptive nav modules (lace, rosette, trinity, spiral_3D)
- new or improved meteo sensor modules (cloud sensor, meteostick)
- improvements to mission interface (UPDATE message, waiting patterns,
unique ID check)
- compact telemetry message MINIMAL_COM to reduce bandwidth (message
supported by server and logplotter)
- basic cloud simulation module (circle or polygon sector) and demo
flight plan

See for details:
Titouan Verdu, Gautier Hattenberger, Simon Lacroix. Flight patterns
  for clouds exploration with a fleet of UAVs. 2019 International
  Conference on Unmanned Aircraft Systems (ICUAS 2019), Jul 2019, Atlanta,
  United States. https://hal-enac.archives-ouvertes.fr/hal-02137839
2022-01-07 15:01:37 +01:00

117 lines
5.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="15000" name="Cloud Sim" security_height="25">
<header/>
<waypoints>
<waypoint name="HOME" x="0" y="0"/>
<waypoint name="STDBY" x="49.5" y="100.1"/>
<waypoint name="CLOUD" x="154.4" y="156.5"/>
<waypoint name="C1" x="206.9" y="464.7"/>
<waypoint name="C2" x="469.1" y="379.4"/>
<waypoint name="C3" x="485.7" y="166.1"/>
<waypoint name="C4" x="201.2" y="113.1"/>
<waypoint name="C5" x="28.3" y="361.1"/>
<waypoint name="O1" x="-202.3" y="366.7"/>
<waypoint name="O2" x="-134.9" y="221.7"/>
<waypoint name="TARGET" x="120." y="120."/>
<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"/>
</waypoints>
<sectors>
<sector name="Cloud" color="white">
<corner name="C1"/>
<corner name="C2"/>
<corner name="C3"/>
<corner name="C4"/>
<corner name="C5"/>
</sector>
</sectors>
<variables>
<variable init="80." max="500." min="80." step="1.0" type="float" var="fp_radius"/>
<variable init="0." max="10." min="-10." step="0.1" type="float" var="fp_vx"/>
<variable init="0." max="10." min="-10." step="0.1" type="float" var="fp_vy"/>
<variable init="0." max="10." min="-10." step="0.1" type="float" var="fp_vz"/>
</variables>
<modules>
<module name="cloud_sim">
<define name="CLOUD_SIM_MODE" value="CLOUD_SIM_POLYGON"/>
</module>
<module name="nav" type="lace"/>
<module name="nav" type="rosette"/>
<module name="nav" type="trinity"/>
<module name="nav" type="spiral_3D"/>
<module name="mission" type="fw"/>
</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">
<circle radius="nav_radius" wp="STDBY"/>
</block>
<block group="adaptive" name="Trinity" strip_button="Trinity">
<call_once fun="nav_trinity_setup(WaypointX(WP_TARGET), WaypointY(WP_TARGET), WaypointAlt(WP_TARGET)-GetAltRef(), 1, fp_radius, fp_vx, fp_vy, fp_vz)"/>
<call fun="nav_trinity_run()"/>
<deroute block="Standby"/>
</block>
<block group="adaptive" name="Lace" strip_button="Lace">
<call_once fun="nav_lace_setup(WaypointX(WP_TARGET), WaypointY(WP_TARGET), WaypointAlt(WP_TARGET)-GetAltRef(), 1, fp_radius, fp_vx, fp_vy, fp_vz)"/>
<call fun="nav_lace_run()"/>
<deroute block="Standby"/>
</block>
<block group="adaptive" name="Rosette" strip_button="Rosette">
<call_once fun="nav_rosette_setup(WaypointX(WP_TARGET), WaypointY(WP_TARGET), WaypointAlt(WP_TARGET)-GetAltRef(), 1, fp_radius, fp_vx, fp_vy, fp_vz)"/>
<call fun="nav_rosette_run()"/>
<deroute block="Standby"/>
</block>
<block group="adaptive" name="Mission" strip_button="Mission">
<call fun="mission_run()"/>
<deroute block="Standby"/>
</block>
<block group="std_pattern" name="Oval 1-2" strip_button="Oval" strip_icon="oval.png">
<oval p1="O1" p2="O2" radius="nav_radius"/>
</block>
<block group="std_pattern" name="Survey 1-2" strip_button="Survey" strip_icon="survey.png">
<survey_rectangle grid="150" wp1="O1" wp2="O2"/>
</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="NavQdrCloseTo(DegOfRad(baseleg_out_qdr)-(nav_radius/fabs(nav_radius))*10) @AND (fabs(GetPosAlt() - WaypointAlt(WP__BASELEG)) @LT 10)" 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>