Skip to content

Commit

Permalink
Merge pull request #65 from sparkfun/release_candidate
Browse files Browse the repository at this point in the history
v3.1.7 - improve performance of getTIMTPAsEpoch
  • Loading branch information
PaulZC authored Aug 14, 2024
2 parents 4a73b78 + 729f5cc commit bb33fa9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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.1.6
version=3.1.7
author=SparkFun Electronics <[email protected]>
maintainer=SparkFun Electronics <sparkfun.com>
sentence=Library for I2C, Serial and SPI Communication with u-blox GNSS modules<br/><br/>
Expand Down
6 changes: 3 additions & 3 deletions src/u-blox_GNSS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18477,9 +18477,9 @@ uint32_t DevUBLOXGNSS::getTIMTPAsEpoch(uint32_t &microsecond, uint16_t maxWait)
uint32_t us = packetUBXTIMTP->data.towMS % 1000; // Extract the milliseconds
us *= 1000; // Convert to microseconds

double subMS = packetUBXTIMTP->data.towSubMS; // Get towSubMS (ms * 2^-32)
subMS *= pow(2.0, -32.0); // Convert to milliseconds
subMS *= 1000; // Convert to microseconds
double subMS = packetUBXTIMTP->data.towSubMS; // Get towSubMS (ms * 2^-32)
subMS *= 2.3283064365386963e-10; // pow(2.0, -32.0); // Convert to milliseconds
subMS *= 1000; // Convert to microseconds

us += (uint32_t)subMS; // Add subMS

Expand Down

0 comments on commit bb33fa9

Please sign in to comment.