Reputation: 181
Im trying to create a 3D scene in JS/React where I can plot the orbit of the ISS around earth, I've currently forked this repo https://github.com/dsuarezv/satellite-tracker
Ive noticed that this only seems to display ground tracked orbits, what I want to do is display a full orbit which isnt ground tracked i.e. its a circle and the start and end meet. With this I will also rotate the earth at an appropriate speed to replicate real time accuracy. All data for path are generated from a tle file using satellite.js propagate function to get xyz coordinates to display.
How would you convert an orbit displayed as a ground track to a full orbit with a rotating globe?
From this:
To this:
Upvotes: 2
Views: 2479
Reputation: 69
The point is, that you need the ISS' position in ECF reference frame. The Orbit on your first image is correct and shows the position of the ISS at the corresponding point in time.
The trick is to propagate the orbit using the predicted orbit time but convert it to ECF using the current time of the scene (by using the same gsmt time for the whole orbit). This way you'll get a rotating orbital plane instead of a prediction of the ISS' positions.
Be aware that this orbit does NOT show the correct path of the spacecraft unless the earth is rotating. This is why the orbit is changing with every movement of the SC.
Upvotes: 1
Reputation: 2164
I'm not familiar with satellite.js, but the issue you are having is that you want to draw the orbit in an Earth Centered Inertial (ECI) frame and not Earth Centered Fixed (ECF). Each time you get the position of the satellite you need to get it in an ECI frame like J2000 or ICRF. If you are propagating a TLE for the ISS then the output of the SGP4 propagator is TEME of Date, also an inertial frame. Draw your points/lines using the ECI coordinates and you should be good to go.
Upvotes: 1