Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Firmware/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ RUN arduino-cli lib install "SparkFun BQ40Z50 Battery Manager Arduino Library"@1
RUN arduino-cli lib install "ArduinoMqttClient"@0.1.8
RUN arduino-cli lib install "SparkFun u-blox PointPerfect Library"@1.11.4
RUN arduino-cli lib install "SparkFun IM19 IMU Arduino Library"@1.0.1
RUN arduino-cli lib install "SparkFun UM980 Triband RTK GNSS Arduino Library"@1.0.9
RUN arduino-cli lib install "SparkFun UM980 Triband RTK GNSS Arduino Library"@1.0.10
RUN arduino-cli lib install "SparkFun LG290P Quadband RTK GNSS Arduino Library"@1.0.8
RUN arduino-cli lib install "SparkFun I2C Expander Arduino Library"@1.0.1
RUN arduino-cli lib install "SparkFun Apple Accessory Arduino Library"@3.0.9
Expand Down
2 changes: 2 additions & 0 deletions Firmware/RTK_Everywhere/Display.ino
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ void displayUpdate()
break;

case (STATE_BASE_CASTER_NOT_STARTED):
case (STATE_BASE_ASSIST_NOT_STARTED):
case (STATE_BASE_NOT_STARTED):
case (STATE_BASE_CONFIG_WAIT):
displayBaseStart(0); // Show 'Base' while the system configures the Base
Expand Down Expand Up @@ -1281,6 +1282,7 @@ void setModeIcon(std::vector<iconPropertyBlinking> *iconList)
break;

case (STATE_BASE_CASTER_NOT_STARTED):
case (STATE_BASE_ASSIST_NOT_STARTED):
case (STATE_BASE_NOT_STARTED):
case (STATE_BASE_CONFIG_WAIT):
// Do nothing. Static display shown during state change.
Expand Down
6 changes: 5 additions & 1 deletion Firmware/RTK_Everywhere/GNSS.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ typedef enum
class GNSS
{
protected:
float _altitude; // Altitude in meters
double _altitude; // Altitude in meters
double _geoidalSeparation; // Geoidal separation in meters
float _horizontalAccuracy; // Horizontal position accuracy in meters
double _latitude; // Latitude in degrees
double _longitude; // Longitude in degrees
Expand Down Expand Up @@ -166,6 +167,9 @@ class GNSS
// Returns the fix type or zero if not online
virtual uint8_t getFixType();

// Returns the geoidal separation
virtual double getGeoidalSeparation();

// Returns the hours of 24 hour clock or zero if not online
virtual uint8_t getHour();

Expand Down
3 changes: 3 additions & 0 deletions Firmware/RTK_Everywhere/GNSS_LG290P.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ class GNSS_LG290P : GNSS
// Returns the fix type or zero if not online
uint8_t getFixType();

// Returns the geoidal separation
double getGeoidalSeparation();

// Returns the hours of 24 hour clock or zero if not online
uint8_t getHour();

Expand Down
15 changes: 14 additions & 1 deletion Firmware/RTK_Everywhere/GNSS_LG290P.ino
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,10 @@ uint8_t GNSS_LG290P::getActiveRtcmMessageCount()
double GNSS_LG290P::getAltitude()
{
if (online.gnss)
return (_lg290p->getAltitude());
// See issue #809
// getAltitude returns the Altitude above mean sea level (meters)
// For Height above Ellipsoid, we need to add the the geoidalSeparation
return (_lg290p->getAltitude() + _lg290p->getGeoidalSeparation());
return (0);
}

Expand Down Expand Up @@ -829,6 +832,16 @@ uint8_t GNSS_LG290P::getFixType()
return 0;
}

//----------------------------------------
// Returns the geoidal separation in meters or zero if the GNSS is offline
//----------------------------------------
double GNSS_LG290P::getGeoidalSeparation()
{
if (online.gnss)
return (_lg290p->getGeoidalSeparation());
return (0);
}

//----------------------------------------
// Get the horizontal position accuracy
// Returns the horizontal position accuracy or zero if offline
Expand Down
3 changes: 3 additions & 0 deletions Firmware/RTK_Everywhere/GNSS_Mosaic.h
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,9 @@ class GNSS_MOSAIC : GNSS
// Returns the fix type or zero if not online
uint8_t getFixType();

// Returns the geoidal separation
double getGeoidalSeparation();

// Returns the hours of 24 hour clock or zero if not online
uint8_t getHour();

Expand Down
13 changes: 12 additions & 1 deletion Firmware/RTK_Everywhere/GNSS_Mosaic.ino
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,8 @@ uint8_t GNSS_MOSAIC::getActiveMessageCount()
//----------------------------------------
double GNSS_MOSAIC::getAltitude()
{
// _altitude contains the Ellipsoidal height (meters) from SBF Block 4007
// We don't need to adjust for the Geoidal Separation (Undulation)
return _altitude;
}

Expand Down Expand Up @@ -952,6 +954,14 @@ uint8_t GNSS_MOSAIC::getFixType()
return _fixType;
}

//----------------------------------------
// Returns the geoidal separation in meters or zero if the GNSS is offline
//----------------------------------------
double GNSS_MOSAIC::getGeoidalSeparation()
{
return _geoidalSeparation;
}

//----------------------------------------
// Returns the hours of 24 hour clock or zero if not online
//----------------------------------------
Expand Down Expand Up @@ -2527,7 +2537,8 @@ void GNSS_MOSAIC::storeBlock4007(SEMP_PARSE_STATE *parse)
{
_latitude = sempSbfGetF8(parse, 16) * 180.0 / PI; // Convert from radians to degrees
_longitude = sempSbfGetF8(parse, 24) * 180.0 / PI;
_altitude = (float)sempSbfGetF8(parse, 32);
_altitude = sempSbfGetF8(parse, 32); // Ellipsoidal height
_geoidalSeparation = (double)sempSbfGetF4(parse, 40); // Geoid undulation
_horizontalAccuracy = ((float)sempSbfGetU2(parse, 90)) / 100.0; // Convert from cm to m

// NrSV is the total number of satellites used in the PVT computation.
Expand Down
8 changes: 8 additions & 0 deletions Firmware/RTK_Everywhere/GNSS_None.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,14 @@ class GNSS_None : public GNSS
return _fixType;
}

// Get the geoidal separation
// Outputs:
// Returns the geoidal separation in meters or zero if the GNSS is offline
double getGeoidalSeparation()
{
return _geoidalSeparation;
}

// Returns the hours of 24 hour clock or zero if not online
uint8_t getHour()
{
Expand Down
3 changes: 3 additions & 0 deletions Firmware/RTK_Everywhere/GNSS_UM980.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ class GNSS_UM980 : GNSS
// Returns the fix type or zero if not online
uint8_t getFixType();

// Returns the geoidal separation
double getGeoidalSeparation();

// Returns the hours of 24 hour clock or zero if not online
uint8_t getHour();

Expand Down
15 changes: 14 additions & 1 deletion Firmware/RTK_Everywhere/GNSS_UM980.ino
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,10 @@ uint8_t GNSS_UM980::getActiveRtcmMessageCount()
double GNSS_UM980::getAltitude()
{
if (online.gnss)
return (_um980->getAltitude());
// See issue #809
// getAltitude returns the Height above mean sea level (meters) from BESTNAVB
// For Height above Ellipsoid, we need to add the the geoidalSeparation
return (_um980->getAltitude() + _um980->getGeoidalSeparation());
return (0);
}

Expand Down Expand Up @@ -586,6 +589,16 @@ uint8_t GNSS_UM980::getFixType()
return 0;
}

//----------------------------------------
// Returns the geoidal separation in meters or zero if the GNSS is offline
//----------------------------------------
double GNSS_UM980::getGeoidalSeparation()
{
if (online.gnss)
return (_um980->getGeoidalSeparation());
return (0);
}

//----------------------------------------
// Get the horizontal position accuracy
// Returns the horizontal position accuracy or zero if offline
Expand Down
3 changes: 3 additions & 0 deletions Firmware/RTK_Everywhere/GNSS_ZED.h
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,9 @@ class GNSS_ZED : GNSS
// Returns the fix type or zero if not online
uint8_t getFixType();

// Returns the geoidal separation
double getGeoidalSeparation();

// Returns the hours of 24 hour clock or zero if not online
uint8_t getHour();

Expand Down
13 changes: 12 additions & 1 deletion Firmware/RTK_Everywhere/GNSS_ZED.ino
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,8 @@ uint8_t GNSS_ZED::getActiveRtcmMessageCount()
//----------------------------------------
double GNSS_ZED::getAltitude()
{
// _altitude contains the Height above ellipsoid from NAV-PVT height
// We don't need to adjust for the Geoidal Separation (Undulation)
return _altitude;
}

Expand Down Expand Up @@ -936,6 +938,14 @@ uint8_t GNSS_ZED::getFixType()
return (_fixType);
}

//----------------------------------------
// Returns the geoidal separation in meters or zero if the GNSS is offline
//----------------------------------------
double GNSS_ZED::getGeoidalSeparation()
{
return _geoidalSeparation;
}

//----------------------------------------
// Get the horizontal position accuracy
// Returns the horizontal position accuracy or zero if offline
Expand Down Expand Up @@ -2542,7 +2552,8 @@ void storePVTdata(UBX_NAV_PVT_data_t *ubxDataStruct)
//----------------------------------------
void GNSS_ZED::storePVTdataRadio(UBX_NAV_PVT_data_t *ubxDataStruct)
{
_altitude = ubxDataStruct->height / 1000.0;
_altitude = (double)ubxDataStruct->height / 1000.0; // Height above ellipsoid in mm
_geoidalSeparation = (double)(ubxDataStruct->height - ubxDataStruct->hMSL) / 1000.0;

_day = ubxDataStruct->day;
_month = ubxDataStruct->month;
Expand Down
29 changes: 23 additions & 6 deletions Firmware/RTK_Everywhere/Network.ino
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,20 @@ bool networkConsumerIsConnected(NETCONSUMER_t consumer)
// Validate the consumer
networkConsumerValidate(consumer);

// if (consumer == NETCONSUMER_NTRIP_SERVER_1)
// {
// index = networkIndexTable[networkPriority];
// systemPrintf("NETCONSUMER_NTRIP_SERVER_1: %ld %d %d %d %d\r\n",
// networkHasInternet_bm,
// networkConsumerPriority[consumer],
// networkPriority,
// index,
// networkInterfaceHasInternet(index)
// );
// }

// NETCONSUMER_NTRIP_SERVER_1: 2 3 3 3 0

// If the client is using the highest priority network and that
// network is still available then continue as normal
if (networkHasInternet_bm && (networkConsumerPriority[consumer] == networkPriority))
Expand Down Expand Up @@ -826,7 +840,7 @@ void networkDisplayMode()

if (rtkMode == 0)
{
systemPrintf("rtkMode: 0 (Not specified)\r\n");
systemPrintf("rtkMode: 0 (Not Specified or Base Undecided)\r\n");
return;
}

Expand Down Expand Up @@ -2455,11 +2469,14 @@ void networkUpdate()
}
}

// Update the WiFi state
wifiStationUpdate();

// Update Ethernet
ethernetUpdate();
// Walk the list of network priorities in descending order
for (priority = 0; priority < NETWORK_OFFLINE; priority++)
{
// Update the networks in order of priority
index = networkIndexTable[priority];
if (networkInterfaceTable[index].updateMethod)
networkInterfaceTable[index].updateMethod();
}

// Update the network services
// Start or stop mDNS
Expand Down
2 changes: 1 addition & 1 deletion Firmware/RTK_Everywhere/RTK_Everywhere.ino
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ bool savePossibleSettings = true; // Save possible vs. available settings. See r
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
#ifdef COMPILE_WIFI
int packetRSSI;
RTK_WIFI wifi(false);
RTK_WIFI wifi(false); // wifi(false); is non-verbose. For verbose, change to wifi(true);
#endif // COMPILE_WIFI

// WiFi Globals - For other module direct access
Expand Down
Loading