32 #include "generated/modules.h"
56 #ifndef NPS_BYPASS_AHRS
57 #define NPS_BYPASS_AHRS FALSE
60 #ifndef NPS_BYPASS_INS
61 #define NPS_BYPASS_INS FALSE
100 #if RADIO_CONTROL && !RADIO_CONTROL_TYPE_DATALINK
119 float pressure = (float)
sensors.baro.value;
128 #if USE_AIRSPEED || USE_NPS_AIRSPEED
143 float dist = (float)
sensors.sonar.value;
146 #ifdef SENSOR_SYNC_SEND_SONAR
156 #if USE_NPS_AOA && !NPS_SYNC_INCIDENCE
164 #if USE_NPS_SIDESLIP && !NPS_SYNC_INCIDENCE
172 #if NPS_SYNC_INCIDENCE && USE_NPS_AOA && USE_NPS_SIDESLIP
201 #ifdef NPS_ACTUATOR_NAMES
212 PRINT_CONFIG_MSG(
"Using throttle, roll, pitch, yaw commands instead of explicit actuators.")
213 PRINT_CONFIG_VAR(COMMAND_THROTTLE)
214 PRINT_CONFIG_VAR(COMMAND_ROLL)
215 PRINT_CONFIG_VAR(COMMAND_PITCH)
222 PRINT_CONFIG_VAR(COMMAND_YAW)
259 utm.
zone = (lla.
lon / 1e7 + 180) / 6 + 1;
Main include for ABI (AirBorneInterface).
#define BARO_SIM_SENDER_ID
struct pprz_autopilot autopilot
Global autopilot structure.
Core autopilot interface common to all firmwares.
bool launch
request launch
bool kill_throttle
allow autopilot to use throttle
static void sys_tick_handler(void)
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
pprz_t commands[COMMANDS_NB]
Hardware independent code for commands handling.
Handling of messages coming from ground and other A/Cs.
Common code for AP and FBW telemetry.
Device independent GPS code (interface)
void gps_feed_value(void)
#define RATES_COPY(_a, _b)
#define QUAT_COPY(_qo, _qi)
#define VECT3_COPY(_a, _b)
#define LLA_COPY(_pos1, _pos2)
static void stateSetAccelNed_f(struct NedCoor_f *ned_accel)
Set acceleration in NED coordinates (float).
static void stateSetNedToBodyQuat_f(struct FloatQuat *ned_to_body_quat)
Set vehicle body attitude from quaternion (float).
bool ned_initialized_f
True if local float coordinate frame is initialsed.
bool utm_initialized_f
True if utm origin (float) coordinate frame is initialsed.
bool ned_initialized_i
true if local int coordinate frame is initialsed
static void stateSetPositionNed_f(struct NedCoor_f *ned_pos)
Set position from local NED coordinates (float).
static void stateSetPositionUtm_f(struct UtmCoor_f *utm_pos)
Set position from UTM coordinates (float).
static void stateSetBodyRates_f(struct FloatRates *body_rate)
Set vehicle body angular rate (float).
static void stateSetSpeedNed_f(struct NedCoor_f *ned_speed)
Set ground speed in local NED coordinates (float).
Inertial Measurement Unit interface.
void imu_feed_gyro_accel(void)
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
void main_ap_periodic(void)
double commands[NPS_COMMANDS_NB]
#define NPS_COMMANDS_NB
Number of commands sent to the FDM of NPS.
struct NpsAutopilot nps_autopilot
void nps_autopilot_run_step(double time)
void nps_autopilot_init(enum NpsRadioControlType type_rc, int num_rc_script, char *rc_dev)
void sim_overwrite_ins(void)
void nps_autopilot_run_systime_step(void)
void sim_overwrite_ahrs(void)
void nps_electrical_init(void)
void nps_electrical_run_step(double time)
Electrical status (bat voltage) for NPS.
struct NedCoor_d ltpprz_ecef_vel
velocity in ltppprz frame, wrt ECEF frame
struct NedCoor_d ltpprz_pos
struct NedCoor_d ltpprz_ecef_accel
accel in ltppprz frame, wrt ECEF frame
struct DoubleQuat ltp_to_body_quat
struct DoubleRates body_ecef_rotvel
struct NpsFdm fdm
Holds all necessary NPS FDM state information.
void nps_radio_control_init(enum NpsRadioControlType type, int num_script, char *js_dev)
bool nps_radio_control_available(double time)
bool nps_sensors_airspeed_available(void)
bool nps_sensors_sonar_available(void)
bool nps_sensors_mag_available(void)
bool nps_sensors_gps_available(void)
bool nps_sensors_sideslip_available(void)
bool nps_sensors_aoa_available(void)
bool nps_sensors_baro_available(void)
bool nps_sensors_gyro_available(void)
bool nps_sensors_temperature_available(void)
void utm_of_lla_f(struct UtmCoor_f *utm, struct LlaCoor_f *lla)
uint8_t zone
UTM zone number.
vector in Latitude, Longitude and Altitude
vector in North East Down coordinates Units: meters
position in UTM coordinates Units: meters
Generic interface for radio control modules.
void radio_control_feed(void)
API to get/set the generic vehicle states.
Architecture independent timing functions.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.