LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 03-30-2024, 11:08 PM   #1
cary.perque
LQ Newbie
 
Registered: Mar 2020
Posts: 13

Rep: Reputation: Disabled
GPS antenna can get time but it is wrong


Hello everyone

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.

cary
 
Old 03-31-2024, 01:18 AM   #2
lvm_
Member
 
Registered: Jul 2020
Posts: 932

Rep: Reputation: 337Reputation: 337Reputation: 337Reputation: 337
Have you set the correct timezone? If yes, continue here https://gpsd.io/gpsd-time-service-howto.html
 
Old 03-31-2024, 04:40 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,714

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
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.
 
Old 03-31-2024, 07:01 AM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,662
Blog Entries: 4

Rep: Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942
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.
 
Old 03-31-2024, 07:27 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,714

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
You can also purchase a standalone GPS network time server. Plug in an antenna, configure DHCP and your done.
 
Old 03-31-2024, 09:37 AM   #6
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,640

Rep: Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697Reputation: 2697
Quote:
Originally Posted by sundialsvcs View Post
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.
 
Old 03-31-2024, 02:22 PM   #7
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
All these suggestions have some merit.

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).
 
Old 03-31-2024, 03:52 PM   #8
cary.perque
LQ Newbie
 
Registered: Mar 2020
Posts: 13

Original Poster
Rep: Reputation: Disabled
Hello

Crafting questions about something one has no knowledge about can be difficult . . . so thank you

hi sundialsvcs "The "time" of a GPS signal – which is in UTC – by definition cannot be "wrong." That was my first thought - how could it be wrong!

michaelk "Did you install ntp?" After hour or so of googling and spelling mistakes I can attest that embarrassment really does make you face red.

Thank you computersavvy for the suggestions

cary
 
Old 04-02-2024, 10:09 PM   #9
friendlysalmon8827
Member
 
Registered: Dec 2023
Distribution: Anfroid,Debian
Posts: 90

Rep: Reputation: 5
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.
 
Old 04-03-2024, 03:53 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,987

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
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.
 
Old 04-03-2024, 04:24 PM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,714

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
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.

Last edited by michaelk; 04-03-2024 at 04:27 PM.
 
Old 04-03-2024, 06:52 PM   #12
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,662
Blog Entries: 4

Rep: Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942Reputation: 3942
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.
 
1 members found this post helpful.
Old 04-03-2024, 06:53 PM   #13
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,987

Rep: Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627Reputation: 3627
On the ship I think we needed 3 to get a valid read.
 
Old 04-03-2024, 07:17 PM   #14
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,714

Rep: Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899Reputation: 5899
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change omni antenna to directional antenna in NS2 programming 13thsparton Linux - Software 1 10-08-2015 03:36 AM
[SOLVED] Garmin GPS getting wrong permissions aluchko Linux - Hardware 2 02-19-2012 01:27 PM
Need software for Microsoft GPS-360 antenna wisejim Linux - Newbie 1 08-31-2010 10:04 AM
Is an antenna an antenna or are there different kinds? General Linux - Laptop and Netbook 1 04-27-2007 08:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration