mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-31 20:38:27 +08:00
[modules] more nav modules cleanup
- rename nav_survey_poly_adv to nav_survey_polygon - nav_bomb.xml is now nav_drop - dox fixes
This commit is contained in:
@@ -60,7 +60,7 @@ twog_1.0 + aspirin + ETS baro + ETS speed
|
||||
<load name="digital_cam.xml">
|
||||
<define name="DC_SHUTTER_LED" value="5"/><!-- led4:aux led5:camsw-->
|
||||
</load>
|
||||
<load name="nav_survey_poly_adv.xml"/>
|
||||
<load name="nav_survey_polygon.xml"/>
|
||||
</modules>
|
||||
|
||||
<!-- ################################################## -->
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
|
||||
<modules>
|
||||
<load name="openlog.xml"/>
|
||||
<load name="nav_survey_poly_adv.xml"/>
|
||||
<load name="nav_survey_polygon.xml"/>
|
||||
<load name="nav_line_border.xml"/>
|
||||
<load name="nav_line.xml"/>
|
||||
<load name="nav_smooth.xml"/>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<load name="nav_line_osam.xml"/>
|
||||
<load name="nav_flower.xml"/>
|
||||
<load name="nav_smooth.xml"/>
|
||||
<load name="nav_survey_poly_adv.xml"/>
|
||||
<load name="nav_survey_polygon.xml"/>
|
||||
<load name="nav_survey_poly_osam.xml"/>
|
||||
<load name="nav_vertical_raster.xml"/>
|
||||
|
||||
|
||||
@@ -82,8 +82,8 @@
|
||||
<call fun="nav_bungee_takeoff_run()"/>
|
||||
</block>
|
||||
<block name="Poly Survey S1-S2" strip_button="Poly Survey">
|
||||
<call fun="nav_survey_poly_adv_start(WP_S1,5,180,30,10,50,100)"/>
|
||||
<call fun="nav_survey_poly_adv_run()"/>
|
||||
<call fun="nav_survey_polygon_start(WP_S1,5,180,30,10,50,100)"/>
|
||||
<call fun="nav_survey_polygon_run()"/>
|
||||
</block>
|
||||
<block name="Border line 1-2" strip_button="Border Line (wp 1-2)">
|
||||
<call fun="nav_line_border_start()"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="nav_bomb" dir="nav">
|
||||
<module name="nav_drop" dir="nav">
|
||||
<doc>
|
||||
<description>
|
||||
Compute the dropping point for a fixedwing aircraft.
|
||||
@@ -9,9 +9,9 @@
|
||||
</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="bomb.h"/>
|
||||
<file name="nav_drop.h"/>
|
||||
</header>
|
||||
<makefile>
|
||||
<file name="bomb.c"/>
|
||||
<file name="nav_drop.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -1,30 +0,0 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="nav_survey_poly_adv" dir="nav">
|
||||
<doc>
|
||||
<description>
|
||||
Advanced polygon survey for fixedwings from Uni Stuttgart.
|
||||
In the flight plan, the survey blocks call init and run functions:
|
||||
1- Initialize the variables needed for the survey to start, with init_poly_survey_adv(first_wp, size,angle, sweep_width, shot_dist, min_rad, altitude):
|
||||
first_wp the first Waypoint of the polygon (WP_waypoint_name)
|
||||
size the number of points that make up the polygon
|
||||
angle angle in which to do the flyovers
|
||||
sweep_width distance between the sweeps
|
||||
shot_dist distance between the shots
|
||||
min_rad minimal radius when navigating
|
||||
altitude the altitude that must be reached before the flyover starts
|
||||
2- Run the survey with poly_survey_adv()
|
||||
Block example:
|
||||
<!--<block name="Poly Survey" strip_button="Poly Survey">
|
||||
<call fun="init_poly_survey_adv(first_wp,size,angle,sweep_width,shot_dist,min_rad,altitude)"/>
|
||||
<call fun="poly_survey_adv()"/>
|
||||
</block>-->
|
||||
</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="nav_survey_poly_adv.h"/>
|
||||
</header>
|
||||
<makefile>
|
||||
<file name="nav_survey_poly_adv.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -0,0 +1,35 @@
|
||||
<!DOCTYPE module SYSTEM "module.dtd">
|
||||
|
||||
<module name="nav_survey_polygon" dir="nav">
|
||||
<doc>
|
||||
<description>
|
||||
Survey a polygon with a fixedwing.
|
||||
From Uni Stuttgart.
|
||||
In the flight plan, the survey blocks call init and run functions:
|
||||
1. Initialize the variables needed for the survey to start, with nav_survey_polygon_start(first_wp, size, angle, sweep_width, shot_dist, min_rad, altitude):
|
||||
- first_wp the first Waypoint of the polygon (WP_waypoint_name)
|
||||
- size the number of points that make up the polygon
|
||||
- angle angle in which to do the flyovers
|
||||
- sweep_width distance between the sweeps
|
||||
- shot_dist distance between the shots
|
||||
- min_rad minimal radius when navigating
|
||||
- altitude the altitude that must be reached before the flyover starts
|
||||
2. Run the survey with nav_survey_polygon_run()
|
||||
<!--
|
||||
Block example:
|
||||
@verbatim
|
||||
<block name="Poly Survey" strip_button="Poly Survey">
|
||||
<call fun="nav_survey_polygon_start(first_wp, size, angle, sweep_width, shot_dist, min_rad, altitude)"/>
|
||||
<call fun="nav_survey_polygon_run()"/>
|
||||
</block>
|
||||
@endverbatim
|
||||
-->
|
||||
</description>
|
||||
</doc>
|
||||
<header>
|
||||
<file name="nav_survey_polygon.h"/>
|
||||
</header>
|
||||
<makefile>
|
||||
<file name="nav_survey_polygon.c"/>
|
||||
</makefile>
|
||||
</module>
|
||||
@@ -1,5 +1,4 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2012, Tobias Münch
|
||||
*
|
||||
* This file is part of paparazzi.
|
||||
@@ -21,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file subsystems/navigation/gls.c
|
||||
* @file modules/nav/nav_gls.c
|
||||
* @brief gps landing system
|
||||
*
|
||||
* gps landing system
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file modules/nav/nav_osam.c
|
||||
* @file modules/nav/nav_line_osam.c
|
||||
*
|
||||
* Flight line from OSAM advanced navigation routines
|
||||
*
|
||||
* TODO compare with normal flight line
|
||||
* @todo compare with normal flight line
|
||||
*/
|
||||
|
||||
#include "modules/nav/nav_line_osam.h"
|
||||
|
||||
+5
-5
@@ -20,13 +20,13 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file modules/nav/nav_survey_poly_adv.c
|
||||
* @file modules/nav/nav_survey_polygon.c
|
||||
*
|
||||
* Advanced polygon survey for fixedwings from Uni Stuttgart.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "nav_survey_poly_adv.h"
|
||||
#include "nav_survey_polygon.h"
|
||||
|
||||
#include "subsystems/nav.h"
|
||||
#include "state.h"
|
||||
@@ -129,7 +129,7 @@ static bool_t get_two_intersects(struct FloatVect2 *x, struct FloatVect2 *y, str
|
||||
* @param min_rad minimal radius when navigating
|
||||
* @param altitude the altitude that must be reached before the flyover starts
|
||||
**/
|
||||
bool_t nav_survey_poly_adv_start(uint8_t first_wp, uint8_t size, float angle, float sweep_width, float shot_dist, float min_rad, float altitude)
|
||||
bool_t nav_survey_polygon_start(uint8_t first_wp, uint8_t size, float angle, float sweep_width, float shot_dist, float min_rad, float altitude)
|
||||
{
|
||||
int i;
|
||||
struct FloatVect2 small, sweep;
|
||||
@@ -228,9 +228,9 @@ bool_t nav_survey_poly_adv_start(uint8_t first_wp, uint8_t size, float angle, fl
|
||||
/**
|
||||
* main navigation routine. This is called periodically evaluates the current
|
||||
* Position and stage and navigates accordingly.
|
||||
* Returns True until the survey is finished
|
||||
* @returns True until the survey is finished
|
||||
*/
|
||||
bool_t nav_survey_poly_adv_run(void)
|
||||
bool_t nav_survey_polygon_run(void)
|
||||
{
|
||||
NavVerticalAutoThrottleMode(0.0);
|
||||
NavVerticalAltitudeMode(survey.psa_altitude, 0.0);
|
||||
+7
-7
@@ -20,14 +20,14 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file modules/nav/nav_survey_poly_adv.h
|
||||
* @file modules/nav/nav_survey_polygon.h
|
||||
*
|
||||
* Advanced polygon survey for fixedwings from Uni Stuttgart.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef POLY_ADV_H
|
||||
#define POLY_ADV_H
|
||||
#ifndef NAV_SURVEY_POLYGON_H
|
||||
#define NAV_SURVEY_POLYGON_H
|
||||
|
||||
#include "std.h"
|
||||
#include "math/pprz_algebra_float.h"
|
||||
@@ -45,8 +45,8 @@
|
||||
enum SurveyStage {ERR, ENTRY, SEG, TURN1, RET, TURN2};
|
||||
|
||||
struct SurveyPolyAdv {
|
||||
/*
|
||||
The following variables are set by poly_survey_init and not changed later on
|
||||
/*
|
||||
The following variables are set by nav_survey_polygon_start and not changed later on
|
||||
*/
|
||||
|
||||
// precomputed vectors to ease calculations
|
||||
@@ -82,7 +82,7 @@ struct SurveyPolyAdv {
|
||||
struct FloatVect2 ret_end;
|
||||
};
|
||||
|
||||
extern bool_t nav_survey_poly_adv_start(uint8_t first_wp, uint8_t size, float angle, float sweep_width, float shot_dist, float min_rad, float altitude);
|
||||
extern bool_t nav_survey_poly_adv_run(void);
|
||||
extern bool_t nav_survey_polygon_start(uint8_t first_wp, uint8_t size, float angle, float sweep_width, float shot_dist, float min_rad, float altitude);
|
||||
extern bool_t nav_survey_polygon_run(void);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user