Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ins_xsens700.c
Go to the documentation of this file.
1 /*
2  * Paparazzi mcu0 $Id$
3  *
4  * Copyright (C) 2003 Pascal Brisset, Antoine Drouin
5  *
6  * This file is part of paparazzi.
7  *
8  * paparazzi is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2, or (at your option)
11  * any later version.
12  *
13  * paparazzi is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with paparazzi; see the file COPYING. If not, write to
20  * the Free Software Foundation, 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  *
23  */
24 
29 #include "ins_module.h"
30 #include "ins_xsens.h"
31 
32 #include <inttypes.h>
33 
34 #include "generated/airframe.h"
35 
36 #include "mcu_periph/sys_time.h"
38 #include "messages.h"
39 
40 #if USE_GPS_XSENS
41 #include "subsystems/gps.h"
44 #include "subsystems/navigation/common_nav.h" /* needed for nav_utm_zone0 */
45 #endif
46 
50 
54 
58 
62 
66 
70 
73 
74 
75 void ahrs_init(void)
76 {
77  ins_init();
78 }
79 
80 
81 #ifdef USE_IMU
82 
83 #include "subsystems/imu.h"
84 
85 void imu_init(void)
86 {
87  ins_init();
88 }
89 
90 void imu_periodic(void)
91 {
93 }
94 
95 #endif
96 
98 //
99 // XSens Specific
100 //
101 
103 
104 #define XsensInitCheksum() { send_ck = 0; }
105 #define XsensUpdateChecksum(c) { send_ck += c; }
106 
107 #define XsensSend1(c) { uint8_t i8=c; InsUartSend1(i8); XsensUpdateChecksum(i8); }
108 #define XsensSend1ByAddr(x) { XsensSend1(*x); }
109 #define XsensSend2ByAddr(x) { XsensSend1(*(x+1)); XsensSend1(*x); }
110 #define XsensSend4ByAddr(x) { XsensSend1(*(x+3)); XsensSend1(*(x+2)); XsensSend1(*(x+1)); XsensSend1(*x); }
111 
112 #define XsensHeader(msg_id, len) { \
113  InsUartSend1(XSENS_START); \
114  XsensInitCheksum(); \
115  XsensSend1(XSENS_BID); \
116  XsensSend1(msg_id); \
117  XsensSend1(len); \
118 }
119 #define XsensTrailer() { uint8_t i8=0x100-send_ck; InsUartSend1(i8); }
120 
122 #include "xsens_protocol.h"
123 
124 
125 #define XSENS_MAX_PAYLOAD 254
127 
128 
129 #define UNINIT 0
130 #define GOT_START 1
131 #define GOT_BID 2
132 #define GOT_MID 3
133 #define GOT_LEN 4
134 #define GOT_DATA 5
135 #define GOT_CHECKSUM 6
136 
137 // FIXME Debugging Only
138 #ifndef DOWNLINK_DEVICE
139 #define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE
140 #endif
141 #include "mcu_periph/uart.h"
142 #include "messages.h"
144 
145 
152 float xsens_gps_arm_x = 0;
153 float xsens_gps_arm_y = 0;
154 float xsens_gps_arm_z = 0;
155 
156 
164 
169 static uint8_t ck;
171 
174 
175 volatile int xsens_configured = 0;
176 
177 void ins_init( void ) {
178 
180  xsens_configured = 30;
181 
182  ins_pitch_neutral = INS_PITCH_NEUTRAL_DEFAULT;
183  ins_roll_neutral = INS_ROLL_NEUTRAL_DEFAULT;
184 
186  xsens_time_stamp = 0;
187 
188  gps.nb_channels = 0;
189 }
190 
192 {
193  uint8_t foo = 0;
194  XsensSend1ByAddr(&c1);
195  XsensSend1ByAddr(&c2);
196  XsensSend1ByAddr(&foo);
197  XsensSend1ByAddr(&freq);
198 }
199 
200 void ins_periodic_task( void ) {
201  if (xsens_configured > 0)
202  {
203  switch (xsens_configured)
204  {
205  case 25:
206  /* send mode and settings to MT */
207  XSENS_GoToConfig();
208  //XSENS_SetOutputMode(xsens_output_mode);
209  //XSENS_SetOutputSettings(xsens_output_settings);
210  break;
211  case 18:
212  // Give pulses on SyncOut
213  //XSENS_SetSyncOutSettings(0,0x0002);
214  break;
215  case 17:
216 
217  XsensHeader(XSENS_SetOutputConfiguration_ID, 44);
218  xsens_ask_message_rate( 0x10, 0x10, 4); // UTC
219  xsens_ask_message_rate( 0x20, 0x30, 100); // Attitude Euler
220  xsens_ask_message_rate( 0x40, 0x10, 100); // Delta-V
221  xsens_ask_message_rate( 0x80, 0x20, 100); // Rate of turn
222  xsens_ask_message_rate( 0xE0, 0x20, 50); // Status
223  xsens_ask_message_rate( 0x30, 0x10, 50); // Baro Pressure
224  xsens_ask_message_rate( 0x88, 0x40, 1); // NavSol
225  xsens_ask_message_rate( 0x88, 0xA0, 1); // SV Info
226  xsens_ask_message_rate( 0x50, 0x20, 50); // GPS Altitude Ellipsiod
227  xsens_ask_message_rate( 0x50, 0x40, 50); // GPS Position
228  xsens_ask_message_rate( 0xD0, 0x10, 50); // GPS Speed
229  XsensTrailer();
230  break;
231  case 2:
232  //XSENS_ReqLeverArmGps();
233  break;
234 
235  case 6:
236  //XSENS_ReqMagneticDeclination();
237  break;
238 
239  case 13:
240  //#ifdef AHRS_H_X
241  //#pragma message "Sending XSens Magnetic Declination."
242  //xsens_declination = atan2(AHRS_H_Y, AHRS_H_X);
243  //XSENS_SetMagneticDeclination(xsens_declination);
244  //#endif
245  break;
246  case 12:
247  #ifdef GPS_IMU_LEVER_ARM_X
248  #pragma message "Sending XSens GPS Arm."
249  XSENS_SetLeverArmGps(GPS_IMU_LEVER_ARM_X,GPS_IMU_LEVER_ARM_Y,GPS_IMU_LEVER_ARM_Z);
250  #endif
251  break;
252  case 10:
253  {
254  uint8_t baud = 1;
255  XSENS_SetBaudrate(baud);
256  }
257  break;
258 
259  case 1:
260  XSENS_GoToMeasurment();
261  break;
262  }
264  return;
265  }
266 
267  //RunOnceEvery(100,XSENS_ReqGPSStatus());
268 }
269 
270 #include "estimator.h"
271 
272 void handle_ins_msg( void) {
273 
274 
275  // Send to Estimator (Control)
276 #ifdef XSENS_BACKWARDS
279 #else
282 #endif
283 
284  // Position
285  float gps_east = gps.utm_pos.east / 100.;
286  float gps_north = gps.utm_pos.north / 100.;
287  gps_east -= nav_utm_east0;
288  gps_north -= nav_utm_north0;
289  EstimatorSetPosXY(gps_east, gps_north);
290 
291  // Altitude and vertical speed
292  float hmsl = gps.hmsl;
293  hmsl /= 1000.0f;
294  EstimatorSetAlt(hmsl);
295 
296  #ifndef ALT_KALMAN
297  #warning NO_VZ
298  #endif
299 
300  // Horizontal speed
301  float fspeed = sqrt(ins_vx*ins_vx + ins_vy*ins_vy);
302  if (gps.fix != GPS_FIX_3D)
303  {
304  fspeed = 0;
305  }
306  float fclimb = -ins_vz;
307  float fcourse = atan2f((float)ins_vx, (float)ins_vy);
308  EstimatorSetSpeedPol(fspeed, fcourse, fclimb);
309 
310  // Now also finish filling the gps struct for telemetry purposes
311  gps.gspeed = (fspeed * 100.);
312  gps.speed_3d = (uint16_t)(sqrt(ins_vx*ins_vx + ins_vy*ins_vy + ins_vz*ins_vz) * 100.);
313  gps.course = fcourse * 1e7;
314 
315 }
316 
317 void parse_ins_msg( void ) {
318  uint8_t offset = 0;
319  if (xsens_id == XSENS_ReqLeverArmGpsAck_ID) {
320  xsens_gps_arm_x = XSENS_ReqLeverArmGpsAck_x(xsens_msg_buf);
321  xsens_gps_arm_y = XSENS_ReqLeverArmGpsAck_y(xsens_msg_buf);
322  xsens_gps_arm_z = XSENS_ReqLeverArmGpsAck_z(xsens_msg_buf);
323 
325  }
326  else if (xsens_id == XSENS_Error_ID) {
327  xsens_errorcode = XSENS_Error_errorcode(xsens_msg_buf);
328  }
329  else if (xsens_id == XSENS_MTData2_ID) {
330  for (offset=0;offset<xsens_len;) {
331  uint8_t code1 = xsens_msg_buf[offset];
332  uint8_t code2 = xsens_msg_buf[offset+1];
333  int subpacklen = (int)xsens_msg_buf[offset+2];
334  offset += 3;
335 
336 
337  if (code1 == 0x10)
338  {
339  if (code2 == 0x10)
340  {
341  // UTC
342  }
343  else if (code2 == 0x20)
344  {
345  // Packet Counter
346  }
347  if (code2 == 0x30)
348  {
349  // ITOW
350  }
351  }
352  else if (code1 == 0x20)
353  {
354  if (code2 == 0x30)
355  {
356  // Attitude Euler
357  ins_phi = XSENS_DATA_Euler_roll(xsens_msg_buf,offset) * M_PI / 180;
358  ins_theta = XSENS_DATA_Euler_pitch(xsens_msg_buf,offset) * M_PI / 180;
359  ins_psi = XSENS_DATA_Euler_yaw(xsens_msg_buf,offset) * M_PI / 180;
360 
361  new_ins_attitude = 1;
362 
363  }
364  }
365  else if (code1 == 0x40)
366  {
367  if (code2 == 0x10)
368  {
369  // Delta-V
370  ins_ax = XSENS_DATA_Acceleration_x(xsens_msg_buf,offset)*100.0f;
371  ins_ay = XSENS_DATA_Acceleration_y(xsens_msg_buf,offset)*100.0f;
372  ins_az = XSENS_DATA_Acceleration_z(xsens_msg_buf,offset)*100.0f;
373  }
374  }
375  else if (code1 == 0x80)
376  {
377  if (code2 == 0x20)
378  {
379  // Rate Of Turn
380  ins_p = XSENS_DATA_RateOfTurn_x(xsens_msg_buf,offset) * M_PI / 180;
381  ins_q = XSENS_DATA_RateOfTurn_y(xsens_msg_buf,offset) * M_PI / 180;
382  ins_r = XSENS_DATA_RateOfTurn_z(xsens_msg_buf,offset) * M_PI / 180;
383  }
384  }
385  else if (code1 == 0x30)
386  {
387  if (code2 == 0x10)
388  {
389  // Baro Pressure
390  }
391  }
392  else if (code1 == 0xE0)
393  {
394  if (code2 == 0x20)
395  {
396  // Status Word
397  xsens_msg_statusword = XSENS_DATA_StatusWord_status(xsens_msg_buf,offset);
398  //gps.tow = xsens_msg_statusword;
399 #if USE_GPS_XSENS
400  if (bit_is_set(xsens_msg_statusword,2) && bit_is_set(xsens_msg_statusword,1))
401  {
402  if (bit_is_set(xsens_msg_statusword,23) && bit_is_set(xsens_msg_statusword,24))
403  gps.fix = GPS_FIX_3D;
404  else
405  gps.fix = GPS_FIX_2D;
406  }
407  else gps.fix = GPS_FIX_NONE;
408 #endif
409  }
410  }
411  else if (code1 == 0x88)
412  {
413  if (code2 == 0x40)
414  {
415  gps.week = XSENS_DATA_GpsSol_week(xsens_msg_buf,offset);
416  gps.num_sv = XSENS_DATA_GpsSol_numSv(xsens_msg_buf,offset);
417  gps.pacc = XSENS_DATA_GpsSol_pAcc(xsens_msg_buf,offset);
418  gps.sacc = XSENS_DATA_GpsSol_sAcc(xsens_msg_buf,offset);
419  gps.pdop = XSENS_DATA_GpsSol_pDop(xsens_msg_buf,offset);
420  }
421  else if (code2 == 0xA0)
422  {
423  // SVINFO
424  gps.tow = XSENS_XDI_GpsSvInfo_iTOW(xsens_msg_buf+offset);
425 
426 #if USE_GPS_XSENS
427  gps.nb_channels = XSENS_XDI_GpsSvInfo_nch(xsens_msg_buf+offset);
428 
430 
431  uint8_t i;
432  // Do not write outside buffer
433  for(i = 0; i < Min(gps.nb_channels, GPS_NB_CHANNELS); i++) {
434  uint8_t ch = XSENS_XDI_GpsSvInfo_chn(xsens_msg_buf+offset,i);
435  if (ch > gps.nb_channels) continue;
436  gps.svinfos[ch].svid = XSENS_XDI_GpsSvInfo_svid(xsens_msg_buf+offset, i);
437  gps.svinfos[ch].flags = XSENS_XDI_GpsSvInfo_bitmask(xsens_msg_buf+offset, i);
438  gps.svinfos[ch].qi = XSENS_XDI_GpsSvInfo_qi(xsens_msg_buf+offset, i);
439  gps.svinfos[ch].cno = XSENS_XDI_GpsSvInfo_cnr(xsens_msg_buf+offset, i);
440  }
441 #endif
442  }
443  }
444  else if (code1 == 0x50)
445  {
446  if (code2 == 0x10)
447  {
448  //gps.hmsl = XSENS_DATA_Altitude_h(xsens_msg_buf,offset)* 1000.0f;
449  }
450  else if (code2 == 0x20)
451  {
452  // Altitude Elipsoid
453  gps.utm_pos.alt = XSENS_DATA_Altitude_h(xsens_msg_buf,offset)* 1000.0f;
454 
455  // Compute geoid (MSL) height
456  float geoid_h;
458  gps.hmsl = gps.utm_pos.alt - (geoid_h * 1000.0f);
459 
460  //gps.tow = geoid_h * 1000.0f; //gps.utm_pos.alt;
461  }
462  else if (code2 == 0x40)
463  {
464  // LatLong
465 #ifdef GPS_LED
466  LED_TOGGLE(GPS_LED);
467 #endif
469  gps.week = 0; // FIXME
470  lla_f.lat = RadOfDeg(XSENS_DATA_LatLon_lat(xsens_msg_buf,offset));
471  lla_f.lon = RadOfDeg(XSENS_DATA_LatLon_lon(xsens_msg_buf,offset));
472 
473  // Set the real UTM zone
474  gps.utm_pos.zone = (DegOfRad(lla_f.lon)+180) / 6 + 1;
475 
477  // convert to utm
479  // copy results of utm conversion
480  gps.utm_pos.east = utm_f.east*100;
481  gps.utm_pos.north = utm_f.north*100;
482  }
483  }
484  else if (code1 == 0xD0)
485  {
486  if (code2 == 0x10)
487  {
488  // Velocity
489  ins_vx = ((INS_FORMAT)XSENS_DATA_VelocityXYZ_x(xsens_msg_buf,offset));
490  ins_vy = ((INS_FORMAT)XSENS_DATA_VelocityXYZ_y(xsens_msg_buf,offset));
491  ins_vz = ((INS_FORMAT)XSENS_DATA_VelocityXYZ_z(xsens_msg_buf,offset));
492  gps.ned_vel.x = ins_vx;
493  gps.ned_vel.y = ins_vy;
494  gps.ned_vel.z = ins_vx;
495  }
496  }
497 
498  if (subpacklen < 0)
499  subpacklen = 0;
500  offset += subpacklen;
501  }
502 
503 
504 /*
505 
506  gps.pacc = XSENS_DATA_RAWGPS_hacc(xsens_msg_buf,offset) / 100;
507  gps.sacc = XSENS_DATA_RAWGPS_sacc(xsens_msg_buf,offset) / 100;
508  gps.pdop = 5; // FIXME Not output by XSens
509 */
510 
511 /*
512 */
513 
514 
515 /*
516  ins_mx = XSENS_DATA_Calibrated_magX(xsens_msg_buf,offset);
517  ins_my = XSENS_DATA_Calibrated_magY(xsens_msg_buf,offset);
518  ins_mz = XSENS_DATA_Calibrated_magZ(xsens_msg_buf,offset);
519 */
520 
521 
522 /*
523  xsens_time_stamp = XSENS_DATA_TimeStamp_ts(xsens_msg_buf,offset);
524 #if USE_GPS_XSENS
525  gps.tow = xsens_time_stamp;
526 #endif
527 */
528 
529  }
530 
531 }
532 
533 
535  ck += c;
536  switch (xsens_status) {
537  case UNINIT:
538  if (c != XSENS_START)
539  goto error;
540  xsens_status++;
541  ck = 0;
542  break;
543  case GOT_START:
544  if (c != XSENS_BID)
545  goto error;
546  xsens_status++;
547  break;
548  case GOT_BID:
549  xsens_id = c;
550  xsens_status++;
551  break;
552  case GOT_MID:
553  xsens_len = c;
555  goto error;
556  xsens_msg_idx = 0;
557  xsens_status++;
558  break;
559  case GOT_LEN:
561  xsens_msg_idx++;
562  if (xsens_msg_idx >= xsens_len)
563  xsens_status++;
564  break;
565  case GOT_DATA:
566  if (ck != 0)
567  goto error;
569  goto restart;
570  break;
571  }
572  return;
573  error:
574  restart:
576  return;
577 }
#define GOT_LEN
Definition: ins_xsens700.c:133
unsigned short uint16_t
Definition: types.h:16
float xsens_gps_arm_z
Definition: ins_xsens700.c:154
struct NedCoor_i ned_vel
speed NED in cm/s
Definition: gps.h:68
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
#define UNINIT
Definition: ins_xsens700.c:129
int8_t xsens_month
Definition: ins_xsens700.c:162
void imu_periodic(void)
Definition: imu_b2_arch.c:83
int32_t course
GPS heading in rad*1e7 (CW/north)
Definition: gps.h:71
#define Min(x, y)
#define XsensTrailer()
Definition: ins_xsens700.c:119
INS_FORMAT ins_phi
Definition: ins_xsens700.c:55
int8_t xsens_hour
Library for the XSENS AHRS.
Definition: ins_xsens700.c:157
uint32_t last_fix_time
cpu time in sec at last valid fix
Definition: gps.h:85
uint8_t xsens_errorcode
Definition: ins_xsens700.c:146
INS_FORMAT ins_psi
Definition: ins_xsens700.c:57
static void xsens_ask_message_rate(uint8_t c1, uint8_t c2, uint8_t freq)
Definition: ins_xsens700.c:191
float ins_roll_neutral
driver for the VectorNav VN100
Definition: ins_xsens700.c:72
void parse_ins_msg(void)
Definition: ins_xsens700.c:317
uint32_t sacc
speed accuracy in cm/s
Definition: gps.h:73
uint8_t zone
UTM zone number.
int8_t xsens_min
Definition: ins_xsens700.c:158
INS_FORMAT ins_y
Definition: ins_xsens700.c:48
INS_FORMAT ins_az
Definition: ins_xsens700.c:65
#define XsensSend1ByAddr(x)
Definition: ins_xsens700.c:108
#define EstimatorSetAtt(phi, psi, theta)
Definition: estimator.h:135
int8_t xsens_sec
Definition: ins_xsens700.c:159
uint16_t pdop
position dilution of precision scaled by 100
Definition: gps.h:75
INS_FORMAT ins_mx
Definition: ins_xsens700.c:67
uint8_t nav_utm_zone0
Definition: common_nav.c:43
INS_FORMAT ins_my
Definition: ins_xsens700.c:68
#define XSENS_MAX_PAYLOAD
Includes macros generated from xsens_MTi-G.xml.
Definition: ins_xsens700.c:125
int32_t hmsl
height above mean sea level in mm
Definition: gps.h:66
float lat
in radians
#define EstimatorSetAlt(z)
Definition: estimator.h:123
int8_t xsens_day
Definition: ins_xsens700.c:163
static uint8_t ck
Definition: ins_xsens700.c:169
uint8_t fix
status of fix
Definition: gps.h:77
#define GPS_FIX_3D
Definition: gps.h:42
INS_FORMAT ins_ax
Definition: ins_xsens700.c:63
int16_t week
GPS week.
Definition: gps.h:78
uint8_t qi
quality bitfield (GPS receiver specific)
Definition: gps.h:55
vector in Latitude, Longitude and Altitude
float xsens_gps_arm_x
Definition: ins_xsens700.c:152
int32_t alt
in millimeters above WGS84 reference ellipsoid
INS_FORMAT ins_r
Definition: ins_xsens700.c:61
int32_t xsens_nanosec
Definition: ins_xsens700.c:160
Paparazzi floating point math for geodetic calculations.
uint32_t tow
GPS time of week in ms.
Definition: gps.h:79
uint32_t xsens_msg_statusword
Definition: ins_xsens700.c:147
#define GPS_NB_CHANNELS
Definition: gps_nmea.h:34
float xsens_gps_arm_y
Definition: ins_xsens700.c:153
INS_FORMAT ins_vy
Definition: ins_xsens700.c:52
void parse_ins_buffer(uint8_t c)
Definition: ins_xsens700.c:534
static uint8_t xsens_len
Definition: ins_xsens700.c:167
uint8_t zone
UTM zone number.
#define GOT_DATA
Definition: ins_xsens700.c:134
struct LlaCoor_f lla_f
Definition: ins_xsens700.c:172
volatile uint8_t new_ins_attitude
Definition: ins_chimu_spi.c:36
int32_t nav_utm_north0
Definition: common_nav.c:42
int16_t gspeed
norm of 2d ground speed in cm/s
Definition: gps.h:69
volatile int xsens_configured
Definition: ins_xsens700.c:175
static uint8_t xsens_id
Definition: ins_xsens700.c:165
Architecture independent timing functions.
float north
in meters
#define GPS_FIX_NONE
Definition: gps.h:40
#define GPS_FIX_2D
Definition: gps.h:41
uint32_t xsens_output_settings
Definition: ins_xsens700.c:150
Device independent GPS code (interface)
volatile uint8_t ins_msg_received
Definition: ins_xsens700.c:102
void ahrs_init(void)
AHRS initialization.
Definition: ins_xsens700.c:75
position in UTM coordinates Units: meters
unsigned long uint32_t
Definition: types.h:18
INS_FORMAT ins_mz
Definition: ins_xsens700.c:69
signed short int16_t
Definition: types.h:17
static uint16_t c1
Definition: baro_MS5534A.c:197
uint16_t foo
Definition: main_demo5.c:54
#define EstimatorSetSpeedPol(vhmod, vhdir, vz)
Definition: estimator.h:124
INS_FORMAT ins_vx
Definition: ins_xsens700.c:51
int32_t north
in centimeters
Inertial Measurement Unit interface.
INS_FORMAT ins_theta
Definition: ins_xsens700.c:56
#define LED_TOGGLE(i)
Definition: led_hw.h:30
float ins_pitch_neutral
Definition: ins_xsens700.c:71
struct UtmCoor_f utm_f
Definition: ins_xsens700.c:173
struct SVinfo svinfos[GPS_NB_CHANNELS]
holds information from the Space Vehicles (Satellites)
Definition: gps.h:82
INS_FORMAT ins_q
Definition: ins_xsens700.c:60
signed long int32_t
Definition: types.h:19
#define GOT_START
Definition: ins_xsens700.c:130
#define INS_FORMAT
Definition: ins_module.h:38
#define TRUE
Definition: imu_chimu.h:144
INS_FORMAT ins_vz
Definition: ins_xsens700.c:53
#define GOT_MID
Definition: ins_xsens700.c:132
int16_t speed_3d
norm of 3d speed in cm/s
Definition: gps.h:70
int32_t east
in centimeters
#define EstimatorSetPosXY(x, y)
Definition: estimator.h:122
uint32_t pacc
position accuracy in cm
Definition: gps.h:72
uint8_t flags
bitfield with GPS receiver specific flags
Definition: gps.h:54
unsigned char uint8_t
Definition: types.h:14
void ins_periodic_task(void)
Definition: ins_xsens700.c:200
#define WGS84_ELLIPSOID_TO_GEOID(_Lat, _Lon, _diff)
uint8_t svid
Satellite ID.
Definition: gps.h:53
INS_FORMAT ins_z
Definition: ins_xsens700.c:49
int32_t nav_utm_east0
Definition: common_nav.c:41
static uint8_t xsens_msg_idx
Definition: ins_xsens700.c:168
static uint16_t c2
Definition: baro_MS5534A.c:197
volatile uint32_t nb_sec
full seconds since startup
Definition: sys_time.h:55
#define GOT_BID
Definition: ins_xsens700.c:131
int16_t xsens_year
Definition: ins_xsens700.c:161
static uint8_t xsens_status
Definition: ins_xsens700.c:166
float xsens_declination
Definition: ins_xsens700.c:151
void ins_init(void)
Definition: ins_xsens700.c:177
State estimation, fusioning sensors.
void handle_ins_msg(void)
Definition: ins_xsens700.c:272
struct UtmCoor_i utm_pos
position in UTM (north,east: cm; alt: mm over ellipsoid)
Definition: gps.h:65
uint8_t xsens_msg_buf[XSENS_MAX_PAYLOAD]
Definition: ins_xsens700.c:126
INS_FORMAT ins_x
Definition: ins_xsens700.c:47
float lon
in radians
uint16_t xsens_output_mode
Definition: ins_xsens700.c:149
INS_FORMAT ins_ay
Definition: ins_xsens700.c:64
signed char int8_t
Definition: types.h:15
static struct point c
Definition: discsurvey.c:13
void imu_init(void)
Definition: imu.c:32
float east
in meters
uint16_t xsens_time_stamp
Definition: ins_xsens700.c:148
struct GpsState gps
global GPS state
Definition: gps.c:31
INS_FORMAT ins_p
Definition: ins_xsens700.c:59
uint8_t cno
Carrier to Noise Ratio (Signal Strength) in dbHz.
Definition: gps.h:56
#define XsensHeader(msg_id, len)
Definition: ins_xsens700.c:112
void utm_of_lla_f(struct UtmCoor_f *utm, struct LlaCoor_f *lla)
#define EstimatorSetRate(p, q, r)
Definition: estimator.h:138
uint8_t nb_channels
Number of scanned satellites.
Definition: gps.h:81
uint8_t send_ck
Definition: ins_xsens700.c:170
uint8_t num_sv
number of sat in fix
Definition: gps.h:76