MapMFD How does MapMFD draw ground tracks, etc?

george7378

DON'T PANIC
Addon Developer
Donator
Joined
Jun 26, 2009
Messages
1,045
Reaction score
0
Points
36
Hi everyone,

I was wondering if anyone knows the methods used by MapMFD to plot:

a) ground tracks
b) the horizon visible to the spacecraft
c) the terminator between day/night (and the shading of the day/night areas)

I guess for the ground track, it could perform a series of forward propagations, store them in sequence, and connect each of these dots with a line, but this seems pretty brute-force. I can't think how the horizon and day/night terminator could be drawn unless there's a pixel shader which is performing calculations on every pixel on the map to see if it's visible to the spacecraft/sun.

Perhaps there is some source code for MapMFD or one that does similar plots? I'd be very interested in knowing how to do these plots in a program of my own using vector graphics if possible.

Thanks!
 

STS

Well-known member
Joined
Feb 1, 2009
Messages
531
Reaction score
273
Points
78
Location
Vigo
Website
orbisondas.es
I am developing a algorithm to draw a groundtrack in google maps/mapbox (yet to be determined, mapbox looks cool). Lots of orbital concepts are required (I think). If I manage to make it work, I could share it.
 
Last edited:

asbjos

tuanibrO
Addon Developer
Joined
Jun 22, 2011
Messages
696
Reaction score
259
Points
78
Location
This place called "home".
I would guess ground tracks are calculated numerically, while the horizon visible and terminator are calculated analytically using coordinates, altitude, planet radius (assuming perfect sphere) and trigonometry for horizon and obliquity and planet rotation for terminator.
 

george7378

DON'T PANIC
Addon Developer
Donator
Joined
Jun 26, 2009
Messages
1,045
Reaction score
0
Points
36
Yes, that's probably true, but the thing I'm wondering is how the MFD plots them. I'd be interested to know how I could plot them using vector graphics like MapMFD.
 

asbjos

tuanibrO
Addon Developer
Joined
Jun 22, 2011
Messages
696
Reaction score
259
Points
78
Location
This place called "home".
Can't talk for Martins, but if he reads this: could the source code for all the stock MFDs be included in the SDK?
 

george7378

DON'T PANIC
Addon Developer
Donator
Joined
Jun 26, 2009
Messages
1,045
Reaction score
0
Points
36
Looking at the source code for an open source satellite tracker program, it seems like the best method probably is to brute-force calculate a series of points along the ground track/satellite horizon/terminator and just join them up as a PolyLine or something.
 

george7378

DON'T PANIC
Addon Developer
Donator
Joined
Jun 26, 2009
Messages
1,045
Reaction score
0
Points
36
OK, I got the solar terminator and ground track working in my program - I could do the satellite horizon in a similar way but it's not really needed at the moment.
 

Attachments

  • SSS_V2a.png
    SSS_V2a.png
    245.7 KB · Views: 45

STS

Well-known member
Joined
Feb 1, 2009
Messages
531
Reaction score
273
Points
78
Location
Vigo
Website
orbisondas.es
Cool, very interesting.

---------- Post added at 08:39 PM ---------- Previous post was at 01:24 PM ----------

OK, I got the solar terminator and ground track working in my program - I could do the satellite horizon in a similar way but it's not really needed at the moment.
Can you tell wich open source program you used to make yours?
 
Top