GithubHelp home page GithubHelp logo

Comments (4)

svdrummer avatar svdrummer commented on August 16, 2024

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.

PiotrFabian avatar PiotrFabian commented on August 16, 2024

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,,,N
70
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.00
0B
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,36
77
13:28:36,06/08/2023,$GPGLL,,,,,132839.00,V,N
48
13:28:37,06/08/2023,$GPRMC,132837.00,V,,,,,,,060823,,,N7E
13:28:37,06/08/2023,$GPVTG,,,,,,,,,N
30
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.00
02
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,36
76
13:28:37,06/08/2023,$GPGLL,,,,,132837.00,V,N46
13:28:38,06/08/2023,$GPRMC,132838.00,V,,,,,,,060823,,,N
71
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.

PiotrFabian avatar PiotrFabian commented on August 16, 2024

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.

cyberman54 avatar cyberman54 commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.