mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-29 02:51:17 +00:00
GPS rework phase 2 updates for M8 and stub for M10 (#3166)
* Portduino multiple logging levels * Fixes based on GPSFan work * Fix derped logic * Correct size field for AID message * Reformat to add comments, beginning of GPS rework * Update PM2 message for Neo-6 * Correct ECO mode logic as ECO mode is only for Neo-6 * Cleanup ubx.h add a few more comments * GPS rework, changes for M8 and stub for M10 --------- Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz> Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
parent
7db02ad722
commit
4c55d5d9e4
@ -326,14 +326,20 @@ bool GPS::setup()
|
|||||||
// Also we need SBAS for better accuracy and extra features
|
// Also we need SBAS for better accuracy and extra features
|
||||||
// ToDo: Dynamic configure GNSS systems depending of LoRa region
|
// ToDo: Dynamic configure GNSS systems depending of LoRa region
|
||||||
|
|
||||||
if (strncmp(info.hwVersion, "00040007", 8) !=
|
if (strncmp(info.hwVersion, "000A0000", 8) != 0) {
|
||||||
0) { // The original ublox 6 is GPS only and doesn't support the UBX-CFG-GNSS message
|
if (strncmp(info.hwVersion, "00040007", 8) != 0) {
|
||||||
if (strncmp(info.hwVersion, "00070000", 8) == 0) { // Max7 seems to only support GPS *or* GLONASS
|
// The original ublox Neo-6 is GPS only and doesn't support the UBX-CFG-GNSS message
|
||||||
|
// Max7 seems to only support GPS *or* GLONASS
|
||||||
|
// Neo-7 is supposed to support GPS *and* GLONASS but NAKs the CFG-GNSS command to do it
|
||||||
|
// So treat all the u-blox 7 series as GPS only
|
||||||
|
// M8 can support 3 constallations at once so turn on GPS, GLONASS and Galileo (or BeiDou)
|
||||||
|
|
||||||
|
if (strncmp(info.hwVersion, "00070000", 8) == 0) {
|
||||||
LOG_DEBUG("Setting GPS+SBAS\n");
|
LOG_DEBUG("Setting GPS+SBAS\n");
|
||||||
msglen = makeUBXPacket(0x06, 0x3e, sizeof(_message_GNSS_7), _message_GNSS_7);
|
msglen = makeUBXPacket(0x06, 0x3e, sizeof(_message_GNSS_7), _message_GNSS_7);
|
||||||
_serial_gps->write(UBXscratch, msglen);
|
_serial_gps->write(UBXscratch, msglen);
|
||||||
} else {
|
} else {
|
||||||
msglen = makeUBXPacket(0x06, 0x3e, sizeof(_message_GNSS), _message_GNSS);
|
msglen = makeUBXPacket(0x06, 0x3e, sizeof(_message_GNSS_8), _message_GNSS_8);
|
||||||
_serial_gps->write(UBXscratch, msglen);
|
_serial_gps->write(UBXscratch, msglen);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,15 +350,29 @@ bool GPS::setup()
|
|||||||
if (strncmp(info.hwVersion, "00070000", 8) == 0) {
|
if (strncmp(info.hwVersion, "00070000", 8) == 0) {
|
||||||
LOG_INFO("GNSS configured for GPS+SBAS. Pause for 0.75s before sending next command.\n");
|
LOG_INFO("GNSS configured for GPS+SBAS. Pause for 0.75s before sending next command.\n");
|
||||||
} else {
|
} else {
|
||||||
LOG_INFO("GNSS configured for GPS+SBAS+GLONASS. Pause for 0.75s before sending next command.\n");
|
LOG_INFO(
|
||||||
|
"GNSS configured for GPS+SBAS+GLONASS+Galileo. Pause for 0.75s before sending next command.\n");
|
||||||
}
|
}
|
||||||
// Documentation say, we need wait atleast 0.5s after reconfiguration of GNSS module, before sending next
|
// Documentation say, we need wait atleast 0.5s after reconfiguration of GNSS module, before sending next
|
||||||
// commands
|
// commands for the M8 it tends to be more... 1 sec should be enough ;>)
|
||||||
delay(750);
|
delay(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// ToDo add M10 tests for below
|
||||||
msglen = makeUBXPacket(0x06, 0x39, sizeof(_message_JAM), _message_JAM);
|
if (strncmp(info.hwVersion, "00080000", 8) == 0) {
|
||||||
|
msglen = makeUBXPacket(0x06, 0x39, sizeof(_message_JAM_8), _message_JAM_8);
|
||||||
|
_serial_gps->write(UBXscratch, msglen);
|
||||||
|
if (getACK(0x06, 0x39, 300) != GNSS_RESPONSE_OK) {
|
||||||
|
LOG_WARN("Unable to enable interference resistance.\n");
|
||||||
|
}
|
||||||
|
clearBuffer();
|
||||||
|
msglen = makeUBXPacket(0x06, 0x23, sizeof(_message_NAVX5_8), _message_NAVX5_8);
|
||||||
|
_serial_gps->write(UBXscratch, msglen);
|
||||||
|
if (getACK(0x06, 0x23, 300) != GNSS_RESPONSE_OK) {
|
||||||
|
LOG_WARN("Unable to configure extra settings.\n");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
msglen = makeUBXPacket(0x06, 0x39, sizeof(_message_JAM_6_7), _message_JAM_6_7);
|
||||||
_serial_gps->write(UBXscratch, msglen);
|
_serial_gps->write(UBXscratch, msglen);
|
||||||
if (getACK(0x06, 0x39, 300) != GNSS_RESPONSE_OK) {
|
if (getACK(0x06, 0x39, 300) != GNSS_RESPONSE_OK) {
|
||||||
LOG_WARN("Unable to enable interference resistance.\n");
|
LOG_WARN("Unable to enable interference resistance.\n");
|
||||||
@ -363,19 +383,19 @@ bool GPS::setup()
|
|||||||
if (getACK(0x06, 0x23, 300) != GNSS_RESPONSE_OK) {
|
if (getACK(0x06, 0x23, 300) != GNSS_RESPONSE_OK) {
|
||||||
LOG_WARN("Unable to configure extra settings.\n");
|
LOG_WARN("Unable to configure extra settings.\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// ublox-M10S can be compatible with UBLOX traditional protocol, so the following sentence settings are also valid
|
// ublox-M10S can be compatible with UBLOX traditional protocol, so the following sentence settings are also valid
|
||||||
|
|
||||||
msglen = makeUBXPacket(0x06, 0x08, sizeof(_message_1HZ), _message_1HZ);
|
msglen = makeUBXPacket(0x06, 0x08, sizeof(_message_1HZ), _message_1HZ);
|
||||||
_serial_gps->write(UBXscratch, msglen);
|
_serial_gps->write(UBXscratch, msglen);
|
||||||
if (getACK(0x06, 0x08, 300) != GNSS_RESPONSE_OK) {
|
if (getACK(0x06, 0x08, 400) != GNSS_RESPONSE_OK) {
|
||||||
LOG_WARN("Unable to set GPS update rate.\n");
|
LOG_WARN("Unable to set GPS update rate.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
msglen = makeUBXPacket(0x06, 0x01, sizeof(_message_GLL), _message_GLL);
|
msglen = makeUBXPacket(0x06, 0x01, sizeof(_message_GLL), _message_GLL);
|
||||||
_serial_gps->write(UBXscratch, msglen);
|
_serial_gps->write(UBXscratch, msglen);
|
||||||
if (getACK(0x06, 0x01, 300) != GNSS_RESPONSE_OK) {
|
if (getACK(0x06, 0x01, 300) != GNSS_RESPONSE_OK) {
|
||||||
LOG_WARN("Unable to disable NMEA GGL.\n");
|
LOG_WARN("Unable to disable NMEA GLL.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
msglen = makeUBXPacket(0x06, 0x01, sizeof(_message_GSA), _message_GSA);
|
msglen = makeUBXPacket(0x06, 0x01, sizeof(_message_GSA), _message_GSA);
|
||||||
@ -407,19 +427,22 @@ bool GPS::setup()
|
|||||||
if (getACK(0x06, 0x01, 300) != GNSS_RESPONSE_OK) {
|
if (getACK(0x06, 0x01, 300) != GNSS_RESPONSE_OK) {
|
||||||
LOG_WARN("Unable to enable NMEA GGA.\n");
|
LOG_WARN("Unable to enable NMEA GGA.\n");
|
||||||
}
|
}
|
||||||
|
clearBuffer();
|
||||||
msglen = makeUBXPacket(0x06, 0x01, sizeof(_message_AID), _message_AID);
|
|
||||||
_serial_gps->write(UBXscratch, msglen);
|
|
||||||
if (getACK(0x06, 0x01, 300) != GNSS_RESPONSE_OK) {
|
|
||||||
LOG_WARN("Unable to disable UBX-AID.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uBloxProtocolVersion >= 18) {
|
if (uBloxProtocolVersion >= 18) {
|
||||||
msglen = makeUBXPacket(0x06, 0x86, sizeof(_message_PMS), _message_PMS);
|
msglen = makeUBXPacket(0x06, 0x86, sizeof(_message_PMS), _message_PMS);
|
||||||
_serial_gps->write(UBXscratch, msglen);
|
_serial_gps->write(UBXscratch, msglen);
|
||||||
if (getACK(0x06, 0x86, 300) != GNSS_RESPONSE_OK) {
|
if (getACK(0x06, 0x86, 300) != GNSS_RESPONSE_OK) {
|
||||||
LOG_WARN("Unable to enable powersaving for GPS.\n");
|
LOG_WARN("Unable to enable powersaving for GPS.\n");
|
||||||
}
|
}
|
||||||
|
// For M8 we want to enable NMEA vserion 4.10 so we can see the additional sats.
|
||||||
|
if (strncmp(info.hwVersion, "00080000", 8) == 0) {
|
||||||
|
msglen = makeUBXPacket(0x06, 0x17, sizeof(_message_NMEA), _message_NMEA);
|
||||||
|
_serial_gps->write(UBXscratch, msglen);
|
||||||
|
if (getACK(0x06, 0x17, 400) != GNSS_RESPONSE_OK) {
|
||||||
|
LOG_WARN("Unable to enable NMEA 4.10.\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (strncmp(info.hwVersion, "00040007", 8) == 0) { // This PSM mode is only for Neo-6
|
if (strncmp(info.hwVersion, "00040007", 8) == 0) { // This PSM mode is only for Neo-6
|
||||||
msglen = makeUBXPacket(0x06, 0x11, 0x2, _message_CFG_RXM_ECO);
|
msglen = makeUBXPacket(0x06, 0x11, 0x2, _message_CFG_RXM_ECO);
|
||||||
@ -432,6 +455,11 @@ bool GPS::setup()
|
|||||||
if (getACK(0x06, 0x3B, 300) != GNSS_RESPONSE_OK) {
|
if (getACK(0x06, 0x3B, 300) != GNSS_RESPONSE_OK) {
|
||||||
LOG_WARN("Unable to enable powersaving details for GPS.\n");
|
LOG_WARN("Unable to enable powersaving details for GPS.\n");
|
||||||
}
|
}
|
||||||
|
msglen = makeUBXPacket(0x06, 0x01, sizeof(_message_AID), _message_AID);
|
||||||
|
_serial_gps->write(UBXscratch, msglen);
|
||||||
|
if (getACK(0x06, 0x01, 300) != GNSS_RESPONSE_OK) {
|
||||||
|
LOG_WARN("Unable to disable UBX-AID.\n");
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
msglen = makeUBXPacket(0x06, 0x11, 0x2, _message_CFG_RXM_PSM);
|
msglen = makeUBXPacket(0x06, 0x11, 0x2, _message_CFG_RXM_PSM);
|
||||||
_serial_gps->write(UBXscratch, msglen);
|
_serial_gps->write(UBXscratch, msglen);
|
||||||
@ -440,6 +468,7 @@ bool GPS::setup()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
msglen = makeUBXPacket(0x06, 0x09, sizeof(_message_SAVE), _message_SAVE);
|
msglen = makeUBXPacket(0x06, 0x09, sizeof(_message_SAVE), _message_SAVE);
|
||||||
_serial_gps->write(UBXscratch, msglen);
|
_serial_gps->write(UBXscratch, msglen);
|
||||||
if (getACK(0x06, 0x09, 2000) != GNSS_RESPONSE_OK) {
|
if (getACK(0x06, 0x09, 2000) != GNSS_RESPONSE_OK) {
|
||||||
@ -447,6 +476,9 @@ bool GPS::setup()
|
|||||||
} else {
|
} else {
|
||||||
LOG_INFO("GNSS module configuration saved!\n");
|
LOG_INFO("GNSS module configuration saved!\n");
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
LOG_INFO("u-blox M10 hardware found, using defaults for now\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
didSerialInit = true;
|
didSerialInit = true;
|
||||||
}
|
}
|
||||||
@ -878,9 +910,9 @@ GnssModel_t GPS::probe(int serialSpeed)
|
|||||||
strncpy((char *)buffer, &(info.extension[i][4]), sizeof(buffer));
|
strncpy((char *)buffer, &(info.extension[i][4]), sizeof(buffer));
|
||||||
// LOG_DEBUG("GetModel:%s\n", (char *)buffer);
|
// LOG_DEBUG("GetModel:%s\n", (char *)buffer);
|
||||||
if (strlen((char *)buffer)) {
|
if (strlen((char *)buffer)) {
|
||||||
LOG_INFO("UBlox GNSS init succeeded, using UBlox %s GNSS Module\n", (char *)buffer);
|
LOG_INFO("UBlox GNSS probe succeeded, using UBlox %s GNSS Module\n", (char *)buffer);
|
||||||
} else {
|
} else {
|
||||||
LOG_INFO("UBlox GNSS init succeeded, using UBlox GNSS Module\n");
|
LOG_INFO("UBlox GNSS probe succeeded, using UBlox GNSS Module\n");
|
||||||
}
|
}
|
||||||
} else if (!strncmp(info.extension[i], "PROTVER", 7)) {
|
} else if (!strncmp(info.extension[i], "PROTVER", 7)) {
|
||||||
char *ptr = nullptr;
|
char *ptr = nullptr;
|
||||||
|
@ -95,13 +95,17 @@ class GPS : private concurrency::OSThread
|
|||||||
static HardwareSerial *_serial_gps;
|
static HardwareSerial *_serial_gps;
|
||||||
|
|
||||||
static uint8_t _message_PMREQ[];
|
static uint8_t _message_PMREQ[];
|
||||||
|
static uint8_t _message_PMREQ_10[];
|
||||||
static const uint8_t _message_CFG_RXM_PSM[];
|
static const uint8_t _message_CFG_RXM_PSM[];
|
||||||
static const uint8_t _message_CFG_RXM_ECO[];
|
static const uint8_t _message_CFG_RXM_ECO[];
|
||||||
static const uint8_t _message_CFG_PM2[];
|
static const uint8_t _message_CFG_PM2[];
|
||||||
static const uint8_t _message_GNSS_7[];
|
static const uint8_t _message_GNSS_7[];
|
||||||
static const uint8_t _message_GNSS[];
|
static const uint8_t _message_GNSS_8[];
|
||||||
static const uint8_t _message_JAM[];
|
static const uint8_t _message_JAM_6_7[];
|
||||||
|
static const uint8_t _message_JAM_8[];
|
||||||
static const uint8_t _message_NAVX5[];
|
static const uint8_t _message_NAVX5[];
|
||||||
|
static const uint8_t _message_NAVX5_8[];
|
||||||
|
static const uint8_t _message_NMEA[];
|
||||||
static const uint8_t _message_1HZ[];
|
static const uint8_t _message_1HZ[];
|
||||||
static const uint8_t _message_GLL[];
|
static const uint8_t _message_GLL[];
|
||||||
static const uint8_t _message_GSA[];
|
static const uint8_t _message_GSA[];
|
||||||
|
@ -2,7 +2,15 @@ uint8_t GPS::_message_PMREQ[] PROGMEM = {
|
|||||||
0x00, 0x00, // 4 bytes duration of request task
|
0x00, 0x00, // 4 bytes duration of request task
|
||||||
0x00, 0x00, // (milliseconds)
|
0x00, 0x00, // (milliseconds)
|
||||||
0x02, 0x00, // Task flag bitfield
|
0x02, 0x00, // Task flag bitfield
|
||||||
0x00, 0x00 // byte index 1 = sleep mode
|
0x00, 0x00, // byte index 1 = sleep mode
|
||||||
|
};
|
||||||
|
|
||||||
|
uint8_t GPS::_message_PMREQ_10[] PROGMEM = {
|
||||||
|
0x00, 0x00, // 4 bytes duration of request task
|
||||||
|
0x00, 0x00, // (milliseconds)
|
||||||
|
0x02, 0x00, // Task flag bitfield
|
||||||
|
0x00, 0x00, // byte index 1 = sleep mode
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // wakeupSources
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t GPS::_message_CFG_RXM_PSM[] PROGMEM = {
|
const uint8_t GPS::_message_CFG_RXM_PSM[] PROGMEM = {
|
||||||
@ -21,7 +29,7 @@ const uint8_t GPS::_message_CFG_PM2[] PROGMEM = {
|
|||||||
0x00, // Reserved 1, set to 0x06 by u-Center
|
0x00, // Reserved 1, set to 0x06 by u-Center
|
||||||
0x00, // Reserved 2
|
0x00, // Reserved 2
|
||||||
0x00, // Reserved 1
|
0x00, // Reserved 1
|
||||||
0x00, 0x11, 0x03, 0x00, // flags-> cyclic mode, wait for normal fix ok, do not wake to update RTC or EPH, doNotEnterOff,
|
0x00, 0x11, 0x03, 0x00, // flags-> cyclic mode, wait for normal fix ok, do not wake to update RTC, doNotEnterOff,
|
||||||
// LimitPeakCurrent
|
// LimitPeakCurrent
|
||||||
0xE8, 0x03, 0x00, 0x00, // update period 1000 ms
|
0xE8, 0x03, 0x00, 0x00, // update period 1000 ms
|
||||||
0x10, 0x27, 0x00, 0x00, // search period 10s
|
0x10, 0x27, 0x00, 0x00, // search period 10s
|
||||||
@ -54,24 +62,52 @@ const uint8_t GPS::_message_GNSS_7[] = {
|
|||||||
// to overwrite a saved state with identical values, no ACK/NAK is received, contrary to
|
// to overwrite a saved state with identical values, no ACK/NAK is received, contrary to
|
||||||
// what is specified in the Ublox documentation.
|
// what is specified in the Ublox documentation.
|
||||||
// There is also a possibility that the module may be GPS-only.
|
// There is also a possibility that the module may be GPS-only.
|
||||||
const uint8_t GPS::_message_GNSS[] = {
|
|
||||||
|
// For M8 GPS, GLONASS, Galileo, SBAS, QZSS
|
||||||
|
const uint8_t GPS::_message_GNSS_8[] = {
|
||||||
0x00, // msgVer (0 for this version)
|
0x00, // msgVer (0 for this version)
|
||||||
0x00, // numTrkChHw (max number of hardware channels, read only, so it's always 0)
|
0x00, // numTrkChHw (max number of hardware channels, read only, so it's always 0)
|
||||||
0xff, // numTrkChUse (max number of channels to use, 0xff = max available)
|
0xff, // numTrkChUse (max number of channels to use, 0xff = max available)
|
||||||
0x03, // numConfigBlocks (number of GNSS systems), most modules support maximum 3 GNSS systems
|
0x05, // numConfigBlocks (number of GNSS systems)
|
||||||
// GNSS config format: gnssId, resTrkCh, maxTrkCh, reserved1, flags
|
// GNSS config format: gnssId, resTrkCh, maxTrkCh, reserved1, flags
|
||||||
0x00, 0x08, 0x10, 0x00, 0x01, 0x00, 0x01, 0x01, // GPS
|
0x00, 0x08, 0x10, 0x00, 0x01, 0x00, 0x01, 0x01, // GPS
|
||||||
0x01, 0x01, 0x03, 0x00, 0x01, 0x00, 0x01, 0x01, // SBAS
|
0x01, 0x01, 0x03, 0x00, 0x01, 0x00, 0x01, 0x01, // SBAS
|
||||||
0x06, 0x08, 0x0e, 0x00, 0x01, 0x00, 0x01, 0x01 // GLONASS
|
0x02, 0x04, 0x08, 0x00, 0x01, 0x00, 0x01, 0x01, // Galileo
|
||||||
|
0x05, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01, 0x01, // QZSS
|
||||||
|
0x06, 0x08, 0x0E, 0x00, 0x01, 0x00, 0x01, 0x01 // GLONASS
|
||||||
|
};
|
||||||
|
/*
|
||||||
|
// For M8 GPS, GLONASS, BeiDou, SBAS, QZSS
|
||||||
|
const uint8_t GPS::_message_GNSS_8_B[] = {
|
||||||
|
0x00, // msgVer (0 for this version)
|
||||||
|
0x00, // numTrkChHw (max number of hardware channels, read only, so it's always 0)
|
||||||
|
0xff, // numTrkChUse (max number of channels to use, 0xff = max available) read only for protocol >23
|
||||||
|
0x05, // numConfigBlocks (number of GNSS systems)
|
||||||
|
// GNSS config format: gnssId, resTrkCh, maxTrkCh, reserved1, flags
|
||||||
|
0x00, 0x08, 0x10, 0x00, 0x01, 0x00, 0x01, 0x01, // GPS
|
||||||
|
0x01, 0x01, 0x03, 0x00, 0x01, 0x00, 0x01, 0x01, // SBAS
|
||||||
|
0x03, 0x08, 0x10, 0x00, 0x01, 0x00, 0x01, 0x01, // BeiDou
|
||||||
|
0x05, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01, 0x01, // QZSS
|
||||||
|
0x06, 0x08, 0x0E, 0x00, 0x01, 0x00, 0x01, 0x01 // GLONASS
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
|
// For M8 we want to enable NMEA version 4.10 messages to allow for Galileo and or BeiDou
|
||||||
|
const uint8_t GPS::_message_NMEA[]{
|
||||||
|
0x00, // filter flags
|
||||||
|
0x41, // NMEA Version
|
||||||
|
0x00, // Max number of SVs to report per TaklerId
|
||||||
|
0x02, // flags
|
||||||
|
0x00, 0x00, 0x00, 0x00, // gnssToFilter
|
||||||
|
0x00, // svNumbering
|
||||||
|
0x00, // mainTalkerId
|
||||||
|
0x00, // gsvTalkerId
|
||||||
|
0x01, // Message version
|
||||||
|
0x00, 0x00, // bdsTalkerId 2 chars 0=default
|
||||||
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Reserved
|
||||||
};
|
};
|
||||||
// Enable jamming/interference monitor
|
// Enable jamming/interference monitor
|
||||||
|
|
||||||
// For Neo-6
|
|
||||||
const uint8_t GPS::_message_JAM[] = {
|
|
||||||
0xf3, 0xac, 0x62, 0xad, // config1 bbThreshold = 3, cwThreshold = 15, enable = 1, reserved bits 0x16B156
|
|
||||||
0x1e, 0x03, 0x00, 0x00 // config2 antennaSetting Unknown = 0, reserved 3, = 0x00,0x00, reserved 2 = 0x31E
|
|
||||||
};
|
|
||||||
/* // WIP GPS reconfig
|
|
||||||
// For Neo-6, Max-7 and Neo-7
|
// For Neo-6, Max-7 and Neo-7
|
||||||
const uint8_t GPS::_message_JAM_6_7[] = {
|
const uint8_t GPS::_message_JAM_6_7[] = {
|
||||||
0xf3, 0xac, 0x62, 0xad, // config1 bbThreshold = 3, cwThreshold = 15, enable = 1, reserved bits 0x16B156
|
0xf3, 0xac, 0x62, 0xad, // config1 bbThreshold = 3, cwThreshold = 15, enable = 1, reserved bits 0x16B156
|
||||||
@ -83,7 +119,6 @@ const uint8_t GPS::_message_JAM_8[] = {
|
|||||||
0xf3, 0xac, 0x62, 0xad, // config1 bbThreshold = 3, cwThreshold = 15, enable1 = 1, reserved bits 0x16B156
|
0xf3, 0xac, 0x62, 0xad, // config1 bbThreshold = 3, cwThreshold = 15, enable1 = 1, reserved bits 0x16B156
|
||||||
0x1e, 0x43, 0x00, 0x00 // config2 antennaSetting Unknown = 0, enable2 = 1, generalBits = 0x31E
|
0x1e, 0x43, 0x00, 0x00 // config2 antennaSetting Unknown = 0, enable2 = 1, generalBits = 0x31E
|
||||||
};
|
};
|
||||||
*/
|
|
||||||
|
|
||||||
// Configure navigation engine expert settings:
|
// Configure navigation engine expert settings:
|
||||||
// there are many variations of what were Reserved fields for the Neo-6 in later versions
|
// there are many variations of what were Reserved fields for the Neo-6 in later versions
|
||||||
@ -118,11 +153,38 @@ const uint8_t GPS::_message_NAVX5[] = {
|
|||||||
0x00, 0x00, // Reserved 3
|
0x00, 0x00, // Reserved 3
|
||||||
0x00, 0x00, 0x00, 0x00 // Reserved 4
|
0x00, 0x00, 0x00, 0x00 // Reserved 4
|
||||||
};
|
};
|
||||||
|
// For the M8
|
||||||
|
const uint8_t GPS::_message_NAVX5_8[] = {
|
||||||
|
0x02, 0x00, // msgVer (2 for this version)
|
||||||
|
0x4c, 0x66, // mask1
|
||||||
|
0x00, 0x00, 0x00, 0x00, // mask2
|
||||||
|
0x00, 0x00, // Reserved 1
|
||||||
|
0x03, // minSVs (Minimum number of satellites for navigation) = 3
|
||||||
|
0x10, // maxSVs (Maximum number of satellites for navigation) = 16
|
||||||
|
0x06, // minCNO (Minimum satellite signal level for navigation) = 6 dBHz
|
||||||
|
0x00, // Reserved 2
|
||||||
|
0x00, // iniFix3D (Initial fix must be 3D) (0 = false 1 = true)
|
||||||
|
0x00, 0x00, // Reserved 3
|
||||||
|
0x00, // ackAiding
|
||||||
|
0x00, 0x00, // wknRollover 0 = firmware default
|
||||||
|
0x00, // sigAttenCompMode
|
||||||
|
0x00, // Reserved 4
|
||||||
|
0x00, 0x00, // Reserved 5
|
||||||
|
0x00, 0x00, // Reserved 6
|
||||||
|
0x00, // usePPP (Precice Point Positioning) (0 = false, 1 = true)
|
||||||
|
0x01, // aopCfg (AssistNow Autonomous configuration) = 1 (enabled)
|
||||||
|
0x00, 0x00, // Reserved 7
|
||||||
|
0x00, 0x00, // aopOrbMaxErr = 0 to reset to firmware default
|
||||||
|
0x00, 0x00, 0x00, 0x00, // Reserved 8
|
||||||
|
0x00, 0x00, 0x00, // Reserved 9
|
||||||
|
0x00 // useAdr
|
||||||
|
};
|
||||||
|
|
||||||
// Set GPS update rate to 1Hz
|
// Set GPS update rate to 1Hz
|
||||||
// Lowering the update rate helps to save power.
|
// Lowering the update rate helps to save power.
|
||||||
// Additionally, for some new modules like the M9/M10, an update rate lower than 5Hz
|
// Additionally, for some new modules like the M9/M10, an update rate lower than 5Hz
|
||||||
// is recommended to avoid a known issue with satellites disappearing.
|
// is recommended to avoid a known issue with satellites disappearing.
|
||||||
|
// The module defaults for M8, M9, M10 are the same as we use here so no update is necessary
|
||||||
const uint8_t GPS::_message_1HZ[] = {
|
const uint8_t GPS::_message_1HZ[] = {
|
||||||
0xE8, 0x03, // Measurement Rate (1000ms for 1Hz)
|
0xE8, 0x03, // Measurement Rate (1000ms for 1Hz)
|
||||||
0x01, 0x00, // Navigation rate, always 1 in GPS mode
|
0x01, 0x00, // Navigation rate, always 1 in GPS mode
|
||||||
|
Loading…
Reference in New Issue
Block a user