Mercurial > ublox > ublox8 > experimental
changeset 8:07bd0928c89a
capture: configure gnss (GPS + Galileo + Glonass + SBAS + QZSS)
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Fri, 03 Jan 2020 23:19:45 -0500 |
parents | 8b8194da4c18 |
children | 2fa0e0935788 |
files | capture.c |
diffstat | 1 files changed, 47 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/capture.c Fri Jan 03 23:19:24 2020 -0500 +++ b/capture.c Fri Jan 03 23:19:45 2020 -0500 @@ -64,6 +64,48 @@ .mask = cpu16_to_le(0x0001), /* only dynamics model */ .dyn_model = 2, /* stationary */ }; + struct ubx_cfg_gnss gnss = { + .num_trk_ch_use = 0xff, + .num_cfg_blocks = UBX_CFG_GNSS_NUM_BLOCKS, + .cfg = { + { + .gnssid = GNSSID_GPS, + .res_trk_ch = 4, + .max_trk_ch = 8, + .flags = cpu32_to_le(0x00010001), /* L1, enable */ + }, + { + .gnssid = GNSSID_GALILEO, + .res_trk_ch = 8, + .max_trk_ch = 10, + .flags = cpu32_to_le(0x00010001), /* E1, enable */ + }, + { + .gnssid = GNSSID_GLONASS, + .res_trk_ch = 6, + .max_trk_ch = 8, + .flags = cpu32_to_le(0x00010001), /* L1, enable */ + }, + { + .gnssid = GNSSID_BEIDOU, + .res_trk_ch = 6, + .max_trk_ch = 8, + .flags = cpu32_to_le(0x00010000), /* B1I */ + }, + { + .gnssid = GNSSID_SBAS, + .res_trk_ch = 3, + .max_trk_ch = 4, + .flags = cpu32_to_le(0x00010001), /* L1, enable */ + }, + { + .gnssid = GNSSID_QZSS, + .res_trk_ch = 4, + .max_trk_ch = 8, + .flags = cpu32_to_le(0x00010001), /* L1C, enable */ + }, + }, + }; void *prt; int ret; int i; @@ -97,6 +139,11 @@ if (ret) return ret; + ret = send_ubx_with_ack(file, UBX_CFG_GNSS, &gnss, + sizeof(struct ubx_cfg_gnss)); + if (ret) + return ret; + enum ubx_msg_id enable_msgs[] = { UBX_NAV_POSECEF, /* ECEF position */ UBX_NAV_PVT, /* position, velocity, time */