Skip to content

Searching along an orbit track #983

Closed Answered by brandon-rhodes
gfireman asked this question in Q&A
Discussion options

You must be logged in to vote

Interesting! I've never tried combining $n$ longitudes and latitudes with $n$ times, but, happily, it looks like the operation works fine in Skyfield:

#!/usr/bin/env python3

import numpy as np
from skyfield.api import EarthSatellite, load, wgs84

ts = load.timescale()
t = ts.utc(2024, 7, 10, [1, 2, 3])

lat = np.array([40.0, 41.0, 42.0])
lon = np.array([-83.0, -84.0, -85.0])

track = wgs84.latlon(lat, lon)
print(track.at(t).xyz)  # multiple lat's and lon's seem to work fine

eph = load('de421.bsp')
earth = eph['earth']
location = (earth + track).at(t)  # and can be combined with multiple t's
print(location.xyz)

Which, happily, seems to work fine!

The problem seems to come in when you ru…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by gfireman
Comment options

You must be logged in to vote
1 reply
@brandon-rhodes
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants