{"id":15138260,"url":"https://github.com/15jgme/RX1","last_synced_at":"2025-09-29T06:31:30.649Z","repository":{"id":44948428,"uuid":"438078408","full_name":"15jgme/RX1","owner":"15jgme","description":"The goal of RX1 is to make the development of hobby-level onboard rocket computer software much easier. The core element of this first project is a robust messaging system to make logging, telemetry, and development easier. The long-term goal is to make a sort of PX4 for rocketry but it's a long road!","archived":false,"fork":false,"pushed_at":"2022-01-16T20:52:49.000Z","size":53676,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-27T07:21:55.911Z","etag":null,"topics":["grafana","logging","robotics","rocketry","sounding-rocket","state-estimation","telemetry"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/15jgme.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-14T01:30:18.000Z","updated_at":"2022-01-10T14:34:01.000Z","dependencies_parsed_at":"2022-09-23T11:05:20.706Z","dependency_job_id":null,"html_url":"https://github.com/15jgme/RX1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/15jgme%2FRX1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/15jgme%2FRX1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/15jgme%2FRX1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/15jgme%2FRX1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/15jgme","download_url":"https://codeload.github.com/15jgme/RX1/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234597573,"owners_count":18857980,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grafana","logging","robotics","rocketry","sounding-rocket","state-estimation","telemetry"],"created_at":"2024-09-26T07:21:28.299Z","updated_at":"2025-09-29T06:31:30.336Z","avatar_url":"https://github.com/15jgme.png","language":"C++","funding_links":[],"categories":["Open Source Projects"],"sub_categories":["Software"],"readme":"# RX1\n\nThe goal of this project is to build portable, and expansible flight software for hobby sized rockets.\n\nThe main goals of the software are\n\n- Telemetry\n- Data logging \n- Parachute firing\n\n\n![RX1_telemetry](https://user-images.githubusercontent.com/47725944/147862830-8f2830b0-9bee-4732-97de-6765282f4972.gif)\n\n## Short term goals\n\n- Build up the flight software now that the messaging is workable\n- Find ways to abstract the code to more platforms (I'd like to avoid relying on Arduino.h and the feather defines)\n- Add in a config file to easily change pins and other things\n- Software in the loop (using fakeArduino) spoof flight by replacing the code inside the sensors class with some flight dynamics (this should be a pretty cool one)\n\nIf we can get things a little more portable, I think this could be very helpful even for teams competing in sport rocketry like the SA Cup, and save a lot of tiresome work building groundstation and telemetry systems. \n# Any contributions are super encouraged and appreciated!\n\n## Requirements \n- Platformio\n- Python3 (and a few packages, check the setup scripts)\n- An MQTT broker (only tested with mosquitto)\n- Grafana or plotjuggler (\u003c-- probably less of a headache but less pretty) for visualization\n- 🚀🚀🚀 lots of rocket emojis\n\n## Making a new topic \nIf you want to add a new topic (or add variables to an existing topic) it is super easy!\nFirst make a new message file \u003cyourmessage\u003e.msg inside **/messages/message_list/**\n  \nThis file contains the variables inside your new message topic, comments are lines beginning with an '#'\nEach line representing a variable must begin with its data type (eg int, float, uint8_t), this is coppied straight into C++ so make sure what ever you choose is supported by C++ or by the defines in the Arduino header\nNext is the variable name this can be anything as its not sent to the groundstation each time\n\nOnce you're finished you should have a file with rows looking like this (watch for unintentional spaces and mixing comments with message descriptions isn't supported yet)\n \n  **parachute.msg**\n  ```\n  bool continuity\n  bool fired\n  float time_delay\n  ```\nNow open the makelist.txt and add your new topic to one of the list rows\n\nAll thats left to do is generate the flight computer and groundstation code (hopefully this will be automatic soon)\n**flight codegen**\n  first cd to /Tools/ \n  then run python generateCode.py in your terminal\n**groundstation codegen**\n  first cd to /Groundstation/Backend \n  then run python generateGSCode.py in your terminal\n  \nNow when you build your code you should have access to a new object inside the msg object, msg.yourmessage !\nmsg.yourmessage holds all your variables.\n  \n## Usage of the message system on the flight computer\nThe message structure was designed to help reduce redundant processing on the flight computer. \nFor example, why run your apogee detection algorithem if there's no new altitude data? \n\nTo account for this, RX1 messages topics all contain a timestamp variable (no need to include it in your .msg file it's built for you 😉). \nVariables in RX1 message topics all must be updated using msg.yourmessage.set\u003cvariable\u003e(newData), and returned by msg.yourmessage.get\u003cvariable\u003e(newData). \nWhen ever the set funtion is run (so long as the newData is different from what's already there) the timestamp is updated.\nThe timestamp is accessed by msg.yourmessage.timestamp (it's the only non-private variable in the topic).\n\nTo prevent, lets say your apogee detector from running on stale data for example, you can save the last data timestamp you ran the detector on.\nLets call this ```oldTs```, when your detector needs to run, simply only run it ```if(oldTS \u003c msg.parachute.timestamp) {run detector}```\n                                                                                                                   \n### One more quick note on the central message object\nThe **msg** object is declared globally so you can access your topics anywhere!\n```msg.getData()``` returns a string (hopefully will change to a char* soon) containing all data stored by the message object in a predictable order that the groundstation expects and automatically parses.\n                                                                                                                      \n                                                                                                                      \n                                                                                                                      \n## Telemetry \nNow the fun part! Running **runProcessing.py** from inside /Groundstation/Backend will listen to serial data from something like an xbee split it into topics and publish it to your friendly local MQTT broker (tested with mosquitto), you just need to change the hostname in generateGSCode.py (will fix soon!). \nThen to visualize the data you should be able to use Grafana, or plotjuggler.\n                                                                                                                      \n**PS** runProcessing.py will also save the telemetry data it gets to a csv in /Groundstation/Backend/Logs just in case something really bad happens to your vehicle 💥                                                                                                                  \n                                                                                                                      \n                                                                                                                      \n                                                                                                                    \n                                                                            \n  \n\n  \n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F15jgme%2FRX1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F15jgme%2FRX1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F15jgme%2FRX1/lists"}