Skip to main content

nightflight

This is a very small library that leverages the astral package to calculate how much of a flight occurs during regulatory night time (30 minutes after sunset to 30 minutes before sunrise).

This calculation is somewhat complicated because sunset and sunrise are a function of location, and location is changing rapidly during a flight.

Positions and times during the flight are approximated by assuming that the flight follows a great circle track between origin and destination and that velocity is constant throughout.

The latter assumption is likely the greatest source of error, since average velocity along the great circle track will be much lower during the initial and terminal manoeuvring phases.

The assumption of great circle track may also be erroneous on very long trips. If a trip starts on exactly opposite sides of the planet, there are an infinite number of equally efficient tracks to choose from, so when the situation is close to this, the actual track flown may end up being radically different from that assumed.

The main function takes n_vectors (vectors normal to the tangent plane at a given location) as arguments to avoid dealing with singularities. A database of n_vectors for airfields as designated by their three letter IATA code or four letter ICAO codes is included. This data is a processed version of the database generously provided by ourairports.com (see https://ourairports.com/). The make_locations module has a to_nvec function to convert an arbitrary latitude and longitude to an n_vector .

Metadata

Release files for nightflight 0.9.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nightflight 0.9.2
File Size Uploaded Provenance Actions
nightflight-0.9.2.tar.gz 236.2 kB Without provenance Details for nightflight-0.9.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nightflight 0.9.2
File Interpreter ABI Platform Actions
nightflight-0.9.2-py3-none-any.whl Python 3 none any Details for nightflight-0.9.2-py3-none-any.whl

Total release size: 469.8 kB

Release files / nightflight-0.9.2.tar.gz

Download URL nightflight-0.9.2.tar.gz
Size 236.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8f1c1248ba56c1ad9949bbca2296e9e91bf3798310aea315c160a11527a7565f
BLAKE2b-256 checksum
How to use checksums
7f45a21cb5d287174ae508fa6aeec09d229064b5be085a005201171a7c9a4488
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.2

Release files / nightflight-0.9.2-py3-none-any.whl

Download URL nightflight-0.9.2-py3-none-any.whl
Size 233.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d6d8fc910a8013a716245edf83c4c3d1b47e89944c4378aa29c3eaabc5aae642
BLAKE2b-256 checksum
How to use checksums
21b67cb63eb48f593d8b0aaaf881be206bcd35b74a5009cb42fea34fa7176f81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.2

Security for nightflight 0.9.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page