HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
brandon-rhodes
python-sgp4
Python2019–2019
brandon-rhodes / python-sgp4

python-sgp4

Python version of the SGP4 satellite position library

2Distinct people
2Mentions
0Explicit recommenders
484GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Python version of the SGP4 satellite position library

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour2 dated mentions

Observed mentions: 2019-08-26 09:03:47 UTC to 2019-08-26 15:58:40 UTC.

012019-08-26 09:00:00 UTC to 2019-08-26 10:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsAug 26, 09:002019-08-26 10:00:00 UTC to 2019-08-26 11:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-08-26 11:00:00 UTC to 2019-08-26 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-08-26 12:00:00 UTC to 2019-08-26 13:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsAug 26, 12:002019-08-26 13:00:00 UTC to 2019-08-26 14:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-08-26 14:00:00 UTC to 2019-08-26 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-08-26 15:00:00 UTC to 2019-08-26 16:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsAug 26, 15:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Aug 26, 09:002019-08-26 09:00:00 UTC2019-08-26 10:00:00 UTC101
Aug 26, 10:002019-08-26 10:00:00 UTC2019-08-26 11:00:00 UTC000
Aug 26, 11:002019-08-26 11:00:00 UTC2019-08-26 12:00:00 UTC000
Aug 26, 12:002019-08-26 12:00:00 UTC2019-08-26 13:00:00 UTC000
Aug 26, 13:002019-08-26 13:00:00 UTC2019-08-26 14:00:00 UTC000
Aug 26, 14:002019-08-26 14:00:00 UTC2019-08-26 15:00:00 UTC000
Aug 26, 15:002019-08-26 15:00:00 UTC2019-08-26 16:00:00 UTC101

What Hacker News says

2 sources
Most of the data is typically in a two-line element format [0]. You can grab it here https://www.space-track.org or here https://celestrak.com/NORAD/elements/ (although I believe the celestrak data comes from space-track, correct me if I'm wrong) The satellite positions are then estimated using an algorithm such as sgp4 implemented in quite a few languages: * https://github.com/joshuaferrara/go-satellite (<-- disclaimer: this is mine) * https://github.com/brandon-rhodes/python-sgp4 * https://github.com/shashwatak/satellite-js Check out Dr. Kelso's (he works for AGI now) original work here in Pascal, plus a few links to C++ works: https://celestrak.com/software/tskelso-sw.php [0] https://celestrak.com/columns/v04n03/
In Spacebook: AGI's near Real-Time satellite viewer
I made a similar site 20 years ago (an applet, what else) and a lot of people seem to be wondering "how does it work" or "where does the data come from?". I can only describe how I implemented it, but it's probably similar. Data is not "real time" for each satellite in any sense. But since satellites follow orbits, it's enough to have recent state, and you can extrapolate where they are. The data comes from places like NORAD, and has a standardized format called a "Two line element set". https://en.wikipedia.org/wiki/Two-line_element_set Here is the current state of the international space station for example as described in a TLE: ISS (ZARYA) 1 25544U 98067A 19238.30917157 .00002323 00000-0 48072-4 0 9991 2 25544 51.6438 13.4147 0007728 328.5901 233.9236 15.50389701186137 It's mostly opaque but we can se
Read the rest
e near the end of the second line that at the current orbit means it does around 15.5 orbits per day. When I implemented my app, I just grabbed some data from a public link with up to date TLE's. Such as this one, for the 100 brightest satellites is a good start for a simple visualization app. https://www.celestrak.com/NORAD/elements/visual.txt Once you have the TLE for a satellite which describes where it was a while ago, you need a function that gives you the current state vector for the satellite, given the time delta since the known state. Far from earth this can be done approximately with simple orbital mechanics, but close to earth you need to account for athmospheric drag and also the uneven or "bumpy" gravitational field. At some point someone devised a set of algorithms for this called the simplified perturbations models in 1988 https://en.wikipedia.org/wiki/Simplified_perturbations_model... Basically current_state = SGP4(old_state, time_since_old_state) Luckily, these functions were released together with a Fortran implementation, so porting it to whatever language you want is fairly straight forward. Here is an example port of SGP4 to python https://github.com/brandon-rhodes/python-sgp4/blob/master/sg...
In Spacebook: AGI's near Real-Time satellite viewer

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.