Skip to content

Commit f95988e

Browse files
authored
Merge pull request #11 from sparkfun/release_candidate
v3.0.5 - setStaticPosition - set TMODE to FIXED - resolves #10
2 parents 3444ad3 + 0373be7 commit f95988e

File tree

6 files changed

+27
-13
lines changed

6 files changed

+27
-13
lines changed

examples/ZED-F9P/Example12_setStaticPosition/Example12_setStaticPosition.ino

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,29 @@ void setup()
5252
//-1280208.308,-4716803.847,4086665.811 is SparkFun HQ in ECEF coordinates so...
5353

5454
//Units are cm so 1234 = 12.34m
55-
//success &= myGNSS.setStaticPosition(-128020831, -471680385, 408666581, false); // False at end enables ECEF input
55+
//
56+
//If you were setting up a full GNSS station, you would want to save these settings to Battery-Backed RAM.
57+
//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.
58+
//success &= myGNSS.setStaticPosition(-128020831, -471680385, 408666581, false, VAL_LAYER_RAM); // False at end enables ECEF input
5659

5760
// Units are cm with a high precision extension so -1234.5678 should be called: (-123456, -78)
58-
success &= myGNSS.setStaticPosition(-128020830, -80, -471680384, -70, 408666581, 10, false); // ECEF with high precision 0.1mm parts
61+
//
62+
//If you were setting up a full GNSS station, you would want to save these settings to Battery-Backed RAM.
63+
//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.
64+
success &= myGNSS.setStaticPosition(-128020830, -80, -471680384, -70, 408666581, 10, false, VAL_LAYER_RAM); // ECEF with high precision 0.1mm parts
5965

6066
// We can also set via lat/long
6167
// 40.09029751,-105.18507900,1560.238
62-
//success &= myGNSS.setStaticPosition(400902975, -1051850790, 156024, true); // True at end enables lat/long input
68+
//
69+
//If you were setting up a full GNSS station, you would want to save these settings to Battery-Backed RAM.
70+
//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.
71+
//success &= myGNSS.setStaticPosition(400902975, -1051850790, 156024, true, VAL_LAYER_RAM); // True at end enables lat/long input
6372

6473
// For High Precision Lat/Lon/Alt the units are: degrees^-7, degrees^-9, degrees^-7, degrees^-9, cm, 0.1mm
65-
//success &= myGNSS.setStaticPosition(400902975, 10, -1051850790, 0, 156023, 80, true);
74+
//
75+
//If you were setting up a full GNSS station, you would want to save these settings to Battery-Backed RAM.
76+
//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.
77+
//success &= myGNSS.setStaticPosition(400902975, 10, -1051850790, 0, 156023, 80, true, VAL_LAYER_RAM);
6678

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

examples/ZED-F9P/Example14_NTRIPServer/Example14_NTRIPServer.ino

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ void setup()
121121
//Note: If you leave these coordinates in place and setup your antenna *not* at SparkFun, your receiver
122122
//will be very confused and fail to generate correction data because, well, you aren't at SparkFun...
123123
//See this tutorial on getting PPP coordinates: https://learn.sparkfun.com/tutorials/how-to-build-a-diy-gnss-reference-station/all
124-
response &= myGNSS.setStaticPosition(-128020830, -80, -471680384, -70, 408666581, 10, false); //With high precision 0.1mm parts. False indicates ECEF (instead of LLH)
124+
//
125+
//If you were setting up a full GNSS station, you would want to save these settings to Battery-Backed RAM.
126+
//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.
127+
//With high precision 0.1mm parts. False indicates ECEF (instead of LLH).
128+
response &= myGNSS.setStaticPosition(-128020830, -80, -471680384, -70, 408666581, 10, false, VAL_LAYER_RAM);
125129
if (response == false)
126130
{
127131
Serial.println(F("Failed to enter static position. Freezing..."));
@@ -135,11 +139,6 @@ void setup()
135139
//but it takes much longer to start generating RTCM data. See Example4_BaseWithLCD
136140
//myGNSS.enableSurveyMode(60, 5.000); //Enable Survey in, 60 seconds, 5.0m
137141

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

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SparkFun u-blox GNSS v3
2-
version=3.0.4
2+
version=3.0.5
33
author=SparkFun Electronics <[email protected]>
44
maintainer=SparkFun Electronics <sparkfun.com>
55
sentence=Library for I2C, Serial and SPI Communication with u-blox GNSS modules<br/><br/>

src/u-blox_Class_and_ID.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,10 @@ const uint8_t UBX_ESF_RESETALG = 0x13;
328328
const uint8_t UBX_ESF_ALG = 0x14;
329329
const uint8_t UBX_ESF_INS = 0x15; // 36 bytes
330330

331+
// CFG-TMODE: Time mode configuration
331332
const uint8_t SVIN_MODE_DISABLE = 0x00;
332-
const uint8_t SVIN_MODE_ENABLE = 0x01;
333+
const uint8_t SVIN_MODE_ENABLE = 0x01; // Survey-In
334+
const uint8_t SVIN_MODE_FIXED = 0x02;
333335

334336
// The following consts are used to configure the various ports and streams for those ports. See -CFG-PRT.
335337
const uint8_t COM_PORT_I2C = 0;

src/u-blox_GNSS.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7286,6 +7286,7 @@ bool DevUBLOXGNSS::setStaticPosition(int32_t ecefXOrLat, int8_t ecefXOrLatHP, in
72867286
unsignedSigned32 converter32;
72877287
unsignedSigned8 converter8;
72887288
bool result = newCfgValset(layer);
7289+
result &= addCfgValset8(UBLOX_CFG_TMODE_MODE, SVIN_MODE_FIXED);
72897290
result &= addCfgValset8(UBLOX_CFG_TMODE_POS_TYPE, (uint8_t)latLong);
72907291
converter32.signed32 = ecefXOrLat;
72917292
result &= addCfgValset32(latLong ? UBLOX_CFG_TMODE_LAT : UBLOX_CFG_TMODE_ECEF_X, converter32.unsigned32);

src/u-blox_config_keys.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ const uint32_t UBLOX_CFG_SPIOUTPROT_RTCM3X = UBX_CFG_L | 0x107a0004; // Flag to
11401140

11411141
// CFG-TMODE: Time mode configuration
11421142
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1143-
const uint32_t UBLOX_CFG_TMODE_MODE = UBX_CFG_E1 | 0x20030001; // Receiver mode
1143+
const uint32_t UBLOX_CFG_TMODE_MODE = UBX_CFG_E1 | 0x20030001; // Receiver mode: 0-Disabled, 1-Survey-In, 2-Fixed
11441144
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?
11451145
const uint32_t UBLOX_CFG_TMODE_ECEF_X = UBX_CFG_I4 | 0x40030003; // ECEF X coordinate of the ARP position.
11461146
const uint32_t UBLOX_CFG_TMODE_ECEF_Y = UBX_CFG_I4 | 0x40030004; // ECEF Y coordinate of the ARP position.

0 commit comments

Comments
 (0)