[modules] nav_survey_poly_osam: sweep improvements

Added half U-turn even if not sweepback
Some modification to change sweep distance and number of points using telemetry parametrers
option to use default 1/2 sweep distance for start line or using alternative 1/32 sweep start

Its is very useful when using poligon survey osam for photogrametry

closes #938
This commit is contained in:
agressiva
2014-11-05 23:05:07 -02:00
committed by Felix Ruess
parent d148a18b60
commit 918fc957dc
4 changed files with 185 additions and 52 deletions
+9 -10
View File
@@ -3,17 +3,17 @@
<flight_plan alt="260" ground_alt="185" lat0="43.46223" lon0="1.27289" max_dist_from_home="1500" name="Basic" security_height="25">
<header>
#include "subsystems/datalink/datalink.h"
#include "modules/digital_cam/dc.h"
#define LINE_START_FUNCTION dc_Survey(40);
#define LINE_STOP_FUNCTION dc_autoshoot = DC_AUTOSHOOT_STOP;
</header>
</header>
<waypoints>
<waypoint name="HOME" x="0" y="0"/>
<waypoint name="STDBY" x="49.5" y="100.1"/>
<waypoint name="1" x="10.1" y="189.9"/>
<waypoint name="2" x="132.3" y="139.1"/>
<waypoint name="MOB" x="137.0" y="-11.6"/>
<waypoint name="S1_angle" x="156.2" y="222.2"/>
<waypoint name="S1" x="-109.0" y="245.9"/>
<waypoint name="S2" x="274.4" y="209.5"/>
<waypoint name="S3" x="322.1" y="29.9"/>
@@ -24,9 +24,8 @@
<waypoint name="_BASELEG" x="168.8" y="-13.8"/>
<waypoint name="CLIMB" x="-114.5" y="162.3"/>
</waypoints>
<sectors>
<sector name="POLY_SURVEY" color="green">
<sector color="green" name="POLY_SURVEY">
<corner name="S1"/>
<corner name="S2"/>
<corner name="S3"/>
@@ -34,7 +33,6 @@
<corner name="S5"/>
</sector>
</sectors>
<exceptions/>
<blocks>
<block name="Wait GPS">
@@ -76,7 +74,6 @@
<block group="extra_pattern" name="Survey S1-S3" strip_button="Survey (wp S1-S3)" strip_icon="survey.png">
<survey_rectangle grid="150" wp1="S1" wp2="S3"/>
</block>
<!--===================== Nav modules example blocks =================================-->
<block name="Bungee take-off">
<call fun="nav_bungee_takeoff_setup(WP_HOME)"/>
<call fun="nav_bungee_takeoff_run()"/>
@@ -90,7 +87,7 @@
<call fun="nav_line_border_run(WP_1, WP_2, nav_radius)"/>
</block>
<block group="nav_pattern" name="Smooth nav (wp 1-2)" strip_button="Smooth nav">
<set var="snav_desired_tow" value="gps.tow / 1000. + 60."/>
<set value="gps.tow / 1000. + 60." var="snav_desired_tow"/>
<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()"/>
@@ -104,7 +101,11 @@
<call fun="nav_flower_run()"/>
</block>
<block name="Poly survey osam">
<call fun="nav_survey_poly_osam_setup(WP_S1, 5, 100, 45)"/>
<call fun="nav_survey_poly_osam_setup(WP_S1, 5, 100, -5)"/>
<call fun="nav_survey_poly_osam_run()"/>
</block>
<block name="Poly survey osam dynamic">
<call fun="nav_survey_poly_osam_setup_towards(WP_S1, 0, 0, WP_S1_angle)"/>
<call fun="nav_survey_poly_osam_run()"/>
</block>
<block name="ZamboniSurvey">
@@ -122,8 +123,6 @@
<call fun="nav_spiral_setup(WP_S1, WP_S2, 30, 10, 3)"/>
<call fun="nav_spiral_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"/>