From 9a211af659e744ffb2f19983761916a9f1a024ea Mon Sep 17 00:00:00 2001 From: curt Date: Sat, 8 Jul 2000 21:30:23 +0000 Subject: [PATCH] Sg-ifying names. --- simgear/ephemeris/celestialBody.cxx | 8 ++++---- simgear/ephemeris/celestialBody.hxx | 10 +++++----- simgear/ephemeris/moon.cxx | 4 ++-- simgear/ephemeris/saturn.cxx | 2 +- simgear/ephemeris/star.cxx | 4 ++-- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/simgear/ephemeris/celestialBody.cxx b/simgear/ephemeris/celestialBody.cxx index d2b1b722..053dfe83 100644 --- a/simgear/ephemeris/celestialBody.cxx +++ b/simgear/ephemeris/celestialBody.cxx @@ -59,12 +59,12 @@ void CelestialBody::updatePosition(double mjd, Star *ourSun) xv, yv, xh, yh, zh, xg, yg, zg, xe, ye, ze; updateOrbElements(mjd); - actTime = fgCalcActTime(mjd); + actTime = sgCalcActTime(mjd); // calcualate the angle bewteen ecliptic and equatorial coordinate system ecl = DEG_TO_RAD * (23.4393 - 3.563E-7 *actTime); - eccAnom = fgCalcEccAnom(M, e); //calculate the eccentric anomaly + eccAnom = sgCalcEccAnom(M, e); //calculate the eccentric anomaly xv = a * (cos(eccAnom) - e); yv = a * (sqrt (1.0 - e*e) * sin(eccAnom)); v = atan2(yv, xv); // the planet's true anomaly @@ -111,7 +111,7 @@ void CelestialBody::updatePosition(double mjd, Star *ourSun) }; /**************************************************************************** - * double CelestialBody::fgCalcEccAnom(double M, double e) + * double CelestialBody::sgCalcEccAnom(double M, double e) * this private member calculates the eccentric anomaly of a celestial body, * given its mean anomaly and eccentricity. * @@ -136,7 +136,7 @@ void CelestialBody::updatePosition(double mjd, Star *ourSun) * the eccentric anomaly * ****************************************************************************/ -double CelestialBody::fgCalcEccAnom(double M, double e) +double CelestialBody::sgCalcEccAnom(double M, double e) { double eccAnom, E0, E1, diff; diff --git a/simgear/ephemeris/celestialBody.hxx b/simgear/ephemeris/celestialBody.hxx index a7a79d96..9311b78c 100644 --- a/simgear/ephemeris/celestialBody.hxx +++ b/simgear/ephemeris/celestialBody.hxx @@ -60,8 +60,8 @@ protected: // make the data protected, in order to give the double magnitude; double lonEcl, latEcl; - double fgCalcEccAnom(double M, double e); - double fgCalcActTime(double mjd); + double sgCalcEccAnom(double M, double e); + double sgCalcActTime(double mjd); void updateOrbElements(double mjd); public: @@ -149,7 +149,7 @@ inline CelestialBody::CelestialBody(double Nf, double Ns, ***************************************************************************/ inline void CelestialBody::updateOrbElements(double mjd) { - double actTime = fgCalcActTime(mjd); + double actTime = sgCalcActTime(mjd); M = DEG_TO_RAD * (MFirst + (MSec * actTime)); w = DEG_TO_RAD * (wFirst + (wSec * actTime)); N = DEG_TO_RAD * (NFirst + (NSec * actTime)); @@ -158,7 +158,7 @@ inline void CelestialBody::updateOrbElements(double mjd) a = aFirst + (aSec * actTime); } /***************************************************************************** - * inline double CelestialBody::fgCalcActTime(double mjd) + * inline double CelestialBody::sgCalcActTime(double mjd) * 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(double mjd) * * return value: the (fractional) number of days until Jan 1, 2000. ****************************************************************************/ -inline double CelestialBody::fgCalcActTime(double mjd) +inline double CelestialBody::sgCalcActTime(double mjd) { return (mjd - 36523.5); } diff --git a/simgear/ephemeris/moon.cxx b/simgear/ephemeris/moon.cxx index 7eda2775..1226e165 100644 --- a/simgear/ephemeris/moon.cxx +++ b/simgear/ephemeris/moon.cxx @@ -88,12 +88,12 @@ void Moon::updatePosition(double mjd, double lst, double lat, Star *ourSun) geoRa, geoDec; updateOrbElements(mjd); - actTime = fgCalcActTime(mjd); + actTime = sgCalcActTime(mjd); // calculate the angle between ecliptic and equatorial coordinate system // in Radians ecl = ((DEG_TO_RAD * 23.4393) - (DEG_TO_RAD * 3.563E-7) * actTime); - eccAnom = fgCalcEccAnom(M, e); // Calculate the eccentric anomaly + eccAnom = sgCalcEccAnom(M, e); // Calculate the eccentric anomaly xv = a * (cos(eccAnom) - e); yv = a * (sqrt(1.0 - e*e) * sin(eccAnom)); v = atan2(yv, xv); // the moon's true anomaly diff --git a/simgear/ephemeris/saturn.cxx b/simgear/ephemeris/saturn.cxx index 0f94f640..fcb12a1f 100644 --- a/simgear/ephemeris/saturn.cxx +++ b/simgear/ephemeris/saturn.cxx @@ -67,7 +67,7 @@ void Saturn::updatePosition(double mjd, Star *ourSun) { CelestialBody::updatePosition(mjd, ourSun); - double actTime = fgCalcActTime(mjd); + double actTime = sgCalcActTime(mjd); double ir = 0.4897394; double Nr = 2.9585076 + 6.6672E-7*actTime; double B = asin (sin(declination) * cos(ir) - diff --git a/simgear/ephemeris/star.cxx b/simgear/ephemeris/star.cxx index 01f20b72..6e07868a 100644 --- a/simgear/ephemeris/star.cxx +++ b/simgear/ephemeris/star.cxx @@ -84,9 +84,9 @@ void Star::updatePosition(double mjd) updateOrbElements(mjd); - actTime = fgCalcActTime(mjd); + actTime = sgCalcActTime(mjd); ecl = DEG_TO_RAD * (23.4393 - 3.563E-7 * actTime); // Angle in Radians - eccAnom = fgCalcEccAnom(M, e); // Calculate the eccentric Anomaly (also known as solving Kepler's equation) + eccAnom = sgCalcEccAnom(M, e); // Calculate the eccentric Anomaly (also known as solving Kepler's equation) xv = cos(eccAnom) - e; yv = sqrt (1.0 - e*e) * sin(eccAnom); -- 2.39.5