OpenMarine

Full Version: Setting Computer Clock with GPS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My Raspberry Pi 3 has been working fine for sometime with OpenPlotter. My GPS is a GlobalSat BU-353 on a USB Lead. My Pi clock is currently set by Internet BUT I will loose my Internet connection when I set of for some time. In OpenPlotter settings I ticked "Set Time from NMEA" and added the port details under "NMEA" > Name: gps  Type:  Serial  Port: /dev/ttyUSB0 etc > apply changes > re-start (Kplex). Now with no Internet connection and Pi shut down for say 20 mins, my clock is 20 mins slow at start up but a few moments after OpenPlotter has played the "Ding Dong", my clock corrects itself precisely.

BUT the GPS data is now intermittent in OpenCPN. The three green signal strength bars keep coming and going and the data stream shown in the NMEA Debug window keep stopping anything up to 10 seconds or so at a time. My "Ship" icon changes from red to black and jumps about a bit.

as soon as I remove the entry for the GPS in OpenPlotter NMEA Settings window, everything is back to normal. Is there a way that I can fix this.

Many thanks

Steve/G4MJW
OpenPlotter (kplex) acts as server for opencpn.
But you add ttyUSB0 directly to opencpn. That's your problem.
In opencpn: connections should be only
(Net 127.0.0.1:10110 1 TCP Input In:None, Out: None)
(Net 127.0.0.1:10110 1 UDP Output In:None, Out: Send RMB)
Many thanks, it's all working now. My previous idea when I was only running OpenCPN on it's own was to install a little RTC Module but this is even better!

One more question, does it update the clock on boot-up only or does it check it periodically?

Thanks again

Steve/G4MJW
Only on boot.

But you can add an Action
trigger
None(always true)
action
command python time_gps.py 30.0 minutes
I might try that but having said that, 6 hours after fixing it and re-booting, watching the GPS Time "Live" the clock on the Computer is still to the second bang on!

My next challenge is to get an NMEA Masthead Wind Unit (Anemometer/Vane) and connect via a 9-Pin Serial to USB Adapter (Already have)!

Thanks again for your help.

Bye for now

Steve/G4MJW