org.mars_sim.msp.simulation.mars
Class OrbitInfo

java.lang.Object
  extended by org.mars_sim.msp.simulation.mars.OrbitInfo
All Implemented Interfaces:
java.io.Serializable

public class OrbitInfo
extends java.lang.Object
implements java.io.Serializable

The OrbitInfo class keeps track of the orbital position of Mars

See Also:
Serialized Form

Constructor Summary
OrbitInfo()
          Constructs an OrbitInfo object
 
Method Summary
 void addTime(double millisols)
          Adds time to the orbit
 double getDistanceToSun()
          Gets the current distance to the Sun.
 double getRadius()
          Returns the radius of Mars's orbit in A.U.
 double getSunAngleFromPhi(double phi)
          Gets the Sun's angle from a given phi (latitude).
 Coordinates getSunDirection()
          The point on the surface of Mars perpendicular to the Sun as Mars rotates.
 double getTheta()
          Returns the theta angle of Mars's orbit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrbitInfo

public OrbitInfo()
Constructs an OrbitInfo object

Method Detail

addTime

public void addTime(double millisols)
Adds time to the orbit

Parameters:
millisols - time added (millisols)

getTheta

public double getTheta()
Returns the theta angle of Mars's orbit. Angle is clockwise starting at aphelion.

Returns:
the theta angle of Mars's orbit

getRadius

public double getRadius()
Returns the radius of Mars's orbit in A.U.

Returns:
the radius of Mars's orbit

getDistanceToSun

public double getDistanceToSun()
Gets the current distance to the Sun.

Returns:
distance in Astronomical Units (A.U.)

getSunAngleFromPhi

public double getSunAngleFromPhi(double phi)
Gets the Sun's angle from a given phi (latitude).

Parameters:
phi - location in radians (0 - PI).
Returns:
angle in radians (0 - PI).

getSunDirection

public Coordinates getSunDirection()
The point on the surface of Mars perpendicular to the Sun as Mars rotates.

Returns:
the surface point on Mars perpendicular to the sun