Page 1 of 1

Calculate analemma for Mars from SSC file

Posted: 28.10.2008, 04:03
by bdm
I would like to calculate and draw the analemma for Mars from data contained in the solar system SSC file, with the goal of adapting the techniques for other planets. For drawing diagrams, Keplerian orbits have sufficient accuracy. Which parameters in the SSC file are important, and how do I go about it?

The values from the SSC file that I think may be needed are:
  • EllipticalOrbit.Eccentricity
  • EllipticalOrbit.Inclination
  • EllipticalOrbit.AscendingNode
  • EllipticalOrbit.LongOfPericenter
  • EllipticalOrbit.MeanLongitude (probably not needed for an analemma diagram but may be needed for equation of time as a function of time T)
  • Obliquity
  • EquatorAscendingNode
We may need to compute the following information:
  • Axial tilt of the planet (equal to Obliquity if EllipticalOrbit.Inclination is zero)
  • Equator ascending Node in relation to orbit of planet (equal to EquatorAscendingNode if EllipticalOrbit.Inclination is zero)
As a first step, I have devised the following formula for the axial tilt for a planet in relation to the plane of its orbit using parameters from the SSC file. It can be calculated as follows:

Code: Select all

Axial tilt = arccos(cos(AscendingNode)*sin(Inclination)*cos(EquatorAscendingNode)*sin(Obliquity) + sin(AscendingNode)*sin(Inclination)*sin(EquatorAscendingNode)*sin(Obliquity) + cos(Inclination)*cos(Obliquity))

(The above formula is the dot product of the vectors described by these two pairs of angles.)

We will need to derive the following formulae:
  • Equation of time
  • Declination of the sun (or star) in relation to the equator of the planet
The analemma can then be plotted by setting x to be the equation of time and y to be declination, for mean anomaly theta = 0 to 360.

From Meeus, I have the following formula for equation of time E:

Code: Select all

E = y sin 2L0 - 2e sin M + 4ey sin M cos 2L0 - (1/2)y^2 sin 4L0 - (5/4) e^2 sin 2M

  • E = equation of time
  • y = tan^2 (axial tilt/2)
  • L0 = Sun's mean longitude
  • e = eccentricity
  • M = sun's mean anomaly
This formula does not contain a term for the ascending node for the equator (which is zero by definition for the Earth), so I doubt it can be applied without modification to Mars.

Re: Calculate analemma for Mars from SSC file

Posted: 28.10.2008, 04:20
by BobHegwood
Please, just for the Brain-Dead if you don't mind...

What the hell is an analemma? Remember who you are talking to. :wink:

Re: Calculate analemma for Mars from SSC file

Posted: 28.10.2008, 04:40
by bdm
Wikipedia:
http://en.wikipedia.org/wiki/Analemma

Basics: If one was to take a photo of the Sun at exactly the same time each day (ignoring daylight saving time), the Sun will appear to trace out a curve over the period of a year. This curve is the analemma.

Pictures of analemma for Mars:
http://apod.nasa.gov/apod/ap030626.html
http://www.giss.nasa.gov/research/briefs/allison_02/

Re: Calculate analemma for Mars from SSC file

Posted: 28.10.2008, 14:20
by BobHegwood
bdm wrote:Basics: If one was to take a photo of the Sun at exactly the same time each day (ignoring daylight saving time), the Sun will appear to trace out a curve over the period of a year. This curve is the analemma.

Yes, I do understand, and your very simple explanation was rather very much appreciated
over those highly technical (and somewhat confusing) explanations found elsewhere in this
complicated world.

Please accept my sincere appreciation for your patience here. :wink:
Thanks, Bob

Re: Calculate analemma for Mars from SSC file

Posted: 28.10.2008, 23:56
by MKruer
I would love to help you, but this is out of my league. Howerver if you come accross the informaintion on how to calculate some of the other information give certian information, i would link it if you could help me with my excel project

Re: Calculate analemma for Mars from SSC file

Posted: 29.10.2008, 04:49
by bdm
The analemma is the result when the equation of time is plotted against the declination of the Sun. The equation of time has two components: one for the eccentricity of the orbit, and one for the axial tilt.

The only numbers we need to draw an analemma are as follows:
  • The eccentricity of the planet's orbit. This is supplied as EllipticalOrbit.Eccentricity.
  • The axial tilt of the planet. This can be calculated using the formula that I gave above.
  • The argument of perihelion, which is angle between the perihelion and the equinox, or equator ascending node, as expressed in the plane of the planet's orbit.
Where I'm stuck is on the spherical rotations that are needed to determine the argument of perihelion that is coplanar with the orbit of the planet.

Re: Calculate analemma for Mars from SSC file

Posted: 30.10.2008, 03:43
by bdm
To clarify, the angle that I am trying to find is marked in red in the following illustration:
arg-of-perihelion.png

(I assume here that the line of nodes passes through the central body, and we do not need to convert it to the Mean Anomaly)

The five parameters that I think are needed to specify this angle are:
  • EllipticalOrbit.Inclination
  • EllipticalOrbit.AscendingNode
  • EllipticalOrbit.LongOfPericenter
  • Obliquity
  • EquatorAscendingNode
Conceptually, we need to rotate the orbit around the line specified by EllipticalOrbit.AscendingNode by an angle equal to EllipticalOrbit.Inclination. We also need to rotate the axis of the planet the same way, and thereby derive the node and planet's axial tilt in relation to its orbit. I have already derived a formula for the axial tilt (see OP), but the node has me stumped.

The Longitude of Pericenter is less of a problem. It is specified in relation to the ascending node of the orbit, so after rotating the orbit into the ecliptic plane, the direction of the Longitude of Pericenter is equal to EllipticalOrbit.AscendingNode + EllipticalOrbit.LongOfPericenter.

Re: Calculate analemma for Mars from SSC file

Posted: 30.10.2008, 04:17
by MKruer

Re: Calculate analemma for Mars from SSC file

Posted: 30.10.2008, 06:18
by bdm
It's only useful for Earth, but I think I have found what I am looking for.

Re: Calculate analemma for Mars from SSC file

Posted: 30.10.2008, 06:31
by bdm
Once I found the Wikipedia pages on Euler angles, it didn't take too long to find what I needed.

It takes three rotations to orient an arbitrary orbital ellipse so that it lies in the plane of the ecliptic with the perihelion pointing to 0h RA.

The first rotation - rotate the ellipse about the z axis so that the ascending node points toward 0h RA - angle is equal to ascending node
The second rotation - rotate the ellipse about the x axis so that the plane of the ellipse is parallel to the ecliptic - angle is equal to inclination
The final rotation - rotate the ellipse about the z axis so that the perihelion points toward 0h RA - angle is equal to argument of perihelion

These undo the rotations needed to orient the ellipse into its orbital orientation, and also provide some insight into the reason why orbital parameters are specified the way they are.