alanbjohnston / CubeSatSim

CubeSatSim, the AMSAT CubeSat Simulator
http://cubesatsim.org
271 stars 82 forks source link

Send telemetry via other communications channels #232

Open MikeMcPherson opened 1 year ago

MikeMcPherson commented 1 year ago

I would like to have software other than FoxTelem consume and process the telemetry from the CubeSatSim. This is for both teaching and for developing and evaluating ground station software for future missions. I have modified the code to add a couple of capabilities, and I'm interested in whether others find these things useful. If so, I'll clean up what I've done, do a fork, and submit my changes.

Capability 1 - publish telemetry via MQTT

FoxTelem is great. but in our "mission control" room we have a 55" UHD display. FoxTelem isn't very useful on a display with that many pixels - too small to read. It's also really an interactive tool and doesn't work well for an unattended "mission status" display.

I've modified the CubeSatSim code to publish all of the BPSK telemetry values via MQTT for analysis and visualization by any tools supporting that common protocol. I'm using a Mosquitto->Telegraf->InfluxDB->Grafana stack to make pretty eye candy that plays well on the big screen, incorporates things such as ground station component status, and can be reconfigured dynamically depending on the context. We might want one display most of the time, another during a pass, and a third when commanding the spacecraft, for example.

Capability 2 - send telemetry via UDP

One of the things we're doing is evaluating open source ground station software. Hopefully, we won't have to write our own for future missions. Done that once, don't want to do it again! All the candidates can consume a telemetry stream from a "radio" via UDP.

I've modified the CubeSatSim code to send the FSK/BPSK telementry packets via UDP.

To be clear: I am not asking anyone else to add these capabilities. I've already done most of the work, and just want to know if anyone else is interested.

Thanks. Mike

alanbjohnston commented 1 year ago

Hi Mike,

Thanks for your work on the CubeSatSim project!

These are interesting capabilities. In the past, had some experimental code that used REST to push telemetry data to the SatNOGS database so it would be displayed in a dashboard on their site: https://dashboard.satnogs.org/d/VesVjq6mk/amsat-cubesat-simulator

I don't have any issues with having this capability in addition to sending telemetry over radio.

(One comment: In the FoxTelem Settings menu, you can change all the font sizes which might make it look better on a big screen).

MQTT and UDP seem like good candidates. Perhaps also the KISS protocol as well.

It would be great if we could architect this as an optional add-on. Not every CubeSatSim has internet access (a Pi Zero, for instance, or a Pi Zero W that is not connected to a WiFi). A Wiki page giving examples of how to process and display the data would also be great, I think.

Alan

MikeMcPherson commented 1 year ago

Thanks for the support and great suggestions. The new code is conditional and will be turned off by default. A page talking about how to use the additional capability is a great idea, and I'll work on it.

Mike

MikeMcPherson commented 1 year ago

Do you have a "How to Contribute" document for the CubeSatSim project, or will the generic process work? Are you working with a particular style guide or coding standard document? (JPL, for example?)

Mike