-
New here and getting used to cFE. What I noticed is the timestamps shown here seem to be very off. How do I fix it? Any pointers welcome.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello and welcome! cFE has it's own internal timekeeping via the TIME service, aka "spacecraft" time. It's worth noting that time services is fairly complex and was designed to handle a variety of use cases, I won't cover everything here but hopefully this will get you started. The easiest way to update time is via the cFE set time command Note there are a few issues open to improve things, specifically nasa/cFE#908 to initialize the STCF from within the PSP, and more general nasa/cFE#302 to really simplify things. Adding in a simple mechanism to update spacecraft time using OS time would be a good improvement. |
Beta Was this translation helpful? Give feedback.
Hello and welcome! cFE has it's own internal timekeeping via the TIME service, aka "spacecraft" time. It's worth noting that time services is fairly complex and was designed to handle a variety of use cases, I won't cover everything here but hopefully this will get you started.
The basics are there's the epoch that's set via configuration, a mission elapsed time (MET) counter, and a spacecraft time correlation factor (STCF).
The easiest way to update time is via the cFE set time command
CFE_TIME_SET_TIME_CC
or cFE set STCF commandSC_TIME_SET_STCF_CC
, both of which will adjust the spacecraft time correlation factor (STCF). You could change the epoch, but that's a compile time configuratio…