-
Notifications
You must be signed in to change notification settings - Fork 4
Brainstorm better data storage/retrieval methods #46
Comments
I think the remote communication and logging utilities need to be rethought. Here's an option I've been thinking about: Instead of directly publishing to the rate limited message streams in the controller, register all logged variables in a central repository and push them to the logger and remote comms in batches at a fixed rate. Here's some pseudocode of what I'm thinking:
|
If I understand correctly, this pseudocode would push all registered variables to the logger at a fixed rate, and if the logging rate is greater than the rate at which some variables are updated, some variables would be logged twice with the same (stale) value - I'd like to avoid that. Let's start a list of requirements for the logger/comm system, assuming they will be more or less the same system:
My general wish is to be able to write anything (within the protocol) to the logger's buffer and have it magically stored on the SD card without interfering with the core control loop. Given the SD card's unpredictable latency and the amount of free clock cycles we have, it would be nice to use up all idle time writing to file with nonblocking file I/O. |
We can avoid sending stale values by adding a Everything else I agree with. For SD card latency, there are three options:
Could we also experiment with buffering to flash? That does add an additional layer of complexity, though. |
For some reason, the filesystem Either change by itself does not cause the firmware to hang. The declaration of the test variable |
Currently, Logger serially dumps all generated data to the SD card. One issue is that the system time is not synchronized to the loops, which leads to entries in the same control loop being logged with different timestamps. Parsing is also fairly easy, but it needs to be a unified solution that sanity checks data and outputs the pertinent few minutes of flight to plots and tables.
The text was updated successfully, but these errors were encountered: