Skip to main content

Flight Dynamic Library

Project description

Documentation Status PyPi version Python versions https://img.shields.io/badge/code%20style-black-000000.svg

This library was started to better understand how Flight Dynamics works. It has no intent of efficiency nor performance at the moment, and the goal is mainly to develop a simple API for space observations.

The sources of this library can be found on codeberg and are under the MIT license.

Installation

Beyond requires Python 3.7+, numpy and sgp4. To install the library and its dependencies use pip

pip install beyond

Documentation

Usage

import numpy as np
from beyond.io.tle import Tle
from beyond.frames import create_station
from beyond.dates import Date, timedelta


# Parse TLE
tle = Tle("""ISS (ZARYA)
1 25544U 98067A   19072.15347313  .00000167  00000-0  10147-4 0  9997
2 25544  51.6420 118.6717 0004098  99.2855 123.2259 15.52799885160336""")

# Create a station from which to compute the pass
station = create_station('KSC', (28.524058, -80.65085, 0.0))

for orb in station.visibility(tle.orbit(), start=Date.now(), stop=timedelta(days=1), step=timedelta(minutes=2), events=True):

    # As all angles are given in radians,
    # there is some conversion to do
    azim = -np.degrees(orb.theta) % 360
    elev = np.degrees(orb.phi)
    r = orb.r / 1000.

    print("{event:10} {tle.name}  {date:%Y-%m-%dT%H:%M:%S.%f} {azim:7.2f} {elev:7.2f} {r:10.2f}".format(
        date=orb.date, r=r, azim=azim, elev=elev,
        tle=tle, event=orb.event if orb.event is not None else ""
    ))

    # Stop at the end of the first pass
    if orb.event and orb.event.info == "LOS":
        break

This library is used as basis for the Space-Command utility.

Commons usages for this library are:

Tests

Beyond is provided with a lot of unit tests. They can be run with pytest and/or tox. The code coverage is around 92%.

References

A lot of the formulas and flight dynamic algorithm are based on Vallado’s Fundamentals of Astrodynamic and Applications 4th ed.

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

beyond-0.9.tar.gz (6.8 MB view details)

Uploaded Source

Built Distribution

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

beyond-0.9-py3-none-any.whl (163.4 kB view details)

Uploaded Python 3

File details

Details for the file beyond-0.9.tar.gz.

File metadata

  • Download URL: beyond-0.9.tar.gz
  • Upload date:
  • Size: 6.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for beyond-0.9.tar.gz
Algorithm Hash digest
SHA256 96f1482ec2ed32e12e3a7d3cc34a46a43bc2323c1af80ba777ee1f6472ebe932
MD5 04675b8a472697166d02ccdae815c8f2
BLAKE2b-256 8c173b64d562db3b70c22e819dcd3b695d26b8f5480971966fb0f42287e6db81

See more details on using hashes here.

File details

Details for the file beyond-0.9-py3-none-any.whl.

File metadata

  • Download URL: beyond-0.9-py3-none-any.whl
  • Upload date:
  • Size: 163.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for beyond-0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 795f3e648605526c3d368431510c79b15f744869b8ed9fff614dc2e88ddc525c
MD5 7e09ac8c37cf8f4771a5e6203904b3fd
BLAKE2b-256 cf0c4442e8b9ae301e28d31946ea9631e515e82418ce0632051677ee5299ed84

See more details on using hashes here.

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