A Python framework that computes a satellite’s circular orbit over Earth, generates customizable ground-track “target” points, and produces a dynamic Google Earth Tour complete with animated highlight circles, variable camera ‘watch’ radius, and automated freeze/resume logic, packaged as KML for visualization in Google Earth Pro.
Untitled.video.-.Made.with.Clipchamp.1.mp4
- Compute a satellite’s Earth‐fixed ground track given:
- Altitude (km)
- Inclination (°)
- Orbital period or derived from circular orbit
- Generate evenly‐spaced “target” points around the ground track.
- Draw a circle around each target on watch mode. The circle shrinks as you approach the target and expands as you move away.
- Create a Google Earth Tour that:
- Flies along the orbit.
- Tracks when approaches the target.
- Freezes the camera (to save “fuel”) when outside a specified target radius.
- Resumes tracking when entering a new target’s radius.
- Output:
.kmlfor preview
- Orbit Propagation: compute ground-track lat/lon from circular orbit model.
def eci_to_llh(θ):
lat = np.arcsin(np.sin(inc_rad) * np.sin(θ))
lon_deg = (np.rad2deg(θ) + 180) % 360 - 180
return np.rad2deg(lat), lon_deg- Target Generation: choose how many targets you want and the deviation via "lateral_km" distance from satellite orbit.
def generate_evenly_spaced_targets(track_latlon, n_points = 10,
lateral_km = 0)- Change the watch range with "range_km = 650"
- Target Highlight Circle: around each target, draw a circle whose radius (km) is computed as:
circle_radius = max(min_radius, scale_factor * distance_to_satellite)- scale_factor determines how the circle expands proportionally to satellite–target distance
- min_radius ensures a baseline circle size even when distance is small
You can use output_example file.
- Download
output_example - Open "Google Earth Pro"
- Click on "file"
- Click on "open"
- Open the downloaded file
- Click on the camera icon under the "Orbit Tour" to start play the simulation
You can check the csv output file log
parameters : satellite position, nearest target, camera tilt deg, angular velocity. Example results:
remark: tilt 0° - the camera looking at target
remark: Radians per second

