Skip to main content

GNSS CN0 Analysis Library - Interference, Jamming & Spoofing Detection

Project description

geoveil-cn0

PyPI version License: MIT Python 3.8+ GitHub

High-performance GNSS CN0 (Carrier-to-Noise) Signal Quality Analysis Library

A Rust-powered Python library for analyzing GNSS signal quality from RINEX observation files. Detect interference, jamming, spoofing, and multipath effects with research-grade algorithms.

Features

  • 🛰️ Multi-GNSS Support: GPS, GLONASS, Galileo, BeiDou, QZSS, NavIC
  • 📊 CN0 Analysis: Signal strength statistics, timeseries, and quality scoring
  • 🚨 Threat Detection: Jamming, spoofing, and interference indicators
  • 📈 Anomaly Detection: Configurable sensitivity for signal anomalies
  • 🗺️ Skyplot Data: Satellite positions with azimuth/elevation (requires NAV file)
  • High Performance: Rust core with Python bindings via PyO3
  • 📁 RINEX Support: Parse RINEX 2.x, 3.x, and 4.x observation files
  • 🧭 Navigation Files: BRDC broadcast ephemeris and SP3 precise orbits

Installation

pip install geoveil-cn0

Quick Start

import geoveil_cn0 as gcn0

# Create analysis configuration
config = gcn0.AnalysisConfig(
    min_elevation=5.0,           # Elevation mask (degrees)
    time_bin_seconds=60,         # Time binning for statistics
    detect_anomalies=True,       # Enable anomaly detection
    anomaly_sensitivity=0.3,     # Sensitivity (0-1, lower = fewer false positives)
    interference_threshold_db=8.0,  # CN0 drop threshold for interference
)

# Create analyzer
analyzer = gcn0.CN0Analyzer(config)

# Analyze observation file (with optional navigation for skyplots)
result = analyzer.analyze_with_nav("observation.rnx", "navigation.rnx")

# Access results
print(f"Quality Score: {result.quality_score.overall}/100 ({result.quality_score.rating})")
print(f"Average CN0: {result.avg_cn0:.1f} dB-Hz")
print(f"Jamming Detected: {result.jamming_detected}")
print(f"Spoofing Detected: {result.spoofing_detected}")
print(f"Anomalies: {result.anomaly_count}")

# Get detailed data
for constellation in result.constellations:
    stats = result.get_constellation_summary(constellation)
    print(f"{constellation}: {stats['satellites_observed']} sats, CN0={stats['cn0_mean']:.1f} dB-Hz")

# Export to JSON
json_data = result.to_json()

Quality Score Components

The quality score (0-100) is computed from multiple factors:

Component Weight Description
CN0 Quality 35% Signal strength relative to thresholds
Availability 20% Satellite availability vs expected
Continuity 20% Data continuity (gaps, cycle slips)
Stability 15% CN0 variance over time
Diversity 10% Multi-constellation coverage

Threat Detection Thresholds

Based on research from ITU-R M.1902-1, Stanford GPS Lab, and GPS Solutions journal:

  • Jamming: Rapid CN0 drops >6 dB in <3 seconds
  • Spoofing: Abnormally uniform CN0 (std <2 dB) or elevated average
  • Interference: CN0 degradation >4 dB from baseline (ITU I/N=-6dB criterion)

API Reference

AnalysisConfig

config = gcn0.AnalysisConfig(
    min_elevation=5.0,              # Elevation cutoff in degrees
    time_bin_seconds=60,            # Time bin for statistics
    systems=['G', 'R', 'E', 'C'],   # GNSS systems to analyze
    detect_anomalies=True,          # Enable anomaly detection
    anomaly_sensitivity=0.3,        # 0-1, lower = stricter
    interference_threshold_db=8.0,  # dB drop for interference flag
    verbose=False,                  # Print debug info
)

CN0Analyzer

analyzer = gcn0.CN0Analyzer(config)

# Analyze without navigation (no skyplots)
result = analyzer.analyze_file("observation.rnx")

# Analyze with navigation (enables skyplots and elevation filtering)
result = analyzer.analyze_with_nav("observation.rnx", "navigation.rnx")

AnalysisResult

Property Type Description
quality_score QualityScore Overall quality metrics
avg_cn0 float Mean CN0 in dB-Hz
cn0_std_dev float CN0 standard deviation
min_cn0, max_cn0 float CN0 range
jamming_detected bool Jamming indicator
spoofing_detected bool Spoofing indicator
interference_detected bool Interference indicator
anomaly_count int Number of anomalies
constellations list Available constellations
duration_hours float Observation duration
epoch_count int Number of epochs

Methods

# Get constellation-specific statistics
stats = result.get_constellation_summary("GPS")  # Returns dict

# Get anomaly list
anomalies = result.get_anomalies()  # Returns list of dicts

# Get timeseries data for plotting
ts_data = result.get_timeseries_data()  # Returns dict with timestamps, cn0_mean, etc.

# Get skyplot data (requires navigation file)
skyplot = result.get_skyplot_data()  # Returns list of satellite traces

# Export to JSON
json_str = result.to_json()

Jupyter Notebook Widget

A ready-to-use interactive widget is included:

# In Jupyter notebook
exec(open("geoveil_cn0_gui.py").read())

Features:

  • File upload or path input
  • Auto-download BRDC navigation files
  • Interactive Plotly charts
  • Quality radar, skyplots, heatmaps, timeseries
  • HTML report export

Data Sources

The library supports navigation data from:

  • BRDC: IGS combined broadcast ephemeris
  • SP3: Precise orbits from ESA, GFZ, CODE, WHU
  • TLE: CelesTrak GNSS TLE (fallback)

Requirements

  • Python 3.8+
  • No runtime dependencies (Rust binary)

Optional for notebooks:

  • plotly - Interactive charts
  • pandas - Data manipulation
  • ipywidgets - Jupyter widgets

License

MIT License - see LICENSE for details.

Author

Miluta Dulea-Flueras

Contributing

Contributions welcome! Please open an issue or pull request on GitHub.

Citation

If you use this library in research, please cite:

@software{geoveil_cn0,
  author = {Dulea-Flueras, Miluta},
  title = {geoveil-cn0: GNSS CN0 Signal Quality Analysis Library},
  year = {2026},
  url = {https://github.com/miluta7/geoveil-cn0}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geoveil_cn0-0.3.2.tar.gz (123.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geoveil_cn0-0.3.2-cp310-cp310-manylinux_2_39_x86_64.whl (502.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

File details

Details for the file geoveil_cn0-0.3.2.tar.gz.

File metadata

  • Download URL: geoveil_cn0-0.3.2.tar.gz
  • Upload date:
  • Size: 123.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for geoveil_cn0-0.3.2.tar.gz
Algorithm Hash digest
SHA256 11f8f3605d32dbc7874714a81f344fc7da299f70ccc628e5b8b72f24b08fa833
MD5 0f6933891e4306eab63c4830020ba14f
BLAKE2b-256 07050899c7ebcace66d333006b5bb47030e7b96c395b650bfbec3272b09ee71c

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoveil_cn0-0.3.2.tar.gz:

Publisher: ci.yml on miluta7/geoveil-cn0

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file geoveil_cn0-0.3.2-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for geoveil_cn0-0.3.2-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 03b083fd26198e6285fdc29715f3f1de21e9bff65a4c528aa864ec2f88dad332
MD5 266ac65764840b693f231262d1a7e710
BLAKE2b-256 4026c120c8db4fc4fc4cc09c0b29352cc9ab97e43a529ace8e2ef4e942e12ed1

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoveil_cn0-0.3.2-cp310-cp310-manylinux_2_39_x86_64.whl:

Publisher: ci.yml on miluta7/geoveil-cn0

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page