When to Use Parameters, Telemetry, or Just Make It a Variable #2129
Replies: 2 comments 1 reply
-
I would say what you described there is pretty accurate. To clarify some things, have you looked at this page in our user guide yet? Data Constructs: Commands, Events, Channels, and Parameters As for modes of operations, we don't have an F´-provided implementation of it yet. But it could likely be handled by a dedicated component that other components and the ground can talk to? Some people in the community may have implemented this or another approach, I'll let them speak to it. |
Beta Was this translation helpful? Give feedback.
-
Hi @John-P-Cargille, It sounds like you are running into some of the same organizational and conceptual challenges that I noticed when I got started on flight software many years ago. In general (and F Prime is no exception) with flight software, the better the code is organized and the more rigid and narrow your definitions are for data usage, then the easier it will be to reason about and avoid bugs. Space flight software (and medical device code) is the most conservative about these things, because the cost of small mistakes is wildly high. Unsurprisingly, this drives seasoned developers down paths of rigidity, for better or worse. And don't get started talking about change, thats a whole other can of worms! That said, F Prime is probably the most forward-thinking FSW framework I have had the pleasure to work with. There are lots of guardrails and tooling support to ensure the best chances of success for your project. So, lets rehash the link that @thomas-bc posted a little, and see if that helps with understand when to use certain data constructs. For clarity, I will use the term "spacecraft" in place of any particular remote robotic platform, but this could just as easily be something the shape of a roomba vacuum or a kuka arm.
There are a few cases where you might want to set the initial value of a variable manually, and then let the FSW update the variable. In this case you probably want to consider using a local variable and using a command to set it, or perhaps you want to go learn about how internal interfaces in F Prime work. |
Beta Was this translation helpful? Give feedback.
-
Hey All,
In making a custom F Prime practice project, I initially approached parameters as something to be actively read and written to from within the implementation code. However, I eventually realized this was an erroneous conception of parameters, given that F' does not support a
paramSet()
function, but only allows you to update them from the ground. I also planned to use telemetry mostly to track those changing parameters, which also ultimately didn't make very much sense to do--partially because telemetry can only be written to in the implementation and not read. Ultimately, I found that a lot of the pieces of data I wanted to interact with were much easier to integrate into the code as standard C++ data members, rather than with an F-Prime-specific solution.So my current understanding is something like this: parameters should be used for broad changes in state or goal, such as coordinates of interest (I honestly struggle to thing of more examples, though), which provide additional logic as to how commands and implemented code should behave; telemetry should be things regularly changing in the state of the system or its surroundings, such as temperature, battery power, or velocity, which gives information to the ground team but doesn't impact the implemented code itself; variables should be used for anything that belongs purely to the components as implemented within the code.
Can other people help me understand how these tools generally relate a little better? I'd be curious to hear especially about what people have used as parameters in their missions, because I'm struggling to think of many my team would use in what will likely be a fairly insularly-programmed system. Also, how do people generally handle modes of operation in relation to these tools?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions