Comments (4)
As this is not a Tiny Gps issue, may I suggest you look at the following link which has options and discussions. In particular GMT vs UTC conversion.
https://news.ycombinator.com/item?id=27944776 (Google search)
from tinygpsplus.
Thank you for your answer. It seems that the problem is difficult to solve. First, I looked in the TinyGPSPlus library for a flag informing that the given time is correct. It turned out that the isValid() function informing about the correct location does not tell about the correctness of the time. It happened many times that despite receiving the correct coordinates, the time was incorrect. It would be enough for me to know whether the seconds correction was included or not. But I don't think it can be determined. With the assumed method of using the clock (it is taken outside the house once a day and synchronized with GPS), it probably makes the most sense to check the time difference between the DS3231 and the GPS. If the difference is in the range from 2900 ms to 3100 ms, it means that the GPS time is not corrected. And if it is in the range from -100 ms to +100 ms, then the correction is included.
Here is a snippet of data received from GPS. At the beginning of each line I have included timestamp from DS3231 (valid UTC time). The moment when the GPS time was corrected is visible: the seconds jump back by three. There is no information that this happened. So the problem is unsolvable with such receivers...
13:28:35,06/08/2023,$GPGLL,,,,,132838.00,V,N49
13:28:36,06/08/2023,$GPRMC,132839.00,V,,,,,,,060823,,,N70
13:28:36,06/08/2023,$GPVTG,,,,,,,,,N30
13:28:36,06/08/2023,$GPGGA,132839.00,,,,,0,03,4.89,,,,,,52
13:28:36,06/08/2023,$GPGSA,A,1,31,03,28,,,,,,,,,,4.99,4.89,1.000B
13:28:36,06/08/2023,$GPGSV,2,1,06,01,28,159,27,03,70,082,34,07,,,17,17,24,250,40
13:28:36,06/08/2023,$GPGSV,2,2,06,28,18,039,30,31,36,066,3677
13:28:36,06/08/2023,$GPGLL,,,,,132839.00,V,N48
13:28:37,06/08/2023,$GPRMC,132837.00,V,,,,,,,060823,,,N7E
13:28:37,06/08/2023,$GPVTG,,,,,,,,,N30
13:28:37,06/08/2023,$GPGGA,132837.00,,,,,0,03,4.90,,,,,,54
13:28:37,06/08/2023,$GPGSA,A,1,31,03,28,,,,,,,,,,5.00,4.90,1.0002
13:28:37,06/08/2023,$GPGSV,2,1,07,01,28,159,28,03,70,082,34,07,,,15,17,24,250,4C
13:28:37,06/08/2023,$GPGSV,2,2,07,20,,,20,28,18,039,30,31,36,066,3676
13:28:37,06/08/2023,$GPGLL,,,,,132837.00,V,N46
13:28:38,06/08/2023,$GPRMC,132838.00,V,,,,,,,060823,,,N71
13:28:38,06/08/2023,$GPVTG,,,,,,,,,N*30
13:28:38,06/08/2023,$GPGGA,132838.00,,,,,0,03,4.90,,,,,,*5B
from tinygpsplus.
I've completed the first version of the GPS-synchronized clock using, among other things, the TinyGPSPlus library.
Here is a short video showing how this clock works: (https://youtu.be/agQMkFr3lfo)
I encountered another problem, this time related to this library. I had problems with refreshing the LED display, composed of eight 8x8 matrices (as in the video). Every few tenths of a second the refresh slowed down, it looked like something was getting stuck. At first I thought it was the fault of too slow processor (Arduino Nano). However, it turned out that the SoftwareSerial library that TinyGPSPlus uses is the cause of the problems. The LED display is connected to the hardware SPI interface. However, regardless of whether SPI was supported by hardware or software, it was not possible to get a smooth display. Only removing the start of the serial interface (ss.begin()) solved the problem. In the current version of the clock, I run the SoftwareSerial object only for a short while when I need to read data from the GPS. For the rest of the time, the PPS signal from GPS is enough. Time is counted by DS3231 after initial synchronization with GPS.
from tinygpsplus.
Use a realtime OS for your project, like FreeRTOS. Segregate time critical tasks like refreshing the display and driving the serial interface in RTOS tasks. Use a state engine for control.
Your issue seems not related to TinyGPS, since TinyGPS is just an NMEA payload parser - no more, no less.
from tinygpsplus.
Related Issues (20)
- Satellites count is always zero but data exists
- problem with include header in a .h module HOT 2
- What a great gps library HOT 3
- no centisecond with Quectel/Mediatek GPS chips HOT 1
- Anything inside void loop if statement does not work...WHYYYY? HOT 2
- Add calculation mechanism for time-since-epoch (in sec and ms)
- Add doc string for `gps.time.age()` that says the return value is in `ms`
- v1.0.3a is invalid semantic versioning syntax
- Is it work for L89 GPS module quectel? HOT 2
- Location: INVALID HOT 3
- Support for Beidou & GLONASS
- Multi-Constillation Support for custom Sentences
- Pull requests. HOT 3
- Error parsing NMEA sentence with TinyGPSPlus HOT 1
- link for the documentation down HOT 2
- No Data coming from module HOT 4
- GPS TEL0094 HOT 5
- ATGM336H Not Encoding HOT 4
- UBLOX-MAX-M10 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinygpsplus.