Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've installed gpsd and to the best of my ability can confirm that it is on the hard drive, I'm still trying to figure out the version but I think it is v3.xx.
I'm have a USB GPS antenna plugged into an Intel NUC with Debian 12 and according to the terminal it can see numerous satellites, the longitude and latitude are showing the right location but the GPS time and date at first was off by about 16 hours but seems to be getting closer to local time after about 3 days.
I set the BIOS time to match my phone but Debian time is 2 hours off.
The only purpose of this computer is to provide time to a private network with a domain controller.
I have a feeling that more software is needed but according to gpsd.io trouble shooting the fact that I can see satellites data means everything works.
If any more information is needed I will try and find it. I sure would appreciate some help with this.
The BIOS should be set to UTC time as well configuring debian so it knows the hardware clock is set to utc. Did you install ntp?
The output of cgps or xgps should show the correct UTC time when the receiver is synced. As posted ntp needs to be configured to use the receiver as a time source. ntp works using UTC so setting timezone on the server is not required. When ntp is started time should be forced to match the receiver but otherwise slowly keep in sync with small changes.
The receiver/ antenna should be positioned in location with a fairly unobstructed view of the sky.
The "time" of a GPS signal – which is in UTC – by definition cannot be "wrong." Because the entire GPS system is based on very-tiny differences in precisely-synchronized and precisely-correct "time signals." But your time zone interpretation can be incorrect. And, if so, it will always be "off" by a precise number of whole hours.
Incidentally, you can now buy "atomic clocks" which are designed to use GPS signals, not the radio station "WWV."
Last edited by sundialsvcs; 03-31-2024 at 07:02 AM.
The "time" of a GPS signal – which is in UTC – by definition cannot be "wrong." Because the entire GPS system is based on very-tiny differences in precisely-synchronized and precisely-correct "time signals." But your time zone interpretation can be incorrect. And, if so, it will always be "off" by a precise number of whole hours.
Exception, in some part of the world the TIME ZONES are some portion of an hour different than what one would expect from your statement.
In IST (India) the factor is CUT +5:30
Personally I use NTP using multiple reference servers and correct my hardware (CUT) clock, and set local time zone the usual way so my machines all display correct local time. This works well as my machines are often shielded from the sky and would rarely get satellite.
Starting point.
Hardware clock set to UTC.
Time zone set as appropriate for the local time.
These 2 should display local time correctly.
the ntpd service should be keeping system time in sync with UTC.
When all this is correct then the gpsd service should be able to properly display local time properly for the current physical location.
Note that the above is only a starting point since if the gps location moves into a different time zone then the gps time may no longer match local time as set by the user time zone. UTC however never changes and is the basis for the gps time so it is mandatory that the system have UTC time set properly for the hardware clock and maintained by ntp to keep everything in sync. If the hardware clock is set to local time it will cause errors (unless local time also happens to be UTC).
Youy may also need to address your ntp drift which is a factor deals with the percentage drift or difference between your local ntp server and the gpsd synchronization protocols. I'd assume that when you installed the gpsd and ntp software packages you where provided with a example configuration file.
The drift or difference between your local nto server and Greenwich mean time should only be of concern if the drift becomes noticeably larger than when you originally configured your local ntp server.I'd also strongly recommenced that you invest in a highly rated uninterruptible power supply in order to allow you to shave graceful shut down of all of your critical machines.
GPS and location are needed to find time isn't it?
From the location one gets local time if within a few hundred feet unless you are getting differential signals spoofing.
Sort of. A receiver needs to lock onto at least 1 satellite for itself to get accurate time and then it can download information on where to find the others. With 3 you get position and 4 altitude. 4 also corrects for receiver time errors which provides the most accuracy something like 150ns.
I once read about the format of the "li'l ol' tzinfo file," and I had no idea how much information it actually contains. About how time-zones are, and, how they used to be.
Usually, you just run "ntp" and it keeps your clock very-well synchronized and that is that.
(P.S.: The "messy details" of how ntp actually "does its thing" are also quite fascinating. ... There are some serious engineers in this world!)
Last edited by sundialsvcs; 04-03-2024 at 06:55 PM.
Being a ntp server is slightly different from being a ntp client. GPS nor the system clock (except if your hardware clock is set to local but that is another matter) cares about time zones.
Actually GPS and UTC are different time references.. GPS time is not adjusted for leap seconds while UTC is.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.