|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Configure Ublox GPS. More...
#include "modules/gps/gps_ubx_ucenter.h"#include "modules/gps/gps_ubx.h"#include "ubx_protocol.h"#include "modules/datalink/downlink.h"#include "modules/datalink/telemetry.h"Go to the source code of this file.
Macros | |
| #define | GPS_UBX_UCENTER_RATE_LEGACY 200 |
| Measurement period [ms]: 5 Hz by default, 10 Hz with the configuration interface (X20). | |
| #define | GPS_UBX_UCENTER_RATE_VALSET 100 |
| #define | GPS_UBX_UCENTER_RATE_LEGACY_FALLBACK 250 |
| #define | GPS_UBX_UCENTER_RATE_VALSET_FALLBACK 200 |
| #define | NAV5_DYN_PORTABLE 0 |
| Dynamic platform model (same values for CFG-NAV5 and CFG-NAVSPG-DYNMODEL). | |
| #define | NAV5_DYN_FIXED 1 |
| #define | NAV5_DYN_STATIONARY 2 |
| #define | NAV5_DYN_PEDESTRIAN 3 |
| #define | NAV5_DYN_AUTOMOTIVE 4 |
| #define | NAV5_DYN_SEA 5 |
| #define | NAV5_DYN_AIRBORNE_1G 6 |
| #define | NAV5_DYN_AIRBORNE_2G 7 |
| #define | NAV5_DYN_AIRBORNE_4G 8 |
| #define | GPS_UBX_NAV5_DYNAMICS NAV5_DYN_AIRBORNE_2G |
| #define | NAV5_2D_ONLY 1 |
| Position fix mode (CFG-NAV5 and CFG-NAVSPG-FIXMODE). | |
| #define | NAV5_3D_ONLY 2 |
| #define | NAV5_AUTO 3 |
| #define | GPS_UBX_ENABLE_NMEA_DATA_MASK 0x00 |
| NMEA output next to UBX, disabled by default. | |
| #define | GPS_UBX_UCENTER_SAVE TRUE |
| Save the configuration to battery backed RAM and flash (UBX-CFG-CFG). | |
| #define | GPS_PORT_DDC 0x00 |
| Receiver port numbers (UBX-CFG-PRT), also the offset of the CFG-MSGOUT keys. | |
| #define | GPS_PORT_UART1 0x01 |
| #define | GPS_PORT_UART2 0x02 |
| #define | GPS_PORT_USB 0x03 |
| #define | GPS_PORT_SPI 0x04 |
| #define | GPS_UBX_UCENTER_STATUS_STOPPED 0 |
| #define | GPS_UBX_UCENTER_STATUS_AUTOBAUD 1 |
| #define | GPS_UBX_UCENTER_STATUS_CONFIG 2 |
| #define | GPS_UBX_UCENTER_STATUS_WAITING 3 |
| #define | GPS_UBX_UCENTER_REPLY_NONE 0 |
| #define | GPS_UBX_UCENTER_REPLY_ACK 1 |
| #define | GPS_UBX_UCENTER_REPLY_NACK 2 |
| #define | GPS_UBX_UCENTER_REPLY_VERSION 3 |
| #define | GPS_UBX_UCENTER_REPLY_CFG_PRT 4 |
| #define | UBX_GPS_BAUD (UBX_GPS_PORT).baudrate |
| #define | GPS_UBX_UCENTER_NB_BAUDS (sizeof(gps_ubx_ucenter_bauds) / sizeof(gps_ubx_ucenter_bauds[0])) |
| #define | NAV_DYN_AIRBORNE_2G 6 |
| #define | NAV5_MASK 0x05 |
| #define | NAV5_DEFAULT_MIN_ELEV 5 |
| #define | NAV5_DEFAULT_PDOP_MASK 25 |
| #define | NAV5_DEFAULT_TDOP_MASK 25 |
| #define | NAV5_DEFAULT_P_ACC 100 |
| #define | NAV5_DEFAULT_T_ACC 300 |
| #define | NAV5_DEFAULT_STATIC_HOLD_THRES 0 |
| #define | IGNORED 0 |
| #define | RESERVED 0 |
| #define | UBX_UART_MODE_MASK 0x000008D0 |
| #define | UBX_PROTO_MASK 0x0001 |
| #define | NMEA_PROTO_MASK 0x0002 |
| #define | RTCM_PROTO_MASK 0x0004 |
| #define | RTCM3_PROTO_MASK 0x0020 |
| #define | GPS_SBAS_ENABLED 0x01 |
| #define | GPS_SBAS_RANGING 0x01 |
| #define | GPS_SBAS_CORRECTIONS 0x02 |
| #define | GPS_SBAS_INTEGRITY 0x04 |
| #define | GPS_SBAS_MAX_SBAS 3 |
| #define | GPS_SBAS_AUTOSCAN 0x00 |
| #define | VALSET_LAYER_RAM 0x01 |
| Written to RAM only, saved afterwards like with the legacy messages (UBX-CFG-CFG): flash is not on every receiver, the whole message would be refused then. | |
| #define | CFG_RATE_MEAS 0x30210001 |
| #define | CFG_RATE_NAV 0x30210002 |
| #define | CFG_NAVSPG_FIXMODE 0x20110011 |
| #define | CFG_NAVSPG_DYNMODEL 0x20110021 |
| #define | CFG_UART1_BAUDRATE 0x40520001 |
| #define | CFG_UART2_BAUDRATE 0x40530001 |
| #define | CFG_UART1INPROT_RTCM3X 0x10730004 |
| #define | CFG_UART2INPROT_RTCM3X 0x10750004 |
| #define | CFG_UART1OUTPROT_NMEA 0x10740002 |
| #define | CFG_UART2OUTPROT_NMEA 0x10760002 |
| #define | CFG_MSGOUT_NAV_PVT 0x20910006 |
| #define | CFG_MSGOUT_NAV_POSLLH 0x20910029 |
| #define | CFG_MSGOUT_NAV_VELNED 0x20910042 |
| #define | CFG_MSGOUT_NAV_STATUS 0x2091001a |
| #define | CFG_MSGOUT_NAV_SAT 0x20910015 |
| #define | CFG_MSGOUT_NAV_RELPOSNED 0x2091008d |
| #define | CFG_MSGOUT_NAV_DAHEADING 0x209103df |
| #define | VALSET_RELPOSNED_RATE 0 |
| #define | VALSET_RECEIVER 0 |
| What a configuration item applies to. | |
| #define | VALSET_UART 1 |
| #define | VALSET_MSGOUT 2 |
| #define | VALSET_CFG_NB (sizeof(gps_ubx_ucenter_valset_cfg) / sizeof(gps_ubx_ucenter_valset_cfg[0])) |
Functions | |
| static bool | gps_ubx_ucenter_autobaud (uint8_t nr) |
| Automatically determine the baudrate of the u-blox module and its configuration interface. | |
| static bool | gps_ubx_ucenter_configure (uint8_t nr) |
| Configure the receiver with the legacy UBX-CFG messages, one step per call (4 Hz). | |
| static bool | gps_ubx_ucenter_configure_valset (uint8_t nr) |
| Configure the receiver with UBX-CFG-VALSET, one step per call (4 Hz). | |
| static uint8_t | gps_ubx_ucenter_gnss (void) |
| Satellite systems in use: from the satellites in the solution (UBX-NAV-SAT), else as reported by UBX-MON-GNSS. | |
| static void | send_ublox_info (struct transport_tx *trans, struct link_device *dev) |
| Receiver information, slowly for the GCS and the logs (the configuration itself is only done at start). | |
| void | gps_ubx_ucenter_init (void) |
| static bool | gps_ubx_ucenter_configure_step (uint8_t nr) |
| One configuration step with the interface the receiver supports, false when done. | |
| void | gps_ubx_ucenter_periodic (void) |
| static void | gps_ubx_ucenter_parse_sw_version (uint8_t *payload) |
| Parse "major.minor" from a version string (e.g. | |
| static uint8_t | gps_ubx_ucenter_parse_protver (uint8_t *payload, uint16_t len) |
| Parse the protocol version major from the extensions (30 characters each, after the software and hardware versions), e.g. | |
| static uint8_t | gps_ubx_ucenter_hex (char c) |
| Value of a hexadecimal character (0 when it isn't one). | |
| void | gps_ubx_ucenter_event (void) |
| static void | gps_ubx_ucenter_autobaud_poll (void) |
| Poll the port configuration (legacy UBX-CFG-PRT), the version (UBX-MON-VER, all receivers) and the port information (UBX-MON-COMMS, generation 9 and later). | |
| static void | gps_ubx_ucenter_send_info (uint8_t sbas) |
| Send the configuration replies (DEBUG message) and the receiver information to the ground. | |
| static void | gps_ubx_ucenter_enable_msg (uint8_t class, uint8_t id, uint8_t rate) |
| Enable u-blox message at desired period. | |
| static void | gps_ubx_ucenter_config_nav (void) |
| static void | gps_ubx_ucenter_config_port (void) |
| static void | gps_ubx_ucenter_config_sbas (void) |
| static uint32_t | gps_ubx_ucenter_valset_key (uint8_t type, uint32_t key, uint32_t key_uart2) |
| Key of a configuration item for the port the autopilot is connected to, 0 when it doesn't apply. | |
| static void | gps_ubx_ucenter_valset (uint32_t key, uint32_t value) |
| Set one configuration item in RAM. | |
| int | gps_ubx_ucenter_get_status (void) |
Variables | |
| struct gps_ubx_ucenter_struct | gps_ubx_ucenter |
| static const uint32_t | gps_ubx_ucenter_bauds [] |
| Baudrates tried, after the target one: the common one, the factory default, the high-rate default, the NMEA default and the higher ones. | |
| struct { | |
| uint8_t | type |
| uint32_t | key |
| uint32_t | key_uart2 |
| uint32_t | value |
| } | gps_ubx_ucenter_valset_cfg [] |
| Configuration, one item per step: the receiver refuses the whole message when it doesn't know one key. | |
Configure Ublox GPS.
After finding the baudrate, the receiver is configured with the legacy UBX-CFG messages, or with the configuration interface (UBX-CFG-VALSET) when it doesn't have them anymore (e.g. X20).
Definition in file gps_ubx_ucenter.c.
| #define CFG_MSGOUT_NAV_DAHEADING 0x209103df |
Definition at line 736 of file gps_ubx_ucenter.c.
| #define CFG_MSGOUT_NAV_POSLLH 0x20910029 |
Definition at line 731 of file gps_ubx_ucenter.c.
| #define CFG_MSGOUT_NAV_PVT 0x20910006 |
Definition at line 730 of file gps_ubx_ucenter.c.
| #define CFG_MSGOUT_NAV_RELPOSNED 0x2091008d |
Definition at line 735 of file gps_ubx_ucenter.c.
| #define CFG_MSGOUT_NAV_SAT 0x20910015 |
Definition at line 734 of file gps_ubx_ucenter.c.
| #define CFG_MSGOUT_NAV_STATUS 0x2091001a |
Definition at line 733 of file gps_ubx_ucenter.c.
| #define CFG_MSGOUT_NAV_VELNED 0x20910042 |
Definition at line 732 of file gps_ubx_ucenter.c.
| #define CFG_NAVSPG_DYNMODEL 0x20110021 |
Definition at line 721 of file gps_ubx_ucenter.c.
| #define CFG_NAVSPG_FIXMODE 0x20110011 |
Definition at line 720 of file gps_ubx_ucenter.c.
| #define CFG_RATE_MEAS 0x30210001 |
Definition at line 718 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_configure_valset().
| #define CFG_RATE_NAV 0x30210002 |
Definition at line 719 of file gps_ubx_ucenter.c.
| #define CFG_UART1_BAUDRATE 0x40520001 |
Definition at line 722 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_configure_valset().
| #define CFG_UART1INPROT_RTCM3X 0x10730004 |
Definition at line 724 of file gps_ubx_ucenter.c.
| #define CFG_UART1OUTPROT_NMEA 0x10740002 |
Definition at line 726 of file gps_ubx_ucenter.c.
| #define CFG_UART2_BAUDRATE 0x40530001 |
Definition at line 723 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_configure_valset().
| #define CFG_UART2INPROT_RTCM3X 0x10750004 |
Definition at line 725 of file gps_ubx_ucenter.c.
| #define CFG_UART2OUTPROT_NMEA 0x10760002 |
Definition at line 727 of file gps_ubx_ucenter.c.
| #define GPS_PORT_DDC 0x00 |
Receiver port numbers (UBX-CFG-PRT), also the offset of the CFG-MSGOUT keys.
Definition at line 96 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_autobaud(), and gps_ubx_ucenter_config_port().
| #define GPS_PORT_SPI 0x04 |
Definition at line 100 of file gps_ubx_ucenter.c.
| #define GPS_PORT_UART1 0x01 |
Definition at line 97 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_autobaud(), gps_ubx_ucenter_config_port(), and gps_ubx_ucenter_valset_key().
| #define GPS_PORT_UART2 0x02 |
Definition at line 98 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_port(), and gps_ubx_ucenter_valset_key().
| #define GPS_PORT_USB 0x03 |
Definition at line 99 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_port().
| #define GPS_SBAS_AUTOSCAN 0x00 |
Definition at line 547 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_sbas().
| #define GPS_SBAS_CORRECTIONS 0x02 |
Definition at line 542 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_sbas(), and gps_ubx_ucenter_configure().
| #define GPS_SBAS_ENABLED 0x01 |
Definition at line 539 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_sbas().
| #define GPS_SBAS_INTEGRITY 0x04 |
Definition at line 543 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_configure().
| #define GPS_SBAS_MAX_SBAS 3 |
Definition at line 545 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_sbas().
| #define GPS_SBAS_RANGING 0x01 |
Definition at line 541 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_sbas(), and gps_ubx_ucenter_configure().
| #define GPS_UBX_ENABLE_NMEA_DATA_MASK 0x00 |
NMEA output next to UBX, disabled by default.
Definition at line 87 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_port().
| #define GPS_UBX_NAV5_DYNAMICS NAV5_DYN_AIRBORNE_2G |
Definition at line 75 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_nav().
| #define GPS_UBX_UCENTER_NB_BAUDS (sizeof(gps_ubx_ucenter_bauds) / sizeof(gps_ubx_ucenter_bauds[0])) |
Definition at line 373 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_autobaud().
| #define GPS_UBX_UCENTER_RATE_LEGACY 200 |
Measurement period [ms]: 5 Hz by default, 10 Hz with the configuration interface (X20).
When the receiver refuses it, the fallback (4 Hz legacy, e.g. LEA-4, and 5 Hz with the configuration interface)
Definition at line 57 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_configure().
| #define GPS_UBX_UCENTER_RATE_LEGACY_FALLBACK 250 |
Definition at line 60 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_configure().
| #define GPS_UBX_UCENTER_RATE_VALSET 100 |
Definition at line 58 of file gps_ubx_ucenter.c.
| #define GPS_UBX_UCENTER_RATE_VALSET_FALLBACK 200 |
Definition at line 61 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_configure_valset().
| #define GPS_UBX_UCENTER_REPLY_ACK 1 |
Definition at line 117 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_event().
| #define GPS_UBX_UCENTER_REPLY_CFG_PRT 4 |
Definition at line 120 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_event().
| #define GPS_UBX_UCENTER_REPLY_NACK 2 |
Definition at line 118 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_configure(), gps_ubx_ucenter_configure_valset(), and gps_ubx_ucenter_event().
| #define GPS_UBX_UCENTER_REPLY_NONE 0 |
Definition at line 116 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_configure(), gps_ubx_ucenter_configure_valset(), and gps_ubx_ucenter_init().
| #define GPS_UBX_UCENTER_REPLY_VERSION 3 |
Definition at line 119 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_event().
| #define GPS_UBX_UCENTER_SAVE TRUE |
Save the configuration to battery backed RAM and flash (UBX-CFG-CFG).
Definition at line 92 of file gps_ubx_ucenter.c.
| #define GPS_UBX_UCENTER_STATUS_AUTOBAUD 1 |
Definition at line 112 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_init(), and gps_ubx_ucenter_periodic().
| #define GPS_UBX_UCENTER_STATUS_CONFIG 2 |
Definition at line 113 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_periodic().
| #define GPS_UBX_UCENTER_STATUS_STOPPED 0 |
Definition at line 111 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_event(), and gps_ubx_ucenter_periodic().
| #define GPS_UBX_UCENTER_STATUS_WAITING 3 |
Definition at line 114 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_periodic().
| #define IGNORED 0 |
Definition at line 480 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_nav().
| #define NAV5_2D_ONLY 1 |
Position fix mode (CFG-NAV5 and CFG-NAVSPG-FIXMODE).
Definition at line 79 of file gps_ubx_ucenter.c.
| #define NAV5_3D_ONLY 2 |
Definition at line 80 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_nav().
| #define NAV5_AUTO 3 |
Definition at line 81 of file gps_ubx_ucenter.c.
| #define NAV5_DEFAULT_MIN_ELEV 5 |
Definition at line 473 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_nav().
| #define NAV5_DEFAULT_P_ACC 100 |
Definition at line 476 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_nav().
| #define NAV5_DEFAULT_PDOP_MASK 25 |
Definition at line 474 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_nav().
| #define NAV5_DEFAULT_STATIC_HOLD_THRES 0 |
Definition at line 478 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_nav().
| #define NAV5_DEFAULT_T_ACC 300 |
Definition at line 477 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_nav().
| #define NAV5_DEFAULT_TDOP_MASK 25 |
Definition at line 475 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_nav().
| #define NAV5_DYN_AIRBORNE_1G 6 |
Definition at line 70 of file gps_ubx_ucenter.c.
| #define NAV5_DYN_AIRBORNE_2G 7 |
Definition at line 71 of file gps_ubx_ucenter.c.
| #define NAV5_DYN_AIRBORNE_4G 8 |
Definition at line 72 of file gps_ubx_ucenter.c.
| #define NAV5_DYN_AUTOMOTIVE 4 |
Definition at line 68 of file gps_ubx_ucenter.c.
| #define NAV5_DYN_FIXED 1 |
Definition at line 65 of file gps_ubx_ucenter.c.
| #define NAV5_DYN_PEDESTRIAN 3 |
Definition at line 67 of file gps_ubx_ucenter.c.
| #define NAV5_DYN_PORTABLE 0 |
Dynamic platform model (same values for CFG-NAV5 and CFG-NAVSPG-DYNMODEL).
Definition at line 64 of file gps_ubx_ucenter.c.
| #define NAV5_DYN_SEA 5 |
Definition at line 69 of file gps_ubx_ucenter.c.
| #define NAV5_DYN_STATIONARY 2 |
Definition at line 66 of file gps_ubx_ucenter.c.
| #define NAV5_MASK 0x05 |
Definition at line 471 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_nav().
| #define NAV_DYN_AIRBORNE_2G 6 |
Definition at line 469 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_nav().
| #define NMEA_PROTO_MASK 0x0002 |
Definition at line 505 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_port().
| #define RESERVED 0 |
Definition at line 481 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_nav(), gps_ubx_ucenter_config_port(), gps_ubx_ucenter_configure(), and gps_ubx_ucenter_valset().
| #define RTCM3_PROTO_MASK 0x0020 |
Definition at line 507 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_port().
| #define RTCM_PROTO_MASK 0x0004 |
Definition at line 506 of file gps_ubx_ucenter.c.
| #define UBX_GPS_BAUD (UBX_GPS_PORT).baudrate |
Definition at line 123 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_init().
| #define UBX_PROTO_MASK 0x0001 |
Definition at line 504 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_port().
| #define UBX_UART_MODE_MASK 0x000008D0 |
Definition at line 502 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_config_port().
| #define VALSET_CFG_NB (sizeof(gps_ubx_ucenter_valset_cfg) / sizeof(gps_ubx_ucenter_valset_cfg[0])) |
Definition at line 774 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_configure_valset().
| #define VALSET_LAYER_RAM 0x01 |
Written to RAM only, saved afterwards like with the legacy messages (UBX-CFG-CFG): flash is not on every receiver, the whole message would be refused then.
Definition at line 715 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_valset().
| #define VALSET_MSGOUT 2 |
Definition at line 747 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_valset_key().
| #define VALSET_RECEIVER 0 |
What a configuration item applies to.
Definition at line 745 of file gps_ubx_ucenter.c.
| #define VALSET_RELPOSNED_RATE 0 |
Definition at line 741 of file gps_ubx_ucenter.c.
| #define VALSET_UART 1 |
Definition at line 746 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_configure_valset(), and gps_ubx_ucenter_valset_key().
|
static |
Automatically determine the baudrate of the u-blox module and its configuration interface.
Only needed when connecting to a UART port on the u-blox. The discovered baudrate is copied to gps_ubx_ucenter.baud_init.
| nr | Autobaud step number to perform |
Definition at line 398 of file gps_ubx_ucenter.c.
References B9600, GPS_PORT_DDC, GPS_PORT_UART1, gps_ubx_ucenter, gps_ubx_ucenter_autobaud_poll(), gps_ubx_ucenter_bauds, GPS_UBX_UCENTER_NB_BAUDS, uart_periph_set_baudrate(), and UART_SPEED.
Referenced by gps_ubx_ucenter_periodic().
|
static |
Poll the port configuration (legacy UBX-CFG-PRT), the version (UBX-MON-VER, all receivers) and the port information (UBX-MON-COMMS, generation 9 and later).
Any reply tells that the baudrate is right. The port the autopilot is connected to is reported by CFG-PRT (without a payload: the port the poll was received on) or, on receivers without CFG-PRT (X20), by MON-COMMS.
Definition at line 381 of file gps_ubx_ucenter.c.
References gps_ubx_ucenter.
Referenced by gps_ubx_ucenter_autobaud().
|
inlinestatic |
Definition at line 483 of file gps_ubx_ucenter.c.
References GPS_UBX_NAV5_DYNAMICS, gps_ubx_ucenter, IGNORED, NAV5_3D_ONLY, NAV5_DEFAULT_MIN_ELEV, NAV5_DEFAULT_P_ACC, NAV5_DEFAULT_PDOP_MASK, NAV5_DEFAULT_STATIC_HOLD_THRES, NAV5_DEFAULT_T_ACC, NAV5_DEFAULT_TDOP_MASK, NAV5_MASK, NAV_DYN_AIRBORNE_2G, and RESERVED.
Referenced by gps_ubx_ucenter_configure().
|
inlinestatic |
Definition at line 509 of file gps_ubx_ucenter.c.
References GPS_PORT_DDC, GPS_PORT_UART1, GPS_PORT_UART2, GPS_PORT_USB, GPS_UBX_ENABLE_NMEA_DATA_MASK, gps_ubx_ucenter, NMEA_PROTO_MASK, RESERVED, RTCM3_PROTO_MASK, UART_SPEED, UBX_PROTO_MASK, and UBX_UART_MODE_MASK.
Referenced by gps_ubx_ucenter_configure().
|
inlinestatic |
Definition at line 549 of file gps_ubx_ucenter.c.
References GPS_SBAS_AUTOSCAN, GPS_SBAS_CORRECTIONS, GPS_SBAS_ENABLED, GPS_SBAS_MAX_SBAS, GPS_SBAS_RANGING, and gps_ubx_ucenter.
Referenced by gps_ubx_ucenter_configure().
|
static |
Configure the receiver with the legacy UBX-CFG messages, one step per call (4 Hz).
Definition at line 558 of file gps_ubx_ucenter.c.
References GPS_SBAS_CORRECTIONS, GPS_SBAS_INTEGRITY, GPS_SBAS_RANGING, gps_ubx_ucenter, gps_ubx_ucenter_config_nav(), gps_ubx_ucenter_config_port(), gps_ubx_ucenter_config_sbas(), GPS_UBX_UCENTER_CONFIG_STEPS, gps_ubx_ucenter_enable_msg(), GPS_UBX_UCENTER_RATE_LEGACY, GPS_UBX_UCENTER_RATE_LEGACY_FALLBACK, GPS_UBX_UCENTER_REPLY_NACK, GPS_UBX_UCENTER_REPLY_NONE, gps_ubx_ucenter_send_info(), RESERVED, uart_periph_set_baudrate(), and UART_SPEED.
Referenced by gps_ubx_ucenter_configure_step().
|
static |
One configuration step with the interface the receiver supports, false when done.
Definition at line 197 of file gps_ubx_ucenter.c.
References gps_ubx_ucenter, gps_ubx_ucenter_configure(), and gps_ubx_ucenter_configure_valset().
Referenced by gps_ubx_ucenter_periodic().
|
static |
Configure the receiver with UBX-CFG-VALSET, one step per call (4 Hz).
Definition at line 814 of file gps_ubx_ucenter.c.
References CFG_RATE_MEAS, CFG_UART1_BAUDRATE, CFG_UART2_BAUDRATE, gps_ubx_ucenter, GPS_UBX_UCENTER_CONFIG_STEPS, GPS_UBX_UCENTER_RATE_VALSET_FALLBACK, GPS_UBX_UCENTER_REPLY_NACK, GPS_UBX_UCENTER_REPLY_NONE, gps_ubx_ucenter_send_info(), gps_ubx_ucenter_valset(), gps_ubx_ucenter_valset_cfg, gps_ubx_ucenter_valset_key(), uart_periph_set_baudrate(), UART_SPEED, VALSET_CFG_NB, and VALSET_UART.
Referenced by gps_ubx_ucenter_configure_step().
Enable u-blox message at desired period.
Will enable the message on the port that this command is received on. For example, sending this configuration message over UART1 will cause the desired message to be published on UART1.
| class | u-blox message class |
| id | u-blox message ID |
| rate | Desired period to send message. Example: Setting 3 would send the message on every 3rd navigation solution. |
Definition at line 464 of file gps_ubx_ucenter.c.
References gps_ubx_ucenter.
Referenced by gps_ubx_ucenter_configure().
| void gps_ubx_ucenter_event | ( | void | ) |
Definition at line 309 of file gps_ubx_ucenter.c.
References gps_ubx, gps_ubx_ucenter, gps_ubx_ucenter_hex(), gps_ubx_ucenter_parse_protver(), gps_ubx_ucenter_parse_sw_version(), GPS_UBX_UCENTER_REPLY_ACK, GPS_UBX_UCENTER_REPLY_CFG_PRT, GPS_UBX_UCENTER_REPLY_NACK, GPS_UBX_UCENTER_REPLY_VERSION, and GPS_UBX_UCENTER_STATUS_STOPPED.
| int gps_ubx_ucenter_get_status | ( | void | ) |
Definition at line 862 of file gps_ubx_ucenter.c.
References gps_ubx_ucenter.
|
inlinestatic |
Satellite systems in use: from the satellites in the solution (UBX-NAV-SAT), else as reported by UBX-MON-GNSS.
The X20 reports only GPS in UBX-MON-GNSS while it uses more systems.
Definition at line 133 of file gps_ubx_ucenter.c.
References gps_ubx_ucenter_struct::gnss_in_use, gps_ubx, and gps_ubx_ucenter.
Referenced by gps_ubx_ucenter_send_info(), and send_ublox_info().
|
static |
Value of a hexadecimal character (0 when it isn't one).
Definition at line 297 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_event().
| void gps_ubx_ucenter_init | ( | void | ) |
Definition at line 152 of file gps_ubx_ucenter.c.
References DefaultPeriodic, gps_ubx_ucenter, GPS_UBX_UCENTER_CONFIG_STEPS, GPS_UBX_UCENTER_REPLY_NONE, GPS_UBX_UCENTER_STATUS_AUTOBAUD, register_periodic_telemetry(), send_ublox_info(), and UBX_GPS_BAUD.
Parse the protocol version major from the extensions (30 characters each, after the software and hardware versions), e.g.
"PROTVER=27.31" (generation 8 and later), 0 when not found
Definition at line 272 of file gps_ubx_ucenter.c.
References gps_ubx_ucenter_struct::protver.
Referenced by gps_ubx_ucenter_event().
|
static |
Parse "major.minor" from a version string (e.g.
"ROM CORE 3.01 (107888)" or "5.00 (28462)")
Definition at line 257 of file gps_ubx_ucenter.c.
References gps_ubx_ucenter.
Referenced by gps_ubx_ucenter_event().
| void gps_ubx_ucenter_periodic | ( | void | ) |
Definition at line 205 of file gps_ubx_ucenter.c.
References gps_i2c_begin(), gps_i2c_tx_is_ready(), gps_ubx_ucenter, gps_ubx_ucenter_autobaud(), gps_ubx_ucenter_configure_step(), GPS_UBX_UCENTER_STATUS_AUTOBAUD, GPS_UBX_UCENTER_STATUS_CONFIG, GPS_UBX_UCENTER_STATUS_STOPPED, and GPS_UBX_UCENTER_STATUS_WAITING.
|
static |
Send the configuration replies (DEBUG message) and the receiver information to the ground.
Definition at line 437 of file gps_ubx_ucenter.c.
References DefaultChannel, DefaultDevice, gps_ubx_ucenter, GPS_UBX_UCENTER_CONFIG_STEPS, and gps_ubx_ucenter_gnss().
Referenced by gps_ubx_ucenter_configure(), and gps_ubx_ucenter_configure_valset().
Set one configuration item in RAM.
Definition at line 795 of file gps_ubx_ucenter.c.
References gps_ubx_ucenter, RESERVED, and VALSET_LAYER_RAM.
Referenced by gps_ubx_ucenter_configure_valset().
Key of a configuration item for the port the autopilot is connected to, 0 when it doesn't apply.
Definition at line 777 of file gps_ubx_ucenter.c.
References GPS_PORT_UART1, GPS_PORT_UART2, gps_ubx_ucenter, VALSET_MSGOUT, and VALSET_UART.
Referenced by gps_ubx_ucenter_configure_valset().
|
static |
Receiver information, slowly for the GCS and the logs (the configuration itself is only done at start).
Definition at line 140 of file gps_ubx_ucenter.c.
References dev, gps_ubx_ucenter, and gps_ubx_ucenter_gnss().
Referenced by gps_ubx_ucenter_init().
| struct gps_ubx_ucenter_struct gps_ubx_ucenter |
Definition at line 126 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_autobaud(), gps_ubx_ucenter_autobaud_poll(), gps_ubx_ucenter_config_nav(), gps_ubx_ucenter_config_port(), gps_ubx_ucenter_config_sbas(), gps_ubx_ucenter_configure(), gps_ubx_ucenter_configure_step(), gps_ubx_ucenter_configure_valset(), gps_ubx_ucenter_enable_msg(), gps_ubx_ucenter_event(), gps_ubx_ucenter_get_status(), gps_ubx_ucenter_gnss(), gps_ubx_ucenter_init(), gps_ubx_ucenter_parse_sw_version(), gps_ubx_ucenter_periodic(), gps_ubx_ucenter_send_info(), gps_ubx_ucenter_valset(), gps_ubx_ucenter_valset_key(), and send_ublox_info().
|
static |
Baudrates tried, after the target one: the common one, the factory default, the high-rate default, the NMEA default and the higher ones.
Definition at line 365 of file gps_ubx_ucenter.c.
Referenced by gps_ubx_ucenter_autobaud().
| const struct { ... } gps_ubx_ucenter_valset_cfg[] |
Configuration, one item per step: the receiver refuses the whole message when it doesn't know one key.
Referenced by gps_ubx_ucenter_configure_valset().