SolarPosition.cpp File Reference


Detailed Description

Compute solar and lunar positions with a simple algorithm.

Definition in file SolarPosition.cpp.

#include "DayTime.hpp"
#include "Position.hpp"
#include "icd_200_constants.hpp"
#include "geometry.hpp"
#include "SolarPosition.hpp"

Include dependency graph for SolarPosition.cpp:

Include dependency graph

Go to the source code of this file.

Namespaces

namespace  gpstk

Functions

Position SolarPosition (DayTime t, double &AR) throw ()
 Compute the Position of the Sun in WGS84 ECEF coordinates.
void CrudeSolarPosition (DayTime t, double &lat, double &lon) throw ()
 Compute the latitude and longitude of the Sun using a very simple algorithm.
double shadowFactor (double Rearth, double Rsun, double dES) throw ()
 Compute the fraction of the area of the Sun covered by the Earth as seen from another body (e.g.
Position LunarPosition (DayTime t, double &AR) throw ()
 Compute the Position of the Moon in WGS84 ECEF coordinates.


Function Documentation

void CrudeSolarPosition DayTime  t,
double &  lat,
double &  lon
throw ()
 

Compute the latitude and longitude of the Sun using a very simple algorithm.

Adapted from sunpos by D. Coco ARL:UT 12/15/94

Parameters:
DayTime t Input epoch of interest
double lat Output latitude of the Sun at t
double lon Output longitude of the Sun at t

Definition at line 123 of file SolarPosition.cpp.

References gpstk::atan(), gpstk::sin(), gpstk::sqrt(), and TWO_PI.

Position LunarPosition DayTime  t,
double &  AR
throw ()
 

Compute the Position of the Moon in WGS84 ECEF coordinates.

Ref. Astronomical Almanac 1990 D46

Parameters:
DayTime t Input epoch of interest
double AR Output apparent angular radius of moon as seen at Earth (deg)
Returns:
Position Position (ECEF) of the Moon at t

Definition at line 199 of file SolarPosition.cpp.

References gpstk::cos(), Position::setECEF(), and gpstk::sin().

double shadowFactor double  Rearth,
double  Rsun,
double  dES
throw ()
 

Compute the fraction of the area of the Sun covered by the Earth as seen from another body (e.g.

satellite).

Parameters:
double Rearth Apparent angular radius of Earth.
double Rsun Apparent angular radius of Sun.
double dES Angular separation of Sun and Earth.
Returns:
double factor Fraction (0 <= factor <= 1) of Sun area covered by Earth

Definition at line 180 of file SolarPosition.cpp.

References gpstk::beta().

Position SolarPosition DayTime  t,
double &  AR
throw ()
 

Compute the Position of the Sun in WGS84 ECEF coordinates.

Ref. Astronomical Almanac pg C24, as presented on USNO web site; claimed accuracy is about 1 arcminute, when t is within 2 centuries of 2000.

Parameters:
DayTime t Input epoch of interest
double AR Output apparent angular radius of sun as seen at Earth (deg)
Returns:
Position Position (ECEF) of the Sun at t

Definition at line 67 of file SolarPosition.cpp.

References gpstk::asin(), gpstk::cos(), Position::setECEF(), and gpstk::sin().

Referenced by gpstk::doSatAtt().


Generated on Wed Feb 8 03:31:19 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1