diff --git a/README.md b/README.md index ff3bd5f..5098d1a 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ PyPredict is a C Python extension directly adapted from the ubiquitous [predict] Originally written for the commodore 64, predict has a proven pedigree; We just aim to provide a convenient API. PyPredict is a port of the predict codebase and should yield identical results. -If you think you've found an error in pypredict, please include output from predict on same inputs to the bug report. +If you think you've found an error in `pypredict`, please include output from `predict` on same inputs to the bug report. If you think you've found a bug in predict, please report and we'll coordinate with upstream. ### Installation @@ -70,21 +70,27 @@ predict.observe(tle, qth) # optional time argument defaults to time.time() # } ``` -#### Show upcoming transits of satellite over groundstation +#### Show upcoming transits of satellite over ground station ```python -p = predict.transits(tle, qth) -for _ in xrange(10): - transit = p.next() - print("%f\t%f\t%f" % (transit.start, transit.duration(), transit.peak()['elevation'])) +# start and stop transit times as UNIX timestamp +transit_start = 1680775200 +transit_stop = 1681034400 + +p = predict.transits(tle, qth, transit_start, transit_stop) + +print("Start of Transit\tTransit Duration (s)\tPeak Elevation") +for transit in p: + print(f"{transit.start}\t{transit.duration()}\t{transit.peak()['elevation']}") ``` + #### Modeling an entire constellation -Generating transits for a lot of satellites over a lot of groundstations can be slow. -Luckily, generating transits for each satellite-groundstation pair can be parallelized for a big speedup. +Generating transits for a lot of satellites over a lot of ground stations can be slow. +Luckily, generating transits for each satellite-groundstation pair can be parallelized for a big speed-up. -``` +```python import itertools from multiprocessing.pool import Pool import time @@ -117,7 +123,7 @@ transits = flattened_results ``` NOTE: If precise accuracy isn't necessary (for modeling purposes, for example) setting the tolerance argument - to the `above` call to a larger value, say 1 degree, can provide a signifigant performance boost. + to the `above` call to a larger value, say 1 degree, can provide a significant performance boost. #### Call predict analogs directly