mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-23 17:13:38 +00:00
allow reporting # sats before we ahve a fix
This commit is contained in:
parent
fc82e872d6
commit
bdcd5c3981
@ -6,7 +6,6 @@ bin/run.sh --set region 8
|
|||||||
time only mode
|
time only mode
|
||||||
./bin/run.sh --set gps_operation 3
|
./bin/run.sh --set gps_operation 3
|
||||||
|
|
||||||
allow longer locking attempts
|
|
||||||
allow locking while cpu sleeps
|
allow locking while cpu sleeps
|
||||||
test with crummy antenna
|
test with crummy antenna
|
||||||
ublox parsing failure
|
ublox parsing failure
|
||||||
|
@ -63,7 +63,7 @@ lib_deps =
|
|||||||
1202 ; CRC32, explicitly needed because dependency is missing in the ble ota update lib
|
1202 ; CRC32, explicitly needed because dependency is missing in the ble ota update lib
|
||||||
https://github.com/meshtastic/arduino-fsm.git
|
https://github.com/meshtastic/arduino-fsm.git
|
||||||
https://github.com/meshtastic/SparkFun_Ublox_Arduino_Library.git#31015a55e630a2df77d9d714669c621a5bf355ad
|
https://github.com/meshtastic/SparkFun_Ublox_Arduino_Library.git#31015a55e630a2df77d9d714669c621a5bf355ad
|
||||||
https://github.com/meshtastic/RadioLib.git#1083c2e76f9906c5f80dfec726facebf8413eef0
|
https://github.com/meshtastic/RadioLib.git#8657380241bce681c33aab46598bbf13b11f876c
|
||||||
https://github.com/meshtastic/TinyGPSPlus.git
|
https://github.com/meshtastic/TinyGPSPlus.git
|
||||||
https://github.com/meshtastic/AXP202X_Library.git#8404abb6d4b486748636bc6ad72d2a47baaf5460
|
https://github.com/meshtastic/AXP202X_Library.git#8404abb6d4b486748636bc6ad72d2a47baaf5460
|
||||||
Wire ; explicitly needed here because the AXP202 library forgets to add it
|
Wire ; explicitly needed here because the AXP202 library forgets to add it
|
||||||
|
@ -32,7 +32,7 @@ bool UBloxGPS::setupGPS()
|
|||||||
_serial_gps->begin(GPS_BAUDRATE);
|
_serial_gps->begin(GPS_BAUDRATE);
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_ESP32
|
#ifndef NO_ESP32
|
||||||
_serial_gps->setRxBufferSize(1024); // the default is 256
|
_serial_gps->setRxBufferSize(2048); // the default is 256
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ void UBloxGPS::whileActive()
|
|||||||
// Update fixtype
|
// Update fixtype
|
||||||
if (ublox.moduleQueried.fixType) {
|
if (ublox.moduleQueried.fixType) {
|
||||||
fixType = ublox.getFixType(0);
|
fixType = ublox.getFixType(0);
|
||||||
DEBUG_MSG("GPS fix type %d\n", fixType);
|
DEBUG_MSG("GPS fix type %d, numSats %d\n", fixType, numSatellites);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,6 +168,12 @@ bool UBloxGPS::lookForLocation()
|
|||||||
{
|
{
|
||||||
bool foundLocation = false;
|
bool foundLocation = false;
|
||||||
|
|
||||||
|
if (ublox.moduleQueried.SIV)
|
||||||
|
numSatellites = ublox.getSIV(0);
|
||||||
|
|
||||||
|
if (ublox.moduleQueried.pDOP)
|
||||||
|
dop = ublox.getPDOP(0); // PDOP (an accuracy metric) is reported in 10^2 units so we have to scale down when we use it
|
||||||
|
|
||||||
// we only notify if position has changed due to a new fix
|
// we only notify if position has changed due to a new fix
|
||||||
if ((fixType >= 3 && fixType <= 4)) {
|
if ((fixType >= 3 && fixType <= 4)) {
|
||||||
if (ublox.moduleQueried.latitude) // rd fixes only
|
if (ublox.moduleQueried.latitude) // rd fixes only
|
||||||
@ -175,12 +181,10 @@ bool UBloxGPS::lookForLocation()
|
|||||||
latitude = ublox.getLatitude(0);
|
latitude = ublox.getLatitude(0);
|
||||||
longitude = ublox.getLongitude(0);
|
longitude = ublox.getLongitude(0);
|
||||||
altitude = ublox.getAltitudeMSL(0) / 1000; // in mm convert to meters
|
altitude = ublox.getAltitudeMSL(0) / 1000; // in mm convert to meters
|
||||||
dop = ublox.getPDOP(0); // PDOP (an accuracy metric) is reported in 10^2 units so we have to scale down when we use it
|
|
||||||
|
|
||||||
// Note: heading is only currently implmented in the ublox for the 8m chipset - therefore
|
// Note: heading is only currently implmented in the ublox for the 8m chipset - therefore
|
||||||
// don't read it here - it will generate an ignored getPVT command on the 6ms
|
// don't read it here - it will generate an ignored getPVT command on the 6ms
|
||||||
// heading = ublox.getHeading(0);
|
// heading = ublox.getHeading(0);
|
||||||
numSatellites = ublox.getSIV(0);
|
|
||||||
|
|
||||||
// bogus lat lon is reported as 0 or 0 (can be bogus just for one)
|
// bogus lat lon is reported as 0 or 0 (can be bogus just for one)
|
||||||
// Also: apparently when the GPS is initially reporting lock it can output a bogus latitude > 90 deg!
|
// Also: apparently when the GPS is initially reporting lock it can output a bogus latitude > 90 deg!
|
||||||
|
Loading…
Reference in New Issue
Block a user