30 #include "generated/airframe.h"
38 #error "USE_GPS needs to be 1 to use the Xsens GPS!"
48 #ifndef INS_XSENS_GPS_ID
49 #define INS_XSENS_GPS_ID GPS_MULTI_ID
60 uint32_t stamp __attribute__((unused)),
88 uint32_t stamp __attribute__((unused)),
103 void gps_xsens_init(
void)
105 xsens.gps.nb_channels = 0;
108 static void gps_xsens_publish(
void)
126 #ifdef XSENS_BACKWARDS
132 struct FloatEulerstRates rates = {
156 #ifdef AHRS_TRIGGERED_ATTITUDE_LOOP
163 if (
xsens.gps_available) {
169 xsens.gps.gspeed = fspeed * 100.;
173 xsens.gps.course = fcourse * 1e7;
177 xsens.gps_available =
false;
Main include for ABI (AirBorneInterface).
Event structure to store callbacks in a linked list.
#define INS_PITCH_NEUTRAL_DEFAULT
#define INS_ROLL_NEUTRAL_DEFAULT
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
struct UtmCoor_f utm_float_from_gps(struct GpsState *gps_s, uint8_t zone)
Convenience functions to get utm position from GPS state.
struct NedCoor_f ned_vel_float_from_gps(struct GpsState *gps_s)
Get GPS ned velocity (float) Converted on the fly if not available.
Device independent GPS code (interface)
int32_t hmsl
height above mean sea level (MSL) in mm
#define GPS_FIX_3D
3D GPS fix
#define GPS_VALID_COURSE_BIT
data structure for GPS information
static float float_vect3_norm(struct FloatVect3 *v)
#define FLOAT_VECT2_NORM(_v)
static void stateSetNedToBodyEulers_f(uint16_t id, struct FloatEulers *ned_to_body_eulers)
Set vehicle body attitude from euler angles (float).
static void stateSetPositionUtm_f(uint16_t id, struct UtmCoor_f *utm_pos)
Set position from UTM coordinates (float).
static void stateSetLocalUtmOrigin_f(uint16_t id, struct UtmCoor_f *utm_def)
Set the local (flat earth) coordinate frame origin from UTM (float).
static void stateSetBodyRates_f(uint16_t id, struct FloatRates *body_rate)
Set vehicle body angular rate (float).
static void stateSetSpeedNed_f(uint16_t id, struct NedCoor_f *ned_speed)
Set ground speed in local NED coordinates (float).
Integrated Navigation System interface.
volatile uint8_t new_ins_attitude
static void handle_ins_msg(void)
static void gps_cb(uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s)
void ins_xsens_init(void)
static void update_state_interface(void)
void ins_xsens_event(void)
#define INS_XSENS_GPS_ID
ABI binding for gps data.
Xsens as a full INS solution.
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
Paparazzi floating point math for geodetic calculations.
float alt
in meters (above WGS84 reference ellipsoid or above MSL)
vector in North East Down coordinates Units: meters
position in UTM coordinates Units: meters
API to get/set the generic vehicle states.
Architecture independent timing functions.
volatile uint32_t nb_sec
full seconds since startup
volatile uint32_t nb_sec_rem
remainder of seconds since startup in CPU_TICKS
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
struct XsensParser parser
struct FloatVect3 vel
NED velocity in m/s.
volatile bool new_attitude
void parse_xsens_msg(void)
void xsens_parser_event(struct XsensParser *xsensparser)
volatile uint8_t msg_received