38 #if PREFLIGHT_CHECKS && !defined(AUTOPILOT_DISABLE_AHRS_KILL)
73 #if PREFLIGHT_CHECKS && !defined(AUTOPILOT_DISABLE_AHRS_KILL)
#define FLOAT_VECT2_NORM(_v)
#define RATES_BFP_OF_REAL(_ri, _rf)
#define SPEEDS_BFP_OF_REAL(_ef, _ei)
#define ACCELS_BFP_OF_REAL(_ef, _ei)
#define RATES_FLOAT_OF_BFP(_rf, _ri)
#define SPEEDS_FLOAT_OF_BFP(_ef, _ei)
#define ACCELS_FLOAT_OF_BFP(_ef, _ei)
uint32_t int32_sqrt(uint32_t in)
#define INT32_COURSE_NORMALIZE(_a)
#define SPEED_FLOAT_OF_BFP(_ai)
#define SPEED_BFP_OF_REAL(_af)
#define UTM_OF_NED_ADD(_utm, _pos, _utm0)
#define ENU_OF_UTM_DIFF(_pos, _utm1, _utm2)
#define NED_OF_UTM_DIFF(_pos, _utm1, _utm2)
#define UTM_OF_ENU_ADD(_utm, _pos, _utm0)
void ned_of_lla_pos_i(struct NedCoor_i *ned, struct LtpDef_i *def, struct LlaCoor_i *lla)
Convert a point from LLA to local NED.
#define ECEF_FLOAT_OF_BFP(_o, _i)
void ecef_of_lla_i(struct EcefCoor_i *out, struct LlaCoor_i *in)
Convert a LLA to ECEF.
#define ENU_FLOAT_OF_BFP(_o, _i)
#define ECEF_BFP_OF_REAL(_o, _i)
#define ENU_BFP_OF_REAL(_o, _i)
#define LLA_BFP_OF_REAL(_o, _i)
#define NED_BFP_OF_REAL(_o, _i)
void ned_of_ecef_pos_i(struct NedCoor_i *ned, struct LtpDef_i *def, struct EcefCoor_i *ecef)
Convert a ECEF position to local NED.
#define NED_FLOAT_OF_BFP(_o, _i)
void enu_of_ecef_pos_i(struct EnuCoor_i *enu, struct LtpDef_i *def, struct EcefCoor_i *ecef)
Convert a ECEF position to local ENU.
#define INT32_VECT3_ENU_OF_NED(_o, _i)
#define VECT3_ENU_OF_NED(_o, _i)
void ecef_of_enu_pos_i(struct EcefCoor_i *ecef, struct LtpDef_i *def, struct EnuCoor_i *enu)
Convert a local ENU position to ECEF.
#define VECT3_NED_OF_ENU(_o, _i)
void ecef_of_ned_vect_i(struct EcefCoor_i *ecef, struct LtpDef_i *def, struct NedCoor_i *ned)
Rotate a vector from NED to ECEF.
void ned_of_ecef_vect_i(struct NedCoor_i *ned, struct LtpDef_i *def, struct EcefCoor_i *ecef)
Rotate a vector from ECEF to NED.
#define LLA_FLOAT_OF_BFP(_o, _i)
#define INT32_VECT3_NED_OF_ENU(_o, _i)
void enu_of_lla_pos_i(struct EnuCoor_i *enu, struct LtpDef_i *def, struct LlaCoor_i *lla)
Convert a point from LLA to local ENU.
void lla_of_ecef_i(struct LlaCoor_i *out, struct EcefCoor_i *in)
Convert a ECEF to LLA.
void enu_of_ecef_vect_i(struct EnuCoor_i *enu, struct LtpDef_i *def, struct EcefCoor_i *ecef)
Rotate a vector from ECEF to ENU.
void ecef_of_ned_pos_i(struct EcefCoor_i *ecef, struct LtpDef_i *def, struct NedCoor_i *ned)
Convert a local NED position to ECEF.
uint8_t status
Holds the status bits for all orientation representations.
struct EcefCoor_f ecef_accel_f
Acceleration in EarthCenteredEarthFixed coordinates.
struct NedCoor_i ned_accel_i
Acceleration in North East Down coordinates.
uint8_t accel_status
Holds the status bits for all acceleration representations.
void stateCalcAccelNed_i(void)
void stateCalcAccelEcef_i(void)
struct EcefCoor_i ecef_accel_i
Acceleration in EarthCenteredEarthFixed coordinates.
void stateCalcAccelEcef_f(void)
struct NedCoor_f ned_accel_f
Acceleration in North East Down coordinates.
void stateCalcAccelNed_f(void)
static bool stateIsAttitudeValid(void)
Test if attitudes are valid.
struct OrientationReps ned_to_body_orientation
Structure holding vehicle state data.
struct NedCoor_i ned_pos_i
Position in North East Down coordinates.
struct NedCoor_f ned_pos_f
Position in North East Down coordinates.
struct EnuCoor_f enu_pos_f
Position in East North Up coordinates.
struct UtmCoor_f utm_pos_f
Position in UTM coordinates.
void stateCalcPositionNed_f(void)
struct LtpDef_f ned_origin_f
Definition of the local (flat earth) coordinate system.
struct LtpDef_i ned_origin_i
Definition of the local (flat earth) coordinate system.
bool ned_initialized_f
True if local float coordinate frame is initialsed.
uint16_t pos_status
Holds the status bits for all position representations.
struct LlaCoor_i lla_pos_i
Position in Latitude, Longitude and Altitude.
void stateCalcPositionUtm_f(void)
void stateCalcPositionEnu_f(void)
struct EcefCoor_f ecef_pos_f
Position in EarthCenteredEarthFixed coordinates.
bool utm_initialized_f
True if utm origin (float) coordinate frame is initialsed.
void stateCalcPositionEcef_f(void)
struct EnuCoor_i enu_pos_i
Position in East North Up coordinates.
bool ned_initialized_i
true if local int coordinate frame is initialsed
void stateCalcPositionLla_f(void)
void stateCalcPositionEcef_i(void)
struct UtmCoor_f utm_origin_f
Definition of the origin of Utm coordinate system.
void stateCalcPositionNed_i(void)
void stateCalcPositionLla_i(void)
Calculate LLA (int) from any other available representation.
struct LlaCoor_f lla_pos_f
Position in Latitude, Longitude and Altitude.
struct EcefCoor_i ecef_pos_i
Position in EarthCenteredEarthFixed coordinates.
void stateCalcPositionEnu_i(void)
void stateCalcBodyRates_f(void)
struct FloatRates body_rates_f
Angular rates in body frame.
void stateCalcBodyRates_i(void)
struct Int32Rates body_rates_i
Angular rates in body frame.
uint8_t rate_status
Holds the status bits for all angular rate representations.
void stateCalcSpeedEnu_f(void)
struct NedCoor_f ned_speed_f
speed in North East Down coordinates
void stateCalcSpeedNed_f(void)
void stateCalcHorizontalSpeedDir_i(void)
struct NedCoor_i ned_speed_i
Velocity in North East Down coordinates.
float h_speed_norm_f
Norm of horizontal ground speed.
int32_t h_speed_dir_i
Direction of horizontal ground speed.
float h_speed_dir_f
Direction of horizontal ground speed.
void stateCalcHorizontalSpeedNorm_f(void)
void stateCalcHorizontalSpeedNorm_i(void)
struct EcefCoor_f ecef_speed_f
Velocity in EarthCenteredEarthFixed coordinates.
void stateCalcSpeedEcef_f(void)
void stateCalcSpeedEnu_i(void)
struct EcefCoor_i ecef_speed_i
Velocity in EarthCenteredEarthFixed coordinates.
void stateCalcHorizontalSpeedDir_f(void)
struct EnuCoor_i enu_speed_i
Velocity in East North Up coordinates.
uint16_t speed_status
Holds the status bits for all ground speed representations.
void stateCalcSpeedNed_i(void)
uint32_t h_speed_norm_i
Norm of horizontal ground speed.
struct EnuCoor_f enu_speed_f
Velocity in East North Up coordinates.
void stateCalcSpeedEcef_i(void)
int32_t airspeed_i
Norm of relative wind speed.
float airspeed_f
Norm of relative air speed.
uint8_t wind_air_status
Holds the status bits for all wind- and airspeed representations.
void stateCalcAirspeed_i(void)
union State::@354 windspeed_f
Horizontal windspeed.
union State::@353 windspeed_i
Horizontal windspeed in north/east/down.
void stateCalcVerticalWindspeed_i(void)
void stateCalcAirspeed_f(void)
void stateCalcHorizontalWindspeed_f(void)
void stateCalcHorizontalWindspeed_i(void)
void stateCalcVerticalWindspeed_f(void)
void ecef_of_enu_point_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct EnuCoor_f *enu)
void enu_of_ecef_point_f(struct EnuCoor_f *enu, struct LtpDef_f *def, struct EcefCoor_f *ecef)
void ned_of_ecef_point_f(struct NedCoor_f *ned, struct LtpDef_f *def, struct EcefCoor_f *ecef)
void lla_of_utm_f(struct LlaCoor_f *lla, struct UtmCoor_f *utm)
void ecef_of_ned_vect_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct NedCoor_f *ned)
void ecef_of_lla_f(struct EcefCoor_f *out, struct LlaCoor_f *in)
void ecef_of_ned_point_f(struct EcefCoor_f *ecef, struct LtpDef_f *def, struct NedCoor_f *ned)
void enu_of_lla_point_f(struct EnuCoor_f *enu, struct LtpDef_f *def, struct LlaCoor_f *lla)
void ned_of_lla_point_f(struct NedCoor_f *ned, struct LtpDef_f *def, struct LlaCoor_f *lla)
void ned_of_ecef_vect_f(struct NedCoor_f *ned, struct LtpDef_f *def, struct EcefCoor_f *ecef)
void enu_of_ecef_vect_f(struct EnuCoor_f *enu, struct LtpDef_f *def, struct EcefCoor_f *ecef)
void lla_of_ecef_f(struct LlaCoor_f *out, struct EcefCoor_f *in)
void utm_of_lla_f(struct UtmCoor_f *utm, struct LlaCoor_f *lla)
uint8_t zone
UTM zone number.
int32_t int32_atan2(int32_t y, int32_t x)
void preflight_error(struct preflight_result_t *result, const char *fmt,...)
Register a preflight error used inside the preflight checking functions.
void preflight_success(struct preflight_result_t *result, const char *fmt,...)
Register a preflight success used inside the preflight checking functions.
void preflight_check_register(struct preflight_check_t *check, preflight_check_f func)
Register a preflight check and add it to the linked list.
API to get/set the generic vehicle states.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.