Paparazzi UAS  v5.15_devel-47-g0391b4d
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gps_ubx_ucenter.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2011 The Paparazzi Team
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  *
21  * Initial author: C. De Wagter
22  */
23 
31 #include "subsystems/gps/gps_ubx.h"
32 #include "ubx_protocol.h"
34 
35 #if PRINT_DEBUG_GPS_UBX_UCENTER
36 #include <stdio.h>
37 #define DEBUG_PRINT(...) printf(__VA_ARGS__)
38 #else
39 #define DEBUG_PRINT(...) {}
40 #endif
41 
44 //
45 // UCENTER: init, periodic and event
46 #ifndef GPS_I2C
47 static bool gps_ubx_ucenter_autobaud(uint8_t nr);
48 #endif
49 static bool gps_ubx_ucenter_configure(uint8_t nr);
50 
51 #define GPS_UBX_UCENTER_STATUS_STOPPED 0
52 #define GPS_UBX_UCENTER_STATUS_AUTOBAUD 1
53 #define GPS_UBX_UCENTER_STATUS_CONFIG 2
54 #define GPS_UBX_UCENTER_STATUS_WAITING 3
55 
56 #define GPS_UBX_UCENTER_REPLY_NONE 0
57 #define GPS_UBX_UCENTER_REPLY_ACK 1
58 #define GPS_UBX_UCENTER_REPLY_NACK 2
59 #define GPS_UBX_UCENTER_REPLY_VERSION 3
60 #define GPS_UBX_UCENTER_REPLY_CFG_PRT 4
61 
62 // Target baudrate for the module
63 #define UBX_GPS_BAUD (UBX_GPS_LINK).baudrate
64 
65 // All U-Center data
67 
68 
70 // Init Function
71 
73 {
74  // Start UCenter
77  gps_ubx_ucenter.cnt = 0;
78 
82 
87 
88  for (int i = 0; i < GPS_UBX_UCENTER_CONFIG_STEPS; i++) {
89  gps_ubx_ucenter.replies[i] = 0;
90  }
91 
92  gps_ubx_ucenter.dev = &(UBX_GPS_LINK).device;
93 }
94 
95 
97 // Periodic Function
98 // -time-based configuration
99 
101 {
102  switch (gps_ubx_ucenter.status) {
103  // Save processing time inflight
105  return;
106  break;
107  // Automatically Determine Current Baudrate
109 #ifdef GPS_I2C
110  gps_ubx_ucenter.cnt = 0;
112 #else
115  gps_ubx_ucenter.cnt = 0;
116 #if PRINT_DEBUG_GPS_UBX_UCENTER
117  if (gps_ubx_ucenter.baud_init > 0) {
118  DEBUG_PRINT("Initial ublox baudrate found: %u\n", gps_ubx_ucenter.baud_init);
119  } else {
120  DEBUG_PRINT("WARNING: Unable to determine the ublox baudrate. Autoconfiguration is unlikely to work.\n");
121  }
122 #endif
123  } else {
125  }
126 #endif /* GPS_I2C */
127  break;
128  // Send Configuration
132 #ifdef GPS_I2C
133  gps_i2c_begin();
134 #endif
135  gps_ubx_ucenter.cnt = 0;
136  } else {
138 #ifdef GPS_I2C
140  }
141  break;
143  if (gps_i2c_tx_is_ready())
144  {
146 #endif /*GPS_I2C*/
147  }
148  break;
149  default:
150  // stop this module now...
151  // todo
152  break;
153  }
154 }
155 
157 // Event Function
158 // -fetch replies: ACK and VERSION info
159 
161 {
162  // Save processing time inflight
164  return;
165  }
166 
167  // Read Configuration Reply's
168  switch (gps_ubx.msg_class) {
169  case UBX_ACK_ID:
170  if (gps_ubx.msg_id == UBX_ACK_ACK_ID) {
172  DEBUG_PRINT("ACK\n");
173  } else if (gps_ubx.msg_id == UBX_ACK_NAK_ID) {
175  DEBUG_PRINT("NACK\n");
176  }
177  break;
178  case UBX_MON_ID:
179  if (gps_ubx.msg_id == UBX_MON_VER_ID) {
181  gps_ubx_ucenter.sw_ver_h = UBX_MON_VER_c(gps_ubx.msg_buf, 0) - '0';
182  gps_ubx_ucenter.sw_ver_l = 10 * (UBX_MON_VER_c(gps_ubx.msg_buf, 2) - '0');
183  gps_ubx_ucenter.sw_ver_l += UBX_MON_VER_c(gps_ubx.msg_buf, 3) - '0';
184  gps_ubx_ucenter.hw_ver_h = UBX_MON_VER_c(gps_ubx.msg_buf, 33) - '0';
185  gps_ubx_ucenter.hw_ver_h += 10 * (UBX_MON_VER_c(gps_ubx.msg_buf, 32) - '0');
186  gps_ubx_ucenter.hw_ver_l = UBX_MON_VER_c(gps_ubx.msg_buf, 37) - '0';
187  gps_ubx_ucenter.hw_ver_l += 10 * (UBX_MON_VER_c(gps_ubx.msg_buf, 36) - '0');
188 
189  DEBUG_PRINT("ublox sw_ver: %u.%u\n", gps_ubx_ucenter.sw_ver_h, gps_ubx_ucenter.sw_ver_l);
190  DEBUG_PRINT("ublox hw_ver: %u.%u\n", gps_ubx_ucenter.hw_ver_h, gps_ubx_ucenter.hw_ver_l);
191  } else if (gps_ubx.msg_id == UBX_MON_GNSS_ID) {
192  gps_ubx_ucenter.gnss_in_use = UBX_MON_GNSS_enabled(gps_ubx.msg_buf);
193  }
194  break;
195  case UBX_CFG_ID:
196  if (gps_ubx.msg_id == UBX_CFG_PRT_ID) {
198  gps_ubx_ucenter.port_id = UBX_CFG_PRT_PortId(gps_ubx.msg_buf, 0);
199  gps_ubx_ucenter.baud_run = UBX_CFG_PRT_Baudrate(gps_ubx.msg_buf, 0);
200 
201  DEBUG_PRINT("gps_ubx_ucenter.baud_run: %u\n", gps_ubx_ucenter.baud_run);
202  DEBUG_PRINT("gps_ubx_ucenter.port_id: %u\n", gps_ubx_ucenter.port_id);
203  }
204  break;
205  default:
206  break;
207  }
208 }
209 
212 //
213 // UCENTER Configuration Functions
214 
221 static inline void gps_ubx_ucenter_config_port_poll(void)
222 {
223  UbxSend_CFG_PRT_POLL(gps_ubx_ucenter.dev);
224 }
225 
238 static inline void gps_ubx_ucenter_enable_msg(uint8_t class, uint8_t id, uint8_t rate)
239 {
240  UbxSend_CFG_MSG(gps_ubx_ucenter.dev, class, id, rate);
241 }
242 
251 #ifndef GPS_I2C
253 {
254  switch (nr) {
255  case 0:
256  case 1:
257  // Very important for some modules:
258  // Give the GPS some time to boot (up to 0.75 second)
259  break;
260  case 2:
262  uart_periph_set_baudrate(&(UBX_GPS_LINK), B38400); // Try the most common first?
264  break;
265  case 3:
268  return false;
269  }
271  uart_periph_set_baudrate(&(UBX_GPS_LINK), B9600); // Maybe the factory default?
273  break;
274  case 4:
277  return false;
278  }
280  uart_periph_set_baudrate(&(UBX_GPS_LINK), B57600); // The high-rate default?
282  break;
283  case 5:
286  return false;
287  }
289  uart_periph_set_baudrate(&(UBX_GPS_LINK), B4800); // Default NMEA baudrate?
291  break;
292  case 6:
295  return false;
296  }
298  uart_periph_set_baudrate(&(UBX_GPS_LINK), B115200); // Last possible option for ublox
300  break;
301  case 7:
304  return false;
305  }
307  uart_periph_set_baudrate(&(UBX_GPS_LINK), B230400); // Last possible option for ublox
309  break;
310  case 8:
313  return false;
314  }
315 
316  // Autoconfig Failed... let's setup the failsafe baudrate
317  // Should we try even a different baudrate?
318  gps_ubx_ucenter.baud_init = 0; // Set as zero to indicate that we couldn't verify the baudrate
319  uart_periph_set_baudrate(&(UBX_GPS_LINK), B9600);
320  return false;
321  default:
322  break;
323  }
324  return true;
325 }
326 #endif /* GPS_I2C */
327 // UBlox internal Navigation Solution
329 
330 #define NAV_DYN_STATIONARY 1
331 #define NAV_DYN_PEDESTRIAN 2
332 #define NAV_DYN_AUTOMOTIVE 3
333 #define NAV_DYN_SEA 4
334 #define NAV_DYN_AIRBORNE_1G 5
335 #define NAV_DYN_AIRBORNE_2G 6 // paparazzi default
336 #define NAV_DYN_AIRBORNE_4G 7
337 
338 #define NAV5_DYN_PORTABLE 0 // ublox default
339 #define NAV5_DYN_FIXED 1
340 #define NAV5_DYN_STATIONARY 2
341 #define NAV5_DYN_PEDESTRIAN 3
342 #define NAV5_DYN_AUTOMOTIVE 4
343 #define NAV5_DYN_SEA 5
344 #define NAV5_DYN_AIRBORNE_1G 6
345 #define NAV5_DYN_AIRBORNE_2G 7 // paparazzi default
346 #define NAV5_DYN_AIRBORNE_4G 8
347 
348 #ifndef GPS_UBX_NAV5_DYNAMICS
349 #define GPS_UBX_NAV5_DYNAMICS NAV5_DYN_AIRBORNE_2G
350 #endif
351 
352 #ifndef GPS_UBX_ENABLE_NMEA_DATA_MASK
353 #define GPS_UBX_ENABLE_NMEA_DATA_MASK 0x00
354 #endif
355 
356 #define NAV5_MASK 0x05 // Apply dynamic model and position fix mode settings
357 
358 #define NAV5_2D_ONLY 1
359 #define NAV5_3D_ONLY 2 // paparazzi default
360 #define NAV5_AUTO 3 // ublox default
361 
362 #define NAV5_DEFAULT_MIN_ELEV 5 // deg
363 #define NAV5_DEFAULT_PDOP_MASK 25 // no units
364 #define NAV5_DEFAULT_TDOP_MASK 25 // no units
365 #define NAV5_DEFAULT_P_ACC 100 // m
366 #define NAV5_DEFAULT_T_ACC 300 // m
367 #define NAV5_DEFAULT_STATIC_HOLD_THRES 0 // cm/s
368 
369 #define IGNORED 0
370 #define RESERVED 0
371 
372 static inline void gps_ubx_ucenter_config_nav(void)
373 {
374  // New ublox firmware v5 or higher uses CFG_NAV5 message, CFG_NAV is no longer available
375  // If version message couldn't be fetched, default to NAV5
376  DEBUG_PRINT("sw_ver: %i, hw_ver: %i\n", gps_ubx_ucenter.sw_ver_h, gps_ubx_ucenter.hw_ver_h);
379  UbxSend_CFG_NAV(gps_ubx_ucenter.dev,
380  NAV_DYN_AIRBORNE_2G, 3, 16, 24, 20, 5, 0, 0x3C,
381  0x3C, 0x14, 0x03E8 , 0x0000, 0x0, 0x17, 0x00FA, 0x00FA,
382  0x0064, 0x012C, 0x000F, 0x00, 0x00);
383  } else {
384 #if USE_GPS_UBX_RTCM
385  UbxSend_CFG_NAV5_HPG(gps_ubx_ucenter.dev,
389 #else
390  UbxSend_CFG_NAV5(gps_ubx_ucenter.dev,
394 #endif
395  }
396 }
397 
398 
399 
401 // UBlox port and protocol GPS configuration
402 
403 #ifdef GPS_PORT_ID
404 #warning "GPS_PORT_ID is no longer needed by the ublox ucenter for automatically configuration. Please remove this defined variable and double check that autoconfig is working as expected."
405 #endif
406 
407 // UART mode: 8N1 with reserved1 set for compatability with A4
408 #define UBX_UART_MODE_MASK 0x000008D0
409 
410 #define UBX_PROTO_MASK 0x0001
411 #define NMEA_PROTO_MASK 0x0002
412 #define RTCM_PROTO_MASK 0x0004
413 #define RTCM3_PROTO_MASK 0x0020
414 
415 #define GPS_PORT_DDC 0x00
416 #define GPS_PORT_UART1 0x01
417 #define GPS_PORT_UART2 0x02
418 #define GPS_PORT_USB 0x03
419 #define GPS_PORT_SPI 0x04
420 #define GPS_PORT_RESERVED 0x05
421 
422 #ifndef GPS_UBX_UCENTER_RATE
423 #define GPS_UBX_UCENTER_RATE 0x00FA // In milliseconds. 0x00FA = 250ms = 4Hz
424 #endif
425 
426 static inline void gps_ubx_ucenter_config_port(void)
427 {
428  switch (gps_ubx_ucenter.port_id) {
429  // I2C Interface
430  case GPS_PORT_DDC:
431 #ifdef GPS_I2C
432  UbxSend_CFG_PRT(gps_ubx_ucenter.dev, gps_ubx_ucenter.port_id, 0x0, 0x0, (0x42<<1), 0x0, UBX_PROTO_MASK, UBX_PROTO_MASK, 0x0, 0x0);
433 #else
434  DEBUG_PRINT("WARNING: Please include the gps_i2c module.\n");
435 #endif
436  break;
437  // UART Interface
438  case GPS_PORT_UART1:
439  case GPS_PORT_UART2:
440  UbxSend_CFG_PRT(gps_ubx_ucenter.dev,
444  break;
445  // USB Interface
446  case GPS_PORT_USB:
447  UbxSend_CFG_PRT(gps_ubx_ucenter.dev,
448  gps_ubx_ucenter.port_id, 0x0, 0x0, 0x0, 0x0,
449  UBX_PROTO_MASK | NMEA_PROTO_MASK, UBX_PROTO_MASK| (NMEA_PROTO_MASK & GPS_UBX_ENABLE_NMEA_DATA_MASK), 0x0, 0x0);
450  break;
451  case GPS_PORT_SPI:
452  DEBUG_PRINT("WARNING: ublox SPI port is currently not supported.\n");
453  break;
454  default:
455  DEBUG_PRINT("WARNING: Unknown ublox port id: %u\n", gps_ubx_ucenter.port_id);
456  break;
457  }
458 }
459 
460 #define GPS_SBAS_ENABLED 0x01
461 
462 #define GPS_SBAS_RANGING 0x01
463 #define GPS_SBAS_CORRECTIONS 0x02
464 #define GPS_SBAS_INTEGRITY 0x04
465 
466 #define GPS_SBAS_MAX_SBAS 3 // Default ublox setting uses 3 SBAS channels(?)
467 
468 #define GPS_SBAS_AUTOSCAN 0x00
469 
470 static inline void gps_ubx_ucenter_config_sbas(void)
471 {
472  // Since March 2nd 2011 EGNOS is released for aviation purposes
475  //UbxSend_CFG_SBAS(0x00, 0x00, 0x00, 0x00, 0x00);
476 }
477 
478 // Text Telemetry for Debugging
479 #undef GOT_PAYLOAD
480 
482 {
483  DEBUG_PRINT("gps_ubx_ucenter_configure nr: %u\n", nr);
484 
485  // Store the reply of the last configuration step and reset
486  if (nr < GPS_UBX_UCENTER_CONFIG_STEPS) {
488  }
489 
490  switch (nr) {
491  case 0:
492  // Use old baudrate to issue a baudrate change command
494  break;
495  case 1:
496 #ifndef GPS_I2C
497 #if PRINT_DEBUG_GPS_UBX_UCENTER
499  DEBUG_PRINT("ublox did not acknowledge port configuration.\n");
500  } else {
501  DEBUG_PRINT("Changed ublox baudrate to: %u\n", UART_SPEED(gps_ubx_ucenter.baud_target));
502  }
503 #endif
504  // Now the GPS baudrate should have changed
507 #endif /*GPS_I2C*/
508  UbxSend_MON_GET_VER(gps_ubx_ucenter.dev);
509  break;
510  case 2:
511  case 3:
512  case 4:
513  case 5:
514  // UBX_G5010 takes 0.7 seconds to answer a firmware request
515  // Version info is important for proper configuration as different firmwares have different settings
516  break;
517  case 6:
518  // Configure CFG-NAV(5) message
520  break;
521  case 7:
522  // Geodetic Position Solution
523  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_POSLLH_ID, 1);
524  break;
525  case 8:
526  // Velocity Solution in NED
527  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_VELNED_ID, 1);
528  break;
529  case 9:
530  // Receiver Navigation Status
531  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_STATUS_ID, 1);
532  break;
533  case 10:
534  // Space Vehicle Information
535  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_SVINFO_ID, 4);
536  break;
537  case 11:
538  // Navigation Solution Information
539 #if GPS_UBX_UCENTER_SLOW_NAV_SOL
540  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_SOL_ID, 8);
541 #else
542  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_SOL_ID, 1);
543 #endif
544  break;
545  case 12:
546 #if ! USE_GPS_UBX_RXM_RAW
547  // Disable UTM on old Lea4P
548  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_POSUTM_ID, 0);
549 #endif
550  break;
551  case 13:
552  // SBAS Configuration
554  break;
555  case 14:
556  // Poll Navigation/Measurement Rate Settings
557  UbxSend_CFG_RATE(gps_ubx_ucenter.dev, GPS_UBX_UCENTER_RATE, 0x0001, 0x0000);
558  break;
559  case 15:
560  // Raw Measurement Data
561 #if USE_GPS_UBX_RXM_RAW
562  gps_ubx_ucenter_enable_msg(UBX_RXM_ID, UBX_RXM_RAW_ID, 1);
563 #endif
564  break;
565  case 16:
566  // Subframe Buffer
567 #if USE_GPS_UBX_RXM_SFRB
568  gps_ubx_ucenter_enable_msg(UBX_RXM_ID, UBX_RXM_SFRB_ID, 1);
569 #endif
570  break;
571 #if USE_GPS_UBX_RTCM
572  case 17:
573  DEBUG_PRINT("CFG_DGNSS\n");
574  UbxSend_CFG_DGNSS(gps_ubx_ucenter.dev, 0x03, RESERVED, RESERVED);
575  break;
576  case 18:
577  DEBUG_PRINT("Enable RELPOSNED\n");
578  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_RELPOSNED_ID, 1);
579  break;
580  case 19:
581  DEBUG_PRINT("Enable HPPPOSLLH\n");
582  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_HPPOSLLH_ID, 1);
583  break;
584  case 20:
585  DEBUG_PRINT("Enable RXM_RTCM\n");
586  gps_ubx_ucenter_enable_msg(UBX_RXM_ID, UBX_RXM_RTCM_ID, 1);
587  break;
588 #endif
589  case 21:
590  // Try to save on non-ROM devices...
591  UbxSend_CFG_CFG(gps_ubx_ucenter.dev, 0x00000000, 0xffffffff, 0x00000000);
592  break;
593  case 22:
594  UbxSend_MON_GET_GNSS(gps_ubx_ucenter.dev);
595  break;
596  case 23:
597  break;
598  case 24:
599 #if DEBUG_GPS_UBX_UCENTER
600  // Debug Downlink the result of all configuration steps: see messages
601  // To view, enable DEBUG message in your telemetry configuration .xml
603  for (int i = 0; i < GPS_UBX_UCENTER_CONFIG_STEPS; i++) {
604  DEBUG_PRINT("%u\n", gps_ubx_ucenter.replies[i]);
605  }
606 #endif
607 #ifdef DOWNLINK_TRANSPORT
608  {
612  }
613 #endif
614  return false;
615  default:
616  break;
617  }
618 
620  return true; // Continue, except for the last case
621 }
622 
624 {
625  return gps_ubx_ucenter.status;
626 }
#define NAV5_DEFAULT_MIN_ELEV
#define NAV5_DEFAULT_P_ACC
#define B38400
Definition: uart_arch.h:45
#define RTCM3_PROTO_MASK
void uart_periph_set_baudrate(struct uart_periph *p, uint32_t baud)
Set baudrate.
Definition: uart_arch.c:861
static bool gps_ubx_ucenter_configure(uint8_t nr)
#define GPS_UBX_UCENTER_CONFIG_STEPS
U-Center Variables.
#define NMEA_PROTO_MASK
#define NAV5_DEFAULT_PDOP_MASK
#define GPS_UBX_UCENTER_STATUS_STOPPED
#define GPS_PORT_UART1
#define GPS_SBAS_RANGING
#define GPS_UBX_UCENTER_REPLY_NONE
#define GPS_SBAS_AUTOSCAN
#define GPS_PORT_DDC
#define GPS_SBAS_CORRECTIONS
#define B115200
Definition: uart_arch.h:48
#define NAV5_DEFAULT_STATIC_HOLD_THRES
UBX protocol specific code.
#define IGNORED
#define GPS_UBX_UCENTER_RATE
#define GPS_UBX_ENABLE_NMEA_DATA_MASK
struct GpsUbx gps_ubx
Definition: gps_ubx.c:73
#define UBX_GPS_BAUD
char replies[GPS_UBX_UCENTER_CONFIG_STEPS]
uint8_t msg_buf[GPS_UBX_MAX_PAYLOAD]
Definition: gps_ubx.h:56
#define GPS_SBAS_ENABLED
uint8_t msg_id
Definition: gps_ubx.h:57
static void gps_ubx_ucenter_config_sbas(void)
#define FALSE
Definition: std.h:5
#define B230400
Definition: uart_arch.h:49
#define GPS_UBX_UCENTER_REPLY_NACK
static void gps_ubx_ucenter_config_port(void)
Configure Ublox GPS.
struct gps_ubx_ucenter_struct gps_ubx_ucenter
#define GPS_UBX_UCENTER_STATUS_WAITING
#define GPS_PORT_SPI
void gps_ubx_ucenter_periodic(void)
#define NAV5_DEFAULT_T_ACC
#define GPS_UBX_NAV5_DYNAMICS
#define GPS_UBX_UCENTER_STATUS_AUTOBAUD
#define B4800
Definition: uart_arch.h:42
#define NAV5_DEFAULT_TDOP_MASK
#define GPS_UBX_UCENTER_REPLY_ACK
#define GPS_UBX_UCENTER_STATUS_CONFIG
#define GPS_SBAS_INTEGRITY
#define NAV_DYN_AIRBORNE_2G
#define GPS_UBX_UCENTER_REPLY_VERSION
#define GPS_UBX_UCENTER_REPLY_CFG_PRT
#define B9600
Definition: uart_arch.h:43
#define RESERVED
static void gps_ubx_ucenter_config_port_poll(void)
Polls the u-blox port configuration When the payload is omitted (zero length), the configuration for ...
#define NAV5_MASK
int gps_ubx_ucenter_get_status(void)
void gps_ubx_ucenter_init(void)
void gps_ubx_ucenter_event(void)
unsigned char uint8_t
Definition: types.h:14
#define UART_SPEED(_def)
Definition: uart_arch.h:53
struct link_device * dev
#define GPS_PORT_USB
#define GPS_SBAS_MAX_SBAS
uint8_t port_id
Port identifier number.
bool gps_i2c_tx_is_ready(void)
is driver ready to send a message
Definition: gps_ubx_i2c.c:154
static bool gps_ubx_ucenter_autobaud(uint8_t nr)
Automatically determine the baudrate of the u-blox module.
#define DEBUG_PRINT(...)
#define NAV5_3D_ONLY
#define UBX_PROTO_MASK
#define GPS_PORT_UART2
#define B57600
Definition: uart_arch.h:46
void gps_i2c_begin(void)
config is done, begin reading messages
Definition: gps_ubx_i2c.c:159
#define UBX_UART_MODE_MASK
uint8_t msg_class
Definition: gps_ubx.h:58
static void gps_ubx_ucenter_config_nav(void)
static void gps_ubx_ucenter_enable_msg(uint8_t class, uint8_t id, uint8_t rate)
Enable u-blox message at desired period.