# How to make satellite ground track on map?

I want to make satellite ground track using matlab. I already had a position of satellite(ECI) by solving Kepler equation. And I know convert ECI to ECEF using rotation determinant. Then I convert them into longitude and latitude.

• longitude = atan2(x/y)

• latitude = asin(z/(x^2+y^2+z^2))

However, when I try to plot, track seems not collect, like a picture (inclination is 25 degree).

Should I need to division into cases? I do not know my mistake.

• I made the equations easier to read. You are missing a square root inside the arcsin, was that just a typo here? – uhoh Oct 27 '18 at 9:45
• You almost definitely need the two-argument form of arctangent. You're using atan2 but with only one parameter? – user7073 Oct 27 '18 at 15:20
• For a reference solution, here is some working code that also does the projection on a map github.com/Juanlu001/catching-asteroids-tracking-satellites – astrojuanlu Oct 28 '18 at 7:28
• Look for "Orbital Mechanics for Engineering Students". Section 4.8 provides a useful explanation including the theory, an example, and MATLAB function. – Eviatar.E Oct 29 '18 at 8:48
• Unless the OP responds about the missing square root and the incorrect and ambiguous use of atan2 with a single argument in a few more days, I think that this question should be closed as unclear. – uhoh Oct 31 '18 at 1:30