Paparazzi UAS  v5.12_stable-4-g9b43e9b
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  }
192  break;
193  case UBX_CFG_ID:
194  if (gps_ubx.msg_id == UBX_CFG_PRT_ID) {
196  gps_ubx_ucenter.port_id = UBX_CFG_PRT_PortId(gps_ubx.msg_buf, 0);
197  gps_ubx_ucenter.baud_run = UBX_CFG_PRT_Baudrate(gps_ubx.msg_buf, 0);
198 
199  DEBUG_PRINT("gps_ubx_ucenter.baud_run: %u\n", gps_ubx_ucenter.baud_run);
200  DEBUG_PRINT("gps_ubx_ucenter.port_id: %u\n", gps_ubx_ucenter.port_id);
201  }
202  break;
203  default:
204  break;
205  }
206 }
207 
210 //
211 // UCENTER Configuration Functions
212 
219 static inline void gps_ubx_ucenter_config_port_poll(void)
220 {
221  UbxSend_CFG_PRT_POLL(gps_ubx_ucenter.dev);
222 }
223 
236 static inline void gps_ubx_ucenter_enable_msg(uint8_t class, uint8_t id, uint8_t rate)
237 {
238  UbxSend_CFG_MSG(gps_ubx_ucenter.dev, class, id, rate);
239 }
240 
249 #ifndef GPS_I2C
251 {
252  switch (nr) {
253  case 0:
254  case 1:
255  // Very important for some modules:
256  // Give the GPS some time to boot (up to 0.75 second)
257  break;
258  case 2:
260  uart_periph_set_baudrate(&(UBX_GPS_LINK), B38400); // Try the most common first?
262  break;
263  case 3:
266  return false;
267  }
269  uart_periph_set_baudrate(&(UBX_GPS_LINK), B9600); // Maybe the factory default?
271  break;
272  case 4:
275  return false;
276  }
278  uart_periph_set_baudrate(&(UBX_GPS_LINK), B57600); // The high-rate default?
280  break;
281  case 5:
284  return false;
285  }
287  uart_periph_set_baudrate(&(UBX_GPS_LINK), B4800); // Default NMEA baudrate?
289  break;
290  case 6:
293  return false;
294  }
296  uart_periph_set_baudrate(&(UBX_GPS_LINK), B115200); // Last possible option for ublox
298  break;
299  case 7:
302  return false;
303  }
305  uart_periph_set_baudrate(&(UBX_GPS_LINK), B230400); // Last possible option for ublox
307  break;
308  case 8:
311  return false;
312  }
313 
314  // Autoconfig Failed... let's setup the failsafe baudrate
315  // Should we try even a different baudrate?
316  gps_ubx_ucenter.baud_init = 0; // Set as zero to indicate that we couldn't verify the baudrate
317  uart_periph_set_baudrate(&(UBX_GPS_LINK), B9600);
318  return false;
319  default:
320  break;
321  }
322  return true;
323 }
324 #endif /* GPS_I2C */
325 // UBlox internal Navigation Solution
327 
328 #define NAV_DYN_STATIONARY 1
329 #define NAV_DYN_PEDESTRIAN 2
330 #define NAV_DYN_AUTOMOTIVE 3
331 #define NAV_DYN_SEA 4
332 #define NAV_DYN_AIRBORNE_1G 5
333 #define NAV_DYN_AIRBORNE_2G 6 // paparazzi default
334 #define NAV_DYN_AIRBORNE_4G 7
335 
336 #define NAV5_DYN_PORTABLE 0 // ublox default
337 #define NAV5_DYN_FIXED 1
338 #define NAV5_DYN_STATIONARY 2
339 #define NAV5_DYN_PEDESTRIAN 3
340 #define NAV5_DYN_AUTOMOTIVE 4
341 #define NAV5_DYN_SEA 5
342 #define NAV5_DYN_AIRBORNE_1G 6
343 #define NAV5_DYN_AIRBORNE_2G 7 // paparazzi default
344 #define NAV5_DYN_AIRBORNE_4G 8
345 
346 #ifndef GPS_UBX_NAV5_DYNAMICS
347 #define GPS_UBX_NAV5_DYNAMICS NAV5_DYN_AIRBORNE_2G
348 #endif
349 
350 #ifndef GPS_UBX_ENABLE_NMEA_DATA_MASK
351 #define GPS_UBX_ENABLE_NMEA_DATA_MASK 0x00
352 #endif
353 
354 #define NAV5_MASK 0x05 // Apply dynamic model and position fix mode settings
355 
356 #define NAV5_2D_ONLY 1
357 #define NAV5_3D_ONLY 2 // paparazzi default
358 #define NAV5_AUTO 3 // ublox default
359 
360 #define NAV5_DEFAULT_MIN_ELEV 5 // deg
361 #define NAV5_DEFAULT_PDOP_MASK 25 // no units
362 #define NAV5_DEFAULT_TDOP_MASK 25 // no units
363 #define NAV5_DEFAULT_P_ACC 100 // m
364 #define NAV5_DEFAULT_T_ACC 300 // m
365 #define NAV5_DEFAULT_STATIC_HOLD_THRES 0 // cm/s
366 
367 #define IGNORED 0
368 #define RESERVED 0
369 
370 static inline void gps_ubx_ucenter_config_nav(void)
371 {
372  // New ublox firmware v5 or higher uses CFG_NAV5 message, CFG_NAV is no longer available
373  // If version message couldn't be fetched, default to NAV5
374  DEBUG_PRINT("sw_ver: %i, hw_ver: %i\n", gps_ubx_ucenter.sw_ver_h, gps_ubx_ucenter.hw_ver_h);
377  UbxSend_CFG_NAV(gps_ubx_ucenter.dev,
378  NAV_DYN_AIRBORNE_2G, 3, 16, 24, 20, 5, 0, 0x3C,
379  0x3C, 0x14, 0x03E8 , 0x0000, 0x0, 0x17, 0x00FA, 0x00FA,
380  0x0064, 0x012C, 0x000F, 0x00, 0x00);
381  } else {
382 #if USE_GPS_UBX_RTCM
383  UbxSend_CFG_NAV5_HPG(gps_ubx_ucenter.dev,
387 #else
388  UbxSend_CFG_NAV5(gps_ubx_ucenter.dev,
392 #endif
393  }
394 }
395 
396 
397 
399 // UBlox port and protocol GPS configuration
400 
401 #ifdef GPS_PORT_ID
402 #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."
403 #endif
404 
405 // UART mode: 8N1 with reserved1 set for compatability with A4
406 #define UBX_UART_MODE_MASK 0x000008D0
407 
408 #define UBX_PROTO_MASK 0x0001
409 #define NMEA_PROTO_MASK 0x0002
410 #define RTCM_PROTO_MASK 0x0004
411 #define RTCM3_PROTO_MASK 0x0020
412 
413 #define GPS_PORT_DDC 0x00
414 #define GPS_PORT_UART1 0x01
415 #define GPS_PORT_UART2 0x02
416 #define GPS_PORT_USB 0x03
417 #define GPS_PORT_SPI 0x04
418 #define GPS_PORT_RESERVED 0x05
419 
420 #ifndef GPS_UBX_UCENTER_RATE
421 #define GPS_UBX_UCENTER_RATE 0x00FA // In milliseconds. 0x00FA = 250ms = 4Hz
422 #endif
423 
424 static inline void gps_ubx_ucenter_config_port(void)
425 {
426  switch (gps_ubx_ucenter.port_id) {
427  // I2C Interface
428  case GPS_PORT_DDC:
429 #ifdef GPS_I2C
430  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);
431 #else
432  DEBUG_PRINT("WARNING: Please include the gps_i2c module.\n");
433 #endif
434  break;
435  // UART Interface
436  case GPS_PORT_UART1:
437  case GPS_PORT_UART2:
438  UbxSend_CFG_PRT(gps_ubx_ucenter.dev,
442  break;
443  // USB Interface
444  case GPS_PORT_USB:
445  UbxSend_CFG_PRT(gps_ubx_ucenter.dev,
446  gps_ubx_ucenter.port_id, 0x0, 0x0, 0x0, 0x0,
447  UBX_PROTO_MASK | NMEA_PROTO_MASK, UBX_PROTO_MASK| (NMEA_PROTO_MASK & GPS_UBX_ENABLE_NMEA_DATA_MASK), 0x0, 0x0);
448  break;
449  case GPS_PORT_SPI:
450  DEBUG_PRINT("WARNING: ublox SPI port is currently not supported.\n");
451  break;
452  default:
453  DEBUG_PRINT("WARNING: Unknown ublox port id: %u\n", gps_ubx_ucenter.port_id);
454  break;
455  }
456 }
457 
458 #define GPS_SBAS_ENABLED 0x01
459 
460 #define GPS_SBAS_RANGING 0x01
461 #define GPS_SBAS_CORRECTIONS 0x02
462 #define GPS_SBAS_INTEGRITY 0x04
463 
464 #define GPS_SBAS_MAX_SBAS 1 // Default ublox setting uses 3 SBAS channels(?)
465 
466 #define GPS_SBAS_AUTOSCAN 0x00
467 
468 static inline void gps_ubx_ucenter_config_sbas(void)
469 {
470  // Since March 2nd 2011 EGNOS is released for aviation purposes
473  //UbxSend_CFG_SBAS(0x00, 0x00, 0x00, 0x00, 0x00);
474 }
475 
476 // Text Telemetry for Debugging
477 #undef GOT_PAYLOAD
478 
480 {
481  DEBUG_PRINT("gps_ubx_ucenter_configure nr: %u\n", nr);
482 
483  // Store the reply of the last configuration step and reset
484  if (nr < GPS_UBX_UCENTER_CONFIG_STEPS) {
486  }
487 
488  switch (nr) {
489  case 0:
490  // Use old baudrate to issue a baudrate change command
492  break;
493  case 1:
494 #ifndef GPS_I2C
495 #if PRINT_DEBUG_GPS_UBX_UCENTER
497  DEBUG_PRINT("ublox did not acknowledge port configuration.\n");
498  } else {
499  DEBUG_PRINT("Changed ublox baudrate to: %u\n", UART_SPEED(gps_ubx_ucenter.baud_target));
500  }
501 #endif
502  // Now the GPS baudrate should have changed
505 #endif /*GPS_I2C*/
506  UbxSend_MON_GET_VER(gps_ubx_ucenter.dev);
507  break;
508  case 2:
509  case 3:
510  case 4:
511  case 5:
512  // UBX_G5010 takes 0.7 seconds to answer a firmware request
513  // Version info is important for proper configuration as different firmwares have different settings
514  break;
515  case 6:
516  // Send some debugging info: detected baudrate, software version etc...
523 #if DEBUG_GPS_UBX_UCENTER
524  DOWNLINK_SEND_DEBUG(DefaultChannel, DefaultDevice, 6, gps_ubx_ucenter.replies);
525 #endif
526  // Configure CFG-NAV(5) message
528  break;
529  case 7:
530  // Geodetic Position Solution
531  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_POSLLH_ID, 1);
532  break;
533  case 8:
534  // Velocity Solution in NED
535  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_VELNED_ID, 1);
536  break;
537  case 9:
538  // Receiver Navigation Status
539  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_STATUS_ID, 1);
540  break;
541  case 10:
542  // Space Vehicle Information
543  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_SVINFO_ID, 4);
544  break;
545  case 11:
546  // Navigation Solution Information
547 #if GPS_UBX_UCENTER_SLOW_NAV_SOL
548  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_SOL_ID, 8);
549 #else
550  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_SOL_ID, 1);
551 #endif
552  break;
553  case 12:
554 #if ! USE_GPS_UBX_RXM_RAW
555  // Disable UTM on old Lea4P
556  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_POSUTM_ID, 0);
557 #endif
558  break;
559  case 13:
560  // SBAS Configuration
562  break;
563  case 14:
564  // Poll Navigation/Measurement Rate Settings
565  UbxSend_CFG_RATE(gps_ubx_ucenter.dev, GPS_UBX_UCENTER_RATE, 0x0001, 0x0000);
566  break;
567  case 15:
568  // Raw Measurement Data
569 #if USE_GPS_UBX_RXM_RAW
570  gps_ubx_ucenter_enable_msg(UBX_RXM_ID, UBX_RXM_RAW_ID, 1);
571 #endif
572  break;
573  case 16:
574  // Subframe Buffer
575 #if USE_GPS_UBX_RXM_SFRB
576  gps_ubx_ucenter_enable_msg(UBX_RXM_ID, UBX_RXM_SFRB_ID, 1);
577 #endif
578  break;
579 #if USE_GPS_UBX_RTCM
580  case 17:
581  DEBUG_PRINT("CFG_DGNSS\n");
582  UbxSend_CFG_DGNSS(gps_ubx_ucenter.dev, 0x03, RESERVED, RESERVED);
583  break;
584  case 18:
585  DEBUG_PRINT("Enable RELPOSNED\n");
586  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_RELPOSNED_ID, 1);
587  break;
588  case 19:
589  DEBUG_PRINT("Enable HPPPOSLLH\n");
590  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_HPPOSLLH_ID, 1);
591  break;
592  case 20:
593  DEBUG_PRINT("Enable RXM_RTCM\n");
594  gps_ubx_ucenter_enable_msg(UBX_RXM_ID, UBX_RXM_RTCM_ID, 1);
595  break;
596 #endif
597  case 21:
598  // Try to save on non-ROM devices...
599  UbxSend_CFG_CFG(gps_ubx_ucenter.dev, 0x00000000, 0xffffffff, 0x00000000);
600  break;
601  case 22:
602 #if DEBUG_GPS_UBX_UCENTER
603  // Debug Downlink the result of all configuration steps: see messages
604  // To view, enable DEBUG message in your telemetry configuration .xml
606  for (int i = 0; i < GPS_UBX_UCENTER_CONFIG_STEPS; i++) {
607  DEBUG_PRINT("%u\n", gps_ubx_ucenter.replies[i]);
608  }
609 #endif
610  return false;
611  default:
612  break;
613  }
614 
616  return true; // Continue, except for the last case
617 }
618 
620 {
621  return gps_ubx_ucenter.status;
622 }
#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:856
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.