|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
39 #include "generated/airframe.h"
45 #include "pprzlink/messages.h"
51 #ifndef NAV_CATAPULT_ACCELERATION_THRESHOLD
52 #define NAV_CATAPULT_ACCELERATION_THRESHOLD 1.5 // in g
55 #ifndef NAV_CATAPULT_ACCELERATION_DETECTION
56 #define NAV_CATAPULT_ACCELERATION_DETECTION 5 // number of valid measurements for launch detection
59 #ifndef NAV_CATAPULT_MOTOR_DELAY
60 #define NAV_CATAPULT_MOTOR_DELAY 0.75 // in seconds
63 #ifndef NAV_CATAPULT_HEADING_DELAY
64 #define NAV_CATAPULT_HEADING_DELAY 3.0 // in seconds
67 #ifndef NAV_CATAPULT_INITIAL_PITCH
68 #define NAV_CATAPULT_INITIAL_PITCH RadOfDeg(10) // in radians
71 #ifndef NAV_CATAPULT_INITIAL_THROTTLE
72 #define NAV_CATAPULT_INITIAL_THROTTLE 1.0 // [0, 1]
75 #ifndef NAV_CATAPULT_CLIMB_DISTANCE
76 #define NAV_CATAPULT_CLIMB_DISTANCE 300. // distance of the climb point ahead of catapult
79 #ifndef NAV_CATAPULT_TIMEOUT
80 #define NAV_CATAPULT_TIMEOUT 30. // disarm timeout (in seconds)
151 nav_catapult_nav_catapult_highrate_module_status = MODULES_STOP;
164 if (nav_catapult_nav_catapult_highrate_module_status != MODULES_RUN) {
165 nav_catapult_nav_catapult_highrate_module_status = MODULES_START;
193 float dir_L = sqrtf(dir_x * dir_x + dir_y * dir_y);
214 nav_catapult_nav_catapult_highrate_module_status = MODULES_STOP;
@ NAV_CATAPULT_MOTOR_CLIMB
bool nav_catapult_run(uint8_t _climb)
static struct NedCoor_f * stateGetAccelNed_f(void)
Get acceleration in NED coordinates (float).
void nav_catapult_init(void)
struct nav_catapult_struct nav_catapult
#define NAV_CATAPULT_HEADING_DELAY
float initial_throttle
throttle during first take-off phase (in radian)
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
uint32_t timer
internal timer
#define NavVerticalThrottleMode(_throttle)
Set the vertical mode to fixed throttle with the specified setpoint.
catapult launch timing system
static struct UtmCoor_f * stateGetPositionUtm_f(void)
Get position in UTM coordinates (float).
#define NAV_CATAPULT_INITIAL_THROTTLE
#define NavVerticalAutoThrottleMode(_pitch)
Set the climb control to auto-throttle with the specified pitch pre-command.
void float_rmat_transp_vmult(struct FloatVect3 *vb, struct FloatRMat *m_b2a, struct FloatVect3 *va)
rotate 3D vector by transposed rotation matrix.
#define NAV_CATAPULT_TIMEOUT
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
#define NAV_CATAPULT_MOTOR_DELAY
#define NAV_CATAPULT_ACCELERATION_THRESHOLD
struct pprz_autopilot autopilot
Global autopilot structure.
float alt
in meters (above WGS84 reference ellipsoid or above MSL)
void DownlinkSendWpNr(uint8_t _wp)
float heading_delay
delay to estimate initial heading after launch (in seconds)
float accel_threshold
acceleration threshold for launch detection (in g)
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 FloatRMat * stateGetNedToBodyRMat_f(void)
Get vehicle body attitude rotation matrix (float).
#define NAV_CATAPULT_ACCELERATION_DETECTION
float initial_pitch
pitch angle during first take-off phase (in radian)
#define NAV_CATAPULT_CLIMB_DISTANCE
#define WaypointAlt(_wp)
waypoint altitude in m above MSL
struct FloatVect3 pos
catapult position
bool nav_approaching_xy(float x, float y, float from_x, float from_y, float approaching_time)
Decide if the UAV is approaching the current waypoint.
void nav_catapult_highrate_module(void)
#define NAV_CATAPULT_INITIAL_PITCH
float motor_delay
delay to start motor after launch detection (in seconds)
@ NAV_CATAPULT_WAIT_ACCEL
#define NavAttitude(_roll)
#define NavGotoWaypoint(_wp)
bool launch
request launch
#define NavVerticalAltitudeMode(_alt, _pre_climb)
Set the vertical mode to altitude control with the specified altitude setpoint and climb pre-command.
enum nav_catapult_state status
current procedure state