 |
Paparazzi UAS
v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
28 #include "generated/flight_plan.h"
58 #ifdef InGeofenceSector
73 if (dist_to_home > 1.
f) {
80 float wind_to_home = (wind.
x * vect_to_home.
x + wind.
y * vect_to_home.
y) / dist_to_home;
82 float airspeed = NOMINAL_AIRSPEED;
87 float gspeed_to_home = wind_to_home + airspeed;
88 if (gspeed_to_home > 1.) {
89 return dist_to_home / gspeed_to_home;
148 for (i = 0; i < NB_WAYPOINT; i++) {
void common_nav_periodic_task()
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
void nav_send_waypoint(uint8_t wp_id)
Send a waypoint throught default telemetry channel.
static float previous_ground_alt
void WEAK ins_reset_utm_zone(struct UtmCoor_f *utm)
INS utm zone reset.
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
void nav_reset_alt(void)
Reset the altitude reference to the current GPS alt.
struct point waypoints[NB_WAYPOINT]
size == nb_waypoint, waypoint 0 is a dummy waypoint
Paparazzi floating point math for geodetic calculations.
static float float_vect2_norm(struct FloatVect2 *v)
void nav_reset_reference(void)
Reset the geographic reference to the current GPS fix.
void nav_reset_utm_zone(void)
Reset the UTM zone to current GPS fix.
float alt
in meters (above WGS84 reference ellipsoid or above MSL)
const uint8_t nb_waypoint
uint8_t zone
UTM zone number.
static float stateGetAirspeed_f(void)
Get airspeed (float).
static bool stateIsAirspeedValid(void)
test if air speed is available.
#define NAVIGATION_FREQUENCY
Default fixedwing navigation frequency.
vector in East North Up coordinates Units: meters
float dist2_to_wp
squared distance to next waypoint
void nav_move_waypoint(uint8_t wp_id, float ux, float uy, float alt)
Move a waypoint to given UTM coordinates.
static bool stateIsWindspeedValid(void)
test if wind speed is available.
void nav_update_waypoints_alt(void)
Shift altitude of the waypoint according to a new ground altitude.
void nav_move_waypoint_enu(uint8_t wp_id, float x, float y, float alt)
Move a waypoint in local frame.
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)
Common code for AP and FBW telemetry.
static struct FloatVect2 * stateGetHorizontalWindspeed_f(void)
Get horizontal windspeed (float).
float dist2_to_home
squared distance to home waypoint
int int32_t
Typedef defining 32 bit int type.
void WEAK ins_reset_altitude_ref(void)
INS altitude reference reset.
float ground_alt
size == nb_waypoint, waypoint 0 is a dummy waypoint
position in UTM coordinates Units: meters
struct UtmCoor_f utm_origin_f
Definition of the origin of Utm coordinate system.
void compute_dist2_to_home(void)
Computes squared distance to the HOME waypoint.
void WEAK ins_reset_local_origin(void)
INS local origin reset.
void nav_move_waypoint_point(uint8_t wp_id, struct point *p)
Move a waypoint from point structure (local frame).
float get_time_to_home(void)
Compute time to home use wind and airspeed when available.