From: curt Date: Thu, 6 Jul 2000 20:10:41 +0000 (+0000) Subject: fg_time.* becomes sg_time.*, FGTime becomes SGTime ... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8159b749f49be587e794a8438db7a4373d527b1d;p=simgear.git fg_time.* becomes sg_time.*, FGTime becomes SGTime ... --- diff --git a/simgear/ephemeris/celestialBody.cxx b/simgear/ephemeris/celestialBody.cxx index d8ea4b36..4762f20e 100644 --- a/simgear/ephemeris/celestialBody.cxx +++ b/simgear/ephemeris/celestialBody.cxx @@ -34,7 +34,7 @@ /************************************************************************** - * void CelestialBody::updatePosition(fgTIME *t, Star *ourSun) + * void CelestialBody::updatePosition(SGTime *t, Star *ourSun) * * Basically, this member function provides a general interface for * calculating the right ascension and declinaion. This function is @@ -45,14 +45,14 @@ * position is calculated an a slightly different manner. * * arguments: - * fgTIME t: provides the current time. + * SGTime t: provides the current time. * Star *ourSun: the sun's position is needed to convert heliocentric * coordinates into geocentric coordinates. * * return value: none * *************************************************************************/ -void CelestialBody::updatePosition(FGTime *t, Star *ourSun) +void CelestialBody::updatePosition(SGTime *t, Star *ourSun) { double eccAnom, v, ecl, actTime, xv, yv, xh, yh, zh, xg, yg, zg, xe, ye, ze; diff --git a/simgear/ephemeris/celestialBody.hxx b/simgear/ephemeris/celestialBody.hxx index c9cda8b9..96f67787 100644 --- a/simgear/ephemeris/celestialBody.hxx +++ b/simgear/ephemeris/celestialBody.hxx @@ -32,7 +32,7 @@ #include -#include +#include class Star; @@ -61,8 +61,8 @@ protected: // make the data protected, in order to give the double lonEcl, latEcl; double fgCalcEccAnom(double M, double e); - double fgCalcActTime(FGTime *t); - void updateOrbElements(FGTime *t); + double fgCalcActTime(SGTime *t); + void updateOrbElements(SGTime *t); public: CelestialBody(double Nf, double Ns, @@ -70,7 +70,7 @@ public: double wf, double ws, double af, double as, double ef, double es, - double Mf, double Ms, FGTime *t); + double Mf, double Ms, SGTime *t); CelestialBody(double Nf, double Ns, double If, double Is, double wf, double ws, @@ -84,7 +84,7 @@ public: double getMagnitude(); double getLon(); double getLat(); - void updatePosition(FGTime *t, Star *ourSun); + void updatePosition(SGTime *t, Star *ourSun); }; /***************************************************************************** @@ -112,7 +112,7 @@ inline CelestialBody::CelestialBody(double Nf, double Ns, double wf, double ws, double af, double as, double ef, double es, - double Mf, double Ms, FGTime *t) + double Mf, double Ms, SGTime *t) { NFirst = Nf; NSec = Ns; iFirst = If; iSec = Is; @@ -139,15 +139,15 @@ inline CelestialBody::CelestialBody(double Nf, double Ns, }; /**************************************************************************** - * inline void CelestialBody::updateOrbElements(FGTime *t) + * inline void CelestialBody::updateOrbElements(SGTime *t) * given the current time, this private member calculates the actual * orbital elements * - * Arguments: FGTime *t: the current time: + * Arguments: SGTime *t: the current time: * * return value: none ***************************************************************************/ -inline void CelestialBody::updateOrbElements(FGTime *t) +inline void CelestialBody::updateOrbElements(SGTime *t) { double actTime = fgCalcActTime(t); M = DEG_TO_RAD * (MFirst + (MSec * actTime)); @@ -158,7 +158,7 @@ inline void CelestialBody::updateOrbElements(FGTime *t) a = aFirst + (aSec * actTime); } /***************************************************************************** - * inline double CelestialBody::fgCalcActTime(FGTime *t) + * inline double CelestialBody::fgCalcActTime(SGTime *t) * this private member function returns the offset in days from the epoch for * wich the orbital elements are calculated (Jan, 1st, 2000). * @@ -166,7 +166,7 @@ inline void CelestialBody::updateOrbElements(FGTime *t) * * return value: the (fractional) number of days until Jan 1, 2000. ****************************************************************************/ -inline double CelestialBody::fgCalcActTime(FGTime *t) +inline double CelestialBody::fgCalcActTime(SGTime *t) { return (t->getMjd() - 36523.5); } diff --git a/simgear/ephemeris/ephemeris.cxx b/simgear/ephemeris/ephemeris.cxx index 957556f9..1a53918c 100644 --- a/simgear/ephemeris/ephemeris.cxx +++ b/simgear/ephemeris/ephemeris.cxx @@ -57,7 +57,7 @@ FGEphemeris::~FGEphemeris( void ) { // Update (recalculate) the positions of all objects for the specified // time -void FGEphemeris::update( FGTime *t, double lat ) { +void FGEphemeris::update( SGTime *t, double lat ) { // update object positions our_sun->updatePosition( t ); moon->updatePosition( t, lat, our_sun ); diff --git a/simgear/ephemeris/ephemeris.hxx b/simgear/ephemeris/ephemeris.hxx index 063dcf54..7340d5e1 100644 --- a/simgear/ephemeris/ephemeris.hxx +++ b/simgear/ephemeris/ephemeris.hxx @@ -32,7 +32,7 @@ #include -#include +#include #include "star.hxx" #include "moon.hxx" @@ -77,7 +77,7 @@ public: // Update (recalculate) the positions of all objects for the // specified time - void update(FGTime *t, double lat); + void update(SGTime *t, double lat); // sun inline Star *get_sun() const { return our_sun; } diff --git a/simgear/ephemeris/jupiter.cxx b/simgear/ephemeris/jupiter.cxx index fe490d84..820cdab1 100644 --- a/simgear/ephemeris/jupiter.cxx +++ b/simgear/ephemeris/jupiter.cxx @@ -31,13 +31,13 @@ #include "jupiter.hxx" /************************************************************************* - * Jupiter::Jupiter(FGTime *t) + * Jupiter::Jupiter(SGTime *t) * Public constructor for class Jupiter * Argument: The current time. * the hard coded orbital elements for Jupiter are passed to * CelestialBody::CelestialBody(); ************************************************************************/ -Jupiter::Jupiter(FGTime *t) : +Jupiter::Jupiter(SGTime *t) : CelestialBody(100.4542, 2.7685400E-5, 1.3030, -1.557E-7, 273.8777, 1.6450500E-5, @@ -58,13 +58,13 @@ Jupiter::Jupiter() : } /************************************************************************* - * void Jupiter::updatePosition(FGTime *t, Star *ourSun) + * void Jupiter::updatePosition(SGTime *t, Star *ourSun) * * calculates the current position of Jupiter, by calling the base class, * CelestialBody::updatePosition(); The current magnitude is calculated using * a Jupiter specific equation *************************************************************************/ -void Jupiter::updatePosition(FGTime *t, Star *ourSun) +void Jupiter::updatePosition(SGTime *t, Star *ourSun) { CelestialBody::updatePosition(t, ourSun); magnitude = -9.25 + 5*log10( r*R ) + 0.014 * FV; diff --git a/simgear/ephemeris/jupiter.hxx b/simgear/ephemeris/jupiter.hxx index ddf74ddd..b250fa7b 100644 --- a/simgear/ephemeris/jupiter.hxx +++ b/simgear/ephemeris/jupiter.hxx @@ -24,7 +24,7 @@ #ifndef _JUPITER_HXX_ #define _JUPITER_HXX_ -#include +#include #include "celestialBody.hxx" #include "star.hxx" @@ -32,9 +32,9 @@ class Jupiter : public CelestialBody { public: - Jupiter (FGTime *t); + Jupiter (SGTime *t); Jupiter (); - void updatePosition(FGTime *t, Star *ourSun); + void updatePosition(SGTime *t, Star *ourSun); }; #endif // _JUPITER_HXX_ diff --git a/simgear/ephemeris/mars.cxx b/simgear/ephemeris/mars.cxx index 14bc9222..3cb53bce 100644 --- a/simgear/ephemeris/mars.cxx +++ b/simgear/ephemeris/mars.cxx @@ -30,13 +30,13 @@ #include "mars.hxx" /************************************************************************* - * Mars::Mars(FGTime *t) + * Mars::Mars(SGTime *t) * Public constructor for class Mars * Argument: The current time. * the hard coded orbital elements for Mars are passed to * CelestialBody::CelestialBody(); ************************************************************************/ -Mars::Mars(FGTime *t) : +Mars::Mars(SGTime *t) : CelestialBody(49.55740, 2.1108100E-5, 1.8497, -1.78E-8, 286.5016, 2.9296100E-5, @@ -55,13 +55,13 @@ Mars::Mars() : { } /************************************************************************* - * void Mars::updatePosition(FGTime *t, Star *ourSun) + * void Mars::updatePosition(SGTime *t, Star *ourSun) * * calculates the current position of Mars, by calling the base class, * CelestialBody::updatePosition(); The current magnitude is calculated using * a Mars specific equation *************************************************************************/ -void Mars::updatePosition(FGTime *t, Star *ourSun) +void Mars::updatePosition(SGTime *t, Star *ourSun) { CelestialBody::updatePosition(t, ourSun); magnitude = -1.51 + 5*log10( r*R ) + 0.016 * FV; diff --git a/simgear/ephemeris/mars.hxx b/simgear/ephemeris/mars.hxx index d773e06e..1b896af4 100644 --- a/simgear/ephemeris/mars.hxx +++ b/simgear/ephemeris/mars.hxx @@ -24,7 +24,7 @@ #ifndef _MARS_HXX_ #define _MARS_HXX_ -#include +#include #include "celestialBody.hxx" #include "star.hxx" @@ -32,9 +32,9 @@ class Mars : public CelestialBody { public: - Mars ( FGTime *t); + Mars ( SGTime *t); Mars (); - void updatePosition(FGTime *t, Star *ourSun); + void updatePosition(SGTime *t, Star *ourSun); }; #endif // _MARS_HXX_ diff --git a/simgear/ephemeris/mercury.cxx b/simgear/ephemeris/mercury.cxx index b55eb3a5..7aba2f4f 100644 --- a/simgear/ephemeris/mercury.cxx +++ b/simgear/ephemeris/mercury.cxx @@ -30,13 +30,13 @@ #include "mercury.hxx" /************************************************************************* - * Mercury::Mercury(FGTime *t) + * Mercury::Mercury(SGTime *t) * Public constructor for class Mercury * Argument: The current time. * the hard coded orbital elements for Mercury are passed to * CelestialBody::CelestialBody(); ************************************************************************/ -Mercury::Mercury(FGTime *t) : +Mercury::Mercury(SGTime *t) : CelestialBody (48.33130, 3.2458700E-5, 7.0047, 5.00E-8, 29.12410, 1.0144400E-5, @@ -55,13 +55,13 @@ Mercury::Mercury() : { } /************************************************************************* - * void Mercury::updatePosition(FGTime *t, Star *ourSun) + * void Mercury::updatePosition(SGTime *t, Star *ourSun) * * calculates the current position of Mercury, by calling the base class, * CelestialBody::updatePosition(); The current magnitude is calculated using * a Mercury specific equation *************************************************************************/ -void Mercury::updatePosition(FGTime *t, Star *ourSun) +void Mercury::updatePosition(SGTime *t, Star *ourSun) { CelestialBody::updatePosition(t, ourSun); magnitude = -0.36 + 5*log10( r*R ) + 0.027 * FV + 2.2E-13 * pow(FV, 6); diff --git a/simgear/ephemeris/mercury.hxx b/simgear/ephemeris/mercury.hxx index 8f92f080..39b37d27 100644 --- a/simgear/ephemeris/mercury.hxx +++ b/simgear/ephemeris/mercury.hxx @@ -24,7 +24,7 @@ #ifndef _MERCURY_HXX_ #define _MERCURY_HXX_ -#include +#include #include "celestialBody.hxx" #include "star.hxx" @@ -32,9 +32,9 @@ class Mercury : public CelestialBody { public: - Mercury ( FGTime *t); + Mercury ( SGTime *t); Mercury (); - void updatePosition(FGTime *t, Star* ourSun); + void updatePosition(SGTime *t, Star* ourSun); }; #endif // _MERURY_HXX_ diff --git a/simgear/ephemeris/moon.cxx b/simgear/ephemeris/moon.cxx index 79267dc3..e28b8f7a 100644 --- a/simgear/ephemeris/moon.cxx +++ b/simgear/ephemeris/moon.cxx @@ -39,14 +39,14 @@ /************************************************************************* - * Moon::Moon(FGTime *t) + * Moon::Moon(SGTime *t) * Public constructor for class Moon. Initializes the orbital elements and * sets up the moon texture. * Argument: The current time. * the hard coded orbital elements for Moon are passed to * CelestialBody::CelestialBody(); ************************************************************************/ -Moon::Moon(FGTime *t) : +Moon::Moon(SGTime *t) : CelestialBody(125.1228, -0.0529538083, 5.1454, 0.00000, 318.0634, 0.1643573223, @@ -73,12 +73,12 @@ Moon::~Moon() /***************************************************************************** - * void Moon::updatePosition(FGTime *t, Star *ourSun) + * void Moon::updatePosition(SGTime *t, Star *ourSun) * this member function calculates the actual topocentric position (i.e.) * the position of the moon as seen from the current position on the surface * of the moon. ****************************************************************************/ -void Moon::updatePosition(FGTime *t, double lat, Star *ourSun) +void Moon::updatePosition(SGTime *t, double lat, Star *ourSun) { double eccAnom, ecl, actTime, diff --git a/simgear/ephemeris/moon.hxx b/simgear/ephemeris/moon.hxx index 4f3ca4f8..4756e70a 100644 --- a/simgear/ephemeris/moon.hxx +++ b/simgear/ephemeris/moon.hxx @@ -26,7 +26,7 @@ #include -#include +#include #include "celestialBody.hxx" #include "star.hxx" @@ -49,10 +49,10 @@ private: public: - Moon( FGTime *t); + Moon( SGTime *t); Moon(); ~Moon(); - void updatePosition(FGTime *t, double lat, Star *ourSun); + void updatePosition(SGTime *t, double lat, Star *ourSun); // void newImage(); }; diff --git a/simgear/ephemeris/neptune.cxx b/simgear/ephemeris/neptune.cxx index 241bf651..302c5df9 100644 --- a/simgear/ephemeris/neptune.cxx +++ b/simgear/ephemeris/neptune.cxx @@ -30,13 +30,13 @@ #include "neptune.hxx" /************************************************************************* - * Neptune::Neptune(FGTime *t) + * Neptune::Neptune(SGTime *t) * Public constructor for class Neptune * Argument: The current time. * the hard coded orbital elements for Neptune are passed to * CelestialBody::CelestialBody(); ************************************************************************/ -Neptune::Neptune(FGTime *t) : +Neptune::Neptune(SGTime *t) : CelestialBody(131.7806, 3.0173000E-5, 1.7700, -2.550E-7, 272.8461, -6.027000E-6, @@ -55,13 +55,13 @@ Neptune::Neptune() : { } /************************************************************************* - * void Neptune::updatePosition(FGTime *t, Star *ourSun) + * void Neptune::updatePosition(SGTime *t, Star *ourSun) * * calculates the current position of Neptune, by calling the base class, * CelestialBody::updatePosition(); The current magnitude is calculated using * a Neptune specific equation *************************************************************************/ -void Neptune::updatePosition(FGTime *t, Star *ourSun) +void Neptune::updatePosition(SGTime *t, Star *ourSun) { CelestialBody::updatePosition(t, ourSun); magnitude = -6.90 + 5*log10 (r*R) + 0.001 *FV; diff --git a/simgear/ephemeris/neptune.hxx b/simgear/ephemeris/neptune.hxx index 17e6f7d1..3fe30b0e 100644 --- a/simgear/ephemeris/neptune.hxx +++ b/simgear/ephemeris/neptune.hxx @@ -24,7 +24,7 @@ #ifndef _NEPTUNE_HXX_ #define _NEPTUNE_HXX_ -#include +#include #include "celestialBody.hxx" #include "star.hxx" @@ -32,9 +32,9 @@ class Neptune : public CelestialBody { public: - Neptune ( FGTime *t); + Neptune ( SGTime *t); Neptune (); - void updatePosition(FGTime *t, Star *ourSun); + void updatePosition(SGTime *t, Star *ourSun); }; #endif // _NEPTUNE_HXX_ diff --git a/simgear/ephemeris/saturn.cxx b/simgear/ephemeris/saturn.cxx index eb61496f..254629ec 100644 --- a/simgear/ephemeris/saturn.cxx +++ b/simgear/ephemeris/saturn.cxx @@ -30,13 +30,13 @@ #include "saturn.hxx" /************************************************************************* - * Saturn::Saturn(FGTime *t) + * Saturn::Saturn(SGTime *t) * Public constructor for class Saturn * Argument: The current time. * the hard coded orbital elements for Saturn are passed to * CelestialBody::CelestialBody(); ************************************************************************/ -Saturn::Saturn(FGTime *t) : +Saturn::Saturn(SGTime *t) : CelestialBody(113.6634, 2.3898000E-5, 2.4886, -1.081E-7, 339.3939, 2.9766100E-5, @@ -56,13 +56,13 @@ Saturn::Saturn() : } /************************************************************************* - * void Saturn::updatePosition(FGTime *t, Star *ourSun) + * void Saturn::updatePosition(SGTime *t, Star *ourSun) * * calculates the current position of Saturn, by calling the base class, * CelestialBody::updatePosition(); The current magnitude is calculated using * a Saturn specific equation *************************************************************************/ -void Saturn::updatePosition(FGTime *t, Star *ourSun) +void Saturn::updatePosition(SGTime *t, Star *ourSun) { CelestialBody::updatePosition(t, ourSun); diff --git a/simgear/ephemeris/saturn.hxx b/simgear/ephemeris/saturn.hxx index ab42adff..58c16860 100644 --- a/simgear/ephemeris/saturn.hxx +++ b/simgear/ephemeris/saturn.hxx @@ -24,7 +24,7 @@ #ifndef _SATURN_HXX_ #define _SATURN_HXX_ -#include +#include #include "celestialBody.hxx" #include "star.hxx" @@ -32,9 +32,9 @@ class Saturn : public CelestialBody { public: - Saturn ( FGTime *t); + Saturn ( SGTime *t); Saturn (); - void updatePosition(FGTime *t, Star *ourSun); + void updatePosition(SGTime *t, Star *ourSun); }; #endif // _SATURN_HXX_ diff --git a/simgear/ephemeris/star.cxx b/simgear/ephemeris/star.cxx index 3aff95db..6eba5589 100644 --- a/simgear/ephemeris/star.cxx +++ b/simgear/ephemeris/star.cxx @@ -34,7 +34,7 @@ /************************************************************************* - * Star::Star(FGTime *t) + * Star::Star(SGTime *t) * Public constructor for class Star * Argument: The current time. * the hard coded orbital elements our sun are passed to @@ -42,7 +42,7 @@ * note that the word sun is avoided, in order to prevent some compilation * problems on sun systems ************************************************************************/ -Star::Star(FGTime *t) : +Star::Star(SGTime *t) : CelestialBody (0.000000, 0.0000000000, 0.0000, 0.00000, 282.9404, 4.7093500E-5, @@ -70,11 +70,11 @@ Star::~Star() /************************************************************************* - * void Star::updatePosition(FGTime *t, Star *ourSun) + * void Star::updatePosition(SGTime *t, Star *ourSun) * * calculates the current position of our sun. *************************************************************************/ -void Star::updatePosition(FGTime *t) +void Star::updatePosition(SGTime *t) { double actTime, eccAnom, diff --git a/simgear/ephemeris/star.hxx b/simgear/ephemeris/star.hxx index 5c4ffa69..5440f724 100644 --- a/simgear/ephemeris/star.hxx +++ b/simgear/ephemeris/star.hxx @@ -25,7 +25,6 @@ #define _STAR_HXX_ -// #include