cFS Time Sync App Question - Different Time Sync Method #642
Unanswered
HLCHowland
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am a student at CMU working on a student-created rover called Moon Ranger which will facilitate a science mission for NASA Ames near the Moon's South Pole. I've designed a time synchronization app to fit our needs, but I don't think it's the way things are normally done with cFS, I was hoping to get some guidance.
Basically, instead of updating the STCF which seems to be the typical solution for time synchronization as described here: #446, I have written an app that will update the MET to the same effect and save the STCF as a constant value. It provides a guarantee of the MET always being correct through reboots and the STCF always represents the start of the mission, but it may introduce instability, I am not sure. Here is how it works:
When the time sync app first initializes, and only at that time barring commands telling it to do otherwise, it will save the current Linux time to the file system and set this to be the STCF. This is meant to represent the mission start time as it is when cFS is first booted.
At this point and for each successive time that cFS (this app) is initialized, we will set the MET to be the current Linux time minus this STCF time, so that our MET will always be correct, and accounts for times that cFS was not running.
This app will perform this synchronization of the MET every minute, possibly changing it slightly.
I made the decision to do this because it would guarantee that the MET would always be correct and also based on my possibly incorrect understanding of the STCF to be the start of the mission. @skliper do you foresee any issues with 1. updating the MET to be a large value when cFS is initializing and 2. slightly modifying the MET every minute or so?
At the time I designed this app I did not realize that the purpose of modifying the STCF and not the MET was so that you would never have to modify the MET and did not take into account any instability that changing the MET might introduce. I have not seen evidence of instability yet, but figured it is much safer to ask.
Suspect APIs used:
CFE_TIME_SetMET
CFE_TIME_SetSTCF
Beta Was this translation helpful? Give feedback.
All reactions