Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
|
Navigation functions for cartography of the ground. More...
#include "state.h"
#include "stdio.h"
#include "firmwares/fixedwing/nav.h"
#include "generated/flight_plan.h"
#include "std.h"
#include "modules/cartography/cartography.h"
#include "generated/modules.h"
#include "subsystems/datalink/downlink.h"
#include "mcu_periph/uart.h"
Go to the source code of this file.
Macros | |
#define | PRTDEB(TYPE, EXP) ; |
#define | PRTDEBSTR(EXP) ; |
#define | DISTXY(P1X, P1Y, P2X, P2Y) (sqrt( ( (P2X-P1X) * (P2X-P1X) ) + ( (P2Y-P1Y) * (P2Y-P1Y) ) ) ) |
#define | NORMXY(P1X, P1Y) (sqrt( ( (P1X) * (P1X) ) + ( (P1Y) * (P1Y) ) ) ) |
#define | DISTLIMIT 30 |
#define | USE_ONBOARD_CAMERA 1 |
Functions | |
void | init_carto (void) |
Automatic survey of an oriented rectangle (defined by three points) More... | |
void | periodic_downlink_carto (void) |
void | start_carto (void) |
void | stop_carto (void) |
bool | nav_survey_Inc_railnumberSinceBoot (void) |
bool | nav_survey_Snapshoot (void) |
bool | nav_survey_Snapshoot_Continu (void) |
bool | nav_survey_StopSnapshoot (void) |
bool | nav_survey_computefourth_corner (uint8_t wp1, uint8_t wp2, uint8_t wp3, uint8_t wp4) |
bool | nav_survey_ComputeProjectionOnLine (struct point pointAf, struct point pointBf, float pos_xf, float pos_yf, float *normAMf, float *normBMf, float *distancefromrailf) |
bool | nav_survey_losange_carto_init (uint8_t wp1, uint8_t wp2, uint8_t wp3, float distrailinit, float distplusinit) |
bool | nav_survey_losange_carto (void) |
Variables | |
uint16_t | railnumberSinceBoot |
uint16_t | camera_snapshot_image_number = 0 |
bool | survey_losange_uturn |
int | railnumber |
int | numberofrailtodo |
float | distrail |
float | distplus |
float | distrailinteractif |
static struct point point1 point2 | point3 |
static struct point pointA pointB | pointC |
static struct point vec12 | vec13 |
float | norm12 |
float | norm13 |
float | tempx |
float | tempy |
float | angle1213 |
float | signforturn |
float | tempcircleradius |
float | circleradiusmin = 40 |
float | normBM |
float | normAM |
float | distancefromrail |
float | course_next_rail |
float | angle_between |
bool | ProjectionInsideLimitOfRail |
Navigation functions for cartography of the ground.
Definition in file cartography.c.
#define DISTLIMIT 30 |
Definition at line 80 of file cartography.c.
Referenced by nav_survey_losange_carto().
#define DISTXY | ( | P1X, | |
P1Y, | |||
P2X, | |||
P2Y | |||
) | (sqrt( ( (P2X-P1X) * (P2X-P1X) ) + ( (P2Y-P1Y) * (P2Y-P1Y) ) ) ) |
Definition at line 71 of file cartography.c.
Referenced by nav_survey_ComputeProjectionOnLine(), and nav_survey_losange_carto().
#define NORMXY | ( | P1X, | |
P1Y | |||
) | (sqrt( ( (P1X) * (P1X) ) + ( (P1Y) * (P1Y) ) ) ) |
Definition at line 74 of file cartography.c.
Referenced by nav_survey_ComputeProjectionOnLine(), and nav_survey_losange_carto_init().
#define PRTDEB | ( | TYPE, | |
EXP | |||
) | ; |
Definition at line 54 of file cartography.c.
Referenced by nav_survey_computefourth_corner(), nav_survey_ComputeProjectionOnLine(), nav_survey_losange_carto(), and nav_survey_losange_carto_init().
#define PRTDEBSTR | ( | EXP | ) | ; |
Definition at line 57 of file cartography.c.
Referenced by nav_survey_computefourth_corner(), nav_survey_ComputeProjectionOnLine(), nav_survey_losange_carto(), nav_survey_Snapshoot(), nav_survey_Snapshoot_Continu(), and nav_survey_StopSnapshoot().
#define USE_ONBOARD_CAMERA 1 |
Definition at line 89 of file cartography.c.
void init_carto | ( | void | ) |
Automatic survey of an oriented rectangle (defined by three points)
Definition at line 148 of file cartography.c.
Definition at line 211 of file cartography.c.
References nav_survey_computefourth_corner(), PRTDEB, PRTDEBSTR, waypoints, point::x, and point::y.
Referenced by nav_survey_computefourth_corner().
bool nav_survey_ComputeProjectionOnLine | ( | struct point | pointAf, |
struct point | pointBf, | ||
float | pos_xf, | ||
float | pos_yf, | ||
float * | normAMf, | ||
float * | normBMf, | ||
float * | distancefromrailf | ||
) |
Definition at line 227 of file cartography.c.
References point::a, DISTXY, NORMXY, PRTDEB, PRTDEBSTR, point::x, and point::y.
Referenced by nav_survey_losange_carto().
bool nav_survey_Inc_railnumberSinceBoot | ( | void | ) |
Definition at line 177 of file cartography.c.
References railnumberSinceBoot.
bool nav_survey_losange_carto | ( | void | ) |
Definition at line 423 of file cartography.c.
References angle_between, camera_snapshot_image_number, circleradiusmin, course_next_rail, distancefromrail, DISTLIMIT, distplus, distrail, DISTXY, FALSE, nav_route_xy(), nav_survey_ComputeProjectionOnLine(), nav_survey_losange_carto(), NavCircleWaypoint, norm12, norm13, normAM, normBM, numberofrailtodo, pointC, ProjectionInsideLimitOfRail, PRTDEB, PRTDEBSTR, railnumber, railnumberSinceBoot, signforturn, stateGetHorizontalSpeedDir_f(), stateGetPositionEnu_f(), survey_losange_uturn, tempcircleradius, tempx, tempy, UTURN, vec13, waypoints, point::x, and point::y.
Referenced by nav_survey_losange_carto().
bool nav_survey_losange_carto_init | ( | uint8_t | wp1, |
uint8_t | wp2, | ||
uint8_t | wp3, | ||
float | distrailinit, | ||
float | distplusinit | ||
) |
Definition at line 322 of file cartography.c.
References angle1213, distplus, distrail, norm12, norm13, NORMXY, numberofrailtodo, point3, PRTDEB, railnumber, railnumberSinceBoot, signforturn, survey_losange_uturn, vec13, waypoints, point::x, and point::y.
bool nav_survey_Snapshoot | ( | void | ) |
Definition at line 183 of file cartography.c.
References camera_snapshot_image_number, PRTDEBSTR, and railnumberSinceBoot.
bool nav_survey_Snapshoot_Continu | ( | void | ) |
Definition at line 192 of file cartography.c.
References camera_snapshot_image_number, PRTDEBSTR, and railnumberSinceBoot.
bool nav_survey_StopSnapshoot | ( | void | ) |
Definition at line 201 of file cartography.c.
References camera_snapshot_image_number, PRTDEBSTR, and STOP.
void periodic_downlink_carto | ( | void | ) |
Definition at line 152 of file cartography.c.
References camera_snapshot_image_number, DefaultChannel, and DefaultDevice.
void start_carto | ( | void | ) |
Definition at line 166 of file cartography.c.
void stop_carto | ( | void | ) |
Definition at line 170 of file cartography.c.
float angle1213 |
Definition at line 120 of file cartography.c.
Referenced by nav_survey_losange_carto_init().
float angle_between |
Definition at line 131 of file cartography.c.
Referenced by nav_survey_losange_carto().
uint16_t camera_snapshot_image_number = 0 |
Definition at line 92 of file cartography.c.
Referenced by nav_survey_losange_carto(), nav_survey_Snapshoot(), nav_survey_Snapshoot_Continu(), nav_survey_StopSnapshoot(), and periodic_downlink_carto().
float circleradiusmin = 40 |
Definition at line 124 of file cartography.c.
Referenced by nav_survey_losange_carto().
float course_next_rail |
Definition at line 130 of file cartography.c.
Referenced by nav_survey_losange_carto().
float distancefromrail |
Definition at line 127 of file cartography.c.
Referenced by nav_survey_losange_carto().
float distplus |
Definition at line 105 of file cartography.c.
Referenced by nav_survey_losange_carto(), and nav_survey_losange_carto_init().
float distrail |
Definition at line 104 of file cartography.c.
Referenced by nav_survey_losange_carto(), and nav_survey_losange_carto_init().
float distrailinteractif |
Definition at line 107 of file cartography.c.
float norm12 |
Definition at line 114 of file cartography.c.
Referenced by nav_survey_losange_carto(), and nav_survey_losange_carto_init().
float norm13 |
Definition at line 114 of file cartography.c.
Referenced by nav_survey_losange_carto(), and nav_survey_losange_carto_init().
float normAM |
Definition at line 127 of file cartography.c.
Referenced by nav_survey_losange_carto().
float normBM |
Definition at line 127 of file cartography.c.
Referenced by nav_survey_losange_carto().
int numberofrailtodo |
Definition at line 102 of file cartography.c.
Referenced by nav_survey_losange_carto(), and nav_survey_losange_carto_init().
|
static |
Definition at line 111 of file cartography.c.
Referenced by nav_survey_losange_carto_init().
|
static |
Definition at line 112 of file cartography.c.
Referenced by nav_survey_losange_carto().
bool ProjectionInsideLimitOfRail |
Definition at line 133 of file cartography.c.
Referenced by nav_survey_losange_carto().
int railnumber |
Definition at line 101 of file cartography.c.
Referenced by nav_survey_losange_carto(), and nav_survey_losange_carto_init().
uint16_t railnumberSinceBoot |
Definition at line 84 of file cartography.c.
Referenced by nav_survey_Inc_railnumberSinceBoot(), nav_survey_losange_carto(), nav_survey_losange_carto_init(), nav_survey_Snapshoot(), and nav_survey_Snapshoot_Continu().
float signforturn |
Definition at line 121 of file cartography.c.
Referenced by nav_survey_losange_carto(), and nav_survey_losange_carto_init().
bool survey_losange_uturn |
Definition at line 99 of file cartography.c.
Referenced by nav_survey_losange_carto(), and nav_survey_losange_carto_init().
float tempcircleradius |
Definition at line 123 of file cartography.c.
Referenced by nav_survey_losange_carto().
float tempx |
Definition at line 119 of file cartography.c.
Referenced by nav_survey_losange_carto().
float tempy |
Definition at line 119 of file cartography.c.
Referenced by nav_survey_losange_carto().
|
static |
Definition at line 113 of file cartography.c.
Referenced by nav_survey_losange_carto(), and nav_survey_losange_carto_init().