-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmoke_test.py
More file actions
21 lines (17 loc) · 757 Bytes
/
Copy pathsmoke_test.py
File metadata and controls
21 lines (17 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from datetime import datetime, timezone
from sat_tracker.config import load_config, configure_logging
from sat_tracker.tle_fetcher import TleFetcher
from sat_tracker.propagator import propagate
from sat_tracker.coordinates import CoordinateConverter
cfg = load_config()
configure_logging(cfg)
with TleFetcher(cfg) as f:
tle = f.fetch(25544)
converter = CoordinateConverter(cfg)
state = propagate(tle, datetime.now(timezone.utc))
ground = converter.teme_to_ground(state)
print(f"ISS at {ground.time_utc.isoformat()}:")
print(f" lat: {ground.latitude_deg:+.4f} deg")
print(f" lon: {ground.longitude_deg:+.4f} deg")
print(f" alt: {ground.altitude_km:.1f} km")
print(f" EOP: {'degraded (bundled)' if ground.eop_degraded else 'fresh IERS data'}")