[fixedwing] snav 'smooth navigation' as a module

This commit is contained in:
Loic Drumettaz
2013-08-26 16:40:53 +02:00
committed by Felix Ruess
parent ebccc37a06
commit e2ccf1b6a3
10 changed files with 34 additions and 78 deletions
+10
View File
@@ -80,6 +80,16 @@
<call fun="border_line_init()"/>
<call fun="border_line(WP_1, WP_2, nav_radius)"/>
</block>
<block name="Smooth nav">
<set var="snav_desired_tow" value="gps.tow / 1000. + 200."/>
<call fun="snav_init(WP_1, M_PI_2-atan2(WaypointY(WP_2)-WaypointY(WP_1),WaypointX(WP_2)-WaypointX(WP_1)), DEFAULT_CIRCLE_RADIUS/2.)"/>
<call fun="snav_circle1()"/>
<call fun="snav_route()"/>
<call fun="snav_circle2()"/>
<call fun="snav_on_time(DEFAULT_CIRCLE_RADIUS)"/>
<go from="1" hmode="route" wp="2"/>
<deroute block="Standby"/>
</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"/>