|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
27 #define Fbw(f) f ## _fbw()
34 #define Ap(f) f ## _ap()
67 #ifndef NPS_BYPASS_AHRS
68 #define NPS_BYPASS_AHRS FALSE
71 #ifndef NPS_BYPASS_INS
72 #define NPS_BYPASS_INS FALSE
76 #if !defined (FBW) || !defined (AP)
77 #error NPS does not currently support dual processor simulation for FBW and AP on fixedwing!
111 #if RADIO_CONTROL && !RADIO_CONTROL_TYPE_DATALINK
113 radio_control_feed();
132 float pressure = (float)
sensors.baro.value;
142 #if USE_AIRSPEED || USE_NPS_AIRSPEED
159 float dist = (float)
sensors.sonar.value;
162 #ifdef SENSOR_SYNC_SEND_SONAR
173 #if USE_NPS_AOA && !NPS_SYNC_INCIDENCE
182 #if USE_NPS_SIDESLIP && !NPS_SYNC_INCIDENCE
191 #if NPS_SYNC_INCIDENCE && USE_NPS_AOA && USE_NPS_SIDESLIP
222 #ifdef NPS_ACTUATOR_NAMES
233 PRINT_CONFIG_MSG(
"Using throttle, roll, pitch, yaw commands instead of explicit actuators.")
234 PRINT_CONFIG_VAR(COMMAND_THROTTLE)
235 PRINT_CONFIG_VAR(COMMAND_ROLL)
236 PRINT_CONFIG_VAR(COMMAND_PITCH)
243 PRINT_CONFIG_VAR(COMMAND_YAW)
280 utm.
zone = (lla.
lon / 1e7 + 180) / 6 + 1;
#define NPS_COMMANDS_NB
Number of commands sent to the FDM of NPS.
bool nps_sensors_aoa_available(void)
vector in North East Down coordinates Units: meters
bool nps_sensors_sonar_available(void)
static void stateSetSpeedNed_f(struct NedCoor_f *ned_speed)
Set ground speed in local NED coordinates (float).
bool nps_sensors_sideslip_available(void)
#define LLA_COPY(_pos1, _pos2)
bool nps_sensors_gyro_available(void)
struct NedCoor_d ltpprz_ecef_vel
velocity in ltppprz frame, wrt ECEF frame
void nps_autopilot_run_systime_step(void)
bool nps_sensors_temperature_available(void)
struct NedCoor_d ltpprz_ecef_accel
accel in ltppprz frame, wrt ECEF frame
static void stateSetPositionUtm_f(struct UtmCoor_f *utm_pos)
Set position from UTM coordinates (float).
struct DoubleQuat ltp_to_body_quat
bool nps_sensors_mag_available(void)
void imu_feed_gyro_accel(void)
bool nps_sensors_baro_available(void)
bool ned_initialized_i
true if local int coordinate frame is initialsed
void utm_of_lla_f(struct UtmCoor_f *utm, struct LlaCoor_f *lla)
bool nps_sensors_airspeed_available(void)
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
struct NpsFdm fdm
Holds all necessary NPS FDM state information.
void sim_overwrite_ahrs(void)
struct DoubleRates body_ecef_rotvel
#define BARO_SIM_SENDER_ID
Device independent GPS code (interface)
struct pprz_autopilot autopilot
Global autopilot structure.
uint8_t zone
UTM zone number.
void gps_feed_value(void)
static void stateSetBodyRates_f(struct FloatRates *body_rate)
Set vehicle body angular rate (float).
bool utm_initialized_f
True if utm origin (float) coordinate frame is initialsed.
bool nps_sensors_gps_available(void)
Architecture independent timing functions.
void nps_radio_control_init(enum NpsRadioControlType type, int num_script, char *js_dev)
void nps_electrical_run_step(double time)
struct NpsAutopilot nps_autopilot
void sim_overwrite_ins(void)
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 const ShellCommand commands[]
static void stateSetAccelNed_f(struct NedCoor_f *ned_accel)
Set acceleration in NED coordinates (float).
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
#define QUAT_COPY(_qo, _qi)
bool nps_radio_control_available(double time)
void nps_electrical_init(void)
struct NedCoor_d ltpprz_pos
static void stateSetPositionNed_f(struct NedCoor_f *ned_pos)
Set position from local NED coordinates (float).
position in UTM coordinates Units: meters
void nps_autopilot_init(enum NpsRadioControlType type_rc, int num_rc_script, char *rc_dev)
bool ned_initialized_f
True if local float coordinate frame is initialsed.
Handling of messages coming from ground and other A/Cs.
Hardware independent code for commands handling.
double commands[NPS_COMMANDS_NB]
#define RATES_COPY(_a, _b)
void nps_autopilot_run_step(double time)
static void sys_tick_handler(void)
bool kill_throttle
allow autopilot to use throttle
bool launch
request launch
#define VECT3_COPY(_a, _b)
STATIC_INLINE void handle_periodic_tasks(void)
static void stateSetNedToBodyQuat_f(struct FloatQuat *ned_to_body_quat)
Set vehicle body attitude from quaternion (float).
vector in Latitude, Longitude and Altitude