39 #include "generated/airframe.h"
45 #include "pprzlink/messages.h"
51 #ifndef NAV_CATAPULT_ACCELERATION_THRESHOLD
52 #define NAV_CATAPULT_ACCELERATION_THRESHOLD 1.5
55 #ifndef NAV_CATAPULT_ACCELERATION_DETECTION
56 #define NAV_CATAPULT_ACCELERATION_DETECTION 5
59 #ifndef NAV_CATAPULT_MOTOR_DELAY
60 #define NAV_CATAPULT_MOTOR_DELAY 0.75
63 #ifndef NAV_CATAPULT_HEADING_DELAY
64 #define NAV_CATAPULT_HEADING_DELAY 3.0
67 #ifndef NAV_CATAPULT_INITIAL_PITCH
68 #define NAV_CATAPULT_INITIAL_PITCH RadOfDeg(10)
71 #ifndef NAV_CATAPULT_INITIAL_THROTTLE
72 #define NAV_CATAPULT_INITIAL_THROTTLE 1.0
75 #ifndef NAV_CATAPULT_CLIMB_DISTANCE
76 #define NAV_CATAPULT_CLIMB_DISTANCE 300.
79 #ifndef NAV_CATAPULT_TIMEOUT
80 #define NAV_CATAPULT_TIMEOUT 30.
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;
struct pprz_autopilot autopilot
Global autopilot structure.
Core autopilot interface common to all firmwares.
bool launch
request launch
#define WaypointAlt(_wp)
waypoint altitude in m above MSL
Common code for AP and FBW telemetry.
Fixed wing horizontal control.
void float_rmat_transp_vmult(struct FloatVect3 *vb, struct FloatRMat *m_b2a, struct FloatVect3 *va)
rotate 3D vector by transposed rotation matrix.
static struct NedCoor_f * stateGetAccelNed_f(void)
Get acceleration in NED coordinates (float).
static struct FloatRMat * stateGetNedToBodyRMat_f(void)
Get vehicle body attitude rotation matrix (float).
static struct EnuCoor_f * stateGetPositionEnu_f(void)
Get position in local ENU coordinates (float).
static struct UtmCoor_f * stateGetPositionUtm_f(void)
Get position in UTM coordinates (float).
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 DownlinkSendWpNr(uint8_t _wp)
Fixedwing Navigation library.
#define NavGotoWaypoint(_wp)
#define NavVerticalThrottleMode(_throttle)
Set the vertical mode to fixed throttle with the specified setpoint.
#define NavAttitude(_roll)
#define NavVerticalAltitudeMode(_alt, _pre_climb)
Set the vertical mode to altitude control with the specified altitude setpoint and climb pre-command.
#define NavVerticalAutoThrottleMode(_pitch)
Set the climb control to auto-throttle with the specified pitch pre-command.
#define NAV_CATAPULT_HEADING_DELAY
#define NAV_CATAPULT_ACCELERATION_DETECTION
#define NAV_CATAPULT_MOTOR_DELAY
#define NAV_CATAPULT_INITIAL_THROTTLE
#define NAV_CATAPULT_INITIAL_PITCH
bool nav_catapult_run(uint8_t _climb)
#define NAV_CATAPULT_ACCELERATION_THRESHOLD
#define NAV_CATAPULT_CLIMB_DISTANCE
struct nav_catapult_struct nav_catapult
void nav_catapult_init(void)
#define NAV_CATAPULT_TIMEOUT
void nav_catapult_highrate_module(void)
catapult launch timing system
uint32_t timer
internal timer
@ NAV_CATAPULT_WAIT_ACCEL
@ NAV_CATAPULT_MOTOR_CLIMB
enum nav_catapult_state status
current procedure state
float initial_throttle
throttle during first take-off phase (in radian)
float motor_delay
delay to start motor after launch detection (in seconds)
float heading_delay
delay to estimate initial heading after launch (in seconds)
float initial_pitch
pitch angle during first take-off phase (in radian)
float accel_threshold
acceleration threshold for launch detection (in g)
struct FloatVect3 pos
catapult position
float alt
in meters (above WGS84 reference ellipsoid or above MSL)
API to get/set the generic vehicle states.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.