Skip to main content

Hubble PHY v-1 / v1 preamble detector, FSK decoder, and spectrogram computation

Project description

hubble-satnet-decoder

CI License

Hubble PHY v-1 / v1 preamble detector, FSK decoder, and spectrogram computation — extracted as a standalone, pip-installable library.

Install

pip install git+https://github.com/hubblenetwork/hubble-satnet-decoder.git

Or for development:

git clone https://github.com/hubblenetwork/hubble-satnet-decoder.git
cd hubble-satnet-decoder
pip install -e ".[dev]"

Quick start

import numpy as np
from hubble_satnet_decoder import decode_signal, configure

# (optional) override the default sample rate
configure(sample_rate=781_250)

# Load 1 second of IQ data (complex64)
iq = np.load("capture.npy")

packets, detections, attempts = decode_signal(iq)
for pkt in packets:
    print(f"Device 0x{pkt['ntw_id']:08X}  seq={pkt['seq_num']}  "
          f"chipset={pkt.get('chipset', 'v-1')}")

API reference

decode_signal(signal) -> (packets, detections, attempts)

Full dual-protocol decode pipeline on a 1-second IQ chunk.

detect_preambles(spec_img, t_det, f_det) -> (time, freq, scores, phy_ver)

Dual-template preamble detection via OpenCV + NMS.

compute_spec_chunk(iq_chunk) -> Sxx_dB

Compute a visualisation spectrogram (freq × time) for an IQ chunk.

configure(sample_rate=None)

Recompute all sample-rate-dependent derived values.

Constants

from hubble_satnet_decoder import (
    SYNTH_RES,             # per-chipset synthesiser resolution (Hz)
    CHANNEL_SPACING,       # nominal channel spacing (Hz)
    DEVICE_CHANNEL_SPACING,# actual per-device channel spacing
    HOPPING_SEQS,          # frequency hopping sequences
    RS_N_V1, RS_K_V1,      # Reed-Solomon block sizes (v1)
    PREAMBLE_CODE_V1,      # v1 preamble code [63,0,63,0,63,0,63,63]
)

Chipset statistics

from hubble_satnet_decoder import get_chipset_stats, reset_chipset_stats

stats = get_chipset_stats()   # {"nordic": {"detected": 5, "ok": 4, ...}, ...}
reset_chipset_stats()

License

Apache-2.0 — see LICENSE.

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

hubble_satnet_decoder-1.0.1.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

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

hubble_satnet_decoder-1.0.1-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file hubble_satnet_decoder-1.0.1.tar.gz.

File metadata

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

File hashes

Hashes for hubble_satnet_decoder-1.0.1.tar.gz
Algorithm Hash digest
SHA256 12437514fc7603357dc73b8039aac95fb696c010f5772fee53bea713c6c50fad
MD5 7ee3da34ae221d82eb2544c2745efc04
BLAKE2b-256 64d2ddd8e6e4fc70a3c0e93e13d31fab9eac56a242018a6aa1b332ce753ab0c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for hubble_satnet_decoder-1.0.1.tar.gz:

Publisher: release.yml on HubbleNetwork/hubble-satnet-decoder

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

File details

Details for the file hubble_satnet_decoder-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hubble_satnet_decoder-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 45529aaa2b9c4f3de81dce99160d656e20c04ed428b41a3f7de86c52f7fa3f75
MD5 a7743ea60b0285fbf0d91ab10f8bae24
BLAKE2b-256 b3cca0b20c57c1755059d8f6bb6044242b01aa1ff4873cb3e660c8ff60f8fac5

See more details on using hashes here.

Provenance

The following attestation bundles were made for hubble_satnet_decoder-1.0.1-py3-none-any.whl:

Publisher: release.yml on HubbleNetwork/hubble-satnet-decoder

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