Skip to content

Commit de66dd4

Browse files
Aadityavorumpkarpov-uizyunlam
authored
Av 1128 consolidate gss (#44)
* lovely data * feather test packet * add mainpy * edit mainpy * Co-authored-by: Aaditya Voruganti <aaditya-voru@Aadityavoru mpkarpov-ui <mpkarpov-ui@users.noreply.github.com> * added mqtt Co-authored-by: mpkarpov-ui <mpkarpov-ui@users.noreply.github.com> * added content * high bandwidth added * optimizing json parsing * optimize combiners * I'm him. (Removed out of order error and integrated with GSS) * soft meeting 4/11 * testing 4/11 * Removed packet dropping -- may be out of order * range test 4/12 final * add static ip * general refactor and improvements * added some changes to offline maps * added map functionality * more issue fixes * maps work yay * fixed mapy * made it look nicer and removed unesscary code chunks * now called Mappy * fixed ground * fixed it * changed bindings * fixed the code to change frequency on a whim * Documentation changes * fix doc embed * Move system architecture to more reasonable location * Add usage help * qol and disable control stream * edit common packet * fixed pull * New telem packet (#46) * added changes * fixed to new telem packet * fixed everything else * made some fixes * correct freq * fixed the mistakes on the review * fixed telem packet and added tilt_angle * new test packet * added RSSI * actually new packet * added frequency * REAL FINAL PACKET THIS TIME * added FSM_state and satcount * working * added chnages to tilt * added some comments to make it easier * Update main.cpp * Fix GPS Coordinates * added transmission settings * fixed the decoding * added drone code * added new authors * added frequency input * added all the drone code * fixed a small error * fixed the issue of is_sustainer * added fixes * add relay func to gss_combiner * resolve main merge * fixed is_sustainer * weird queue issue * added timeouts * added timings but it is till notnworking 100% * change frequencies and output * pre-rewrite * added the frequency part back * refactor and remove dupe packets * added freq writing and easy config files * doc improvements * doc pass * config change and doc improvements * actually commit readme * health update * final telemetry health fixes * Update README.md * Update README.md * Update README.md * Update README.md * fixes for git conflict * set freq local bug fix * fixed some bugs on relay * fixed all decoding * fixed the relay stuff * misc combiner fixes * push latest * Final combiner fixes * added frequency polling * added battery voltage * added changes * combiner fix + relay packet * fsm satcound hb detect * store changes * hb detect * push the chabnfges * FINAL CODE FOR MICHAEL HE WILL NOT WRITE CODE EVER AGAIN * Fix minor change * Make system more stable * Add other minor fixes * Remove extraneous pyc files --------- Co-authored-by: mpkarpov-ui <mkarpov2@illinois.edu> Co-authored-by: mpkarpov-ui <mpkarpov-ui@users.noreply.github.com> Co-authored-by: zyunlam <143246898+zyunlam@users.noreply.github.com> Co-authored-by: Zyun Lam <zyunlam2@illinois.edu>
1 parent ef01db3 commit de66dd4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+9560
-314
lines changed

champaign_county_map.html

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
5+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
6+
7+
<script>
8+
L_NO_TOUCH = false;
9+
L_DISABLE_3D = false;
10+
</script>
11+
12+
<style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>
13+
<style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>
14+
<script src="https://cdn.jsdelivr.net/npm/leaflet@1.9.3/dist/leaflet.js"></script>
15+
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
16+
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"></script>
17+
<script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>
18+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/leaflet@1.9.3/dist/leaflet.css"/>
19+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css"/>
20+
<link rel="stylesheet" href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"/>
21+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.2.0/css/all.min.css"/>
22+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>
23+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/python-visualization/folium/folium/templates/leaflet.awesome.rotate.min.css"/>
24+
25+
<meta name="viewport" content="width=device-width,
26+
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
27+
<style>
28+
#map_484c021280c263d5a21b25e3fcea911f {
29+
position: relative;
30+
width: 100.0%;
31+
height: 100.0%;
32+
left: 0.0%;
33+
top: 0.0%;
34+
}
35+
.leaflet-container { font-size: 1rem; }
36+
</style>
37+
38+
</head>
39+
<body>
40+
41+
42+
<div class="folium-map" id="map_484c021280c263d5a21b25e3fcea911f" ></div>
43+
44+
</body>
45+
<script>
46+
47+
48+
var map_484c021280c263d5a21b25e3fcea911f = L.map(
49+
"map_484c021280c263d5a21b25e3fcea911f",
50+
{
51+
center: [40.1397, -88.2001],
52+
crs: L.CRS.EPSG3857,
53+
zoom: 10,
54+
zoomControl: true,
55+
preferCanvas: false,
56+
}
57+
);
58+
59+
60+
61+
62+
63+
var tile_layer_50a2541f98e0874f9d1ac8357b59712d = L.tileLayer(
64+
"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
65+
{"attribution": "Data by \u0026copy; \u003ca target=\"_blank\" href=\"http://openstreetmap.org\"\u003eOpenStreetMap\u003c/a\u003e, under \u003ca target=\"_blank\" href=\"http://www.openstreetmap.org/copyright\"\u003eODbL\u003c/a\u003e.", "detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
66+
);
67+
68+
69+
tile_layer_50a2541f98e0874f9d1ac8357b59712d.addTo(map_484c021280c263d5a21b25e3fcea911f);
70+
71+
var marker_125b7991b2c0946e1581fabdc4b0ecb9 = L.marker(
72+
[40.1164, -88.2434],
73+
{}
74+
).addTo(map_484c021280c263d5a21b25e3fcea911f);
75+
76+
77+
var marker_a7e177cd715ebda9d48d70525727f200 = L.marker(
78+
[40.1234, -88.2615],
79+
{}
80+
).addTo(map_484c021280c263d5a21b25e3fcea911f);
81+
82+
83+
var marker_3faf02c3d567179b6c1620b853a2c39e = L.marker(
84+
[40.1629, -88.1506],
85+
{}
86+
).addTo(map_484c021280c263d5a21b25e3fcea911f);
87+
88+
89+
var marker_8394c4815e0393898bb77b323b905617 = L.marker(
90+
[40.2284, -88.2614],
91+
{}
92+
).addTo(map_484c021280c263d5a21b25e3fcea911f);
93+
94+
95+
var marker_fa26a8bb9167b6becceacefd68158c25 = L.marker(
96+
[40.0971, -88.2017],
97+
{}
98+
).addTo(map_484c021280c263d5a21b25e3fcea911f);
99+
100+
</script>
101+
</html>

ground/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.vscode/c_cpp_properties.json
44
.vscode/launch.json
55
.vscode/ipch
6+
*.pyc

ground/README.md

Lines changed: 176 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
# GSS v1.1
2+
This is the primary source of information for all things related to **GSS 1.1**, the telemetry system used for Spaceshot's 2024 launch of *Kairos II* at FAR 51025!
3+
4+
## Contributors
5+
6+
- Nicholas Phillips
7+
- Gautam Dayal
8+
- Patrick Marschoun
9+
- Peter Giannetos
10+
- Aaditya Voruganti
11+
- Michael Karpov
12+
13+
System architecture:
14+
15+
Changes from **GSS 1.0**: Unlike GSS 1.0, the new system uses a single laptop to combine streams from our antenna array and send out the data to a network, with all other data consumers subscribing to a stream over [MQTT](https://mqtt.org/). Additionally, this architecture allows us to implement other systems into our ecosystem which use telemetry data but would otherwise slow down our telemetry computers.
16+
17+
![System Architecture](https://i.ibb.co/YtWs14w/Screenshot-2024-04-16-190354.png)
18+
19+
# Telemetry Recievers
20+
This section refers to the Feather Reciever software which is stored at `./src/feather`.
21+
22+
This repository contains the software for the ground station hardware (LoRa Feather module) used by the Spaceshot Telemetry Team during the 2023-24 season.
23+
24+
## Description
25+
26+
The ground station software is responsible for receiving telemetry data from the rocket, processing commands sent from the ground station GUI, and interfacing with the LoRa Feather module. It includes functionalities such as setting frequency, sending commands to the rocket, and parsing telemetry data.
27+
28+
## Features
29+
30+
- Receive telemetry data from the rocket
31+
- Send commands to the rocket
32+
- Interface with the ground station GUI through serial communication
33+
- Parse incoming commands from the ground station GUI
34+
- Set frequency for communication with the rocket
35+
- Decode and process telemetry data packets
36+
- Handle errors and retries in command transmission
37+
38+
## Dependencies
39+
40+
- [RH_RF95 library](https://github.com/PaulStoffregen/RadioHead) - for LoRa communication
41+
- [SPI library](https://github.com/PaulStoffregen/SPI) - for SPI communication
42+
- [SerialParser library](link-to-serial-parser-library) - for parsing serial input
43+
44+
## Usage
45+
46+
1. Connect the LoRa Feather module to the ground station hardware.
47+
2. Upload the appropriate version of the code to the ground station hardware using the Arduino IDE or compatible software.
48+
- **For Ground Station**: Upload the code with `IS_GROUND` defined.
49+
- **For Drone**: Upload the code with `IS_DRONE` defined.
50+
3. Open the serial monitor to view output messages and interact with the ground station GUI.
51+
4. Follow the commands and instructions provided by the ground station GUI to control the rocket and receive telemetry data.
52+
53+
## Configuration
54+
55+
- Adjust default frequencies (`RF95_FREQ`, `SUSTAINER_FREQ`, `BOOSTER_FREQ`, `GROUND_FREQ`) as needed for your application.
56+
- `RF95_FREQ` is used only when `IS_GROUND` is active
57+
- `SUSTAINER_FREQ`, `BOOSTER_FREQ`, `GROUND_FREQ` is used only when `IS_DRONE` is active
58+
59+
## Flashing Instructions
60+
61+
### Ground Station
62+
63+
It is used for the typical feathers on the ground and will be able to receive any code either directly from the rocket or from the drone relay.
64+
65+
1. Connect the ground station hardware to your computer.
66+
2. Open the Arduino IDE or compatible software.
67+
3. Load the code with `IS_GROUND` defined.
68+
4. Compile and upload the code to the ground station hardware.
69+
70+
### Drone
71+
72+
This code is used by feathers to relay information via a drone from the rocket to ground, this is for better connectivity when the rocket is further away from us or is covered by earth elements.
73+
74+
1. Connect the drone hardware to your computer.
75+
2. Open the Arduino IDE or compatible software.
76+
3. Load the code with `IS_DRONE` defined.
77+
4. Compile and upload the code to the drone hardware.
78+
79+
80+
81+
82+
83+
84+
85+
To upload to the reciever you must navigate to the `ground` directory and use the `Platformio` vscode extension and upload using either the `feather` or `drone` build environments.
86+
Alternatively use the `pio` command like so:
87+
88+
```bash
89+
$ pio run -t upload -e <feather/drone>
90+
```
91+
92+
# Ground Station Combiner
93+
This section refers to the Ground Station Combiner software which is stored at `./gss_combiner`.
94+
## Installation and Operation
95+
First, begin by cloning the repository to your computer (or opening it) and opening the `gss_combiner` folder:
96+
97+
```bash
98+
$ git clone https://github.com/ISSUIUC/MIDAS-Software.git
99+
$ cd ./MIDAS-Software/ground/gss_combiner
100+
```
101+
102+
To install dependencies for the combiner, you can run:
103+
```bash
104+
$ pip install -r requirements.txt
105+
```
106+
107+
*(MK) TODO: Add requirements.txt file.*
108+
109+
Then, you can run the combiner using **Python**:
110+
111+
```bash
112+
$ python ./main.py <options>
113+
```
114+
115+
`<options>` refers to a set of command line arguments that can be passed to `main.py`, listed below:
116+
117+
`--booster <COM1,COM2,COM3,...>`: Pass in a comma-separated list of COM ports to receive telemetry from, and transmit to the `Booster` data topics.
118+
119+
`--sustainer <COM1,COM2,COM3,...>`: Pass in a comma-separated list of COM ports to receive telemetry from, and transmit to the `Sustainer` data topics.
120+
121+
`--relay <COM1,COM2,COM3,...>`: Pass in a comma-separated list of COM ports to receive telemetry from, specifically for the `Drone Relay` system.
122+
123+
`--local (alias -l)`: Use `localhost` as the MQTT target. Useful for debugging.
124+
125+
`--no-log (alias -n)`: Do not generate logs for this run.
126+
127+
`--verbose (alias -v)`: Print out all combiner actions. This may slow down the combiner due to print volume.
128+
129+
`--no-vis (alias -nv)`: Disable the visualization for system health (Also disabled with `--verbose`).
130+
131+
`--config <config> (alias -c)`: Load an argument configuration from the `config.ini` file
132+
133+
`--no-rf`: Skip overriding RF frequencies for the feather reciever.
134+
135+
`--help (alias -h)`: Display a set of these options.
136+
137+
138+
Not including sustainer / booster sources will throw a warning, but will still run the system, allowing you to check the connectivity for the backend MQTT broker.
139+
140+
### For Kairos II Summer Launch 2024:
141+
The `config.ini` file will be updated to include all necessary configuration within the `launch` config. As such you will only need to edit the COM ports present in the file, and you will be able to execute the system with the command
142+
143+
```bash
144+
$ python ./main.py -c launch
145+
```
146+
147+
148+
Additionally, for this launch we have adopted the following lookup scheme for determining the stage callsign:
149+
150+
| Callsign bit value (highest bit of `fsm_callsign_satcount`) | Callsign |
151+
| ----------------------------------------------------------- | -------- |
152+
| 0 | KD9ZPM |
153+
| 1 | KD9ZMJ |
154+
155+
156+
## MQTT Streams
157+
This system uses [MQTT](https://mqtt.org/) as the primary data transfer method to other sections of the telemetry system. This is accomplished using multiple data streams. While technically unsecured, `data` streams are intended to be read-only (and only written to by this service), while `control` streams are intended to allow control of the system. As of writing (4/16), the current accepted data streams for GSS 1.1 are the following:
158+
159+
`FlightData-All` (`data`): Subscribe to receive all telemetry packets (Both booster and sustainer)
160+
161+
`FlightData-Sustainer` (`data`): Subscribe to receive sustainer telemetry packets
162+
163+
`FlightData-Booster` (`data`): Subscribe to receive booster telemetry packets
164+
165+
`Control-Sustainer` (`control`): Publish to edit Sustainer telemetry system functionality.
166+
167+
`Control-Booster` (`control`): Publish to edit Booster telemetry system functionality.
168+
169+
`Common` (`control / data`): Data published by auxiliary services or non-critical systems.
170+
171+
172+
## Null-Modem Emulation
173+
It is possible to run full tests of this telemetry system without access to the telemetry hardware. Installing a null-modem emulator such as [this one](https://com0com.sourceforge.net/) will allow you to emulate COM ports on your device and run the `test/test.py` script.
174+
175+
While this is the software we use for internal testing of this system, we cannot guarantee your results regarding installation and software safety.
176+

ground/gss_combiner/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/outputs/

ground/gss_combiner/config.ini

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[config:rf]
2+
rfBooster = 425.15
3+
rfSustainer = 426.15
4+
rfRelay = 420
5+
6+
[launch]
7+
args = --sustainer COM1,COM2 --booster COM18 --relay COM20 --ip 192.168.0.69
8+
9+
[test]
10+
args = --sustainer COM1,COM2 --booster COM18,COM20 --no-log --local --no-rf
11+
12+
[limited]
13+
args = --sustainer COM13 --booster COM23 --no-log --local

0 commit comments

Comments
 (0)