* September 1998. This code is based upon algorithms and data kindly
* provided by Mr. Paul Schlyter. (pausch@saaf.se).
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
*
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
+ * Library General Public License for more details.
*
- * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * 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.
*
* $Id$
**************************************************************************/
#include <simgear/constants.h>
-#include <simgear/timing/sg_time.hxx>
class Star;
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:
eFirst = ef; eSec = es;
MFirst = Mf; MSec = Ms;
updateOrbElements(mjd);
-};
+}
inline CelestialBody::CelestialBody(double Nf, double Ns,
double If, double Is,
aFirst = af; aSec = as;
eFirst = ef; eSec = es;
MFirst = Mf; MSec = Ms;
-};
+}
/****************************************************************************
* inline void CelestialBody::updateOrbElements(double mjd)
***************************************************************************/
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));
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).
*
*
* 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);
}