39 #ifndef USE_INS_NAV_INIT
40 #define USE_INS_NAV_INIT TRUE
45 #include "generated/flight_plan.h"
66 #define INS_PT_GPS_ID GPS_MULTI_ID
72 uint32_t stamp __attribute__((unused)),
97 #if PERIODIC_TELEMETRY
100 static void send_ins(
struct transport_tx *trans,
struct link_device *
dev)
102 pprz_msg_send_INS(trans, dev, AC_ID,
110 static const float fake_baro_z = 0.0;
111 pprz_msg_send_INS_Z(trans, dev, AC_ID,
118 static const float fake_qfe = 0.0;
120 pprz_msg_send_INS_REF(trans, dev, AC_ID,
133 llh_nav0.
lat = NAV_LAT0;
134 llh_nav0.
lon = NAV_LON0;
136 llh_nav0.
alt = NAV_ALT0 + NAV_MSL0;
154 #if PERIODIC_TELEMETRY
#define INT32_VECT3_SCALE_2(_a, _b, _num, _den)
static void stateSetPositionNed_i(struct NedCoor_i *ned_pos)
Set position from local NED coordinates (int).
Event structure to store callbacks in a linked list.
static void send_ins_ref(struct transport_tx *trans, struct link_device *dev)
definition of the local (flat earth) coordinate system
Periodic telemetry system header (includes downlink utility and generated code).
vector in EarthCenteredEarthFixed coordinates
#define INT32_VECT3_ZERO(_v)
Main include for ABI (AirBorneInterface).
#define INS_PT_GPS_ID
ABI binding for gps data.
struct NedCoor_i ltp_speed
Integrated Navigation System interface.
void ins_reset_altitude_ref(void)
INS altitude reference reset.
#define INT32_SPEED_OF_CM_S_DEN
vector in Latitude, Longitude and Altitude
static void stateSetSpeedNed_i(struct NedCoor_i *ned_speed)
Set ground speed in local NED coordinates (int).
#define GPS_FIX_3D
3D GPS fix
void ltp_def_from_lla_i(struct LtpDef_i *def, struct LlaCoor_i *lla)
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.
struct EcefCoor_i ecef
Reference point in ecef.
int32_t hmsl
Height above mean sea level in mm.
int32_t alt
in millimeters above WGS84 reference ellipsoid
int32_t hmsl
height above mean sea level (MSL) in mm
data structure for GPS information
#define INT32_POS_OF_CM_NUM
static void send_ins_z(struct transport_tx *trans, struct link_device *dev)
static void stateSetLocalOrigin_i(struct LtpDef_i *ltp_def)
Set the local (flat earth) coordinate frame origin (int).
Device independent GPS code (interface)
struct EcefCoor_i ecef_pos
position in ECEF in cm
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
struct LlaCoor_i lla
Reference point in lla.
#define DefaultPeriodic
Set default periodic telemetry.
int32_t lon
in degrees*1e7
static void gps_cb(uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s)
struct NedCoor_i ltp_accel
static const struct usb_device_descriptor dev
struct LtpDef_i ned_origin_i
Definition of the local (flat earth) coordinate system.
#define INT32_POS_OF_CM_DEN
API to get/set the generic vehicle states.
void ned_of_ecef_point_i(struct NedCoor_i *ned, struct LtpDef_i *def, struct EcefCoor_i *ecef)
Convert a point from ECEF to local NED.
vector in North East Down coordinates
void ins_gps_passthrough_init(void)
#define INT32_SPEED_OF_CM_S_NUM
static void send_ins(struct transport_tx *trans, struct link_device *dev)
struct InsGpsPassthrough ins_gp
void ecef_of_lla_i(struct EcefCoor_i *out, struct LlaCoor_i *in)
Convert a LLA to ECEF.
void ins_reset_local_origin(void)
INS local origin reset.
struct LlaCoor_i lla_pos
position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid)
Simply passes GPS through to the state interface.
int32_t lat
in degrees*1e7
struct GpsState gps
global GPS state
void ltp_def_from_ecef_i(struct LtpDef_i *def, struct EcefCoor_i *ecef)
int8_t register_periodic_telemetry(struct periodic_telemetry *_pt, uint8_t _id, telemetry_cb _cb)
Register a telemetry callback function.