HomeSoftware


PC clock synchronization using GPS
t1d
I did some more research and it appears that Time Tools will not correct for an error of greater than 15 minutes. So, I induced an error of 10 minutes. The time did not update to correct the error. Accordingly, my question still stands: how do I check to comfirm that the PC is using Time Tools for the sync feed.

Thanks!
Ken in Regina
Jack,

Most consumer-grade GPS navigation receivers come with either USB or Bluetooth, not RS-232 DB-9 connectors.

All of the consumer-grade USB GPS navigation receivers come with a driver to create a virtual COM port because many of the laptop navigation programs do not know how to communicate directly with a USB-connected receiver. The Bluetooth stack with Bluetooth receivers also allow you to direct the data to a virtual COM port for software that cannot communicate directly with Bluetooth.

I do not consider those devices in the ZTI link I posted to be either consumer-grade or navigation receivers.

If you are interested in a device like those from ZTI you simply purchase a USB-to-serial adapter. They are a cable with a DB-9 connector on one end and a USB connector on the other. They will allow you to connect a serial device to a USB port on your computer and will include a driver to create a virtual COM port for the software.

The only thing I'm not sure of with USB-to-Serial adapters and virtual COM ports is how well they deal with some of the pin-specific signals. If you purchase a device that sends the PPS pulse on the DCD (Data Carrier Detect) pin, for instance, will the virtual COM driver assert it properly for the monitoring software? I don't know the answer.

If you decide to go with a device that does PPS and, therefore, must connect by a serial port, you must talk with the manufacturer to see exactly what they recommend you use to connect to a computer that does not have a real RS-232/RS-422 port.

...ken...
Ken in Regina
Quote:
Originally Posted by jack
I understand accuracy in my case will be keeping the 2 laptops in sync with each other. But here the only reference clock will be the UTC through GPS receiver. One laptop has absolutely no idea about what is going on in the other one. I think even if we start capturing images at different instants it should not be a problem because the system time will be already synchronized to GPS signal in both the laptops and hence images will be time stamped accordingly.Is this assumption acceptable??
I don't know if this is acceptable. I don't know what software you will be using for post-processing or if you will be using software for post-processing or if you will simply be viewing the videos side by side manually or any other details of how you will be working with the videos after you shoot them. So it is impossible for me to know.

That is why I recommended that you do some testing immediately. You do not need a GPS receiver to do a useful test right now. You can use the internet to sync the computer clocks, use your expected procedure to shoot some videos for the expected amount of time and check the timestamps, as I described in one of my previous posts. You do not need to rely on my judgment. You can easily perform some testing that will tell you if a simple and cheap solution will work or not.

Here are some programs you can use to sync your PC clocks over the internet to start your testing.

I use NISTime because it works and because I've been using it for twenty years when it was the only thing available. Others may be prettier and easier to use.

http://www.nist.gov/physlab/div847/grp40/upload/NIST-Time-software.exe

Here is a page that lists more software for setting your time to an atomic clock. I have not tried these. I only offer them as alternatives so you will have a choice.

Publishers of Time and Frequency Software

At this point I would stop worrying about GPS stuff and perform a simple test to see what exact concerns you might have.

1. Set the computers up so you can shoot something in a way that you will in the field, except not so far apart.

2. Use one of the above programs to set the clocks on the computers. You will need to connect them to the internet for this, maybe with cables or wifi.

3. Shoot a test session for as long as you will in the field.

4. Use the videos the way you plan to, e.g. post-process them or view them or whatever you plan to do with them.

5. How did it work out? Was there a problem? What is the nature of the problem?

...ken...
Ken in Regina
Quote:
Originally Posted by t1dunn
I did some more research and it appears that Time Tools will not correct for an error of greater than 15 minutes. So, I induced an error of 10 minutes. The time did not update to correct the error.

Accordingly, my question still stands: how do I check to comfirm that the PC is using Time Tools for the sync feed.
I'm assuming that when you say you induced an error of 10 minutes, you set the PC clock to be "wrong" by ten minutes and GPS Clock did not correct it?

If so, you already have checked. If GPS Clock did not correct the error it is not useful.

For whatever it's worth, GPS Clock will not provide a sync feed. That is not its purpose. If someone wants a proper "sync feed" they will need buy a device like those listed on the ZTI web site for that specific purpose.

To use a consumer navigation GPS receiver we would need a program similar to GPS Clock but which will correct much smaller time deltas, similar to what NISTime will do from an atomic clock time server over the internet.

This is still not a "sync feed". It is simply a one-time correction that you can do manually any time you want to. Or you can do it on a timed basis, either through the program or using Windows Scheduler.

For the cheap consumer-grade solution to Jack's situation, I envision using something like GPS Clock to do a one-time sync of the two computers' clocks and then do a shooting session. For each shooting session, if necessary, run the clock sync program again just before shooting.

Now that I think about it, it will still be possible to use GPS Clock by simply setting the PC clocks to be "wrong" by more than fifteen minutes, thus forcing GPS Clock to correct the clocks. This should work as long as GPS Clock will correct the PC clock to exactly one second.

...ken...
t1d
I have discovered that the sync feed function is working. What I needed to do to test was induce the time error and close the Windows clock. After closing, Time Tools forces the Windows Clock to the correct "Atomic Time." The updates seem to be constant and continuous.

I don't know how the Windows clock is getting the feed, and I don't need to, as long as testing proves it is working.

This feature will be great for true plotting and piloting by paper chart and pencil. Kewl
t1d
Additional testing revealed that the sync update seems to occur only once per minute. I don't know whether Windows Clock is only sampling once per minute or if Time Tools is only sending the feed once per minute. Without the answer to that question, I don't know if the update rate could be improved.

I also tested with the automatic net update function turned back on. Time tools continued to operate in this configuration. I am leaving that feature on so that my computer will update the time by the best available feed, whether that be Time Tools or the Net.

As an aside, COMPASS seems to run the time from the GPS receiver (and not from Windows Clock). However, it seems to present the time display subject to the Widows Clock settings regarding Time Zone, etc. More testing is needed to confirm these initial impressions about COMPASS.
Ken in Regina
Okay, calm down. Glad to hear it is doing something useful for you.

Now we need to be reasonable about expectation.

1. How much accuracy do you really need? For the purposes you mentioned, not a heckuva lot. Probably correct to one second, updated once a minute is way overkill.

2. How often does it need to update to maintain the accuracy? Well, even the crappiest PC clock won't drift enough in sixty seconds to be an issue for your purposes. Probably not for Jack's purposes, either. For your pusposes, probably once a day would be sufficient. Depends on how flakey the clock is. One of the towers in my office gets about three seconds ahead in a week. The other loses about a second in a week.

3. Your GPS needs to have a good look at the satellites, have WAAS enabled, be running for long enough to download the latest ephemeris tables from the satellite (typically a minimum of half an hour) and also long enough to be sure things have stabilized (typically twenty minutes, longer is better).

For your navigation purposes you want a reasonable degree of accuracy relative to UTC. You'll do more to ensure your accuracy relative to UTC by ensuring a good and stable GPS signal with up to date WAAS correction before doing the clock correction than by sweating how often the PC clock gets corrected.

Actually, for your purposes you probably don't even need to worry about the PC clock if what you want is a time display to use for plotting and piloting with charts and pencil. Either GPS Clock or Compass will give you the time readout you are looking for. It doesn't even matter if they update the PC's clock. Any time you want an accurate time reading you just need to be sure you've got a stable GPS reading and have had long enough to acquire the latest WAAS data, then fire up one of the GPS clocks.

For Jack's purposes, time relative to UTC is not relevant. He just needs the clocks on the two computers to be really close when the shooting starts and the time drift during the shooting to be nearly identical.

For Jack, it's more important to test the time drift on the two computers to make sure they are really close and going in the same direction than it is to get really close to UTC. He doesn't even need a GPS to do that.

For his purposes, in the field he will still need to make sure he gives the GPS receivers time to stabilize, just as you will need to do, but for a different reason. He doesn't care about accuracy relative to UTC. But by ensuring both GPS receivers have stabilized and are giving the same readings he has the best chance of getting the PC clocks set really close to each other.

...ken...
Ken in Regina
I've tested Compass and it does not interact with the PC clock at all.

I fired up Compass with my Bluetooth GPS and waited until there was a lock and a time display in Compass.

I set the PC clock to be two minutes slow. No effect on the Compass display.

I waited for a couple of minutes and Compass did not update the PC clock. The two sat there running happily two minutes apart.

It appears that there is no interaction between them at all.

I can't test GPS Clock. It only allows selection of COM ports 1 or 2. When I fire up my Bluetooth GPS is appears on COM3 because my tower has two real serial ports on it. Yeah, I know I could mess around with Device Manager and change things around but that's too much like work. And I would have to change it all back when I'm done.

Perhaps later I'll fire up the laptop and see how it works.

...ken...
Ken in Regina
Okay, I forced the device change so I could use COM2 at 4800. That made GPS Clock happy.

1. It only displays UTC. Not a big deal. Just an observation.

2. It's easy to get it to set the PC clock. You just click the Config button and check the option to Set PC System Time.

3. Also on the Config screen you can set the frequency that it should update the PC clock. It's not entirely clear what all the ticks mean and which end of the scale is more often or less often.

4. I tested by manually setting the PC clock wrong and watching GPS Clock reset it. I was able to force a reset by changing the PC clock to only a few seconds off. Within a couple of seconds it was reset.

Now I have to go change the COM port back so I don't forget and screw myself up the next time I go to use it.

...ken...
tcassidy
Don't forget to change whichever GPS you used back to its old COM port too.

Terry
werdnanostaw
Since the PCs are relatively close would it be possible to run an Ethernet cable or WiFi signal between them?

Couldn't you then run an NTP server on PC1 and sync PC2 to PC1?

Andrew Watson
Perth, Western Australia
Ken in Regina
Hi Andrew,

Good to hear from you again.

It might be possible but it's rather complicated. If they need that much accuracy AND stability the simplest method would be to buy a couple of the model 200 devices from ZTI and use them.

I'm not yet convinced they need that much accuracy or stability. I'm pretty sure if they use a pair of consumer GPSs to set the PC clocks before each shooting session the computer clocks should stay similar enough for that long. At most they would need to resync the clocks between sessions.

The key is to make sure they have two computers whose time drift is very similar and in the same direction (e.g. faster/slower).

Think of it this way: the time between any two timestamps in the video does not to be exact. It merely needs to be very similar between the two computers.

So, if you are able to start the shooting on both computers at very nearly the same time there will be a specific small difference between the timestamps on the very first frame of the two videos. That will be caused by two things: the small difference introduced by not being able to sync the computers exactly simultaneously and by not being able to start the shooting exactly simultaneously. This difference is, then, a control.

So you should then be able to look at any random frames on the two videos, lets say the 27,465th frames, and the timestamps should have the same difference between them as the first frames have.

I believe you can get there, within any tolerances Jack needs, with just a pair of consumer GPS receiver and a program like GPS Clock. Then, by syncing the two computers in the field with that setup before each shoot, they will have the timestamps on the two videos close enough to get the job done.

The testing I recommended will tell them if it will be close enough.

Plan B is to buy a pair of the model 200 devices from ZTI or something similar.

They can also control for all of this by doing the same thing filmmakers do at the start of each "take". Just hold a digital clock with a Seconds display on it in front of the subject for a few seconds at the start of the shooting session. Or something similar so there is a "marker" in the video itself to visually key on. This may not be possible in the field but it's certainly possible to do in the "lab" testing I recommended as an additional control.

...ken...
brancwp
Sorry for being so late to the conversation, but if you want to sync many computers extremely accurately you are looking for an IRIG-B time source. That is how we do it in labs...
MrUmbra
You can try this time setter. Leave your GPS on for about 15 minutes to allow it to collect a complete set of data. I believe the 12 minute problem is related to what's required for the receiver to send the correct time.

--- CHAS
Attached Files
File Type: zip GPSTime.zip (249.0 KB)
Nivedita
Quote:
Originally Posted by Ken in Regina
Jack,

Most consumer-grade GPS navigation receivers come with either USB or Bluetooth, not RS-232 DB-9 connectors.

All of the consumer-grade USB GPS navigation receivers come with a driver to create a virtual COM port because many of the laptop navigation programs do not know how to communicate directly with a USB-connected receiver. The Bluetooth stack with Bluetooth receivers also allow you to direct the data to a virtual COM port for software that cannot communicate directly with Bluetooth.

I do not consider those devices in the ZTI link I posted to be either consumer-grade or navigation receivers.

If you are interested in a device like those from ZTI you simply purchase a USB-to-serial adapter. They are a cable with a DB-9 connector on one end and a USB connector on the other. They will allow you to connect a serial device to a USB port on your computer and will include a driver to create a virtual COM port for the software.

The only thing I'm not sure of with USB-to-Serial adapters and virtual COM ports is how well they deal with some of the pin-specific signals. If you purchase a device that sends the PPS pulse on the DCD (Data Carrier Detect) pin, for instance, will the virtual COM driver assert it properly for the monitoring software? I don't know the answer.

If you decide to go with a device that does PPS and, therefore, must connect by a serial port, you must talk with the manufacturer to see exactly what they recommend you use to connect to a computer that does not have a real RS-232/RS-422 port.

...ken...
Hello ken,
can you please help me with synchronization of time in pc using GPS with refrence to atomic clock as i am not able to access the gps module and not able to sync my desktop time using it. I want to know about the software suitable for this work.
laptopgpsworld.com About