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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

geoveil_cn0-0.3.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (504.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

geoveil_cn0-0.3.7-cp311-cp311-macosx_11_0_arm64.whl (454.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

geoveil_cn0-0.3.7-cp310-cp310-win_amd64.whl (445.6 kB view details)

Uploaded CPython 3.10Windows x86-64

geoveil_cn0-0.3.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (504.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

geoveil_cn0-0.3.7-cp310-cp310-macosx_11_0_arm64.whl (454.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file geoveil_cn0-0.3.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geoveil_cn0-0.3.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9fb10aeec19722c282740b381a95cba54d6b75b1c639b8d65f9edb9b2963e7c4
MD5 2edc4bbeed725981740710fb39f27d96
BLAKE2b-256 ea611ad982c94bd8b944de7fa1886750fe2a2137bc9e5098a0c36c14ef84ea78

See more details on using hashes here.

File details

Details for the file geoveil_cn0-0.3.7-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for geoveil_cn0-0.3.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 04305e2ed76bef692f2eb155663e9449459ab5fd68c896dc4353a19348a324bf
MD5 69c4a93a052e51d73fc73cf7755d5616
BLAKE2b-256 73e2f38d0dae87dd39e5eb869d9358c8a786abbd1e546028b213790bab7e5ab6

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoveil_cn0-0.3.7-cp311-cp311-macosx_11_0_arm64.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.

File details

Details for the file geoveil_cn0-0.3.7-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: geoveil_cn0-0.3.7-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 445.6 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for geoveil_cn0-0.3.7-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c0f4f22c3c5ff7377d28bbe44576272e74d74728553606293682ba493cf5de53
MD5 a1f1251591bce1fb4d3f2b10426de44a
BLAKE2b-256 25735dba4d46c8b2cada41ad2f888eed0ba81081f3fc1524b83a86b675275276

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoveil_cn0-0.3.7-cp310-cp310-win_amd64.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.

File details

Details for the file geoveil_cn0-0.3.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for geoveil_cn0-0.3.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b526d26bd8d3feeb44c21f7028a43dfcb2e2fb2793a339ad53625fb850ed048d
MD5 3029b0ef5bf6ab5a839f79019d04b2a5
BLAKE2b-256 5483f1eab287823a7420c6bc7a58d19cd4cfe1d258ea0bf9827420f7fcb9f460

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoveil_cn0-0.3.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_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.

File details

Details for the file geoveil_cn0-0.3.7-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for geoveil_cn0-0.3.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9b5cf3b898d492063e40f353f58211c4ba209979bab9710ef73745e8d1a0ec05
MD5 a12f23c3c54cad8e1e894f3831bdf096
BLAKE2b-256 d7c6a043a9dc495a68d9f0fd66ef7b591b7a997a03288fed6a79659aba4a382f

See more details on using hashes here.

Provenance

The following attestation bundles were made for geoveil_cn0-0.3.7-cp310-cp310-macosx_11_0_arm64.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