### Install Pyorbital from Source (Latest Development) Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Install the latest in-development version of Pyorbital directly from its GitHub repository. ```bash pip install git+https://github.com/pytroll/pyorbital.git ``` -------------------------------- ### Install Pyorbital from PyPI Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Install the Pyorbital package using pip for use in an existing Python environment. ```bash pip install pyorbital ``` -------------------------------- ### Install Pyorbital from Source (Editable Mode) Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Clone the Pyorbital repository and install it in editable mode to reflect source code changes immediately. ```bash git clone git://github.com/pytroll/pyorbital.git cd pyorbital pip install -e . ``` -------------------------------- ### Install Pyorbital from Conda-Forge Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Install the Pyorbital package from the conda-forge channel for use in a conda-based environment. ```bash conda install -c conda-forge pyorbital ``` -------------------------------- ### Create Git Tag for New Version Source: https://github.com/pytroll/pyorbital/blob/main/RELEASING.md Create an annotated Git tag for the new version. Version numbers should follow semantic versioning (semver.org) and start with 'v'. ```bash git tag -a v0.22.45 -m "Version 0.22.45" ``` -------------------------------- ### Get Satellite Position with Earlier TLE Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Demonstrates how a slightly older TLE file can affect the calculated satellite position. This highlights the importance of using TLEs close to the time of interest for accuracy. ```python snpp = Orbital('Suomi NPP', tle_file='/path/to/tle/files/tle-20150131.txt') snpp.get_lonlatalt(dtobj) ``` -------------------------------- ### Get Satellite Position with Current TLE Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the longitude, latitude, and altitude of the Suomi NPP satellite using its current TLE. This is suitable for near-real-time position estimations. ```python from pyorbital.orbital import Orbital import datetime as dt orb = Orbital("Suomi NPP") dtobj = dt.datetime(2015,2,7,3,0) orb.get_lonlatalt(dtobj) ``` -------------------------------- ### Get Satellite Position with Specific TLE File Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the satellite's position using a TLE file specified by its path. This is useful for accurate historical or future position calculations when a specific TLE is known. ```python snpp = Orbital('Suomi NPP', tle_file='/path/to/tle/files/tle-20150207.txt') snpp.get_lonlatalt(dtobj) ``` -------------------------------- ### pyorbital.orbital.Orbital.get_position Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Gets the cartesian position and velocity of a satellite at a given UTC time. ```APIDOC ## get_position ### Description Get the cartesian position and velocity from the satellite. ### Method N/A (Method of Orbital class) ### Parameters * **utc_time** (datetime) - The UTC time for the calculation. * **normalize** (boolean) - Whether to normalize the position vector. ``` -------------------------------- ### main Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Runs a test routine for reading TLE data. ```APIDOC ### pyorbital.tlefile.main() Run a test TLE reading. ``` -------------------------------- ### Check Platform Support Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Use the check_platform.py script to verify if a satellite is supported by Pyorbital. This script also indicates the location of the platforms.txt configuration file. ```default python -m pyorbital.check_platform -s NOAA-21 [INFO: 2023-01-22 21:20:25 : pyorbital.tlefile] Satellite NOAA-21 is supported. NORAD number: 54234 [INFO: 2023-01-22 21:20:25 : pyorbital.tlefile] Satellite names and NORAD numbers are defined in /path/to/pyorbital/etc/directory/platforms.txt ``` -------------------------------- ### get_platforms_filepath Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Retrieves the file path for the platforms.txt configuration file. ```APIDOC ### pyorbital.tlefile.get_platforms_filepath() Get the platforms.txt file path. Check that the file exists or raise an error. ``` -------------------------------- ### fetch Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Fetches TLE data from the internet and saves it to a specified destination file. ```APIDOC ### pyorbital.tlefile.fetch(destination) Fetch TLE from internet and save it to destination. ``` -------------------------------- ### SQLiteTLE Class Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Manages TLE data storage and retrieval using a SQLite database. ```APIDOC ## class pyorbital.tlefile.SQLiteTLE(db_location, platforms, writer_config) Store TLE data in a sqlite3 database. ### Methods #### close() Close the database. #### update_db(tle, source) Update the collected data. Only data with newer epoch than the existing one is used. ``` -------------------------------- ### read_platform_numbers Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Reads platform numbers from the platforms.txt configuration file. ```APIDOC ### pyorbital.tlefile.read_platform_numbers(filename, in_upper=False, num_as_int=False) Read platform numbers from $PYORBITAL_CONFIG_PATH/platforms.txt. ``` -------------------------------- ### Push Changes and Tags to GitHub Source: https://github.com/pytroll/pyorbital/blob/main/RELEASING.md Push all local commits and tags to the remote GitHub repository. ```bash git push --follow-tags ``` -------------------------------- ### read Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Reads TLE data for a specified platform from various sources. ```APIDOC ### pyorbital.tlefile.read(platform, tle_file=None, line1=None, line2=None) Read TLE for *platform*. The data are read from *tle_file*, from *line1* and *line2*, from the newest file provided in the TLES pattern, or from internet if none is provided. ``` -------------------------------- ### pyorbital.tlefile.Downloader Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md The Downloader class provides methods to fetch and read TLE data from various sources. ```APIDOC ## Class: pyorbital.tlefile.Downloader ### Description Class for downloading TLE data. ### Methods #### fetch_plain_tle() Fetch plain text-formated TLE data. #### fetch_spacetrack() Fetch TLE data from Space-Track. #### read_tle_files() Read TLE data from files. #### read_xml_admin_messages() Read Eumetsat admin messages in XML format. ``` -------------------------------- ### check_is_platform_supported Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Checks if a given satellite platform is supported by the library. ```APIDOC ### pyorbital.tlefile.check_is_platform_supported(satname) Check if satellite is supported and print info. ``` -------------------------------- ### get_alt_az Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the sun's altitude and azimuth angles for a given time and location. ```APIDOC ### pyorbital.astronomy.get_alt_az(utc_time, lon, lat) Return sun altitude and azimuth from *utc_time*, *lon*, and *lat*. lon,lat in degrees The returned angles are given in radians. ``` -------------------------------- ### pyorbital.orbital.Orbital.get_lonlatalt Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the sub-longitude, sub-latitude, and altitude of a satellite at a given UTC time. ```APIDOC ## get_lonlatalt ### Description Calculate sublon, sublat and altitude of satellite. ### Method N/A (Method of Orbital class) ### Parameters * **utc_time** (datetime) - The UTC time for the calculation. ``` -------------------------------- ### Update Changelog with Loghub Source: https://github.com/pytroll/pyorbital/blob/main/RELEASING.md Use loghub to automatically generate changelog entries based on git commits. Requires a LOGHUB_GITHUB_TOKEN environment variable. ```bash loghub pytroll/pyorbital --token $LOGHUB_GITHUB_TOKEN -st $(git tag --sort=-version:refname --list 'v*' | head -n 1) -plg bug "Bugs fixed" -plg enhancement "Features added" -plg documentation "Documentation changes" ``` -------------------------------- ### Read TLE file Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Parses a TLE file to retrieve satellite orbital elements. If no path is provided, it attempts to read from the TLES environment variable or downloads from Celestrak. ```pycon >>> from pyorbital import tlefile >>> tle = tlefile.read('noaa 18', '/path/to/my/tle_file.txt') >>> tle.inclination 99.043499999999995 ``` -------------------------------- ### read_tles_from_mmam_xml_files Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Reads TLE data from a list of MMAM XML files (EUMETSAT format). ```APIDOC ### pyorbital.tlefile.read_tles_from_mmam_xml_files(paths) Read TLE data from a list of MMAM XMl file (EUMETSAT). MMAM = Multi-Mission Administration Message ``` -------------------------------- ### sun_ra_dec Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the sun's right ascension and declination at a given UTC time. ```APIDOC ### pyorbital.astronomy.sun_ra_dec(utc_time) Right ascension and declination of the sun at *utc_time*. ``` -------------------------------- ### pyorbital.orbital.Orbital.utc2local Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Converts a UTC time to the local time. ```APIDOC ## utc2local ### Description Convert UTC to local time. ### Method N/A (Method of Orbital class) ### Parameters * **utc_time** (datetime) - The UTC time to convert. ``` -------------------------------- ### cos_zen Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Derives the cosine of the sun-zenith angle for a given longitude, latitude, and UTC time. ```APIDOC ### pyorbital.astronomy.cos_zen(utc_time, lon, lat) Derive the cosine of the sun-zenith angle for *lon*, *lat* at *utc_time*. utc_time: datetime.datetime instance of the UTC time lon: Longitude in degrees lat: Latitude in degrees. Returns: Cosine of the sun zenith angle. ``` -------------------------------- ### collect_filenames Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Collects all TLE filenames from a list of specified paths. ```APIDOC ### pyorbital.tlefile.collect_filenames(paths) Collect all filenames from *paths*. ``` -------------------------------- ### pyorbital.orbital.Orbital.get_next_passes Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates satellite passes for a given observer and time range. ```APIDOC ## get_next_passes ### Description Calculate passes for the next hours for a given start time and a given observer. ### Method N/A (Method of Orbital class) ### Parameters * **utc_time** (datetime) - Observation time. * **length** (int) - Number of hours to find passes. * **lon** (float) - Longitude of observer position on ground. * **lat** (float) - Latitude of observer position on ground. * **alt** (float) - Altitude above sea-level (geoid) in km of observer position on ground. * **tol** (float) - Precision of the result in seconds. * **horizon** (float) - The elevation of horizon to compute risetime and falltime. ``` -------------------------------- ### Compute Satellite Longitude, Latitude, and Altitude Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the geographical longitude, latitude, and altitude of a satellite at a specific time using its TLE data. ```pycon >>> # Get longitude, latitude and altitude of the satellite: >>> orb.get_lonlatalt(now) (40.374855865574951, 78.849923885700363, 839.62504115338368) ``` -------------------------------- ### read_tle_from_mmam_xml_file Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Reads TLE data from a single MMAM XML file (EUMETSAT format). ```APIDOC ### pyorbital.tlefile.read_tle_from_mmam_xml_file(fname) Read TLE data from MMAM XMl file (EUMETSAT). ``` -------------------------------- ### Compute Satellite Position and Velocity Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the normalized position and velocity of a satellite at a given time using its TLE data. It can fetch current TLEs from the internet if not specified. ```pycon >>> from pyorbital.orbital import Orbital >>> import datetime as dt >>> # Use current TLEs from the internet: >>> orb = Orbital("Suomi NPP") >>> now = dt.datetime.now(dt.timezone.utc) >>> # Get normalized position and velocity of the satellite: >>> orb.get_position(now) (array([-0.20015267, 0.09001458, 1.10686756]), array([ 0.06148495, 0.03234914, 0.00846805])) ``` -------------------------------- ### Tle Class Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Represents a single TLE (Two-Line Element) object. ```APIDOC ## class pyorbital.tlefile.Tle(platform, tle_file=None, line1=None, line2=None) Class holding TLE objects. ### Properties #### excentricity Get ‘eccentricity’ using legacy ‘excentricity’ name. #### line1 Return first TLE line. #### line2 Return second TLE line. #### platform Return satellite platform name. ### Methods #### to_dict() Return the raw, parsed TLE elements as a dictionary. ``` -------------------------------- ### table_exists Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Checks if a specified table exists within a SQLite database. ```APIDOC ### pyorbital.tlefile.table_exists(db, name) Check if the table ‘name’ exists in the database. ``` -------------------------------- ### jdays Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Converts a UTC datetime object to its Julian day representation. ```APIDOC ### pyorbital.astronomy.jdays(utc_time) Get the julian day of *utc_time*. ``` -------------------------------- ### pyorbital.orbital.kep2xyz Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Converts Keplerian orbital elements to Cartesian coordinates. ```APIDOC ## kep2xyz ### Description Keppler to cartesian coordinates conversion. ### Method N/A (Standalone function) ### Parameters * **kep** (list or tuple) - Keplerian elements. ``` -------------------------------- ### pyorbital.orbital.Orbital.get_observer_look Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the observer's look angle (azimuth and elevation) to a satellite. ```APIDOC ## get_observer_look ### Description Calculate observers look angle to a satellite. ### Method N/A (Method of Orbital class) ### Parameters * **utc_time** (datetime) - Observation time. * **lon** (float) - Longitude of observer position on ground in degrees east. * **lat** (float) - Latitude of observer position on ground in degrees north. * **alt** (float) - Altitude above sea-level (geoid) of observer position on ground in km. ### Returns (Azimuth, Elevation) ``` -------------------------------- ### sun_zenith_angle Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the sun-zenith angle for a given longitude, latitude, and UTC time. ```APIDOC ### pyorbital.astronomy.sun_zenith_angle(utc_time, lon, lat) Sun-zenith angle for *lon*, *lat* at *utc_time*. lon,lat in degrees. The sun zenith angle returned is in degrees. ``` -------------------------------- ### pyorbital.orbital.Orbital.get_equatorial_crossing_time Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Estimates the equatorial crossing time of an orbit, either ascending or descending. ```APIDOC ## get_equatorial_crossing_time ### Description Estimate the equatorial crossing time of an orbit. The crossing time is determined via the orbit number, which increases by one if the spacecraft passes the ascending node at the equator. A bisection algorithm is used to find the time of that passage. ### Method N/A (Method of Orbital class) ### Parameters * **tstart** (datetime) - Start time of the orbit. * **tend** (datetime) - End time of the orbit. Orbit number at the end must be at least one greater than at the start. If there are multiple revolutions in the given time interval, the crossing time of the last revolution in that interval will be computed. * **node** (string) - Specifies whether to compute the crossing time at the ascending or descending node. Choices: (‘ascending’, ‘descending’). * **local_time** (boolean) - By default the UTC crossing time is returned. Use this flag to convert UTC to local time. * **rtol** (float) - Tolerance of the bisection algorithm. The smaller the tolerance, the more accurate the result. ``` -------------------------------- ### observer_position Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the observer's position in Earth-Centered Inertial (ECI) coordinates. ```APIDOC ### pyorbital.astronomy.observer_position(utc_time, lon, lat, alt) Calculate observer ECI position. [http://celestrak.com/columns/v02n03/](http://celestrak.com/columns/v02n03/) ``` -------------------------------- ### jdays2000 Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the number of days since the year 2000 for a given UTC time. ```APIDOC ### pyorbital.astronomy.jdays2000(utc_time) Get the days since year 2000. ``` -------------------------------- ### gmst Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the Greenwich Mean Sidereal Time (GMST) for a given UTC time. ```APIDOC ### pyorbital.astronomy.gmst(utc_time) Greenwich mean sidereal utc_time, in radians. As defined in the AIAA 2006 implementation: [http://www.celestrak.com/publications/AIAA/2006-6753/](http://www.celestrak.com/publications/AIAA/2006-6753/) ``` -------------------------------- ### pyorbital.orbital.Orbital.get_last_an_time Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the time of the last ascending node relative to a specified time. ```APIDOC ## get_last_an_time ### Description Calculate time of last ascending node relative to the specified time. ### Method N/A (Method of Orbital class) ### Parameters * **utc_time** (datetime) - The UTC time to reference the calculation from. ``` -------------------------------- ### Compute Sun-Zenith Angle Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the Sun-zenith angle for a given time, longitude, and latitude. This is useful for remote sensing applications. ```python from pyorbital import astronomy import datetime as dt utc_time = dt.datetime(2012, 5, 15, 15, 45) lon, lat = 12, 56 astronomy.sun_zenith_angle(utc_time, lon, lat) ``` -------------------------------- ### pyorbital.orbital.get_observer_look Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the observer's look angle (azimuth and elevation) to a satellite, as a standalone function. ```APIDOC ## get_observer_look ### Description Calculate observers look angle to a satellite. ### Method N/A (Standalone function) ### Parameters * **sat_lon** (float) - Satellite longitude. * **sat_lat** (float) - Satellite latitude. * **sat_alt** (float) - Satellite altitude. * **utc_time** (datetime) - Observation time. * **lon** (float) - Longitude of observer position on ground in degrees east. * **lat** (float) - Latitude of observer position on ground in degrees north. * **alt** (float) - Altitude above sea-level (geoid) of observer position on ground in km. ### Returns (Azimuth, Elevation) ``` -------------------------------- ### pyorbital.orbital.Orbital.find_aos Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Finds the Acquisition of Signal (AOS) for a satellite at a given time and location. ```APIDOC ## find_aos ### Description Finds the Acquisition of Signal (AOS) for a satellite at a given time and location. ### Method N/A (Method of Orbital class) ### Parameters * **utc_time** (datetime) - The UTC time for the calculation. * **lon** (float) - The longitude of the observer. * **lat** (float) - The latitude of the observer. ``` -------------------------------- ### pyorbital.orbital.Orbital.find_aol Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Finds the Angle of Local Station (AOL) for a satellite at a given time and location. ```APIDOC ## find_aol ### Description Finds the Angle of Local Station (AOL) for a satellite at a given time and location. ### Method N/A (Method of Orbital class) ### Parameters * **utc_time** (datetime) - The UTC time for the calculation. * **lon** (float) - The longitude of the observer. * **lat** (float) - The latitude of the observer. ``` -------------------------------- ### sun_ecliptic_longitude Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the ecliptic longitude of the sun at a given UTC time. ```APIDOC ### pyorbital.astronomy.sun_ecliptic_longitude(utc_time) Ecliptic longitude of the sun at *utc_time*. ``` -------------------------------- ### pyorbital.orbital.Orbital.get_orbit_number Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the orbit number of a satellite at a specified time. ```APIDOC ## get_orbit_number ### Description Calculate orbit number at specified time. ### Method N/A (Method of Orbital class) ### Parameters * **utc_time** (datetime) - UTC time as a datetime.datetime object. * **tbus_style** (boolean) - If True, use TBUS-style orbit numbering (TLE orbit number + 1). * **as_float** (boolean) - Return a continuous orbit number as float. ``` -------------------------------- ### sun_earth_distance_correction Source: https://github.com/pytroll/pyorbital/blob/main/doc/source/index.md Calculates the correction factor for the sun-Earth distance relative to 1 AU. ```APIDOC ### pyorbital.astronomy.sun_earth_distance_correction(utc_time) Calculate the sun earth distance correction, relative to 1 AU. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.