SunV1:

Path: SC/Ephem

% Generate the sun vector in the earth-centered inertial frame. 
   Low precision formula. Will output the distance to the sun from the 
   earth if two output arguments are given.

--------------------------------------------------------------------------
   Form:
   [u, r] = SunV1( jD, rSc )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   jD        (1,:)   Julian date
   rSc       (3,:)   Spacecraft vector in the ECI frame (km)

   -------
   Outputs
   -------
   u         (3,:)   Unit sun vector (vector TO the sun)
   r         (1,:)   Distance from origin to sun (km)

--------------------------------------------------------------------------
   References: The 1993 Astronomical Almanac, U.S. Government
               Printing Office, p. C24.
               The 2015 Astronomical Almanac, p. C5
--------------------------------------------------------------------------

Children:

Common: Time/DTSToDTA
Common: Time/Date2JD
Math: Linear/Mag
Math: Linear/Unit
Math: Trigonometry/CosD
Math: Trigonometry/SinD

Back to the SC Module page