Hi Bill,
First of all thank you very much for your reply.
In my system there are two to three cars. All cars are having embedded
board. It receive GPS as well as vehicle status data & give it to our
application. Our application detects any accident scenarios based on GPS
information & other parameters.
We can't do field test again & again as our application is evolving .
We decided to simulate the things.
So we are logging GPS time stamp value to a file with other required
parameters. This file we are using to give inputs to our application over
UDP at later point of time.
But all the cars(embedded board) should sync to exact time stamp to
simulate the things properly.
I can have tolerance of 20ms.(i.e. 20ms system time forward or backward).
It will be very helpful if you tell me a better approach to achieve this.
Thanks again,
Pratik Pawar
On Sun, Apr 19, 2015 at 8:53 PM, Bill Unruh <[email protected]> wrote:
> It is not clear to me why you are trying to do this. If you are trying to
> transfer time from the gps system to the other one, just use it as your
> time
> server, and use chrony to get time from it. Yes, your system would have
> large variations. It takes time for the first
> system to write the data to a file, get the time from the file, prepare
> it, send it over
> the wire to the other system. file reading and writing is highly variable--
> the system does not regard it as urgent. iThe client's clock it better
> than the variations in that whole process. So why do you
> want to simulate this whole thing?
>
> Now, you could extend the pps wire from the first system to the second, and
> then set up the second system in the same way as the first. Or just use
> chrony
> to have the second one a client of the first.
>
>
>
>
> On Sun, 19 Apr 2015, Pratik Pawar wrote:
>
> Hi All,
>> I have one strange question about chrony.
>> I am using chrony to keep embedded board system time in sync. When
>> GPS receiver is connected to board,
>> It can able to sync system time with very negligible deviation. The
>> reference clock for chrony are PPS & SHM.
>> Whenever GPS receiver got new time stamp, application log that
>> value into a file as well as Same
>> timestamp is being given to SHM. GPS receiver is sending updated time
>> stamp at every 200ms.
>>
>> I want to simulate same think. For this I am reading logged timestamp
>> from file & sending it through UDP
>> packet at 200ms interval using another application.
>> Embedded board receive that UDP packet extract timestamp information
>> & write it into SHM.
>> With this approach chrony able to get SHM data & sync system time. But
>> I am getting lots of deviation. PPS
>> is disable only SHM is enable for this chrony.
>>
>> Can any one tell me a better approach or previous experience to
>> achieve this.
>>
>> Thanks & Regards,
>> Pratik Pawar
>>
>>
>> Here is chrony.conf
>>
>> #refclock PPS /dev/pps0 lock SHM0
>> refclock SHM 0 poll 0 offset 0.1 delay 0.5 refid SHM0
>> makestep 1 10
>> maxupdateskew 5
>>
>> local stratum 1
>> manual
>> allow
>>
>> pidfile /mnt/ubi/mk2/chrony/chronyd.pid
>>
>> driftfile /mnt/ubi/mk2/chrony/chrony.drift
>>
>> keyfile /mnt/ubi/mk2/chrony/chrony.keys
>> commandkey 1
>>
>> logdir /mnt/ubi/mk2/chrony/log
>> log statistics tracking refclocks
>> log tracking
>> noclientlog
>> logchange 0.1
>>
>> dumponexit
>> dumpdir /mnt/ubi/mk2/chrony/log
>>
>> cmdallow 127.0.0.1
>>
>>
>>