This repository contains a preview version of the Telemetry Software for our experimental rocket "Hanggang Sa Dulo".
Please note that this source code is not finalized and remains under active development.
Unresolved bugs, incomplete features, and performance issues may occur.Use with caution and make sure to install all the dependencies, especially the required CUDA version for your system, so that it will run accordingly, as it may affect your hardware.
Real-time data visualization system designed specifically for our CanSat mission. Communicates between the onboard microcontroller and the ground station via our radio communication module.
- Real-time serial-port telemetry
- Auto-detect available COM ports
- Parse and validate 14 telemetry channels (pressure, GPS, attitude, etc.)
- Compute horizontal speed via Haversine formula
- Offline map integration
- Pan/zoom over cached map tiles using
tkintermapview
- Plot current GPS track & waypoints
- Pan/zoom over cached map tiles using
- Responsive GUI
- CustomTkinter theme & layout
- Configurable widgets, buttons, status indicators
- Real-time 3-dimensional trajectory/flight-path projection
- User authentication
- Simple login screen with
bcrypt
-encrypted credentials
- Simple login screen with
- Performance monitoring
- Optional GPU acceleration via
cupy
- System stats overlay using
psutil
&GPUtil
- Optional GPU acceleration via
We follow a layered structure mirroring clean-architecture principles:
core/
(Domain Logic)geo_utils.py
― Haversine & coordinate-conversion utilities
main
newui7_stable_rebuild_offlinemap.py
― Main dashboard & map widgetslogin.py
― Login dialog and credential management
assets
CanSat Compe Logo.png
- Competition LogoFlag_of_the_Philippines.jpg
— Philippine FlagHsD Logo.png
- Our group's Logohsd_logo_Fxh_icon.ico
— Software's LogoIAU Logo.png
- Our University's Logosyae.png
- Our department Logo
assets\3dMeshes
cylinder.stl
- For the Attitude Visualization 3d Object
- OS: Windows 10/11, macOS, or Linux
- Python: ≥ 3.11 (3.11+)
Tested in an environment of Python: v3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)] on win32.
Incompatibility may occur at your instance.
- Hardware:
- USB-serial adapter or onboard COM port
- GPU with CUDA support
Tested in an environment of CUDA Build: cuda_12.9.r12.9/compiler.35813241_0 (V12.9.41).
Incompatibility may occur at your instance.
- Clone the repository
git clone https://github.com/mikeedudee/CanSatTelemetrySoftware.git cd CanSatTelemetrySoftware
- Dependencies
- customtkinter
- pyserial
- tkintermapview
- cupy
- psutil
- GPUtil
- matplotlib
- numpy
- numpy-stl
- memory-profiler
- bcrypt
- pywinstyles
- Pillow
-
You can install them all at once using the command below:
pip install customtkinter pyserial tkintermapview cupy psutil GPUtil matplotlib numpy numpy-stl memory-profiler bcrypt pywinstyles Pillow
-
Or Install them with:
pip install -r requirements.txt
Ensure you’re using a compatible Python 3.x interpreter.
- For GPU acceleration, cupy must match your CUDA toolkit version. Please do be aware that some cupy builds might not support the latest versions of Python; you might need to use an environment that supports your cupy build. See Prerequisites for more info.
- tkinter comes with the standard library, but on some Linux distributions, you may need to install python3-tk.
Before running the file make sure to install all the pre-requisites and make sure to have a compatible CUDA version installed on your system; otherwise, it will not work.
To run, you can skip the login.py and go directly to the "newui7_stable_rebuild_offlinemap.py". If you wish to see it working and integrated into your system, your CanSat must provide the following format, or modify the reading formatting directly to suit your needs.
- The Format
Pressure
― Pressure reading from MS5611 or any sensor capable of providing such.Relative_Altitude
— Derived from the pressure data or simply from any data gathered from a sensor.Main Sensor Temperature
— From your main sensor reading of temperature.Backup Temperature
— From your backup temperature sensor.Latitude
— Latitude reading from the GPS.Longitude
— Longitude reading from the GPS.SD Card Status
— Must be 0 or 1 value.Elapsed Time
— Time starting from the initialization of the CanSat.Sensor Accurary
— Accurary state of your Inertial Measurement Unit (IMU) or any 9-DoF sensor (if capable).Yaw
— Yaw reading for your Inertial Measurement Unit (IMU).Pitch
— Pitch reading for your Inertial Measurement Unit (IMU).Roll
— Roll reading for your Inertial Measurement Unit (IMU).Velocity
— Vertical velocity reading (derived or accessed) from the sensorAbsolute Altitude
— The fixed altitude from sea level.
To make the GPS work offline, make sure you downloaded the maps of your place or the location of the launch site and run a python command line at that map JSON folder:
python -m http.server 8000
-
Download Mobile Atlas Creator
-
Select a Map Source:
- Open MOBAC and choose the desired map source from the list (for example, OpenStreetMap, OpenCycleMap, etc.).
-
Define the Area:
- Use the map view to navigate to the region you want to download tiles for. You can either draw a bounding box or select a predefined region.
-
Choose Zoom Levels:
- In the interface, select the zoom levels you need. The more zoom levels you select, the larger (and more detailed) the downloaded atlas will be.
-
Select an Atlas Format:
- Under the “Atlas Format” options, choose the format that suits your needs. For offline tile serving, you can select a “Tile Directory” (which saves tiles in a folder structure like {z}/{x}/{y}.png) or an MBTiles format if your offline viewer supports it.
-
Create the Atlas:
- Click the “Create Atlas” button. MOBAC will download the tiles for the specified region and zoom levels and save them in your chosen format.
-
Serve the Tiles Locally:
- If you select a tile directory, you can then run a local HTTP server (e.g., using Python’s http.server module) in that folder so your application can use them offline.
-
Export your atlas as an MBTiles file and then convert it into a folder structure. You can use a tool like mbutil to extract the tiles. For example, after exporting your MBTiles file (e.g., myatlas.mbtiles), install mbutil via pip:
pip install mbutil
mb-util myatlas.mbtiles offline_tiles
- This command will create a directory structure with folders for each zoom level and the tiles organized as {z}/{x}/{y}.png.
- We can now point the software's map server to this local directory served via a local HTTP server (using, for example, Python's built-in server):
cd offline_tiles python -m http.server 8000
This is the listener that allows it to do that (for your reference):
tile_server="http://localhost:8000/{z}/{x}/{y}.png"
-