Predict TinyGS network coverage for different LoRa configurations
Project description
TinyGS QoS
A machine learning tool for predicting satellite transmission quality of service (QoS) probabilities in the TinyGS network. This project provides a Streamlit web application and utilities for analyzing LoRa satellite transmission success rates based on orbital parameters and radio configuration. https://tinygsqos.streamlit.app/
Overview
TinyGS QoS uses machine learning (Positive-Unlabeled learning) to predict the probability of successful satellite transmissions based on:
- Satellite position (latitude, longitude, altitude)
- LoRa radio parameters (spreading factor, bandwidth)
- Antenna configuration (gain)
- Geometric factors (elevation angle, distance to the nearest ground station)
Features
- Interactive Streamlit web interface for transmission probability visualization
- Global coverage heatmaps showing transmission success probability
- Support for custom satellite orbital parameters
- Batch prediction capabilities
- Sun-Synchronous Orbit (SSO) simulation tools
- Pre-trained ML model using scikit-learn
Installation
Requirements
- Python 3.12 or higher
- Poetry (recommended) or pip
Using Poetry
poetry add tinygs-qos
Using pip
pip install tinygs-qos
Usage
Running the Web Application
Launch the Streamlit interface:
streamlit run main.py
The application provides:
- Interactive parameter controls for SF, BW, antenna gain, and altitude
- Validation for valid LoRa parameter combinations
- Global transmission probability heatmaps
- Overlay of actual transmission data
Using the TransmissionPredictor Class
from tinygs_qos import TransmissionPredictor
# Initialize predictor
predictor = TransmissionPredictor()
# Single prediction
prob = predictor.predict(
sat_alt=600.0, # Satellite altitude in km
sf=10, # Spreading factor
bw=125.0, # Bandwidth in kHz
min_gain=5.0, # Antenna gain in dB
el=45.0, # Elevation angle in degrees
distance_to_station=500.0 # Distance to nearest station in km
)
# Batch prediction
import pandas as pd
predictions = predictor.predict_batch(dataframe)
Generating Test Samples
from tinygs_qos.utils.tiny_utils import TestSample, SSOOrbitTestSample
# Random global samples
X_test = TestSample(
n_samples=10000,
rand_lat=True,
sf=[10],
bw=[125.0],
gain=[5.0],
alt=600.0
)
# Sun-Synchronous Orbit samples
X_orbit = SSOOrbitTestSample(
altitude=600.0, # km
sf=10,
bw=125.0,
gain=5.0,
raan=0.0, # Right Ascension of Ascending Node
time_step=1.0 # seconds
)
Data Files
The project requires the following data files in the data/ directory:
PU_optuna_SDG_log_loss_12_7_v2.joblib- Pre-trained ML modelpacket_features.parquet- Historical packet transmission datastation_locations.parquet- TinyGS ground station locationskdtree_stations.joblib- KDTree for fast nearest station lookupsatellite_min_gain.parquet- Satellite-specific minimum gain datakde_satPosAlt.joblib- Kernel Density Estimator for altitude distribution
Valid LoRa Parameter Combinations
The model supports the following (Bandwidth, Spreading Factor) pairs based on actual TinyGS data:
| Bandwidth (kHz) | Spreading Factor |
|---|---|
| 125.0 | 7 |
| 62.5 | 8 |
| 125.0 | 8 |
| 125.0 | 9 |
| 500.0 | 9 |
| 125.0 | 10 |
| 250.0 | 10 |
| 125.0 | 11 |
Model Details
The prediction model uses:
- Positive-Unlabeled (PU) learning framework
- Modified F1 score metric optimized for PU learning
- Features: satellite altitude, spreading factor, bandwidth, elevation angle, distance to station, antenna gain
- Training via Optuna hyperparameter optimization
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tinygs_qos-0.1.0.tar.gz.
File metadata
- Download URL: tinygs_qos-0.1.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.0 CPython/3.10.12 Linux/6.6.87.2-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd5217d072cc9aa396d784fdcf266eca33ff9b83ed838a58f9aaaa452edb77be
|
|
| MD5 |
a283f2861dec8b7a1392ed634c7bcdfd
|
|
| BLAKE2b-256 |
5dfad512092a7d780a5f4be788e8eb843828d63cb56eeb95e8d1c74b44004ab4
|
File details
Details for the file tinygs_qos-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tinygs_qos-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.0 CPython/3.10.12 Linux/6.6.87.2-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04f2bc2cad133f418c068f19385556b2be9ed2bfb790138dcefa59fccce5c005
|
|
| MD5 |
03b20f6fbbdac3d47e45e9939fa98930
|
|
| BLAKE2b-256 |
77166047d66636e13b541f8d8e6edba0c1a7719221d420f4094a90bbc0014a2e
|