Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

Change Ublox to u-blox #133

Merged
merged 2 commits into from
Oct 26, 2020
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
6 changes: 3 additions & 3 deletions library.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name=SparkFun Ublox Arduino Library
name=SparkFun u-blox Arduino Library
version=1.8.6
author=SparkFun Electronics <techsupport@sparkfun.com>
maintainer=SparkFun Electronics <sparkfun.com>
sentence=Library for I2C and Serial Communication with Ublox modules
paragraph=An Arduino Library to enable both I2C and Serial communication for both NMEA reception and binary UBX sending to the module. Useful for interfacing to the <a href="https://www.sparkfun.com/products/15136">SparkFun GPS-RTK2</a> ZED-F9P, <a href="https://www.sparkfun.com/products/14980">SparkFun GPS-RTK</a> NEO-M8P-2, the <a href="https://www.sparkfun.com/products/15210">SparkFun SAM-M8Q</a>, and the <a href="https://www.sparkfun.com/products/15193">SparkFun ZEO-M8Q</a>. Library also works with other Ublox based boards. <br><br>The ZED-F9P and NEO-M8P-2 modules are top-of-the-line modules for high accuracy GNSS and GPS location solutions including RTK. The ZED-F9P is unique in that it is capable of both rover and base station operations allowing the module to become a base station and produce RTCM 3.x correction data.
sentence=Library for I2C and Serial Communication with u-blox modules
paragraph=An Arduino Library to enable both I2C and Serial communication for both NMEA reception and binary UBX sending to u-blox modules. Useful for interfacing to the <a href="https://www.sparkfun.com/products/15136">SparkFun GPS-RTK2</a> ZED-F9P, <a href="https://www.sparkfun.com/products/14980">SparkFun GPS-RTK</a> NEO-M8P-2, the <a href="https://www.sparkfun.com/products/15210">SparkFun SAM-M8Q</a>, and the <a href="https://www.sparkfun.com/products/15193">SparkFun ZEO-M8Q</a>. Library also works with other u-lox based boards. <br><br>The ZED-F9P and NEO-M8P-2 modules are top-of-the-line modules for high accuracy GNSS and GPS location solutions including RTK. The ZED-F9P is unique in that it is capable of both rover and base station operations allowing the module to become a base station and produce RTCM 3.x correction data.
category=Sensors
url=https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library
architectures=*
38 changes: 19 additions & 19 deletions src/SparkFun_Ublox_Arduino_Library.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
This is a library written for the Ublox ZED-F9P and NEO-M8P-2
This is a library written for the u-blox ZED-F9P and NEO-M8P-2
SparkFun sells these at its website: www.sparkfun.com
Do you like this library? Help support SparkFun. Buy a board!
https://www.sparkfun.com/products/15136
Expand All @@ -11,7 +11,7 @@
Written by Nathan Seidle @ SparkFun Electronics, September 6th, 2018

This library handles configuring and handling the responses
from a Ublox GPS module. Works with most modules from Ublox including
from a u-blox GPS module. Works with most modules from u-blox including
the Zed-F9P, NEO-M8P-2, NEO-M9N, ZOE-M8Q, SAM-M8Q, and many others.

https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library
Expand Down Expand Up @@ -239,7 +239,7 @@ void SFE_UBLOX_GPS::hardReset()
sendCommand(&packetCfg, 0); // don't expect ACK
}

//Changes the serial baud rate of the Ublox module, can't return success/fail 'cause ACK from modem
//Changes the serial baud rate of the u-blox module, can't return success/fail 'cause ACK from modem
//is lost due to baud rate change
void SFE_UBLOX_GPS::setSerialRate(uint32_t baudrate, uint8_t uartPort, uint16_t maxWait)
{
Expand Down Expand Up @@ -277,7 +277,7 @@ void SFE_UBLOX_GPS::setSerialRate(uint32_t baudrate, uint8_t uartPort, uint16_t
}
}

//Changes the I2C address that the Ublox module responds to
//Changes the I2C address that the u-blox module responds to
//0x42 is the default but can be changed with this command
boolean SFE_UBLOX_GPS::setI2CAddress(uint8_t deviceAddress, uint16_t maxWait)
{
Expand Down Expand Up @@ -343,10 +343,10 @@ boolean SFE_UBLOX_GPS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedCl
uint8_t lsb = _i2cPort->read();
if (lsb == 0xFF)
{
//I believe this is a Ublox bug. Device should never present an 0xFF.
//I believe this is a u-blox bug. Device should never present an 0xFF.
if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging
{
_debugSerial->println(F("checkUbloxI2C: Ublox bug, length lsb is 0xFF"));
_debugSerial->println(F("checkUbloxI2C: u-blox bug, length lsb is 0xFF"));
}
if (checksumFailurePin >= 0)
{
Expand Down Expand Up @@ -439,7 +439,7 @@ boolean SFE_UBLOX_GPS::checkUbloxI2C(ubxPacket *incomingUBX, uint8_t requestedCl
{
if ((_printDebug == true) || (_printLimitedDebug == true)) // Print this if doing limited debugging
{
_debugSerial->println(F("checkUbloxU2C: Ublox error, module not ready with data"));
_debugSerial->println(F("checkUbloxU2C: u-blox error, module not ready with data"));
}
delay(5); //In logic analyzation, the module starting responding after 1.48ms
if (checksumFailurePin >= 0)
Expand Down Expand Up @@ -1641,7 +1641,7 @@ boolean SFE_UBLOX_GPS::factoryDefault(uint16_t maxWait)

//Given a group, ID and size, return the value of this config spot
//The 32-bit key is put together from group/ID/size. See other getVal to send key directly.
//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
//Configuration of modern u-blox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
uint8_t SFE_UBLOX_GPS::getVal8(uint16_t group, uint16_t id, uint8_t size, uint8_t layer, uint16_t maxWait)
{
//Create key
Expand All @@ -1663,7 +1663,7 @@ uint8_t SFE_UBLOX_GPS::getVal8(uint16_t group, uint16_t id, uint8_t size, uint8_
//Given a key, return its value
//This function takes a full 32-bit key
//Default layer is BBR
//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
//Configuration of modern u-blox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
uint8_t SFE_UBLOX_GPS::getVal8(uint32_t key, uint8_t layer, uint16_t maxWait)
{
packetCfg.cls = UBX_CLASS_CFG;
Expand Down Expand Up @@ -1725,7 +1725,7 @@ uint8_t SFE_UBLOX_GPS::getVal8(uint32_t key, uint8_t layer, uint16_t maxWait)
//Given a key, set a 16-bit value
//This function takes a full 32-bit key
//Default layer is BBR
//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
//Configuration of modern u-blox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
uint8_t SFE_UBLOX_GPS::setVal(uint32_t key, uint16_t value, uint8_t layer, uint16_t maxWait)
{
return setVal16(key, value, layer, maxWait);
Expand All @@ -1734,7 +1734,7 @@ uint8_t SFE_UBLOX_GPS::setVal(uint32_t key, uint16_t value, uint8_t layer, uint1
//Given a key, set a 16-bit value
//This function takes a full 32-bit key
//Default layer is BBR
//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
//Configuration of modern u-blox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
uint8_t SFE_UBLOX_GPS::setVal16(uint32_t key, uint16_t value, uint8_t layer, uint16_t maxWait)
{
packetCfg.cls = UBX_CLASS_CFG;
Expand Down Expand Up @@ -1766,7 +1766,7 @@ uint8_t SFE_UBLOX_GPS::setVal16(uint32_t key, uint16_t value, uint8_t layer, uin
//Given a key, set an 8-bit value
//This function takes a full 32-bit key
//Default layer is BBR
//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
//Configuration of modern u-blox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
uint8_t SFE_UBLOX_GPS::setVal8(uint32_t key, uint8_t value, uint8_t layer, uint16_t maxWait)
{
packetCfg.cls = UBX_CLASS_CFG;
Expand Down Expand Up @@ -1797,7 +1797,7 @@ uint8_t SFE_UBLOX_GPS::setVal8(uint32_t key, uint8_t value, uint8_t layer, uint1
//Given a key, set a 32-bit value
//This function takes a full 32-bit key
//Default layer is BBR
//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
//Configuration of modern u-blox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
uint8_t SFE_UBLOX_GPS::setVal32(uint32_t key, uint32_t value, uint8_t layer, uint16_t maxWait)
{
packetCfg.cls = UBX_CLASS_CFG;
Expand Down Expand Up @@ -1831,7 +1831,7 @@ uint8_t SFE_UBLOX_GPS::setVal32(uint32_t key, uint32_t value, uint8_t layer, uin
//Start defining a new UBX-CFG-VALSET ubxPacket
//This function takes a full 32-bit key and 32-bit value
//Default layer is BBR
//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
//Configuration of modern u-blox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
uint8_t SFE_UBLOX_GPS::newCfgValset32(uint32_t key, uint32_t value, uint8_t layer)
{
packetCfg.cls = UBX_CLASS_CFG;
Expand Down Expand Up @@ -1865,7 +1865,7 @@ uint8_t SFE_UBLOX_GPS::newCfgValset32(uint32_t key, uint32_t value, uint8_t laye
//Start defining a new UBX-CFG-VALSET ubxPacket
//This function takes a full 32-bit key and 16-bit value
//Default layer is BBR
//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
//Configuration of modern u-blox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
uint8_t SFE_UBLOX_GPS::newCfgValset16(uint32_t key, uint16_t value, uint8_t layer)
{
packetCfg.cls = UBX_CLASS_CFG;
Expand Down Expand Up @@ -1897,7 +1897,7 @@ uint8_t SFE_UBLOX_GPS::newCfgValset16(uint32_t key, uint16_t value, uint8_t laye
//Start defining a new UBX-CFG-VALSET ubxPacket
//This function takes a full 32-bit key and 8-bit value
//Default layer is BBR
//Configuration of modern Ublox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
//Configuration of modern u-blox modules is now done via getVal/setVal/delVal, ie protocol v27 and above found on ZED-F9P
uint8_t SFE_UBLOX_GPS::newCfgValset8(uint32_t key, uint8_t value, uint8_t layer)
{
packetCfg.cls = UBX_CLASS_CFG;
Expand Down Expand Up @@ -3189,7 +3189,7 @@ uint16_t SFE_UBLOX_GPS::getPDOP(uint16_t maxWait)
return (pDOP);
}

//Get the current protocol version of the Ublox module we're communicating with
//Get the current protocol version of the u-blox module we're communicating with
//This is helpful when deciding if we should call the high-precision Lat/Long (HPPOSLLH) or the regular (POSLLH)
uint8_t SFE_UBLOX_GPS::getProtocolVersionHigh(uint16_t maxWait)
{
Expand All @@ -3198,7 +3198,7 @@ uint8_t SFE_UBLOX_GPS::getProtocolVersionHigh(uint16_t maxWait)
return (versionHigh);
}

//Get the current protocol version of the Ublox module we're communicating with
//Get the current protocol version of the u-blox module we're communicating with
//This is helpful when deciding if we should call the high-precision Lat/Long (HPPOSLLH) or the regular (POSLLH)
uint8_t SFE_UBLOX_GPS::getProtocolVersionLow(uint16_t maxWait)
{
Expand All @@ -3207,7 +3207,7 @@ uint8_t SFE_UBLOX_GPS::getProtocolVersionLow(uint16_t maxWait)
return (versionLow);
}

//Get the current protocol version of the Ublox module we're communicating with
//Get the current protocol version of the u-blox module we're communicating with
//This is helpful when deciding if we should call the high-precision Lat/Long (HPPOSLLH) or the regular (POSLLH)
boolean SFE_UBLOX_GPS::getProtocolVersion(uint16_t maxWait)
{
Expand Down
16 changes: 8 additions & 8 deletions src/SparkFun_Ublox_Arduino_Library.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
This is a library written for the Ublox ZED-F9P and NEO-M8P-2
This is a library written for the u-blox ZED-F9P and NEO-M8P-2
SparkFun sells these at its website: www.sparkfun.com
Do you like this library? Help support SparkFun. Buy a board!
https://www.sparkfun.com/products/15136
Expand All @@ -11,7 +11,7 @@
Written by Nathan Seidle @ SparkFun Electronics, September 6th, 2018

This library handles configuring and handling the responses
from a Ublox GPS module. Works with most modules from Ublox including
from a u-blox GPS module. Works with most modules from u-blox including
the Zed-F9P, NEO-M8P-2, NEO-M9N, ZOE-M8Q, SAM-M8Q, and many others.

https://github.com/sparkfun/SparkFun_Ublox_Arduino_Library
Expand Down Expand Up @@ -154,9 +154,9 @@ const uint8_t UBX_CFG_SBAS = 0x16; //SBAS configuration
const uint8_t UBX_CFG_TMODE3 = 0x71; //Time Mode Settings 3. Used to enable Survey In Mode
const uint8_t UBX_CFG_TP5 = 0x31; //Time Pulse Parameters
const uint8_t UBX_CFG_USB = 0x1B; //USB Configuration
const uint8_t UBX_CFG_VALDEL = 0x8C; //Used for config of higher version Ublox modules (ie protocol v27 and above). Deletes values corresponding to provided keys/ provided keys with a transaction
const uint8_t UBX_CFG_VALGET = 0x8B; //Used for config of higher version Ublox modules (ie protocol v27 and above). Configuration Items
const uint8_t UBX_CFG_VALSET = 0x8A; //Used for config of higher version Ublox modules (ie protocol v27 and above). Sets values corresponding to provided key-value pairs/ provided key-value pairs within a transaction.
const uint8_t UBX_CFG_VALDEL = 0x8C; //Used for config of higher version u-blox modules (ie protocol v27 and above). Deletes values corresponding to provided keys/ provided keys with a transaction
const uint8_t UBX_CFG_VALGET = 0x8B; //Used for config of higher version u-blox modules (ie protocol v27 and above). Configuration Items
const uint8_t UBX_CFG_VALSET = 0x8A; //Used for config of higher version u-blox modules (ie protocol v27 and above). Sets values corresponding to provided key-value pairs/ provided key-value pairs within a transaction.

//The following are used to enable NMEA messages. Descriptions come from the NMEA messages overview in the ZED-F9P Interface Description
const uint8_t UBX_NMEA_MSB = 0xF0; //All NMEA enable commands have 0xF0 as MSB
Expand Down Expand Up @@ -461,7 +461,7 @@ class SFE_UBLOX_GPS
//Control the size of the internal I2C transaction amount
void setI2CTransactionSize(uint8_t bufferSize);
uint8_t getI2CTransactionSize(void);

//Set the max number of bytes set in a given I2C transaction
uint8_t i2cTransactionSize = 32; //Default to ATmega328 limit

Expand Down Expand Up @@ -494,8 +494,8 @@ class SFE_UBLOX_GPS
void factoryReset(); //Send factory reset sequence (i.e. load "default" configuration and perform hardReset)
void hardReset(); //Perform a reset leading to a cold start (zero info start-up)

boolean setI2CAddress(uint8_t deviceAddress, uint16_t maxTime = 250); //Changes the I2C address of the Ublox module
void setSerialRate(uint32_t baudrate, uint8_t uartPort = COM_PORT_UART1, uint16_t maxTime = defaultMaxWait); //Changes the serial baud rate of the Ublox module, uartPort should be COM_PORT_UART1/2
boolean setI2CAddress(uint8_t deviceAddress, uint16_t maxTime = 250); //Changes the I2C address of the u-blox module
void setSerialRate(uint32_t baudrate, uint8_t uartPort = COM_PORT_UART1, uint16_t maxTime = defaultMaxWait); //Changes the serial baud rate of the u-blox module, uartPort should be COM_PORT_UART1/2
void setNMEAOutputPort(Stream &nmeaOutputPort); //Sets the internal variable for the port to direct NMEA characters to

boolean setNavigationFrequency(uint8_t navFreq, uint16_t maxWait = defaultMaxWait); //Set the number of nav solutions sent per second
Expand Down