Skip to main content

A Python package to generate datasets for satellite tasking schedulers.

Project description

satdatagen

a Python package for generating datasets to be used in satellite tasking schedulers

Installation

satdatagen is in the Python Package Index, and can be installed using pip. The command:

python3 -m pip install satdatagen

or

pip3 install satdatagen

will install the satdatagen library in addition to all necessary dependencies.

Note: in some cases the library openmeteo-requests does not get automatically installed. Users will need to run pip3 install openmeteo-requests only once to solve this

User Requirements

This package relies on data collected from space-track.org, one of the main resource for satellite ephemeral data. Users of satdatagen must have an existing space-track.org login. Add a file called credentials.json to your working directory, with login information formatted as a JSON object:

{
  identity : 'username@email.com',
  password : 'yourPassword12345'
}

The satdatagen code will query the space-track.org servers for satellite data using the user's login information. Note that each user is subject to space-track's query limit - up to 30 queries per minute and up to 300 queries per hour.

Usage

The satdatagen library is easy to use. A dataset can be generated with minimal lines of code. Dataset generation revolves around the creation of 2 objects: a TimeRange object and a GroundLocation object.

TimeRange

satdatagen.TimeRange(start_date, periods, delta = 0, end_date = None)

Parameters:

start_date: datetime object or str in ISO-T format (YYYY-MM-DDTHH:mm:ss). Represents the start date/time for the dataset scheduling

periods: int. Represents the number of time steps in the time range for the duration of scheduling

[delta]: optional parameter. int. Represents the time between each time step in the time range

[end_date]: optional parameter. datetime object or str in ISO-T format (YYYY-MM-DDTHH:mm:ss). Represents the final date/time in the time range.

Users must provide either a delta value or end_date value to control the length of the time range.


GroundLocation

satdatagen.GroundLocation(space_track_credentials, latitude, longitude, time_range)

Parameters:

space_track_credentials: str. Path to the .json file with space-track.org login info as described above in User Requirements.

latitude: float. Latitude of the ground location where the observatory is located

longitude: float. Longitude of the ground location where the observatory is located

time_range: TimeRange object. Represents the time range for which the dataset will find satellites overhead of the observatory.

Methods:

generate_dataset generate_dataset(self, method = 'krag', limit = None, orbit = 'all', mixing_coeff = 0.8, output_file = None)

method: str. The method to use to calculate apparent visual magnitude (AVM). Options are 'krag', 'hejduk', or 'molczan'.

limit: int. The number of satellites to include in the dataset. Default is no limit.

orbit: str. A filter for satellites in a certain orbit. Options are 'LEO', 'MEO', 'GEO', or 'all'. Default is 'all', no filter.

mixing_coeff: float. A value between 0 and 1 that defines the ratio of diffuse reflection off objects. Default is 0.8. only used when method=='hejduk'

output_file: str. Path to a .json file to output the dataset to. File does not need to be created beforehand.

Note: all parameters described above for the generate_dataset method are optional.

Example

import satdatagen as sdg
from datetime import datetime

start_date = datetime(2024, 6, 18, hour = 20, minute = 0)
periods = 24
delta = 30
haystack_lon = -71.44 #degrees west
haystack_lat = 42.58 #degrees north

credentials = '/path/to/space/track/credentials.json'

tr = sdg.TimeRange(start_date = start_date, periods = periods, delta = delta) #time range is 12 hours long
gl = sdg.GroundLocation(credentials, haystack_lat, haystack_lon, tr)

#use Molczan's method to calculate AVM, only include 500 satellites in the dataset, and save the dataset to dataset.json
ds = gl.generate_dataset(method = 'molczan', limit = 500, output_file = 'dataset.json') 

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

satdatagen-1.0.1.tar.gz (2.9 MB view details)

Uploaded Source

Built Distribution

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

satdatagen-1.0.1-py3-none-any.whl (3.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: satdatagen-1.0.1.tar.gz
  • Upload date:
  • Size: 2.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.6

File hashes

Hashes for satdatagen-1.0.1.tar.gz
Algorithm Hash digest
SHA256 68825d66ea753019e95918c1e124f49155557aac3b174a7cca033e71b60c398d
MD5 c3ed8f5cefe136cfb276aad41bfa2b8e
BLAKE2b-256 ed26363390c2f5cee642b96ab9a4f1300ef1fb86335e9415ba23c4af9ba13844

See more details on using hashes here.

File details

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

File metadata

  • Download URL: satdatagen-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.6

File hashes

Hashes for satdatagen-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d58e3d94627b86df0dbc5b0d771b1a7fb5558d91082c06e0a7ab8a1f49620bc9
MD5 2f480780d4ee10d278dffb64074c5ea6
BLAKE2b-256 5e640006ebea012f64017f64feea5896970192712a71febda8910196212fbf8c

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