Storing Parameters when the satellite is not in contact with any groundstation #921
-
Hi, I'm trying to implement some sort of local database that can store some housekeeping data when the satellite is not in view of a groundstation. This way, space ops crews can pull the data to see if there's any anomaly before then. In the beginning, I tried to look at prmdb since it is mentioned in Math Component but turned out it's more like a way to store parameters so that it would not be affected if the OBC is rebooted. Is there a way to modify it to work or if F' has something that can perform this task? If there's none and I have to make one, what would be your recommendation on how to do this from scratch? I imagined I could have a component that create a txt file to write on then I can use filedownlink to download them to the ground station but I'm open for any recommendation. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
@rawinza555: There is a component |
Beta Was this translation helpful? Give feedback.
-
I have follow up questions @timcanham. I have tried out ComLogger by connecting comsplitter to tlmchan then have one goes to framer and other one goes to comlogger, just to check out file format and how it stored values using Ref. I see that in text file have a space delim between two bytes of data and it starts a new line every 16 bytes per line, regardless of how long the telemetry packet size actually is. I'm wondering if there's a way to change the way the file is written so that the entire telemetry packet is in one line and every byte is separated by a space. I imagined that if it is formatted this way, I can easily identify the channel code so I can compare time stamp of the telemetry in the file vs the incoming data. Then I can set a threshold that if it has been longer than X seconds, it will write it in a file. |
Beta Was this translation helpful? Give feedback.
-
It's on our "to-do" list to write a file decoder. You have to use the dictionary file to match channel ID to telemetry type in order to convert the data correctly. Want to volunteer? :) |
Beta Was this translation helpful? Give feedback.
-
In case anyone is wondering, what I have done is, similar to what @timcanham suggested, I inserted a component between rategroup1 and tlmchan and a comsplitter from tlmchan to framer and comlogger. For the first iteration, this new component is a queued component that have one command to adjust data write rate. The component initialize with a default write rate and a reference timestamp which initialize at during the initialization. If the time difference between current time stamp and a reference time stamp is greater than data write rate, it will drive tlmchan. Otherwise it will do nothing. In the next iteration, I will implement a two operational mode (think of it like a day/night scene in home automation system) that is triggered by an input from comm driver (TCP/IP or radio module, I'm still looking at the technical detail of it). It will run full rate if is in "in view" mode and drive at slower rate at "Not in view mode". Not sure why suddenly I can't mark the answer........ |
Beta Was this translation helpful? Give feedback.
-
Very good! If you don't want to depend on time, you could also just use a counter in the component that would skip n cycles before invoking |
Beta Was this translation helpful? Give feedback.
Very good! If you don't want to depend on time, you could also just use a counter in the component that would skip n cycles before invoking
TlmChan
.