Skip to content

Commit

Permalink
docs: update .transits() code snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
hefnawi7 committed Apr 6, 2023
1 parent 5221e55 commit 45ed442
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 45ed442

Please sign in to comment.