X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fephemeris%2Fephemeris.hxx;h=398eb3ef2421c13a372611e3c1e17c64bb5eada7;hb=598b64fa9569c16878c904e344e2e2775e210c42;hp=6f487c3ea1dbf6d16a0992b0695c9a91f5a75db6;hpb=124629e1d923935d19129cccd0718eb9fbbea46e;p=simgear.git diff --git a/simgear/ephemeris/ephemeris.hxx b/simgear/ephemeris/ephemeris.hxx index 6f487c3e..398eb3ef 100644 --- a/simgear/ephemeris/ephemeris.hxx +++ b/simgear/ephemeris/ephemeris.hxx @@ -7,7 +7,7 @@ // All the core code underneath this is written by Durk Talsma. See // the headers of all the other individual files for details. // -// Copyright (C) 2000 Curtis L. Olson - curt@flightgear.org +// Copyright (C) 2000 Curtis L. Olson - http://www.flightgear.org/~curt // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Library General Public @@ -19,10 +19,9 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Library General Public License for more details. // -// You should have received a copy of the GNU Library General Public -// License along with this library; if not, write to the -// Free Software Foundation, Inc., 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // // $Id$ @@ -30,12 +29,7 @@ #ifndef _EPHEMERIS_HXX #define _EPHEMERIS_HXX - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include +#include #include #include @@ -48,8 +42,14 @@ #include #include +#include +#include + /** Ephemeris class + * + * Written by Durk Talsma and Curtis Olson + * * * Introduction * @@ -85,7 +85,7 @@ class SGEphemeris { // planets[i][1] = Declination // planets[i][2] = Magnitude int nplanets; - sgdVec3 planets[7]; + SGVec3d planets[7]; SGStarData *stars; @@ -97,7 +97,7 @@ public: * calling the constructor you need to provide a path pointing to * your star database file. * @param path path to your star database */ - SGEphemeris( const string &path ); + SGEphemeris( const std::string &path ); /** Destructor */ ~SGEphemeris( void ); @@ -115,38 +115,38 @@ public: void update(double mjd, double lst, double lat); /** - * Returns a pointer to a Star class containing all the positional + * @return a pointer to a Star class containing all the positional * information for Earth's Sun. */ inline Star *get_sun() const { return our_sun; } - /** Returns the right ascension of the Sun. */ + /** @return the right ascension of the Sun. */ inline double getSunRightAscension() const { return our_sun->getRightAscension(); } - /** Returns the declination of the Sun. */ + /** @return the declination of the Sun. */ inline double getSunDeclination() const { return our_sun->getDeclination(); } /** - * Returns a pointer to a Moon class containing all the positional + * @return a pointer to a Moon class containing all the positional * information for Earth's Moon. */ inline MoonPos *get_moon() const { return moon; } - /** Returns the right ascension of the Moon. */ + /** @return the right ascension of the Moon. */ inline double getMoonRightAscension() const { return moon->getRightAscension(); } - /** Returns the declination of the Moon. */ + /** @return the declination of the Moon. */ inline double getMoonDeclination() const { return moon->getDeclination(); } - /** Returns the numbers of defined planets. */ + /** @return the numbers of defined planets. */ inline int getNumPlanets() const { return nplanets; } /** @@ -155,10 +155,12 @@ public: * 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. + * @return planets array */ - inline sgdVec3 *getPlanets() { return planets; } + inline SGVec3d *getPlanets() { return planets; } + inline const SGVec3d *getPlanets() const { return planets; } - /** Returns the numbers of defined stars. */ + /** @return the numbers of defined stars. */ inline int getNumStars() const { return stars->getNumStars(); } /** @@ -166,8 +168,10 @@ public: * 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 */ - inline sgdVec3 *getStars() { return stars->getStars(); } + inline SGVec3d *getStars() { return stars->getStars(); } + inline const SGVec3d *getStars() const { return stars->getStars(); } };