Skip to main content

Read and manipulate Universal Tracking Data Format (UTDF) satellite tracking data

Reason this release was yanked:

mistake

Project description

UTDFpy

A Python library for reading and manipulating Universal Tracking Data Format (UTDF) satellite tracking data.

A direct conversion of https://github.com/trwyant/perl-Astro-UTDF. Thanks go to https://github.com/trwyant for creating the Perl module.

Binary Format

UTDF records are 75-byte big-endian binary structures. The library uses explicit big-endian unpacking (struct format >), so it produces identical results on any architecture (arm64, amd64, etc.).

Prerequisites

  • Task (task runner)
  • Docker (or Podman)

Development

All development tasks run inside a Docker container via Taskfile.yaml. To use Podman instead of Docker:

task tests CONTAINER_BIN=podman

Available tasks

task tests          # Run lint, format check, typecheck, then pytest
task tests:cov      # Run tests with coverage report
task lint           # Run ruff linter
task lint:fix       # Run ruff linter with auto-fix (modifies host files)
task format         # Run ruff formatter (modifies host files)
task format:check   # Check formatting without changes
task typecheck      # Run mypy type checking
task check          # Run all checks (lint, format, typecheck, tests)
task build          # Build distribution packages
task publish        # Build and publish package to PyPI
task clean          # Remove build artifacts and caches
task clean:all      # Remove everything including Docker image

Task dependency chain

tests depends on lint, format:check, and typecheck, each of which depends on docker:build. Running task tests will automatically build the Docker image, run the linter, check formatting, and run mypy before executing the test suite. publish depends on tests, so it runs the full check suite before uploading to PyPI.

Installation

pip install utdfpy

Or for development:

pip install -e '.[dev]'

Usage

from utdfpy import UTDFRecord

# Read all records from a UTDF file
records = UTDFRecord.slurp("tracking_data.utd")

for record in records:
    print(record.sic, record.vid, record.decode("measurement_time"))
    print(f"  azimuth:  {record.azimuth}")
    print(f"  elevation: {record.elevation}")
    print(f"  range:    {record.range}")

CLI tool

An interactive query tool is included:

query-utdf tracking_data.utd

Commands: load, count, select, next, list, or type any field name to inspect it.

CI/CD

  • GitHub Actions (.github/workflows/ci.yaml): runs lint, tests, and typecheck on push/PR; publishes to PyPI on release.
  • GitLab CI (.gitlab-ci.yaml): runs lint, tests (Python 3.10-3.13), and typecheck; publishes to PyPI on version tags.

License

Artistic-2.0 OR GPL-1.0-or-later (same as the original Perl module).

Architecture

classDiagram
    class UTDFRecord {
        -bytes _front
        -str _router
        -int _year
        -int _sic
        -int _vid
        -int _seconds_of_year
        -int _microseconds_of_year
        -float _transponder_latency
        -bool _enforce_validity
        -UTDFRecord _prior_record
        -float _factor_K
        -float _factor_M
        +azimuth() float
        +elevation() float
        +range_delay() float
        +doppler_count() float
        +doppler_shift() float
        +range() float
        +range_rate() float
        +measurement_time() float
        +transmit_frequency() int
        +raw_record() bytes
        +hex_record() str
        +clone() UTDFRecord
        +slurp(file) list~UTDFRecord~
        +iter_file(file) Iterator~UTDFRecord~
        +decode(field_name) str
    }

    class UTDFError {
        <<exception>>
    }

    class InvalidRecordError {
        <<exception>>
    }

    class FrequencyBand {
        <<IntEnum>>
        UNSPECIFIED
        VHF
        UHF
        S_BAND
        C_BAND
        X_BAND
        KU_BAND
        VISIBLE
    }

    class TransmissionType {
        <<IntEnum>>
        TEST
        SIMULATED
        RESUBMIT
        REAL_TIME
        PLAYBACK
    }

    class TrackingMode {
        <<IntEnum>>
        AUTOTRACK
        PROGRAM_TRACK
        MANUAL
        SLAVED
    }

    class TrackerType {
        <<IntEnum>>
        C_BAND_PULSE
        SRE
        SGLS
        TDRSS
    }

    class AntennaGeometry {
        <<IntEnum>>
        AZ_EL
        XY_SOUTH
        XY_EAST
        RA_DEC
        HR_DEC
    }

    Exception <|-- UTDFError
    UTDFError <|-- InvalidRecordError
    UTDFRecord --> UTDFRecord : prior_record
    UTDFRecord ..> InvalidRecordError : raises
    UTDFRecord ..> parsing : uses
    UTDFRecord ..> decode : uses

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

utdfpy-0.1.0.tar.gz (29.2 kB view details)

Uploaded Source

Built Distribution

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

utdfpy-0.1.0-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file utdfpy-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for utdfpy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 713d0ace0445c8c519c713906eccf028825f92f0d66c84240a8fcb80fc100211
MD5 e0229c79d7927aa6c22aa054e6f0114f
BLAKE2b-256 e342f9e59809e30c65fbc5a36feda589a7f08ff663b4040a0b6fa08abc7634b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for utdfpy-0.1.0.tar.gz:

Publisher: ci.yaml on haisamido/UTDFpy

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

File details

Details for the file utdfpy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: utdfpy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for utdfpy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8052757311703665ac436912fc8e6ada071196eaa3cf1492513dc1333ef4fe5e
MD5 b876a372b3e24f799fb2ca2726747a7f
BLAKE2b-256 eaea0af32612ae9d862c310e1f10e45eda67a90b4f0afc1e06ae603242d2a987

See more details on using hashes here.

Provenance

The following attestation bundles were made for utdfpy-0.1.0-py3-none-any.whl:

Publisher: ci.yaml on haisamido/UTDFpy

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