This repository was archived by the owner on Jan 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
Add support for TMOD3 fixed position. #135
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
examples/ZED-F9P/Example11_setStaticPosition/Example11_setStaticPosition.ino
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
Set the static position of the receiver. | ||
By: SparkFun Electronics / Nathan Seidle | ||
Date: September 26th, 2020 | ||
License: MIT. See license file for more information but you can | ||
basically do whatever you want with this code. | ||
|
||
This example shows how to set the static position of a receiver | ||
using an Earth-Centered, Earth-Fixed (ECEF) location. This is the | ||
output from a long (24 hour+) survey-in. Setting the static position | ||
immediately causes the receiver to begin outputting RTCM data (if | ||
enabled), perfect for setting up your own RTCM NTRIP caster or CORS. | ||
|
||
Feel like supporting open source hardware? | ||
Buy a board from SparkFun! | ||
ZED-F9P RTK2: https://www.sparkfun.com/products/15136 | ||
NEO-M8P RTK: https://www.sparkfun.com/products/15005 | ||
SAM-M8Q: https://www.sparkfun.com/products/15106 | ||
|
||
Hardware Connections: | ||
Plug a Qwiic cable into the GPS and a BlackBoard | ||
If you don't have a platform with a Qwiic connection use the SparkFun Qwiic Breadboard Jumper (https://www.sparkfun.com/products/14425) | ||
Open the serial monitor at 115200 baud to see the output | ||
*/ | ||
|
||
#include <Wire.h> //Needed for I2C to GPS | ||
|
||
#include "SparkFun_Ublox_Arduino_Library.h" //http://librarymanager/All#SparkFun_Ublox_GPS | ||
SFE_UBLOX_GPS myGPS; | ||
|
||
void setup() | ||
{ | ||
Serial.begin(115200); // You may need to increase this for high navigation rates! | ||
while (!Serial) | ||
; //Wait for user to open terminal | ||
Serial.println(F("SparkFun u-blox Example")); | ||
|
||
Wire.begin(); | ||
|
||
//myGPS.enableDebugging(); // Uncomment this line to enable debug messages | ||
|
||
if (myGPS.begin() == false) //Connect to the u-blox module using Wire port | ||
{ | ||
Serial.println(F("u-blox GPS not detected at default I2C address. Please check wiring. Freezing.")); | ||
while (1) | ||
; | ||
} | ||
|
||
myGPS.setI2COutput(COM_TYPE_UBX); //Set the I2C port to output UBX only (turn off NMEA noise) | ||
|
||
//-1280208.308,-4716803.847,4086665.811 is SparkFun HQ so... | ||
|
||
//Units are cm so 1234 = 12.34m | ||
//myGPS.setStaticPosition(-128020831, -471680385, 408666581); | ||
nseidle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
//Units are cm with a high precision extension so -1234.5678 should be called: (-123456, -78) | ||
myGPS.setStaticPosition(-128020830, -80, -471680384, -70, 408666581, 10, true, 250); //With high precision 0.1mm parts | ||
nseidle marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
//We can also set via lat/long | ||
//40.09029751,-105.18507900,1560.238 | ||
//myGPS.setStaticPosition(400902975, -1051850790, 156024, true); //True at end enables lat/long input | ||
//myGPS.setStaticPosition(400902975, 10, -1051850790, 0, 156023, 80, true); | ||
|
||
//Now let's use getVals to read back the data | ||
//long ecefX = myGPS.getVal32(0x40030003); | ||
//Serial.print("ecefX: "); | ||
//Serial.println(ecefX); | ||
|
||
Serial.println(F("Done!")); | ||
} | ||
|
||
void loop() | ||
{ | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.