From 5221e558e05a1b787f74b445a505711ef8cbf850 Mon Sep 17 00:00:00 2001 From: Ahmed Hefnawi <57364603+hefnawi7@users.noreply.github.com> Date: Thu, 6 Apr 2023 10:41:39 +0100 Subject: [PATCH 1/2] docs: formatting + typo fixes --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ff3bd5f..ce921cb 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,7 +70,7 @@ 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) @@ -81,10 +81,10 @@ for _ in xrange(10): #### 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 +117,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 From 45ed4425773980344f1b8d3440b93fc6bda69eb6 Mon Sep 17 00:00:00 2001 From: Ahmed Hefnawi <57364603+hefnawi7@users.noreply.github.com> Date: Thu, 6 Apr 2023 10:42:02 +0100 Subject: [PATCH 2/2] docs: update `.transits()` code snippet --- README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ce921cb..5098d1a 100644 --- a/README.md +++ b/README.md @@ -73,12 +73,18 @@ predict.observe(tle, qth) # optional time argument defaults to time.time() #### 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 ground stations can be slow.