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();
141 #if USE_AIRSPEED || USE_NPS_AIRSPEED
196 #ifdef NPS_ACTUATOR_NAMES
207 PRINT_CONFIG_MSG(
"Using throttle, roll, pitch, yaw commands instead of explicit actuators.")
208 PRINT_CONFIG_VAR(COMMAND_THROTTLE)
209 PRINT_CONFIG_VAR(COMMAND_ROLL)
210 PRINT_CONFIG_VAR(COMMAND_PITCH)
217 PRINT_CONFIG_VAR(COMMAND_YAW)
254 utm.
zone = (lla.
lon / 1e7 + 180) / 6 + 1;
bool launch
request launch
bool utm_initialized_f
True if utm origin (float) coordinate frame is initialsed.
struct NedCoor_d ltpprz_ecef_accel
accel in ltppprz frame, wrt ECEF frame
bool nps_sensors_gps_available(void)
bool nps_sensors_aoa_available(void)
void nps_autopilot_run_systime_step(void)
struct DoubleRates body_ecef_rotvel
struct NpsFdm fdm
Holds all necessary NPS FDM state information.
void nps_electrical_run_step(double time)
bool nps_sensors_mag_available(void)
#define NPS_COMMANDS_NB
Number of commands sent to the FDM of NPS.
#define VECT3_COPY(_a, _b)
bool ned_initialized_f
True if local float coordinate frame is initialsed.
bool nps_sensors_baro_available(void)
Handling of messages coming from ground and other A/Cs.
Main include for ABI (AirBorneInterface).
double value
airspeed reading in meters/second
struct NpsSensorBaro baro
static void stateSetNedToBodyQuat_f(struct FloatQuat *ned_to_body_quat)
Set vehicle body attitude from quaternion (float).
STATIC_INLINE void handle_periodic_tasks(void)
position in UTM coordinates Units: meters
struct NpsSensorSonar sonar
struct pprz_autopilot autopilot
Global autopilot structure.
struct NedCoor_d ltpprz_pos
#define QUAT_COPY(_qo, _qi)
static void stateSetAngleOfAttack_f(float aoa)
Set angle of attack in radians (float).
static void stateSetPositionUtm_f(struct UtmCoor_f *utm_pos)
Set position from UTM coordinates (float).
vector in Latitude, Longitude and Altitude
static void stateSetSpeedNed_f(struct NedCoor_f *ned_speed)
Set ground speed in local NED coordinates (float).
static void sys_tick_handler(void)
double value
temperature in degrees Celcius
vector in North East Down coordinates Units: meters
bool nps_sensors_sideslip_available(void)
struct NpsSensorAngleOfAttack aoa
Architecture independent timing functions.
void nps_electrical_init(void)
struct NpsAutopilot nps_autopilot
Device independent GPS code (interface)
void nps_radio_control_init(enum NpsRadioControlType type, int num_script, char *js_dev)
double value
sideslip reading in radian
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
void sim_overwrite_ahrs(void)
Hardware independent code for commands handling.
struct NpsSensors sensors
double value
sonar reading in meters
Inertial Measurement Unit interface.
uint8_t zone
UTM zone number.
static void stateSetPositionNed_f(struct NedCoor_f *ned_pos)
Set position from local NED coordinates (float).
#define LLA_COPY(_pos1, _pos2)
bool ned_initialized_i
true if local int coordinate frame is initialsed
void gps_feed_value(void)
void sim_overwrite_ins(void)
Core autopilot interface common to all firmwares.
void imu_feed_gyro_accel(void)
void nps_autopilot_init(enum NpsRadioControlType type_rc, int num_rc_script, char *rc_dev)
bool nps_sensors_temperature_available(void)
#define BARO_SIM_SENDER_ID
pprz_t commands[COMMANDS_NB]
Storage of intermediate command values.
API to get/set the generic vehicle states.
struct NpsSensorSideSlip sideslip
bool nps_sensors_airspeed_available(void)
bool nps_radio_control_available(double time)
Electrical status (bat voltage) for NPS.
void nps_autopilot_run_step(double time)
static void stateSetAirspeed_f(float airspeed)
Set airspeed (float).
Common code for AP and FBW telemetry.
bool nps_sensors_gyro_available(void)
double value
pressure in Pascal
struct NpsSensorAirspeed airspeed
struct NedCoor_d ltpprz_ecef_vel
velocity in ltppprz frame, wrt ECEF frame
#define RATES_COPY(_a, _b)
FBW ( FlyByWire ) process API.
double value
angle of attack reading in radian
bool kill_throttle
allow autopilot to use throttle
static void stateSetSideslip_f(float sideslip)
Set sideslip angle in radians (float).
static void stateSetBodyRates_f(struct FloatRates *body_rate)
Set vehicle body angular rate (float).
bool nps_sensors_sonar_available(void)
static void stateSetAccelNed_f(struct NedCoor_f *ned_accel)
Set acceleration in NED coordinates (float).
struct DoubleQuat ltp_to_body_quat
double commands[NPS_COMMANDS_NB]
AP ( AutoPilot ) process API.
struct NpsSensorTemperature temp
void utm_of_lla_f(struct UtmCoor_f *utm, struct LlaCoor_f *lla)