Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gps_piksi.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Gautier Hattenberger <gautier.hattenberger@enac.fr>
3  * 2015 Freek van Tienen <freek.v.tienen@gmail.com>
4  *
5  * This file is part of paparazzi.
6  *
7  * paparazzi is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2, or (at your option)
10  * any later version.
11  *
12  * paparazzi is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with paparazzi; see the file COPYING. If not, write to
19  * the Free Software Foundation, 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  *
22  */
23 
34 #include "subsystems/gps.h"
35 #include "subsystems/abi.h"
36 #include "mcu_periph/uart.h"
38 #if GPS_USE_LATLONG
41 #include "generated/flight_plan.h"
42 #endif
43 
44 #include <libsbp/sbp.h>
45 #include <libsbp/navigation.h>
46 #include <libsbp/observation.h>
47 #include <libsbp/tracking.h>
48 #include <libsbp/settings.h>
49 #include <libsbp/piksi.h>
50 
51 #define SBP_FIX_MODE_SPP 0X00
52 #define SBP_FIX_MODE_FLOAT 0X02
53 #define SPB_FIX_MODE_FIXED 0X01
54 
55 #define POS_ECEF_TIMEOUT 1000
56 
57 /*
58  * Set the Piksi GPS antenna (default is Patch, internal)
59  */
60 #if USE_PIKSI_EXT_ANTENNA
61 static const char SBP_ANT_SET[] = "frontend""\x00""antenna_selection""\x00""External";
62 #elif USE_PIKSI_AUTO_ANTENNA
63 static const char SBP_ANT_SET[] = "frontend""\x00""antenna_selection""\x00""Auto";
64 #else
65 static const char SBP_ANT_SET[] = "frontend""\x00""antenna_selection""\x00""Patch";
66 #endif
67 
68 /*
69  * Set the UART config depending on which UART is connected
70  */
71 #if USE_PIKSI_UARTA
72 static const char SBP_UART_SET1[] = "uart_uarta""\x00""mode""\x00""SBP";
73 static const char SBP_UART_SET2[] = "uart_uarta""\x00""sbp_message_mask""\x00""784"; //0x310 which masks all navigation and tracking messages
74 static const char SBP_UART_SET3[] = "uart_uarta""\x00""configure_telemetry_radio_on_boot""\x00""False";
75 #else
76 static const char SBP_UART_SET1[] = "uart_uartb""\x00""mode""\x00""SBP";
77 static const char SBP_UART_SET2[] = "uart_uartb""\x00""sbp_message_mask""\x00""784"; //0x310 which masks all navigation and tracking messages
78 static const char SBP_UART_SET3[] = "uart_uartb""\x00""configure_telemetry_radio_on_boot""\x00""False";
79 #endif
80 
81 /*
82  * State of the SBP message parser.
83  * Must be statically allocated.
84  */
85 sbp_state_t sbp_state;
86 
87 /*
88  * SBP callback nodes must be statically allocated. Each message ID / callback
89  * pair must have a unique sbp_msg_callbacks_node_t associated with it.
90  */
91 sbp_msg_callbacks_node_t pos_ecef_node;
92 sbp_msg_callbacks_node_t vel_ecef_node;
93 sbp_msg_callbacks_node_t pos_llh_node;
94 sbp_msg_callbacks_node_t vel_ned_node;
95 sbp_msg_callbacks_node_t dops_node;
96 sbp_msg_callbacks_node_t gps_time_node;
97 sbp_msg_callbacks_node_t tracking_state_node;
98 sbp_msg_callbacks_node_t tracking_state_dep_a_node;
99 
100 
101 static void gps_piksi_publish(void);
102 static uint8_t get_fix_mode(uint8_t flags);
103 uint32_t gps_piksi_read(uint8_t *buff, uint32_t n, void *context __attribute__((unused)));
104 uint32_t gps_piksi_write(uint8_t *buff, uint32_t n, void *context __attribute__((unused)));
106 
107 /*
108  * Callback functions to interpret SBP messages.
109  * Every message ID has a callback associated with it to
110  * receive and interpret the message payload.
111  */
112 static void sbp_pos_ecef_callback(uint16_t sender_id __attribute__((unused)),
113  uint8_t len __attribute__((unused)),
114  uint8_t msg[],
115  void *context __attribute__((unused)))
116 {
117  time_since_last_pos_update = get_sys_time_msec();
118  msg_pos_ecef_t pos_ecef = *(msg_pos_ecef_t *)msg;
119 
120  // Check if we got RTK fix (FIXME when libsbp has a nicer way of doing this)
121  gps.fix = get_fix_mode(pos_ecef.flags);
122  // get_fix_mode() will still return fix > 3D even if the current flags are spp so ignore when it is spp
123  if ( ( (gps.fix > GPS_FIX_3D) )
124  && pos_ecef.flags == SBP_FIX_MODE_SPP) {
125  return;
126  }
127 
128  gps.ecef_pos.x = (int32_t)(pos_ecef.x * 100.0);
129  gps.ecef_pos.y = (int32_t)(pos_ecef.y * 100.0);
130  gps.ecef_pos.z = (int32_t)(pos_ecef.z * 100.0);
131  gps.pacc = (uint32_t)(pos_ecef.accuracy);// FIXME not implemented yet by libswiftnav
132  gps.num_sv = pos_ecef.n_sats;
133  gps.tow = pos_ecef.tow;
134  gps_piksi_publish(); // Only if RTK position
135 }
136 
137 static void sbp_vel_ecef_callback(uint16_t sender_id __attribute__((unused)),
138  uint8_t len __attribute__((unused)),
139  uint8_t msg[],
140  void *context __attribute__((unused)))
141 {
142  msg_vel_ecef_t vel_ecef = *(msg_vel_ecef_t *)msg;
143  gps.ecef_vel.x = (int32_t)(vel_ecef.x / 10);
144  gps.ecef_vel.y = (int32_t)(vel_ecef.y / 10);
145  gps.ecef_vel.z = (int32_t)(vel_ecef.z / 10);
146  gps.sacc = (uint32_t)(vel_ecef.accuracy);
147 
148  // Solution available (VEL_ECEF is the last message to be send)
149  gps_piksi_publish(); // TODO: filter out if got RTK position
150 }
151 
152 static void sbp_pos_llh_callback(uint16_t sender_id __attribute__((unused)),
153  uint8_t len __attribute__((unused)),
154  uint8_t msg[],
155  void *context __attribute__((unused)))
156 {
157  static uint8_t last_flags = 0;
158  msg_pos_llh_t pos_llh = *(msg_pos_llh_t *)msg;
159 
160  // Check if we got RTK fix (FIXME when libsbp has a nicer way of doing this)
161  if(pos_llh.flags > 0 || last_flags == 0) {
162  gps.lla_pos.lat = (int32_t)(pos_llh.lat * 1e7);
163  gps.lla_pos.lon = (int32_t)(pos_llh.lon * 1e7);
164  int32_t alt = (int32_t)(pos_llh.height * 1000.);
165 #if GPS_USE_LATLONG
166  /* Computes from (lat, long) in the referenced UTM zone */
167  struct LlaCoor_f lla_f;
168  LLA_FLOAT_OF_BFP(lla_f, gps.lla_pos);
169  struct UtmCoor_f utm_f;
170  utm_f.zone = nav_utm_zone0;
171  /* convert to utm */
172  utm_of_lla_f(&utm_f, &lla_f);
173  /* copy results of utm conversion */
174  gps.utm_pos.east = utm_f.east * 100;
175  gps.utm_pos.north = utm_f.north * 100;
178  // height is above ellipsoid or MSL according to bit flag (but not both are available)
179  // 0: above ellipsoid
180  // 1: above MSL
181  // we have to get the HMSL from the flight plan for now
182  if (bit_is_set(pos_llh.flags, 3)) {
183  gps.hmsl = alt;
184  gps.lla_pos.alt = alt + NAV_MSL0;
185  } else {
186  gps.lla_pos.alt = alt;
187  gps.hmsl = alt - NAV_MSL0;
188  }
189 #else
190  // but here we fill the two alt with the same value since we don't know HMSL
191  gps.lla_pos.alt = alt;
192  gps.hmsl = alt;
193 #endif
194  }
195  last_flags = pos_llh.flags;
196 }
197 
198 static void sbp_vel_ned_callback(uint16_t sender_id __attribute__((unused)),
199  uint8_t len __attribute__((unused)),
200  uint8_t msg[],
201  void *context __attribute__((unused)))
202 {
203  msg_vel_ned_t vel_ned = *(msg_vel_ned_t *)msg;
204  gps.ned_vel.x = (int32_t)(vel_ned.n / 10);
205  gps.ned_vel.y = (int32_t)(vel_ned.e / 10);
206  gps.ned_vel.z = (int32_t)(vel_ned.d / 10);
207 #if GPS_USE_LATLONG
209  gps.course = (int32_t)(1e7 * atan2(gps.ned_vel.y, gps.ned_vel.x));
210 #endif
211 }
212 
213 static void sbp_dops_callback(uint16_t sender_id __attribute__((unused)),
214  uint8_t len __attribute__((unused)),
215  uint8_t msg[],
216  void *context __attribute__((unused)))
217 {
218  msg_dops_t dops = *(msg_dops_t *)msg;
219  gps.pdop = dops.pdop;
220 }
221 
222 static void sbp_gps_time_callback(uint16_t sender_id __attribute__((unused)),
223  uint8_t len __attribute__((unused)),
224  uint8_t msg[],
225  void *context __attribute__((unused)))
226 {
227  msg_gps_time_t gps_time = *(msg_gps_time_t *)msg;
228  gps.week = gps_time.wn;
229  gps.tow = gps_time.tow;
230 }
231 
232 static void sbp_tracking_state_callback(uint16_t sender_id __attribute__((unused)),
233  uint8_t len,
234  uint8_t msg[],
235  void *context __attribute__((unused)))
236 {
237  uint8_t channels_cnt = len/sizeof(tracking_channel_state_t);
238  msg_tracking_state_t *tracking_state = (msg_tracking_state_t *)msg;
239 
240  for(uint8_t i = 0; i < channels_cnt; i++) {
241  if(tracking_state->states[i].state == 1) {
242  gps.svinfos[i].svid = tracking_state->states[i].sid + 1;
243  gps.svinfos[i].cno = tracking_state->states[i].cn0;
244  }
245  }
246 }
247 
248 static void sbp_tracking_state_dep_a_callback(uint16_t sender_id __attribute__((unused)),
249  uint8_t len,
250  uint8_t msg[],
251  void *context __attribute__((unused)))
252 {
253  uint8_t channels_cnt = len/sizeof(tracking_channel_state_dep_a_t);
254  msg_tracking_state_dep_a_t *tracking_state = (msg_tracking_state_dep_a_t *)msg;
255 
256  for(uint8_t i = 0; i < channels_cnt; i++) {
257  if(tracking_state->states[i].state == 1) {
258  gps.svinfos[i].svid = tracking_state->states[i].prn + 1;
259  gps.svinfos[i].cno = tracking_state->states[i].cn0;
260  }
261  }
262 }
263 
264 /*
265  * Return fix mode based on present and past flags
266  */
268 {
269  static uint8_t n_since_last_rtk = 0;
270  if (flags == SBP_FIX_MODE_SPP) {
271  n_since_last_rtk++;
272  if ( n_since_last_rtk > 2 ) {
273  return GPS_FIX_3D;
274  } else {
275  return gps.fix;
276  }
277  } else if (flags == SBP_FIX_MODE_FLOAT) {
278  n_since_last_rtk = 0;
279  return GPS_FIX_DGPS;
280  } else if (flags == SPB_FIX_MODE_FIXED) {
281  n_since_last_rtk = 0;
282  return GPS_FIX_RTK;
283  } else {
284  return GPS_FIX_NONE;
285  }
286 
287 }
288 
289 /*
290  * Initialize the Piksi GPS and write the settings
291  */
292 void gps_impl_init(void)
293 {
294  /* Setup SBP nodes */
295  sbp_state_init(&sbp_state);
296 
297  /* Register a node and callback, and associate them with a specific message ID. */
298  sbp_register_callback(&sbp_state, SBP_MSG_POS_ECEF, &sbp_pos_ecef_callback, NULL, &pos_ecef_node);
299  sbp_register_callback(&sbp_state, SBP_MSG_VEL_ECEF, &sbp_vel_ecef_callback, NULL, &vel_ecef_node);
300  sbp_register_callback(&sbp_state, SBP_MSG_POS_LLH, &sbp_pos_llh_callback, NULL, &pos_llh_node);
301  sbp_register_callback(&sbp_state, SBP_MSG_VEL_NED, &sbp_vel_ned_callback, NULL, &vel_ned_node);
302  sbp_register_callback(&sbp_state, SBP_MSG_DOPS, &sbp_dops_callback, NULL, &dops_node);
303  sbp_register_callback(&sbp_state, SBP_MSG_GPS_TIME, &sbp_gps_time_callback, NULL, &gps_time_node);
304  sbp_register_callback(&sbp_state, SBP_MSG_TRACKING_STATE, &sbp_tracking_state_callback, NULL, &tracking_state_node);
305  sbp_register_callback(&sbp_state, SBP_MSG_TRACKING_STATE_DEP_A, &sbp_tracking_state_dep_a_callback, NULL, &tracking_state_dep_a_node);
306 
307  /* Write settings */
308  sbp_send_message(&sbp_state, SBP_MSG_SETTINGS_WRITE, SBP_SENDER_ID, sizeof(SBP_ANT_SET), (u8*)(&SBP_ANT_SET), gps_piksi_write);
309  sbp_send_message(&sbp_state, SBP_MSG_SETTINGS_WRITE, SBP_SENDER_ID, sizeof(SBP_UART_SET1), (u8*)(&SBP_UART_SET1), gps_piksi_write);
310  sbp_send_message(&sbp_state, SBP_MSG_SETTINGS_WRITE, SBP_SENDER_ID, sizeof(SBP_UART_SET2), (u8*)(&SBP_UART_SET2), gps_piksi_write);
311  sbp_send_message(&sbp_state, SBP_MSG_SETTINGS_WRITE, SBP_SENDER_ID, sizeof(SBP_UART_SET3), (u8*)(&SBP_UART_SET3), gps_piksi_write);
312  sbp_send_message(&sbp_state, SBP_MSG_SETTINGS_SAVE, SBP_SENDER_ID, 0, NULL, gps_piksi_write);
313  /*msg_base_pos_t base_pos;
314  base_pos.lat = 51.991152;
315  base_pos.lon = 4.378052;
316  base_pos.height = 50.;
317  sbp_send_message(&sbp_state, SBP_MSG_BASE_POS, SBP_SENDER_ID, sizeof(msg_base_pos_t), (u8*)(&base_pos), gps_piksi_write);*/
318 
320 }
321 
322 /*
323  * Event handler for reading the GPS UART bytes
324  */
325 void gps_piksi_event(void)
326 {
327  if ( get_sys_time_msec() - time_since_last_pos_update > POS_ECEF_TIMEOUT ) {
328  gps.fix = GPS_FIX_NONE;
329  }
330  // call sbp event function
331  if (uart_char_available(&(GPS_LINK)))
332  sbp_process(&sbp_state, &gps_piksi_read);
333 }
334 
335 /*
336  * Publish the GPS data from the Piksi on the ABI bus
337  */
338 static void gps_piksi_publish(void)
339 {
340  // current timestamp
341  uint32_t now_ts = get_sys_time_usec();
342 
345  if (gps.fix >= GPS_FIX_3D) {
348  }
349  AbiSendMsgGPS(GPS_PIKSI_ID, now_ts, &gps);
350 }
351 
352 /*
353  * Read bytes from the Piksi UART connection
354  * This is a wrapper functions used in the libsbp library
355  */
356 uint32_t gps_piksi_read(uint8_t *buff, uint32_t n, void *context __attribute__((unused)))
357 {
358  uint32_t i;
359  for (i = 0; i < n; i++) {
360  if (!uart_char_available(&(GPS_LINK)))
361  break;
362 
363  buff[i] = uart_getch(&(GPS_LINK));
364  }
365  return i;
366 }
367 
368 /*
369  * Write bytes to the Piksi UART connection
370  * This is a wrapper functions used in the libsbp library
371  */
372 uint32_t gps_piksi_write(uint8_t *buff, uint32_t n, void *context __attribute__((unused)))
373 {
374  uint32_t i = 0;
375  for (i = 0; i < n; i++) {
376  uart_put_byte(&(GPS_LINK), buff[i]);
377  }
378  return n;
379 }
380 
384 void gps_inject_data(uint8_t packet_id, uint8_t length, uint8_t *data)
385 {
386  sbp_send_message(&sbp_state, packet_id, SBP_SENDER_ID, length, data, gps_piksi_write);
387 }
static uint32_t get_sys_time_msec(void)
Get the time in milliseconds since startup.
Definition: sys_time_arch.h:49
unsigned short uint16_t
Definition: types.h:16
int32_t z
in centimeters
static uint8_t get_fix_mode(uint8_t flags)
Definition: gps_piksi.c:267
#define GPS_PIKSI_ID
int32_t north
in centimeters
uint32_t gps_piksi_read(uint8_t *buff, uint32_t n, void *context)
Definition: gps_piksi.c:356
sbp_state_t sbp_state
Definition: gps_piksi.c:85
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
struct SVinfo svinfos[GPS_NB_CHANNELS]
holds information from the Space Vehicles (Satellites)
Definition: gps.h:87
#define SBP_FIX_MODE_SPP
Definition: gps_piksi.c:51
uint32_t gps_piksi_write(uint8_t *buff, uint32_t n, void *context)
Definition: gps_piksi.c:372
sbp_msg_callbacks_node_t vel_ecef_node
Definition: gps_piksi.c:92
sbp_msg_callbacks_node_t tracking_state_dep_a_node
Definition: gps_piksi.c:98
float east
in meters
uint32_t pacc
position accuracy in cm
Definition: gps.h:77
sbp_msg_callbacks_node_t gps_time_node
Definition: gps_piksi.c:96
static void sbp_tracking_state_dep_a_callback(uint16_t sender_id, uint8_t len, uint8_t msg[], void *context)
Definition: gps_piksi.c:248
float north
in meters
float alt
in meters above WGS84 reference ellipsoid
uint8_t nb_channels
Number of scanned satellites.
Definition: gps.h:86
int32_t y
in centimeters
uint16_t week
GPS week.
Definition: gps.h:83
uint16_t uart_char_available(struct uart_periph *p)
Check UART for available chars in receive buffer.
Definition: uart_arch.c:296
Main include for ABI (AirBorneInterface).
static const char SBP_ANT_SET[]
Definition: gps_piksi.c:65
uint8_t nav_utm_zone0
Definition: common_nav.c:44
void gps_impl_init(void)
GPS initialization.
Definition: gps_piksi.c:292
static void sbp_pos_llh_callback(uint16_t sender_id, uint8_t len, uint8_t msg[], void *context)
Definition: gps_piksi.c:152
position in UTM coordinates Units: meters
int32_t east
in centimeters
sbp_msg_callbacks_node_t dops_node
Definition: gps_piksi.c:95
uint8_t svid
Satellite ID.
Definition: gps.h:58
#define GPS_FIX_3D
3D GPS fix
Definition: gps.h:43
sbp_msg_callbacks_node_t pos_llh_node
Definition: gps_piksi.c:93
int32_t z
Down.
struct UtmCoor_i utm_pos
position in UTM (north,east: cm; alt: mm over ellipsoid)
Definition: gps.h:70
void gps_piksi_event(void)
Definition: gps_piksi.c:325
uint32_t last_3dfix_ticks
cpu time ticks at last valid 3D fix
Definition: gps.h:89
int32_t alt
in millimeters above WGS84 reference ellipsoid
static uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
Definition: sys_time_arch.h:39
uint32_t sacc
speed accuracy in cm/s
Definition: gps.h:78
static void gps_piksi_publish(void)
Definition: gps_piksi.c:338
int32_t y
East.
#define SPB_FIX_MODE_FIXED
Definition: gps_piksi.c:53
Paparazzi double-precision floating point math for geodetic calculations.
uint32_t last_msg_time
cpu time in sec at last received GPS message
Definition: gps.h:92
uint8_t zone
UTM zone number.
Paparazzi floating point math for geodetic calculations.
vector in Latitude, Longitude and Altitude
#define GPS_FIX_DGPS
DGPS fix.
Definition: gps.h:44
static void sbp_tracking_state_callback(uint16_t sender_id, uint8_t len, uint8_t msg[], void *context)
Definition: gps_piksi.c:232
static void sbp_dops_callback(uint16_t sender_id, uint8_t len, uint8_t msg[], void *context)
Definition: gps_piksi.c:213
int32_t hmsl
height above mean sea level in mm
Definition: gps.h:71
uint8_t cno
Carrier to Noise Ratio (Signal Strength) in dbHz.
Definition: gps.h:61
sbp_msg_callbacks_node_t pos_ecef_node
Definition: gps_piksi.c:91
uint32_t tow
GPS time of week in ms.
Definition: gps.h:84
#define GPS_FIX_NONE
No GPS fix.
Definition: gps.h:41
Device independent GPS code (interface)
uint16_t pdop
position dilution of precision scaled by 100
Definition: gps.h:80
int32_t x
North.
unsigned long uint32_t
Definition: types.h:18
static const char SBP_UART_SET3[]
Definition: gps_piksi.c:78
struct EcefCoor_i ecef_pos
position in ECEF in cm
Definition: gps.h:68
uint32_t int32_sqrt(uint32_t in)
int32_t lon
in degrees*1e7
Driver for Piksi modules from Swift-Nav.
sbp_msg_callbacks_node_t tracking_state_node
Definition: gps_piksi.c:97
uint8_t zone
UTM zone number.
volatile uint32_t nb_sec_rem
remainder of seconds since startup in CPU_TICKS
Definition: sys_time.h:70
static void sbp_vel_ecef_callback(uint16_t sender_id, uint8_t len, uint8_t msg[], void *context)
Definition: gps_piksi.c:137
uint8_t uart_getch(struct uart_periph *p)
Definition: uart_arch.c:287
signed long int32_t
Definition: types.h:19
#define GPS_FIX_RTK
RTK GPS fix.
Definition: gps.h:45
static const char SBP_UART_SET1[]
Definition: gps_piksi.c:76
uint32_t last_3dfix_time
cpu time in sec at last valid 3D fix
Definition: gps.h:90
int32_t alt
in millimeters above WGS84 reference ellipsoid
static void sbp_pos_ecef_callback(uint16_t sender_id, uint8_t len, uint8_t msg[], void *context)
Definition: gps_piksi.c:112
unsigned char uint8_t
Definition: types.h:14
int32_t course
GPS course over ground in rad*1e7, [0, 2*Pi]*1e7 (CW/north)
Definition: gps.h:76
static const char SBP_UART_SET2[]
Definition: gps_piksi.c:77
volatile uint32_t nb_sec
full seconds since startup
Definition: sys_time.h:69
static uint32_t time_since_last_pos_update
Definition: gps_piksi.c:105
static void sbp_gps_time_callback(uint16_t sender_id, uint8_t len, uint8_t msg[], void *context)
Definition: gps_piksi.c:222
uint32_t last_msg_ticks
cpu time ticks at last received GPS message
Definition: gps.h:91
uint8_t num_sv
number of sat in fix
Definition: gps.h:81
int32_t x
in centimeters
uint16_t gspeed
norm of 2d ground speed in cm/s
Definition: gps.h:74
struct EcefCoor_i ecef_vel
speed ECEF in cm/s
Definition: gps.h:72
void gps_inject_data(uint8_t packet_id, uint8_t length, uint8_t *data)
Override the default GPS packet injector to inject the data trough UART.
Definition: gps_piksi.c:384
struct LlaCoor_i lla_pos
position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid)
Definition: gps.h:69
#define POS_ECEF_TIMEOUT
Definition: gps_piksi.c:55
int32_t lat
in degrees*1e7
uint8_t fix
status of fix
Definition: gps.h:82
uint8_t msg[10]
Buffer used for general comunication over SPI (out buffer)
struct NedCoor_i ned_vel
speed NED in cm/s
Definition: gps.h:73
struct GpsState gps
global GPS state
Definition: gps.c:41
static void sbp_vel_ned_callback(uint16_t sender_id, uint8_t len, uint8_t msg[], void *context)
Definition: gps_piksi.c:198
uint8_t buff[25]
Buffer used for general comunication over SPI (in buffer)
#define LLA_FLOAT_OF_BFP(_o, _i)
void uart_put_byte(struct uart_periph *periph, uint8_t data)
Definition: uart_arch.c:243
sbp_msg_callbacks_node_t vel_ned_node
Definition: gps_piksi.c:94
void utm_of_lla_f(struct UtmCoor_f *utm, struct LlaCoor_f *lla)
#define SBP_FIX_MODE_FLOAT
Definition: gps_piksi.c:52