Sg-ifying names.

This commit is contained in:
curt
2000-07-08 21:30:23 +00:00
parent 82459a2802
commit 9a211af659
5 changed files with 14 additions and 14 deletions

View File

@@ -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;

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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) -

View File

@@ -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);