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