This class provides an API to communicate with a u-blox GNSS chip. The files here were originally part of the C027_Support library (https://developer.mbed.org/teams/ublox/code/C027_Support/ at revision 138:dafbbf31bf76) but have been separated out, primarily for use on the u-blox C030 board where the cellular interace portion of the C027_Support library will instead be provided through the new mbed Cellular API.
Dependents: example-ublox-at-cellular-interface-ext example-low-power-sleep example-C030-out-of-box-demo example-C030-out-of-box-demo ... more
Revision 17:6c226e3e9d61, committed 2018-09-03
- Comitter:
- fahim.alavi@u-blox.com
- Date:
- Mon Sep 03 14:39:27 2018 +0500
- Parent:
- 16:cb9861f0f4d8
- Child:
- 18:7adca4350499
- Commit message:
- Set ground speed, fixType and avg_ignss
Changed in this revision
gnss.cpp | Show annotated file Show diff for this revision Revisions of this file |
gnss.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/gnss.cpp Wed Aug 01 13:14:52 2018 +0500 +++ b/gnss.cpp Mon Sep 03 14:39:27 2018 +0500 @@ -436,6 +436,10 @@ return_decoded_msg.day = buf[index++]; + // Go to Fix type + index = UBX_PAYLOAD_INDEX + 20; + return_decoded_msg.fixType = buf[index]; + // Go to lon index = UBX_PAYLOAD_INDEX + 24; @@ -454,6 +458,13 @@ return_decoded_msg.height |= (buf[index++] << 16); return_decoded_msg.height |= (buf[index++] << 24); + // Go to gSpeed + index = UBX_PAYLOAD_INDEX + 60; + return_decoded_msg.speed = buf[index++]; + return_decoded_msg.speed |= (buf[index++] << 8); + return_decoded_msg.speed |= (buf[index++] << 16); + return_decoded_msg.speed |= (buf[index++] << 24); + return return_decoded_msg; }
--- a/gnss.h Wed Aug 01 13:14:52 2018 +0500 +++ b/gnss.h Mon Sep 03 14:39:27 2018 +0500 @@ -72,9 +72,11 @@ uint16_t year; uint8_t month; uint8_t day; + uint8_t fixType; int32_t lon; // scaling 1e-7 int32_t lat; // scaling 1e-7 int32_t height; + int32_t speed; }tUBX_NAV_PVT;