CarletonURocketry / ground-station

The ground station software used to interface with the ground station LoRa board and distribute signals from the rocket across websocket connections.
https://carletonurocketry.github.io/ground-station/
MIT License
7 stars 6 forks source link

[ENHANCEMENT] Detect anomalous measurements and report via API #36

Open linguini1 opened 1 year ago

linguini1 commented 1 year ago

Problem

The ground-station-ui should have a visual indication when anomalous measurements are detected from the rocket sensors. However, such calculations should not take place on the UI. Instead, the ground-station should detect such measurements and flag them so they are easily identifiable when the UI receives JSON packets through the websocket.

Proposed Solution

Have an intermediate step of checking for anomalous readings before sending out packets over the websocket to the UI.

Alternatives

N/A at this time.

Additional Context

It's important to consider how to best store the information of which measurements are anomalous. We don't want to create much extra clutter in the JSON packets, so storing on a per-measurement basis is probable not great: Example:

{
    "measurements": {
        "temperature": {
            "value": 10,
            "anomalous": false
        },
        "altitude": {
            "value": 10000000000000000001,
            "anomalous": true
        }
    }
}

Instead, it might be better to only record anomalous measurements using a separate key:

{
    "measurements": {
        "temperature": 10,
        "altitude": 100000000000000000001
    },
    "anomalies": [
        "altitude"
    ]
}
TASelwyn commented 1 year ago

https://github.com/CarletonURocketry/ground-station/tree/anomalous_faults