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 @@ -52,17 +52,29 @@ void setup()
//-1280208.308,-4716803.847,4086665.811 is SparkFun HQ in ECEF coordinates so...

//Units are cm so 1234 = 12.34m
//success &= myGNSS.setStaticPosition(-128020831, -471680385, 408666581, false); // False at end enables ECEF input
//
//If you were setting up a full GNSS station, you would want to save these settings to Battery-Backed RAM.
//Because setting an incorrect static position will disable the ability to get a lock, we will save to RAM layer only in this example - not RAM_BBR.
//success &= myGNSS.setStaticPosition(-128020831, -471680385, 408666581, false, VAL_LAYER_RAM); // False at end enables ECEF input

// Units are cm with a high precision extension so -1234.5678 should be called: (-123456, -78)
success &= myGNSS.setStaticPosition(-128020830, -80, -471680384, -70, 408666581, 10, false); // ECEF with high precision 0.1mm parts
//
//If you were setting up a full GNSS station, you would want to save these settings to Battery-Backed RAM.
//Because setting an incorrect static position will disable the ability to get a lock, we will save to RAM layer only in this example - not RAM_BBR.
success &= myGNSS.setStaticPosition(-128020830, -80, -471680384, -70, 408666581, 10, false, VAL_LAYER_RAM); // ECEF with high precision 0.1mm parts

// We can also set via lat/long
// 40.09029751,-105.18507900,1560.238
//success &= myGNSS.setStaticPosition(400902975, -1051850790, 156024, true); // True at end enables lat/long input
//
//If you were setting up a full GNSS station, you would want to save these settings to Battery-Backed RAM.
//Because setting an incorrect static position will disable the ability to get a lock, we will save to RAM layer only in this example - not RAM_BBR.
//success &= myGNSS.setStaticPosition(400902975, -1051850790, 156024, true, VAL_LAYER_RAM); // True at end enables lat/long input

// For High Precision Lat/Lon/Alt the units are: degrees^-7, degrees^-9, degrees^-7, degrees^-9, cm, 0.1mm
//success &= myGNSS.setStaticPosition(400902975, 10, -1051850790, 0, 156023, 80, true);
//
//If you were setting up a full GNSS station, you would want to save these settings to Battery-Backed RAM.
//Because setting an incorrect static position will disable the ability to get a lock, we will save to RAM layer only in this example - not RAM_BBR.
//success &= myGNSS.setStaticPosition(400902975, 10, -1051850790, 0, 156023, 80, true, VAL_LAYER_RAM);

if (!success) Serial.println(F("At least one call to setStaticPosition failed!"));

Expand Down
11 changes: 5 additions & 6 deletions examples/ZED-F9P/Example14_NTRIPServer/Example14_NTRIPServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ void setup()
//Note: If you leave these coordinates in place and setup your antenna *not* at SparkFun, your receiver
//will be very confused and fail to generate correction data because, well, you aren't at SparkFun...
//See this tutorial on getting PPP coordinates: https://learn.sparkfun.com/tutorials/how-to-build-a-diy-gnss-reference-station/all
response &= myGNSS.setStaticPosition(-128020830, -80, -471680384, -70, 408666581, 10, false); //With high precision 0.1mm parts. False indicates ECEF (instead of LLH)
//
//If you were setting up a full GNSS station, you would want to save these settings to Battery-Backed RAM.
//Because setting an incorrect static position will disable the ability to get a lock, we will save to RAM layer only in this example - not RAM_BBR.
//With high precision 0.1mm parts. False indicates ECEF (instead of LLH).
response &= myGNSS.setStaticPosition(-128020830, -80, -471680384, -70, 408666581, 10, false, VAL_LAYER_RAM);
if (response == false)
{
Serial.println(F("Failed to enter static position. Freezing..."));
Expand All @@ -135,11 +139,6 @@ void setup()
//but it takes much longer to start generating RTCM data. See Example4_BaseWithLCD
//myGNSS.enableSurveyMode(60, 5.000); //Enable Survey in, 60 seconds, 5.0m

//If you were setting up a full GNSS station, you would want to save these settings.
//Because setting an incorrect static position will disable the ability to get a lock, we will skip saving during this example
//if (myGNSS.saveConfiguration() == false) //Save the current settings to flash and BBR
// Serial.println(F("Module failed to save"));

Serial.println(F("Module configuration complete"));
}

Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=SparkFun u-blox GNSS v3
version=3.0.4
version=3.0.5
author=SparkFun Electronics <techsupport@sparkfun.com>
maintainer=SparkFun Electronics <sparkfun.com>
sentence=Library for I2C, Serial and SPI Communication with u-blox GNSS modules<br/><br/>
Expand Down
4 changes: 3 additions & 1 deletion src/u-blox_Class_and_ID.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,10 @@ const uint8_t UBX_ESF_RESETALG = 0x13;
const uint8_t UBX_ESF_ALG = 0x14;
const uint8_t UBX_ESF_INS = 0x15; // 36 bytes

// CFG-TMODE: Time mode configuration
const uint8_t SVIN_MODE_DISABLE = 0x00;
const uint8_t SVIN_MODE_ENABLE = 0x01;
const uint8_t SVIN_MODE_ENABLE = 0x01; // Survey-In
const uint8_t SVIN_MODE_FIXED = 0x02;

// The following consts are used to configure the various ports and streams for those ports. See -CFG-PRT.
const uint8_t COM_PORT_I2C = 0;
Expand Down
1 change: 1 addition & 0 deletions src/u-blox_GNSS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7286,6 +7286,7 @@ bool DevUBLOXGNSS::setStaticPosition(int32_t ecefXOrLat, int8_t ecefXOrLatHP, in
unsignedSigned32 converter32;
unsignedSigned8 converter8;
bool result = newCfgValset(layer);
result &= addCfgValset8(UBLOX_CFG_TMODE_MODE, SVIN_MODE_FIXED);
result &= addCfgValset8(UBLOX_CFG_TMODE_POS_TYPE, (uint8_t)latLong);
converter32.signed32 = ecefXOrLat;
result &= addCfgValset32(latLong ? UBLOX_CFG_TMODE_LAT : UBLOX_CFG_TMODE_ECEF_X, converter32.unsigned32);
Expand Down
2 changes: 1 addition & 1 deletion src/u-blox_config_keys.h
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,7 @@ const uint32_t UBLOX_CFG_SPIOUTPROT_RTCM3X = UBX_CFG_L | 0x107a0004; // Flag to

// CFG-TMODE: Time mode configuration
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
const uint32_t UBLOX_CFG_TMODE_MODE = UBX_CFG_E1 | 0x20030001; // Receiver mode
const uint32_t UBLOX_CFG_TMODE_MODE = UBX_CFG_E1 | 0x20030001; // Receiver mode: 0-Disabled, 1-Survey-In, 2-Fixed
const uint32_t UBLOX_CFG_TMODE_POS_TYPE = UBX_CFG_E1 | 0x20030002; // Determines whether the ARP position is given in ECEF or LAT/LON/HEIGHT?
const uint32_t UBLOX_CFG_TMODE_ECEF_X = UBX_CFG_I4 | 0x40030003; // ECEF X coordinate of the ARP position.
const uint32_t UBLOX_CFG_TMODE_ECEF_Y = UBX_CFG_I4 | 0x40030004; // ECEF Y coordinate of the ARP position.
Expand Down