head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.36; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.50; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.53.58; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.21.54; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# SGEphemeris Class Reference

Ephemeris class. More...

`#include <ephemeris.hxx>`

List of all members.

## Public Methods
| SGEphemeris (const string &path)
| Constructor.
| ~SGEphemeris (void)
| Destructor.
void | update (double mjd, double lst, double lat)
| Update (recalculate) the positions of all objects for the specified time.
Star * | get_sun () const
double | getSunRightAscension () const
double | getSunDeclination () const
MoonPos * | get_moon () const
double | getMoonRightAscension () const
double | getMoonDeclination () const
int | getNumPlanets () const
sgdVec3 * | getPlanets ()
| Returns a pointer to an array of planet data in sgdVec3 format.
int | getNumStars () const
sgdVec3 * | getStars ()
| Returns a pointer to an array of star data in sgdVec3 format.

## Detailed Description

Ephemeris class.

Written by Durk Talsma <d.talsma@@direct.a2000.nl> and Curtis Olson <curt@@flightgear.org>

Introduction

The SGEphemeris class computes and stores the positions of the Sun, the Moon, the planets, and the brightest stars. These positions can then be used to accurately render the dominant visible items in the Earth's sky. Note, this class isn't intended for use in an interplanetary/interstellar/intergalactic type application. It is calculates everything relative to the Earth and is therefore best suited for Earth centric applications.

The positions of the various astronomical objects are time dependent, so to maintain accuracy, you will need to periodically call the update() method. The SGTime class conveniently provides the two time related values you need to pass to the update() method.

Definition at line 70 of file ephemeris.hxx.

## Constructor & Destructor Documentation

SGEphemeris::SGEphemeris | ( | const string & | path | ) |

  | Constructor. This creates an instance of the SGEphemeris object. When calling the constructor you need to provide a path pointing to your star database file. Parameters:
  path | path to your star database
Definition at line 30 of file ephemeris.cxx.

## Member Function Documentation

MoonPos* SGEphemeris::get_moon | ( |  | ) | const`[inline]`

| Returns: a pointer to a Moon class containing all the positional information for Earth's Moon. Definition at line 136 of file ephemeris.hxx.

Star* SGEphemeris::get_sun | ( |  | ) | const`[inline]`

| Returns: a pointer to a Star class containing all the positional information for Earth's Sun. Definition at line 120 of file ephemeris.hxx.

double SGEphemeris::getMoonDeclination | ( |  | ) | const`[inline]`

| Returns: the declination of the Moon. Definition at line 144 of file ephemeris.hxx.

double SGEphemeris::getMoonRightAscension | ( |  | ) | const`[inline]`

| Returns: the right ascension of the Moon. Definition at line 139 of file ephemeris.hxx.

int SGEphemeris::getNumPlanets | ( |  | ) | const`[inline]`

| Returns: the numbers of defined planets. Definition at line 149 of file ephemeris.hxx.

int SGEphemeris::getNumStars | ( |  | ) | const`[inline]`

| Returns: the numbers of defined stars. Definition at line 162 of file ephemeris.hxx.

sgdVec3* SGEphemeris::getPlanets | ( |  | ) | `[inline]`

| Returns a pointer to an array of planet data in sgdVec3 format. (See plib.sourceforge.net for information on plib and the ``sg'' package.) An sgdVec3 is a 3 element double array. The first element is the right ascension of the planet, the second is the declination, and the third is the magnitude. Returns: planets array Definition at line 159 of file ephemeris.hxx.

sgdVec3* SGEphemeris::getStars | ( |  | ) | `[inline]`

| Returns a pointer to an array of star data in sgdVec3 format. An The first element of the sgdVec3 is the right ascension of the planet, the second is the declination, and the third is the magnitude. Returns: star array Definition at line 171 of file ephemeris.hxx.

double SGEphemeris::getSunDeclination | ( |  | ) | const`[inline]`

| Returns: the declination of the Sun. Definition at line 128 of file ephemeris.hxx.

double SGEphemeris::getSunRightAscension | ( |  | ) | const`[inline]`

| Returns: the right ascension of the Sun. Definition at line 123 of file ephemeris.hxx.

void SGEphemeris::update | ( | double | mjd,
|  | double | lst,
|  | double | lat
| ) |

  | Update (recalculate) the positions of all objects for the specified time. The update() method requires you to pass in the current modified Julian date, the current local sidereal time, and the current latitude. The update() method is designed to be called by the host application before every frame. Parameters:
  mjd | modified julian date
  lst | current local sidereal time
  lat | current latitude
Definition at line 61 of file ephemeris.cxx.

The documentation for this class was generated from the following files:

- ephemeris.hxx
- ephemeris.cxx

@ 1.3 log @Oops, try again. @ text @d474 1 a474 1