31 #include "generated/airframe.h"
39 #error "USE_GPS needs to be 1 to use the Xsens GPS!"
49 #ifndef INS_XSENS_GPS_ID
50 #define INS_XSENS_GPS_ID GPS_MULTI_ID
61 uint32_t stamp __attribute__((unused)),
89 uint32_t stamp __attribute__((unused)),
108 void gps_xsens_init(
void)
110 xsens.gps.nb_channels = 0;
113 static void gps_xsens_publish(
void)
131 #ifdef XSENS_BACKWARDS
137 struct FloatEulerstRates rates = {
166 if (
xsens.gps_available) {
172 xsens.gps.gspeed = fspeed * 100.;
176 xsens.gps.course = fcourse * 1e7;
180 xsens.gps_available =
false;
182 #endif // USE_GPS_XSENS
Event structure to store callbacks in a linked list.
static void stateSetNedToBodyEulers_f(struct FloatEulers *ned_to_body_eulers)
Set vehicle body attitude from euler angles (float).
Xsens as a full INS solution.
float alt
in meters (above WGS84 reference ellipsoid or above MSL)
void parse_xsens_msg(void)
Main include for ABI (AirBorneInterface).
Integrated Navigation System interface.
position in UTM coordinates Units: meters
#define GPS_FIX_3D
3D GPS fix
#define INS_ROLL_NEUTRAL_DEFAULT
struct FloatVect3 vel
NED velocity in m/s.
#define INS_XSENS_GPS_ID
ABI binding for gps data.
void ins_xsens_event(void)
static float float_vect3_norm(struct FloatVect3 *v)
static void stateSetPositionUtm_f(struct UtmCoor_f *utm_pos)
Set position from UTM coordinates (float).
Paparazzi floating point math for geodetic calculations.
#define GPS_VALID_COURSE_BIT
static void stateSetSpeedNed_f(struct NedCoor_f *ned_speed)
Set ground speed in local NED coordinates (float).
#define FLOAT_VECT2_NORM(_v)
int32_t hmsl
height above mean sea level (MSL) in mm
vector in North East Down coordinates Units: meters
Architecture independent timing functions.
data structure for GPS information
Device independent GPS code (interface)
#define INS_PITCH_NEUTRAL_DEFAULT
volatile uint32_t nb_sec_rem
remainder of seconds since startup in CPU_TICKS
static void update_state_interface(void)
static void handle_ins_msg(void)
struct UtmCoor_f utm_float_from_gps(struct GpsState *gps_s, uint8_t zone)
Convenience functions to get utm position from GPS state.
API to get/set the generic vehicle states.
volatile uint8_t new_ins_attitude
volatile bool msg_received
volatile uint32_t nb_sec
full seconds since startup
static void gps_cb(uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s)
Parser for the Xsens protocol.
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
static void stateSetBodyRates_f(struct FloatRates *body_rate)
Set vehicle body angular rate (float).
struct NedCoor_i ned_vel
speed NED in cm/s
static void stateSetLocalUtmOrigin_f(struct UtmCoor_f *utm_def)
Set the local (flat earth) coordinate frame origin from UTM (float).
void ins_xsens_init(void)
volatile bool new_attitude