nasa / SBN

38 stars 23 forks source link

Time sync in two cFS in different processors? #35

Open jongyeob opened 3 years ago

jongyeob commented 3 years ago

Hello,

One of cFS is a time server and the other is a time client. They are connected by SBN.

Can the server deliver the time tone message to the client? Can the client synchronize its own time to the server time tone?

I want to make sure this can be a possible scenario.

Thanks, JY

CDKnightNASA commented 3 years ago

With a low frequency (like 1hz) you could send tone messages over SBN, but most SBN protocols are non-deterministic and you'll end up with latency even with deterministic protocols as other traffic goes through the same pipes. You'll probably want to use a separate path/architecture for time synchronization.

skliper commented 3 years ago

The "tone" is typically a pulse on a serial line or similar sent by the server, which the client processes with an interrupt (records what it thinks is current time). Then the "time at tone message" is sent by the server in a CCSDS message over whatever interface is appropriate (sounds like SBN in your case, but could be CI or any other way to publish on the client SB). When the "time at tone message" is received the client would typically correct it's current understanding of time based on the difference between the "time at tone message" and the time it recorded when the "tone" was sensed. There's a decent amount of complexity in the details of this process (could be a "time will be" at the next tone message vs "time was" at the last message, there's internal correction factors to handle tone latencies, there's gradual time correction vs immediate step, etc) but this is the general concept.