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
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,17 @@ void pushGPGGA(NMEA_GGA_data_t nmeaData)
// | | |
void printPVTdata(UBX_NAV_PVT_data_t ubxDataStruct)
{
long latitude = ubxDataStruct.lat; // Print the latitude
double latitude = ubxDataStruct.lat; // Print the latitude
Serial.print(F("Lat: "));
Serial.print(latitude / 10000000L);
Serial.print(F("."));
Serial.print(abs(latitude % 10000000L));
Serial.print(latitude / 10000000.0, 7);

long longitude = ubxDataStruct.lon; // Print the longitude
double longitude = ubxDataStruct.lon; // Print the longitude
Serial.print(F(" Long: "));
Serial.print(longitude / 10000000L);
Serial.print(F("."));
Serial.print(abs(longitude % 10000000L));
Serial.print(longitude / 10000000.0, 7);

long altitude = ubxDataStruct.hMSL; // Print the height above mean sea level
double altitude = ubxDataStruct.hMSL; // Print the height above mean sea level
Serial.print(F(" Height: "));
Serial.print(altitude);
Serial.print(F(" (mm)"));
Serial.print(altitude / 1000.0, 3);

uint8_t fixType = ubxDataStruct.fixType; // Print the fix type
Serial.print(F(" Fix: "));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,22 +220,17 @@ bool checkConnection(int theSocket, bool connectionIsOpen)
// See if new PVT data is available
if (myGNSS.getPVT()) // getPVT will return true if fresh data is available
{
long latitude = myGNSS.getLatitude(); // Print the latitude
double latitude = (double)myGNSS.getLatitude(); // Print the latitude
Serial.print(F("checkConnection: Lat: "));
Serial.print(latitude / 10000000L);
Serial.print(F("."));
Serial.print(abs(latitude % 10000000L));
Serial.print(latitude / 10000000.0, 7);

long longitude = myGNSS.getLongitude(); // Print the longitude
double longitude = (double)myGNSS.getLongitude(); // Print the longitude
Serial.print(F(" Long: "));
Serial.print(longitude / 10000000L);
Serial.print(F("."));
Serial.print(abs(longitude % 10000000L));
Serial.print(longitude / 10000000.0, 7);

long altitude = myGNSS.getAltitudeMSL(); // Print the height above mean sea level
double altitude = (double)myGNSS.getAltitudeMSL(); // Print the height above mean sea level
Serial.print(F(" Height: "));
Serial.print(altitude);
Serial.print(F(" (mm)"));
Serial.print(altitude / 1000.0, 3);

uint8_t fixType = myGNSS.getFixType(); // Print the fix type
Serial.print(F(" Fix: "));
Expand Down
2 changes: 1 addition & 1 deletion src/SparkFun_u-blox_SARA-R5_Arduino_Library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2432,7 +2432,7 @@ SARA_R5_error_t SARA_R5::socketWrite(int socket, const char *str, int len)
{
unsigned long writeDelay = millis();
while (millis() < (writeDelay + 50))
delay(1); //uBlox specification says to wait 50ms after receiving "@" to write data.
delay(1); //u-blox specification says to wait 50ms after receiving "@" to write data.

if (len == -1)
{
Expand Down