Re: [chrony-users] help

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


On Wed, Jul 06, 2022 at 03:38:54PM -0400, Tommy Prusak wrote:
> It seems like chrony doesn't like the
> timing data I am inputting but the only error message I get is "No suitable
> source for synchronization" and I can't seem to work back and find what is
> giving me that error log.

The chrony configure script has --enable-debug option to build with
debug support. If you run chronyd with "-d -d" options, it should
print the reason for rejecting the sameple.

> I also think there might be an issue with the
> rate I am sending this data, since ROS is sending out this data as fast as
> it can. Any help would be greatly appreciated!

A higher rate shouldn't be a problem.

> void callback(const sensor_msgs::TimeReference::ConstPtr &msg)
> {
>   struct sock_sample sample;
>   int currentTime;
>   currentTime = time(NULL);
>   sample.magic = 0x534f434;
>   sample.pulse = 0;
>   sample.leap = 0;
>   sample._pad = 0;
>   double secs = msg->header.stamp.toSec();
>   sample.tv.tv_sec = (int)secs;
>   sample.tv.tv_usec = ((int)((secs - sample.tv.tv_sec) * 1000000));

sample.tv should be the system time when the sample was received, e.g.
returned by gettimeofday(). It's not supposed to be the reference time
received from the GPS. That would cause the sample to be rejected if
the offset was not small enough.

-- 
Miroslav Lichvar


-- 
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/