Archived

This topic is now archived and is closed to further replies.

Xgkkp

Mapping a sattelites path across the earth

Recommended Posts

Right - I am intending to build a game thing that uses a HUGE world map, and I want you to be able to use satellites, you know, that map thing you see in films like Goldeneye with the path of the sattelite over it. The main problem I can see, is working out how to map a satellites movement onto a 2-D picture. Soes anyone have any ideas (or know ) ????

Share this post


Link to post
Share on other sites
It''s an interesting problem and we need to know a few things to solve it.

1) A surface of a ''sphere'' (i.e. the earth) does not unravel in to a rectangular surface. This means that when you see world maps they have some distortion to account for the earth being spherical. We need to know about this certainly.

2) An equation of motion for the sattellite describing the path it takes.

If we know how to convert angular displacement from the centre of the sphere to the 2d map then it''s easy to sample various points along the path and draw them on the 2D map.

So basically we need a calculation that relates two angles to latitude and longitude.

*Fires up google*

http://www-istp.gsfc.nasa.gov/stargaze/Slatlong.htm

woohoo this should be handy. It''s some pictures of what I am trying to describe (I guess).

So for longitude it''s really simple.

Angle between our point and start of map
P= ---------------------------------------- * Width of Map
360º

where p is the position on the 2D map.

so if it was at 180 degrees it would be in the middle of the map,
1/2 * width of map.

Now latitude....

As it''s a sphere we can in theory do the same but in reality we don''t map the earth this way. I''m sure there is some funky equation to convery angle to y-position but I''ll let you have a search for this.

I hope this has helped somehow.

-Meto

Share this post


Link to post
Share on other sites
The great thing about a sphere is that the math is really similar to that of an arc. If we had an arc defined by the function f(x) = sqrt(1 - x2)), -1 ≤ x ≤ 1, not only would we be able to find the Y coordinate given any X (duh ), but we do a change of variables to theta and use trig function instead => f(θ ) = cos(θ ), -PI/2 ≤ x ≤ PI/2 or f(θ ) = sin(θ ), 0 ≤ x ≤ PI.

A sphere can be projected onto one of the planes, and the surface on which you sattelite travels will project to an arc, which you can then calculate easily. It's simply a matter of using the right forumulas with the angle to find you X,Y, and Z coordinates.

[edited by - Zipster on November 2, 2002 5:21:00 PM]

Share this post


Link to post
Share on other sites