Paparazzi UAS  v5.15_devel-230-gc96ce27
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()) {
145 #endif /*GPS_I2C*/
146  }
147  break;
148  default:
149  // stop this module now...
150  // todo
151  break;
152  }
153 }
154 
156 // Event Function
157 // -fetch replies: ACK and VERSION info
158 
160 {
161  // Save processing time inflight
163  return;
164  }
165 
166  // Read Configuration Reply's
167  switch (gps_ubx.msg_class) {
168  case UBX_ACK_ID:
169  if (gps_ubx.msg_id == UBX_ACK_ACK_ID) {
171  DEBUG_PRINT("ACK\n");
172  } else if (gps_ubx.msg_id == UBX_ACK_NAK_ID) {
174  DEBUG_PRINT("NACK\n");
175  }
176  break;
177  case UBX_MON_ID:
178  if (gps_ubx.msg_id == UBX_MON_VER_ID) {
180  gps_ubx_ucenter.sw_ver_h = UBX_MON_VER_c(gps_ubx.msg_buf, 0) - '0';
181  gps_ubx_ucenter.sw_ver_l = 10 * (UBX_MON_VER_c(gps_ubx.msg_buf, 2) - '0');
182  gps_ubx_ucenter.sw_ver_l += UBX_MON_VER_c(gps_ubx.msg_buf, 3) - '0';
183  gps_ubx_ucenter.hw_ver_h = UBX_MON_VER_c(gps_ubx.msg_buf, 33) - '0';
184  gps_ubx_ucenter.hw_ver_h += 10 * (UBX_MON_VER_c(gps_ubx.msg_buf, 32) - '0');
185  gps_ubx_ucenter.hw_ver_l = UBX_MON_VER_c(gps_ubx.msg_buf, 37) - '0';
186  gps_ubx_ucenter.hw_ver_l += 10 * (UBX_MON_VER_c(gps_ubx.msg_buf, 36) - '0');
187 
188  DEBUG_PRINT("ublox sw_ver: %u.%u\n", gps_ubx_ucenter.sw_ver_h, gps_ubx_ucenter.sw_ver_l);
189  DEBUG_PRINT("ublox hw_ver: %u.%u\n", gps_ubx_ucenter.hw_ver_h, gps_ubx_ucenter.hw_ver_l);
190  } else if (gps_ubx.msg_id == UBX_MON_GNSS_ID) {
191  gps_ubx_ucenter.gnss_in_use = UBX_MON_GNSS_enabled(gps_ubx.msg_buf);
192  }
193  break;
194  case UBX_CFG_ID:
195  if (gps_ubx.msg_id == UBX_CFG_PRT_ID) {
197  gps_ubx_ucenter.port_id = UBX_CFG_PRT_PortId(gps_ubx.msg_buf, 0);
198  gps_ubx_ucenter.baud_run = UBX_CFG_PRT_Baudrate(gps_ubx.msg_buf, 0);
199 
200  DEBUG_PRINT("gps_ubx_ucenter.baud_run: %u\n", gps_ubx_ucenter.baud_run);
201  DEBUG_PRINT("gps_ubx_ucenter.port_id: %u\n", gps_ubx_ucenter.port_id);
202  }
203  break;
204  default:
205  break;
206  }
207 }
208 
211 //
212 // UCENTER Configuration Functions
213 
220 static inline void gps_ubx_ucenter_config_port_poll(void)
221 {
222  UbxSend_CFG_PRT_POLL(gps_ubx_ucenter.dev);
223 }
224 
237 static inline void gps_ubx_ucenter_enable_msg(uint8_t class, uint8_t id, uint8_t rate)
238 {
239  UbxSend_CFG_MSG(gps_ubx_ucenter.dev, class, id, rate);
240 }
241 
250 #ifndef GPS_I2C
252 {
253  switch (nr) {
254  case 0:
255  case 1:
256  // Very important for some modules:
257  // Give the GPS some time to boot (up to 0.75 second)
258  break;
259  case 2:
261  uart_periph_set_baudrate(&(UBX_GPS_LINK), B38400); // Try the most common first?
263  break;
264  case 3:
267  return false;
268  }
270  uart_periph_set_baudrate(&(UBX_GPS_LINK), B9600); // Maybe the factory default?
272  break;
273  case 4:
276  return false;
277  }
279  uart_periph_set_baudrate(&(UBX_GPS_LINK), B57600); // The high-rate default?
281  break;
282  case 5:
285  return false;
286  }
288  uart_periph_set_baudrate(&(UBX_GPS_LINK), B4800); // Default NMEA baudrate?
290  break;
291  case 6:
294  return false;
295  }
297  uart_periph_set_baudrate(&(UBX_GPS_LINK), B115200); // Last possible option for ublox
299  break;
300  case 7:
303  return false;
304  }
306  uart_periph_set_baudrate(&(UBX_GPS_LINK), B230400); // Last possible option for ublox
308  break;
309  case 8:
312  return false;
313  }
314 
315  // Autoconfig Failed... let's setup the failsafe baudrate
316  // Should we try even a different baudrate?
317  gps_ubx_ucenter.baud_init = 0; // Set as zero to indicate that we couldn't verify the baudrate
318  uart_periph_set_baudrate(&(UBX_GPS_LINK), B9600);
319  return false;
320  default:
321  break;
322  }
323  return true;
324 }
325 #endif /* GPS_I2C */
326 // UBlox internal Navigation Solution
328 
329 #define NAV_DYN_STATIONARY 1
330 #define NAV_DYN_PEDESTRIAN 2
331 #define NAV_DYN_AUTOMOTIVE 3
332 #define NAV_DYN_SEA 4
333 #define NAV_DYN_AIRBORNE_1G 5
334 #define NAV_DYN_AIRBORNE_2G 6 // paparazzi default
335 #define NAV_DYN_AIRBORNE_4G 7
336 
337 #define NAV5_DYN_PORTABLE 0 // ublox default
338 #define NAV5_DYN_FIXED 1
339 #define NAV5_DYN_STATIONARY 2
340 #define NAV5_DYN_PEDESTRIAN 3
341 #define NAV5_DYN_AUTOMOTIVE 4
342 #define NAV5_DYN_SEA 5
343 #define NAV5_DYN_AIRBORNE_1G 6
344 #define NAV5_DYN_AIRBORNE_2G 7 // paparazzi default
345 #define NAV5_DYN_AIRBORNE_4G 8
346 
347 #ifndef GPS_UBX_NAV5_DYNAMICS
348 #define GPS_UBX_NAV5_DYNAMICS NAV5_DYN_AIRBORNE_2G
349 #endif
350 
351 #ifndef GPS_UBX_ENABLE_NMEA_DATA_MASK
352 #define GPS_UBX_ENABLE_NMEA_DATA_MASK 0x00
353 #endif
354 
355 #define NAV5_MASK 0x05 // Apply dynamic model and position fix mode settings
356 
357 #define NAV5_2D_ONLY 1
358 #define NAV5_3D_ONLY 2 // paparazzi default
359 #define NAV5_AUTO 3 // ublox default
360 
361 #define NAV5_DEFAULT_MIN_ELEV 5 // deg
362 #define NAV5_DEFAULT_PDOP_MASK 25 // no units
363 #define NAV5_DEFAULT_TDOP_MASK 25 // no units
364 #define NAV5_DEFAULT_P_ACC 100 // m
365 #define NAV5_DEFAULT_T_ACC 300 // m
366 #define NAV5_DEFAULT_STATIC_HOLD_THRES 0 // cm/s
367 
368 #define IGNORED 0
369 #define RESERVED 0
370 
371 static inline void gps_ubx_ucenter_config_nav(void)
372 {
373  // New ublox firmware v5 or higher uses CFG_NAV5 message, CFG_NAV is no longer available
374  // If version message couldn't be fetched, default to NAV5
375  DEBUG_PRINT("sw_ver: %i, hw_ver: %i\n", gps_ubx_ucenter.sw_ver_h, gps_ubx_ucenter.hw_ver_h);
378  UbxSend_CFG_NAV(gps_ubx_ucenter.dev,
379  NAV_DYN_AIRBORNE_2G, 3, 16, 24, 20, 5, 0, 0x3C,
380  0x3C, 0x14, 0x03E8 , 0x0000, 0x0, 0x17, 0x00FA, 0x00FA,
381  0x0064, 0x012C, 0x000F, 0x00, 0x00);
382  } else {
383  UbxSend_CFG_NAV5(gps_ubx_ucenter.dev,
387  }
388 }
389 
390 
391 
393 // UBlox port and protocol GPS configuration
394 
395 #ifdef GPS_PORT_ID
396 #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."
397 #endif
398 
399 // UART mode: 8N1 with reserved1 set for compatability with A4
400 #define UBX_UART_MODE_MASK 0x000008D0
401 
402 #define UBX_PROTO_MASK 0x0001
403 #define NMEA_PROTO_MASK 0x0002
404 #define RTCM_PROTO_MASK 0x0004
405 #define RTCM3_PROTO_MASK 0x0020
406 
407 #define GPS_PORT_DDC 0x00
408 #define GPS_PORT_UART1 0x01
409 #define GPS_PORT_UART2 0x02
410 #define GPS_PORT_USB 0x03
411 #define GPS_PORT_SPI 0x04
412 #define GPS_PORT_RESERVED 0x05
413 
414 #ifndef GPS_UBX_UCENTER_RATE
415 #define GPS_UBX_UCENTER_RATE 0x00FA // In milliseconds. 0x00FA = 250ms = 4Hz
416 #endif
417 
418 static inline void gps_ubx_ucenter_config_port(void)
419 {
420  switch (gps_ubx_ucenter.port_id) {
421  // I2C Interface
422  case GPS_PORT_DDC:
423 #ifdef GPS_I2C
424  UbxSend_CFG_PRT(gps_ubx_ucenter.dev, gps_ubx_ucenter.port_id, 0x0, 0x0, (0x42 << 1), 0x0, UBX_PROTO_MASK,
425  UBX_PROTO_MASK, 0x0, 0x0);
426 #else
427  DEBUG_PRINT("WARNING: Please include the gps_i2c module.\n");
428 #endif
429  break;
430  // UART Interface
431  case GPS_PORT_UART1:
432  case GPS_PORT_UART2:
433  UbxSend_CFG_PRT(gps_ubx_ucenter.dev,
437  break;
438  // USB Interface
439  case GPS_PORT_USB:
440  UbxSend_CFG_PRT(gps_ubx_ucenter.dev,
441  gps_ubx_ucenter.port_id, 0x0, 0x0, 0x0, 0x0,
442  UBX_PROTO_MASK | NMEA_PROTO_MASK, UBX_PROTO_MASK | (NMEA_PROTO_MASK & GPS_UBX_ENABLE_NMEA_DATA_MASK), 0x0, 0x0);
443  break;
444  case GPS_PORT_SPI:
445  DEBUG_PRINT("WARNING: ublox SPI port is currently not supported.\n");
446  break;
447  default:
448  DEBUG_PRINT("WARNING: Unknown ublox port id: %u\n", gps_ubx_ucenter.port_id);
449  break;
450  }
451 }
452 
453 #define GPS_SBAS_ENABLED 0x01
454 
455 #define GPS_SBAS_RANGING 0x01
456 #define GPS_SBAS_CORRECTIONS 0x02
457 #define GPS_SBAS_INTEGRITY 0x04
458 
459 #define GPS_SBAS_MAX_SBAS 3 // Default ublox setting uses 3 SBAS channels(?)
460 
461 #define GPS_SBAS_AUTOSCAN 0x00
462 
463 static inline void gps_ubx_ucenter_config_sbas(void)
464 {
465  // Since March 2nd 2011 EGNOS is released for aviation purposes
469 }
470 
471 // Text Telemetry for Debugging
472 #undef GOT_PAYLOAD
473 
475 {
476  DEBUG_PRINT("gps_ubx_ucenter_configure nr: %u\n", nr);
477 
478  // Store the reply of the last configuration step and reset
479  if (nr < GPS_UBX_UCENTER_CONFIG_STEPS) {
481  }
482 
483  switch (nr) {
484  case 0:
485  // Use old baudrate to issue a baudrate change command
487  break;
488  case 1:
489 #ifndef GPS_I2C
490 #if PRINT_DEBUG_GPS_UBX_UCENTER
492  DEBUG_PRINT("ublox did not acknowledge port configuration.\n");
493  } else {
494  DEBUG_PRINT("Changed ublox baudrate to: %u\n", UART_SPEED(gps_ubx_ucenter.baud_target));
495  }
496 #endif
497  // Now the GPS baudrate should have changed
500 #endif /*GPS_I2C*/
501  UbxSend_MON_GET_VER(gps_ubx_ucenter.dev);
502  break;
503  case 2:
504  case 3:
505  case 4:
506  case 5:
507  // UBX_G5010 takes 0.7 seconds to answer a firmware request
508  // Version info is important for proper configuration as different firmwares have different settings
509  break;
510  case 6:
511  // Configure CFG-NAV(5) message
513  break;
514  case 7:
515  // Geodetic Position Solution
516  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_POSLLH_ID, 1);
517  break;
518  case 8:
519  // Velocity Solution in NED
520  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_VELNED_ID, 1);
521  break;
522  case 9:
523  // Receiver Navigation Status
524  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_STATUS_ID, 1);
525  break;
526  case 10:
527  // Space Vehicle Information
528  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_SVINFO_ID, 10);
529  break;
530  case 11:
531  // Navigation Solution Information
532 #if GPS_UBX_UCENTER_SLOW_NAV_SOL
533  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_SOL_ID, 8);
534 #else
535  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_SOL_ID, 1);
536 #endif
537  break;
538  case 12:
539  // Disable UTM on old Lea4P
540  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_POSUTM_ID, 0);
541  break;
542  case 13:
543  // Enable Position Velocity time solution
544  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_PVT_ID, 1);
545  break;
546  case 14:
547  // SBAS Configuration
549  break;
550  case 15:
551  // Poll Navigation/Measurement Rate Settings
552  UbxSend_CFG_RATE(gps_ubx_ucenter.dev, GPS_UBX_UCENTER_RATE, 0x0001, 0x0000);
553  break;
554  case 16:
555  // Raw Measurement Data
556 #if USE_GPS_UBX_RXM_RAW
557  gps_ubx_ucenter_enable_msg(UBX_RXM_ID, UBX_RXM_RAW_ID, 1);
558 #endif
559  break;
560  case 17:
561  // Subframe Buffer
562 #if USE_GPS_UBX_RXM_SFRB
563  gps_ubx_ucenter_enable_msg(UBX_RXM_ID, UBX_RXM_SFRB_ID, 1);
564 #endif
565  break;
566 #if USE_GPS_UBX_RTCM
567  case 18:
568  DEBUG_PRINT("CFG_DGNSS\n");
569  UbxSend_CFG_DGNSS(gps_ubx_ucenter.dev, 0x03, RESERVED, RESERVED);
570  break;
571  case 19:
572  DEBUG_PRINT("Enable RELPOSNED\n");
573  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_RELPOSNED_ID, 1);
574  break;
575  case 20:
576  DEBUG_PRINT("Enable HPPPOSLLH\n");
577  gps_ubx_ucenter_enable_msg(UBX_NAV_ID, UBX_NAV_HPPOSLLH_ID, 1);
578  break;
579  case 21:
580  DEBUG_PRINT("Enable RXM_RTCM\n");
581  gps_ubx_ucenter_enable_msg(UBX_RXM_ID, UBX_RXM_RTCM_ID, 1);
582  break;
583 #endif
584  case 22:
585  // Try to save on non-ROM devices...
586  UbxSend_CFG_CFG(gps_ubx_ucenter.dev, 0x00000000, 0xffffffff, 0x00000000);
587  break;
588  case 23:
589  UbxSend_MON_GET_GNSS(gps_ubx_ucenter.dev);
590  break;
591  case 24:
592  break;
593  case 25:
594 #if DEBUG_GPS_UBX_UCENTER
595  // Debug Downlink the result of all configuration steps: see messages
596  // To view, enable DEBUG message in your telemetry configuration .xml
598  for (int i = 0; i < GPS_UBX_UCENTER_CONFIG_STEPS; i++) {
599  DEBUG_PRINT("%u\n", gps_ubx_ucenter.replies[i]);
600  }
601 #endif
602 #ifdef DOWNLINK_TRANSPORT
603  {
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:883
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:75
#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:54
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.