mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 05:42:49 +08:00
[nav] trying to harmonize nav modules
This commit is contained in:
committed by
Felix Ruess
parent
f1f1a1a4bb
commit
0446598931
@@ -74,16 +74,16 @@
|
||||
</block>
|
||||
<!--===================== Nav modules example blocks =================================-->
|
||||
<block name="Bungee take-off">
|
||||
<call fun="bungee_takeoff_start(WP_HOME)"/>
|
||||
<call fun="bungee_takeoff_run()"/>
|
||||
<call fun="nav_bungee_takeoff_start(WP_HOME)"/>
|
||||
<call fun="nav_bungee_takeoff_run()"/>
|
||||
</block>
|
||||
<block name="Poly Survey S1-S2" strip_button="Poly Survey">
|
||||
<call fun="poly_survey_adv_start(WP_S1,5,180,30,10,50,100)"/>
|
||||
<call fun="poly_survey_adv_run()"/>
|
||||
<call fun="nav_survey_poly_adv_start(WP_S1,5,180,30,10,50,100)"/>
|
||||
<call fun="nav_survey_poly_adv_run()"/>
|
||||
</block>
|
||||
<block name="Border line 1-2" strip_button="Border Line (wp 1-2)">
|
||||
<call fun="border_line_start()"/>
|
||||
<call fun="border_line_run(WP_1, WP_2, nav_radius)"/>
|
||||
<call fun="nav_line_border_start()"/>
|
||||
<call fun="nav_line_border_run(WP_1, WP_2, nav_radius)"/>
|
||||
</block>
|
||||
<block name="Smooth nav" strip_button="Smooth nav (wp 1-2)">
|
||||
<set var="snav_desired_tow" value="gps.tow / 1000. + 200."/>
|
||||
@@ -96,19 +96,19 @@
|
||||
<deroute block="Standby"/>
|
||||
</block>
|
||||
<block name="Flower" strip_button="Flower (wp 1-2)">
|
||||
<call fun="flower_start(WP_1, WP_2)"/>
|
||||
<call fun="flower_run()"/>
|
||||
<call fun="nav_flower_start(WP_1, WP_2)"/>
|
||||
<call fun="nav_flower_run()"/>
|
||||
</block>
|
||||
<block name="Poly survey">
|
||||
<call fun="osam_poly_survey_start(WP_S1, 5, 50, 45)"/>
|
||||
<call fun="osam_poly_survey_run()"/>
|
||||
<call fun="nav_survey_poly_osam_start(WP_S1, 5, 50, 45)"/>
|
||||
<call fun="nav_survey_poly_osam_run()"/>
|
||||
</block>
|
||||
<block name="Flight Line block">
|
||||
<call fun="osam_flight_line_block_run(WP_S1, WP_S5, nav_radius, 30, 10)"/>
|
||||
<call fun="nav_line_osam_block_run(WP_S1, WP_S5, nav_radius, 30, 10)"/>
|
||||
</block>
|
||||
<block name="Vertical Raster">
|
||||
<call fun="vertical_raster_start()"/>
|
||||
<call fun="vertical_raster_run(WP_S1, WP_S2, nav_radius, 50)"/>
|
||||
<call fun="nav_vertical_raster_start()"/>
|
||||
<call fun="nav_vertical_raster_run(WP_S1, WP_S2, nav_radius, 50)"/>
|
||||
</block>
|
||||
<!--====================================================================================-->
|
||||
|
||||
|
||||
@@ -3,8 +3,19 @@
|
||||
<module name="nav_bungee_takeoff" dir="nav">
|
||||
<doc>
|
||||
<description>
|
||||
Takeoff procedure using a bungee
|
||||
Takeoff functions for bungee takeoff.
|
||||
Run initialize function when the plane is on the bungee, the bungee is fully extended and you are ready to
|
||||
launch the plane. After initialized, the plane will follow a line drawn by the position of the plane on initialization and the
|
||||
position of the bungee (given in the arguments). Once the plane crosses the throttle line, which is perpendicular to the line the plane is following,
|
||||
and intersects the position of the bungee (plus or minus a fixed distance (TakeOff_Distance in airframe file) from the bungee just in case the bungee doesn't release directly above the bungee) the prop will come on. The plane will then continue to follow the line until it has reached a specific
|
||||
height (defined in as Takeoff_Height in airframe file) above the bungee waypoint and speed (defined as Takeoff_Speed in the airframe file).
|
||||
</description>
|
||||
<section name="Takeoff" prefix="Takeoff_">
|
||||
<define name="Height" value="distance" unit="m" description="Takeoff height"/>
|
||||
<define name="Speed" value="speed" unit="m/s" description="Procedures ends above this speed (and above Height)"/>
|
||||
<define name="Distance" value="distance" unit="m" description="After this distance, the throttle is activated (if above MinSpeed)"/>
|
||||
<define name="MinSpeed" value="speed" unit="m/s" description="Throttle is activated if crossing the line above this speed"/>
|
||||
</section>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="nav_bungee_takeoff.h"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="nav_border_line" dir="nav">
|
||||
<module name="nav_line_border" dir="nav">
|
||||
<doc>
|
||||
<description>
|
||||
navigate along a border line (line 1-2) with turns in the same direction
|
||||
@@ -10,16 +10,16 @@
|
||||
take care youre navigation radius is not to small in strong wind conditions!
|
||||
In the flight plan:
|
||||
<!--
|
||||
<call fun="nav_line_init()"/>
|
||||
<call fun="nav_line(WP_waypoint1_name, WP_waypoint1_name, nav_radius)"/>
|
||||
<call fun="nav_line_border_start()"/>
|
||||
<call fun="nav_line_border_run(WP_waypoint1_name, WP_waypoint1_name, nav_radius)"/>
|
||||
-->
|
||||
|
||||
</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="nav_border_line.h"/>
|
||||
<file name="nav_line_border.h"/>
|
||||
</header>
|
||||
<makefile>
|
||||
<file name="nav_border_line.c"/>
|
||||
<file name="nav_line_border.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -1,15 +1,15 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="nav_disc_survey" dir="nav">
|
||||
<module name="nav_survey_disc" dir="nav">
|
||||
<doc>
|
||||
<description>
|
||||
Disc Survey.
|
||||
</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="nav_disc_survey.h"/>
|
||||
<file name="nav_survey_disc.h"/>
|
||||
</header>
|
||||
<makefile>
|
||||
<file name="nav_disc_survey.c"/>
|
||||
<file name="nav_survey_disc.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -1,16 +1,15 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="zamboni_survey" dir="nav">
|
||||
<module name="nav_survey_zamboni" dir="nav">
|
||||
<doc>
|
||||
<description>
|
||||
Zamboni pattern survey for fixedwings.
|
||||
</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="zamboni_survey.h"/>
|
||||
<file name="nav_survey_zamboni.h"/>
|
||||
</header>
|
||||
<makefile>
|
||||
<file name="zamboni_survey.c"/>
|
||||
<file name="nav_survey_zamboni.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
@@ -76,7 +76,7 @@ static float BungeeAlt;
|
||||
static float TDistance;
|
||||
static uint8_t BungeeWaypoint;
|
||||
|
||||
bool_t bungee_takeoff_start(uint8_t BungeeWP)
|
||||
bool_t nav_bungee_takeoff_start(uint8_t BungeeWP)
|
||||
{
|
||||
float ThrottleB;
|
||||
|
||||
@@ -130,7 +130,7 @@ bool_t bungee_takeoff_start(uint8_t BungeeWP)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool_t bungee_takeoff_run(void)
|
||||
bool_t nav_bungee_takeoff_run(void)
|
||||
{
|
||||
//Translate current position so Throttle point is (0,0)
|
||||
float Currentx = stateGetPositionEnu_f()->x-throttlePx;
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
|
||||
#include "std.h"
|
||||
|
||||
extern bool_t bungee_takeoff_start(uint8_t BungeeWP);
|
||||
extern bool_t bungee_takeoff_run(void);
|
||||
extern bool_t nav_bungee_takeoff_start(uint8_t BungeeWP);
|
||||
extern bool_t nav_bungee_takeoff_run(void);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ static float Flowerradius;
|
||||
static uint8_t Center;
|
||||
static uint8_t Edge;
|
||||
|
||||
bool_t flower_start(uint8_t CenterWP, uint8_t EdgeWP)
|
||||
bool_t nav_flower_start(uint8_t CenterWP, uint8_t EdgeWP)
|
||||
{
|
||||
Center = CenterWP;
|
||||
Edge = EdgeWP;
|
||||
@@ -87,7 +87,7 @@ bool_t flower_start(uint8_t CenterWP, uint8_t EdgeWP)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool_t flower_run(void)
|
||||
bool_t nav_flower_run(void)
|
||||
{
|
||||
TransCurrentX = stateGetPositionEnu_f()->x - WaypointX(Center);
|
||||
TransCurrentY = stateGetPositionEnu_f()->y - WaypointY(Center);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "std.h"
|
||||
|
||||
extern bool_t flower_run(void);
|
||||
extern bool_t flower_start(uint8_t CenterWP, uint8_t EdgeWP);
|
||||
extern bool_t nav_flower_run(void);
|
||||
extern bool_t nav_flower_start(uint8_t CenterWP, uint8_t EdgeWP);
|
||||
|
||||
#endif
|
||||
|
||||
+14
-14
@@ -21,7 +21,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file modules/nav/nav_border_line.c
|
||||
* @file modules/nav/nav_line_border.c
|
||||
* @brief navigate along a border line (line 1-2) with turns in the same direction
|
||||
*
|
||||
* you can use this function to navigate along a border if it is essetial not to cross it
|
||||
@@ -29,20 +29,20 @@
|
||||
* take care youre navigation radius is not to small in strong wind conditions!
|
||||
*/
|
||||
|
||||
#include "modules/nav/nav_border_line.h"
|
||||
#include "modules/nav/nav_line_border.h"
|
||||
#include "generated/airframe.h"
|
||||
#include "subsystems/nav.h"
|
||||
|
||||
|
||||
enum border_line_status { LR12, LQC21, LTC2, LQC22, LR21, LQC12, LTC1, LQC11 };
|
||||
static enum border_line_status border_line_status;
|
||||
enum line_border_status { LR12, LQC21, LTC2, LQC22, LR21, LQC12, LTC1, LQC11 };
|
||||
static enum line_border_status line_border_status;
|
||||
|
||||
bool_t border_line_start( void ) {
|
||||
border_line_status = LR12;
|
||||
bool_t nav_line_border_start( void ) {
|
||||
line_border_status = LR12;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool_t border_line_run(uint8_t l1, uint8_t l2, float radius) {
|
||||
bool_t nav_line_border_run(uint8_t l1, uint8_t l2, float radius) {
|
||||
radius = fabs(radius);
|
||||
float alt = waypoints[l1].a;
|
||||
waypoints[l2].a = alt;
|
||||
@@ -80,25 +80,25 @@ bool_t border_line_run(uint8_t l1, uint8_t l2, float radius) {
|
||||
NavVerticalAutoThrottleMode(0);
|
||||
NavVerticalAltitudeMode(WaypointAlt(l1), 0.);
|
||||
|
||||
switch (border_line_status) {
|
||||
switch (line_border_status) {
|
||||
case LR12:
|
||||
NavSegment(l2, l1);
|
||||
if (NavApproachingFrom(l1, l2, CARROT)) {
|
||||
border_line_status = LQC21;
|
||||
line_border_status = LQC21;
|
||||
nav_init_stage();
|
||||
}
|
||||
break;
|
||||
case LQC21:
|
||||
nav_circle_XY(l2_c1.x, l2_c1.y, -radius);
|
||||
if (NavQdrCloseTo(DegOfRad(qdr_out_2_2)-10)) {
|
||||
border_line_status = LTC2;
|
||||
line_border_status = LTC2;
|
||||
nav_init_stage();
|
||||
}
|
||||
break;
|
||||
case LTC2:
|
||||
nav_circle_XY(l2_c2.x, l2_c2.y, radius);
|
||||
if (NavQdrCloseTo(DegOfRad(qdr_out_2_3)-10)) {
|
||||
border_line_status = LR21;
|
||||
line_border_status = LR21;
|
||||
nav_init_stage();
|
||||
}
|
||||
break;
|
||||
@@ -106,7 +106,7 @@ bool_t border_line_run(uint8_t l1, uint8_t l2, float radius) {
|
||||
case LR21:
|
||||
NavSegment(l1, l2);
|
||||
if (NavApproachingFrom(l2, l1, CARROT)) {
|
||||
border_line_status = LTC1;
|
||||
line_border_status = LTC1;
|
||||
nav_init_stage();
|
||||
}
|
||||
break;
|
||||
@@ -114,14 +114,14 @@ bool_t border_line_run(uint8_t l1, uint8_t l2, float radius) {
|
||||
case LTC1:
|
||||
nav_circle_XY(l1_c2.x, l1_c2.y, radius);
|
||||
if (NavQdrCloseTo(DegOfRad(qdr_out_2_1) + 10)) {
|
||||
border_line_status = LQC11;
|
||||
line_border_status = LQC11;
|
||||
nav_init_stage();
|
||||
}
|
||||
break;
|
||||
case LQC11:
|
||||
nav_circle_XY(l1_c3.x, l1_c3.y, -radius);
|
||||
if (NavQdrCloseTo(DegOfRad(qdr_out_2_3 + M_PI + 10))) {
|
||||
border_line_status = LR12;
|
||||
line_border_status = LR12;
|
||||
nav_init_stage();
|
||||
}
|
||||
break;
|
||||
+6
-6
@@ -20,16 +20,16 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file modules/nav/nav_border_line.h
|
||||
* @file modules/nav/nav_line_border.h
|
||||
* @brief navigate along a border line (line 1-2) with turns in the same direction
|
||||
*/
|
||||
|
||||
#ifndef BORDER_LINE_H
|
||||
#define BORDER_LINE_H
|
||||
#ifndef NAV_LINE_BORDER_H
|
||||
#define NAV_LINE_BORDER_H
|
||||
|
||||
#include "std.h"
|
||||
|
||||
extern bool_t border_line_start( void );
|
||||
extern bool_t border_line_run(uint8_t wp1, uint8_t wp2, float radius);
|
||||
extern bool_t nav_line_border_start( void );
|
||||
extern bool_t nav_line_border_run(uint8_t wp1, uint8_t wp2, float radius);
|
||||
|
||||
#endif /* BORDER_LINE_H */
|
||||
#endif /* NAV_LINE_BORDER_H */
|
||||
@@ -61,7 +61,7 @@ static void TranslateAndRotateFromWorld(struct Point2D *p, float Zrot, float tra
|
||||
}
|
||||
|
||||
|
||||
bool_t osam_flight_line_run(uint8_t From_WP, uint8_t To_WP, float radius, float Space_Before, float Space_After)
|
||||
bool_t nav_line_osam_run(uint8_t From_WP, uint8_t To_WP, float radius, float Space_Before, float Space_After)
|
||||
{
|
||||
struct Point2D V;
|
||||
struct Point2D P;
|
||||
@@ -168,11 +168,11 @@ bool_t osam_flight_line_run(uint8_t From_WP, uint8_t To_WP, float radius, float
|
||||
|
||||
static uint8_t FLBlockCount = 0;
|
||||
|
||||
bool_t osam_flight_line_block_run(uint8_t First_WP, uint8_t Last_WP, float radius, float Space_Before, float Space_After)
|
||||
bool_t nav_line_osam_block_run(uint8_t First_WP, uint8_t Last_WP, float radius, float Space_Before, float Space_After)
|
||||
{
|
||||
if(First_WP < Last_WP)
|
||||
{
|
||||
osam_flight_line_run(First_WP+FLBlockCount, First_WP+FLBlockCount+1, radius, Space_Before, Space_After);
|
||||
nav_line_osam_run(First_WP+FLBlockCount, First_WP+FLBlockCount+1, radius, Space_Before, Space_After);
|
||||
|
||||
if(CFLStatus == FLInitialize)
|
||||
{
|
||||
@@ -186,7 +186,7 @@ bool_t osam_flight_line_block_run(uint8_t First_WP, uint8_t Last_WP, float radiu
|
||||
}
|
||||
else
|
||||
{
|
||||
osam_flight_line_run(First_WP-FLBlockCount, First_WP-FLBlockCount-1, radius, Space_Before, Space_After);
|
||||
nav_line_osam_run(First_WP-FLBlockCount, First_WP-FLBlockCount-1, radius, Space_Before, Space_After);
|
||||
|
||||
if(CFLStatus == FLInitialize)
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "std.h"
|
||||
|
||||
extern bool_t osam_flight_line_run(uint8_t From_WP, uint8_t To_WP, float radius, float Space_Before, float Space_After);
|
||||
extern bool_t osam_flight_line_block_run(uint8_t First_WP, uint8_t Last_WP, float radius, float Space_Before, float Space_After);
|
||||
extern bool_t nav_line_osam_run(uint8_t From_WP, uint8_t To_WP, float radius, float Space_Before, float Space_After);
|
||||
extern bool_t nav_line_osam_block_run(uint8_t First_WP, uint8_t Last_WP, float radius, float Space_Before, float Space_After);
|
||||
|
||||
#endif
|
||||
|
||||
+4
-4
@@ -20,11 +20,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file modules/nav/nav_disc_survey.c
|
||||
* @file modules/nav/nav_survey_disc.c
|
||||
*
|
||||
*/
|
||||
|
||||
#include "modules/nav/nav_disc_survey.h"
|
||||
#include "modules/nav/nav_survey_disc.h"
|
||||
|
||||
#include "generated/airframe.h"
|
||||
#include "state.h"
|
||||
@@ -46,7 +46,7 @@ struct DiscSurvey {
|
||||
static struct DiscSurvey disc_survey;
|
||||
|
||||
|
||||
bool_t nav_disc_survey_start( float grid ) {
|
||||
bool_t nav_survey_disc_start( float grid ) {
|
||||
nav_survey_shift = grid;
|
||||
disc_survey.status = DOWNWIND;
|
||||
disc_survey.sign = 1;
|
||||
@@ -55,7 +55,7 @@ bool_t nav_disc_survey_start( float grid ) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool_t nav_disc_survey_run( uint8_t center_wp, float radius) {
|
||||
bool_t nav_survey_disc_run( uint8_t center_wp, float radius) {
|
||||
struct FloatVect2* wind = stateGetHorizontalWindspeed_f();
|
||||
float wind_dir = atan2(wind->x, wind->y) + M_PI;
|
||||
|
||||
+6
-6
@@ -20,16 +20,16 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file modules/nav/nav_disc_survey.h
|
||||
* @file modules/nav/nav_survey_disc.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef NAV_DISC_SURVEY_H
|
||||
#define NAV_DISC_SURVEY_H
|
||||
#ifndef NAV_SURVEY_DISC_H
|
||||
#define NAV_SURVEY_DISC_H
|
||||
|
||||
#include "std.h"
|
||||
|
||||
extern bool_t nav_disc_survey_start( float grid );
|
||||
extern bool_t nav_disc_survey_run(uint8_t c, float radius);
|
||||
extern bool_t nav_survey_disc_start( float grid );
|
||||
extern bool_t nav_survey_disc_run(uint8_t c, float radius);
|
||||
|
||||
#endif /* NAV_DISC_SURVEY_H */
|
||||
#endif /* NAV_SURVEY_DISC_H */
|
||||
+4
-4
@@ -20,11 +20,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file modules/nav/nav_poly_survey_osam.c
|
||||
* @file modules/nav/nav_survey_poly_osam.c
|
||||
*
|
||||
*/
|
||||
|
||||
#include "modules/nav/nav_poly_survey_osam.h"
|
||||
#include "modules/nav/nav_survey_poly_osam.h"
|
||||
|
||||
#include "subsystems/nav.h"
|
||||
#include "state.h"
|
||||
@@ -77,7 +77,7 @@ static float MaxY;
|
||||
uint16_t PolySurveySweepNum;
|
||||
uint16_t PolySurveySweepBackNum;
|
||||
|
||||
bool_t osam_poly_survey_start(uint8_t EntryWP, uint8_t Size, float sw, float Orientation)
|
||||
bool_t nav_survey_poly_osam_start(uint8_t EntryWP, uint8_t Size, float sw, float Orientation)
|
||||
{
|
||||
SmallestCorner.x = 0;
|
||||
SmallestCorner.y = 0;
|
||||
@@ -273,7 +273,7 @@ bool_t osam_poly_survey_start(uint8_t EntryWP, uint8_t Size, float sw, float Ori
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool_t osam_poly_survey_run(void)
|
||||
bool_t nav_survey_poly_osam_run(void)
|
||||
{
|
||||
struct Point2D C;
|
||||
struct Point2D ToP;
|
||||
+5
-5
@@ -20,17 +20,17 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file modules/nav/nav_poly_survey_osam.h
|
||||
* @file modules/nav/nav_survey_poly_osam.h
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef NAV_POLY_SURVEY_OSAM_H
|
||||
#define NAV_POLY_SURVEY_OSAM_H
|
||||
#ifndef NAV_SURVEY_POLY_OSAM_H
|
||||
#define NAV_SURVEY_POLY_OSAM_H
|
||||
|
||||
#include "std.h"
|
||||
|
||||
extern bool_t osam_poly_survey_start(uint8_t FirstWP, uint8_t Size, float Sweep, float Orientation);
|
||||
extern bool_t osam_poly_survey_run(void);
|
||||
extern bool_t nav_survey_poly_osam_start(uint8_t FirstWP, uint8_t Size, float Sweep, float Orientation);
|
||||
extern bool_t nav_survey_poly_osam_run(void);
|
||||
extern uint16_t PolySurveySweepNum;
|
||||
extern uint16_t PolySurveySweepBackNum;
|
||||
|
||||
+4
-4
@@ -20,12 +20,12 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file modules/nav/zamboni_survey.c
|
||||
* @file modules/nav/nav_survey_zamboni.c
|
||||
*
|
||||
* Zamboni pattern survey for fixedwings.
|
||||
*/
|
||||
|
||||
#include "modules/nav/zamboni_survey.h"
|
||||
#include "modules/nav/nav_survey_zamboni.h"
|
||||
|
||||
#include "subsystems/nav.h"
|
||||
#include "autopilot.h"
|
||||
@@ -48,7 +48,7 @@ struct ZamboniSurvey zs;
|
||||
* @param sweep_lines number of sweep_lines to fly
|
||||
* @param altitude the altitude that must be reached before the flyover starts
|
||||
*/
|
||||
bool_t zamboni_survey_start(uint8_t center_wp, uint8_t dir_wp, float sweep_length, float sweep_spacing, int sweep_lines, float altitude)
|
||||
bool_t nav_survey_zamboni_start(uint8_t center_wp, uint8_t dir_wp, float sweep_length, float sweep_spacing, int sweep_lines, float altitude)
|
||||
{
|
||||
zs.current_laps = 0;
|
||||
zs.pre_leave_angle = 2;
|
||||
@@ -121,7 +121,7 @@ bool_t zamboni_survey_start(uint8_t center_wp, uint8_t dir_wp, float sweep_lengt
|
||||
*
|
||||
* @returns TRUE until the survey is finished
|
||||
*/
|
||||
bool_t zamboni_survey_run(void)
|
||||
bool_t nav_survey_zamboni_run(void)
|
||||
{
|
||||
// retain altitude
|
||||
NavVerticalAutoThrottleMode(0.0);
|
||||
+5
-5
@@ -20,13 +20,13 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file modules/nav/zamboni_survey.h
|
||||
* @file modules/nav/nav_survey_zamboni.h
|
||||
*
|
||||
* Zamboni pattern survey for fixedwings.
|
||||
*/
|
||||
|
||||
#ifndef ZAMBONI_SURVEY_H
|
||||
#define ZAMBONI_SURVEY_H
|
||||
#ifndef NAV_SURVEY_ZAMBONI_H
|
||||
#define NAV_SURVEY_ZAMBONI_H
|
||||
|
||||
#include "std.h"
|
||||
#include "math/pprz_algebra_float.h"
|
||||
@@ -70,7 +70,7 @@ struct ZamboniSurvey {
|
||||
};
|
||||
|
||||
|
||||
extern bool_t zamboni_survey_start(uint8_t center_wp, uint8_t dir_wp, float sweep_length, float sweep_spacing, int sweep_lines, float altitude);
|
||||
extern bool_t zamboni_survey_run(void);
|
||||
extern bool_t nav_survey_zamboni_start(uint8_t center_wp, uint8_t dir_wp, float sweep_length, float sweep_spacing, int sweep_lines, float altitude);
|
||||
extern bool_t nav_survey_zamboni_run(void);
|
||||
|
||||
#endif //ZAMBONI_SURVEY_H
|
||||
@@ -40,12 +40,12 @@
|
||||
enum line_status { LR12, LQC21, LTC2, LQC22, LR21, LQC12, LTC1, LQC11 };
|
||||
static enum line_status line_status;
|
||||
|
||||
bool_t vertical_raster_start( void ) {
|
||||
bool_t nav_vertical_raster_start( void ) {
|
||||
line_status = LR12;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool_t vertical_raster_run(uint8_t l1, uint8_t l2, float radius, float AltSweep) {
|
||||
bool_t nav_vertical_raster_run(uint8_t l1, uint8_t l2, float radius, float AltSweep) {
|
||||
radius = fabs(radius);
|
||||
float alt = waypoints[l1].a;
|
||||
waypoints[l2].a = alt;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "std.h"
|
||||
|
||||
extern bool_t vertical_raster_start( void );
|
||||
extern bool_t vertical_raster_run(uint8_t wp1, uint8_t wp2, float radius, float AltSweep);
|
||||
extern bool_t nav_vertical_raster_start( void );
|
||||
extern bool_t nav_vertical_raster_run(uint8_t wp1, uint8_t wp2, float radius, float AltSweep);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user