samtx / passpredict Goto Github PK
View Code? Open in Web Editor NEWPredict upcoming satellite overpasses over a point on Earth.
License: MIT License
Predict upcoming satellite overpasses over a point on Earth.
License: MIT License
Create benchmark suite with air speed velocity
Use Pydantic to create object models
The current output for predict
only returns overpass predictions between midnight and 12:59pm local time. The sgp4 propagation is probably correct, so the error is most likely within the conversion from TEME to ECEF coordinates in propagate()
or somewhere in predict_passes()
Write some basic documentation using mkdocs. It doesn't need a full API reference, just an overview of the process, math, and CLI reference.
Add tests to compare overpasses predictions with
ensure that the TLE and viewing locations are the same
Implement a consistent caching system for computations that are performed once per day, such as
propagate()
Potential cache options are:
OrderedDict()
that saves the results to diskThis cache option should be written so that it can be easily substituted with a Memcached or Redis database for web apps.
Create SQL tables for Satellite and Location objects.
We could potentially use the database to directly cache the satellite position values, but leave that for later.
Create new Satellite propagator using a general perturbed Kepler propagator. An initial implementation should be based on Vallado's pkepler algorithm. It will be helpful for validating future pass prediction algorithms.
Add some initial documentation with mkdocs
Download and parse earth orientation parameter data for coordinate transformations
Use Astropy to handle time, orientation, and reference frame computations. The latest development release of astropy 4.1rc1 has support for the TEME reference frame (ref: Working with Earth Satellites Using Astropy Coordinates)
Let astropy do all of the heavy lifting computing the julian dates, gathering the delta UT1, TEME <-> ECEF frame transformations, and getting sun position. Astropy also has a convenience method EarthLocation.of_address() that queries the Open Street Map or Google geocoding API to get the latitude and longitude of a topographic location.
During initial testing, it appears that using astropy to convert ECEF vectors to AltAz (and range) is too slow for our use case at 1900 ms. It will probably be fine to stick with the existing computing methods since those weren't giving too much of a problem and were much faster at 90 ms.
Note: the underlying numpy array data from the CartesianRepresentation object can be accessed with CartesianRepresentation.data.xyz.value
Hello @samtx I am trying out passpredict for the first time, and your canned CLI examples are quietly failing (even with --verbose set). I dug down a level, found and mimicked your httpx call, and I realized it is failing due to HTTP 301 (Moved Permanently) errors. Looks like celestrak dot com has permanently moved to celestrak dot org.
Create new Observer class to implement Alfano, et al, algorithm for pass predictions. Uses quartic blending to approximate azimuth and elevation curves.
Hello,
I have used the passpredict package on a daily basis without any problems since March the 22nd and the code that worked since then suddenly stopped working on the 29th of July. It is something to do with the tle = source.get_tle command:
Traceback (most recent call last):
File "C:\Users\EM27\Desktop\PROFFASTv2.0.1\le_tropomi.py", line 430, in
tle = source.get_tle(42969) # Sentinel 5P, Norad ID 42969
File "C:\Users\EM27\AppData\Local\Programs\Python\Python310\lib\site-packages\passpredict\sources.py", line 92, in get_tle
tle = self._query_tle_from_celestrak(satid)
File "C:\Users\EM27\AppData\Local\Programs\Python\Python310\lib\site-packages\passpredict\sources.py", line 128, in _query_tle_from_celestrak
raise CelestrakError(f'Celestrak TLE for satellite {satid} not found')
passpredict.exceptions.CelestrakError: Celestrak TLE for satellite 42969 not found
I can change the NORAD ID for 25544, and it also does not work. I have updated predictpass to 0.5.1 but it does not solve the problem. Any thoughts on this?
Since the core astrodynamic calculations use julian date internally, it is cumbersome and prone to error to convert datetime objects to julian date floats. This is particularly problematic if the datetime isn't in UTC time.
The JSON output should be in a string format. JSON strings will help to natively print tables and other output formats. The passpredict-api will use byte output optimized for web traffic.
The standard json
module outputs as string while the orjson
module outputs as bytes. Since using the orjson
module would add an unnecessary dependency, stick to using the standard library json
here and only use orjson
in the passpredict-api.
Compute ECI position coordinates for satellites, Earth viewing locations, and the sun. This is needed to compute satellite visibility.
Will most likely have to implement precession and nutation rotations
Reference vallado/matlab/teme2eci.m
and vallado/matlab/ecef2eci.m
Custom TLEs or COE values should be able to be entered from the command line, or read from a file.
Need to investigate possible file formats. Maybe have a extra CLI option to specify input file format.
The predict_passes()
function is the real-time computation of satellite overpasses over a location assuming that the satellite ECEF position vectors have already been computed and cached.
We could potentially use Cython or c-extensions to improve speed of matrix operations.
Find a good way to compute the apparent magnitude for a satellite which is visible.
Add optional output formats for CLI commands.
Options include:
Compute the visibility of a satellite during an overpass event.
Do automatic testing, coverage checks, and benchmarks on pull requests or commits to master
Use console scripts to create passpredict
command. Output to html, csv, json.
I have always used this library on a daily basis, but now whenever I try to run get_tle I get the following error:
Traceback (most recent call last):
File "C:\Users\EM27\Desktop\PROFFASTv2.0.1\le_tropomi.py", line 438, in
tle = source.get_tle(25544) # Sentinel 5P, Norad ID 25544
File "C:\Users\EM27\anaconda3\lib\site-packages\passpredict\sources.py", line 92, in get_tle
tle = self._query_tle_from_celestrak(satid)
File "C:\Users\EM27\anaconda3\lib\site-packages\passpredict\sources.py", line 139, in _query_tle_from_celestrak
raise CelestrakError(f'Celestrak TLE for satellite {satid} not found')
passpredict.exceptions.CelestrakError: Celestrak TLE for satellite 25544 not found
Is there anything I can do to fix this problem? It also happens if I chose a different id, like the ISS.
Thank you !
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.