File: init-satellite

package info (click to toggle)
sgp4 2.22-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 676 kB
  • sloc: python: 2,463; cpp: 2,416; makefile: 6; xml: 5
file content (19 lines) | stat: -rwxr-xr-x 371 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/python3

import sys

from sgp4.api import Satrec

s = '1 25544U 98067A   19343.69339541  .00001764  00000-0  38792-4 0  9991'
t = '2 25544  51.6439 211.2001 0007417  17.6667  85.6398 15.50103472202482'

satellite = Satrec.twoline2rv(s, t)

jd, fr = 2458827, 0.362605

e, r, v = satellite.sgp4(jd, fr)

if e != 0:
    print('Error')
    sys.exit(1)
sys.exit(0)