#endif
+#include <simgear/constants.h>
+
#include <Time/fg_time.hxx>
-#include <Include/fg_constants.h>
class Star;
class CelestialBody
{
-protected: // make the data protected, in order to give the inherited
- // classes direct access to the data
+protected: // make the data protected, in order to give the
+ // inherited classes direct access to the data
double NFirst; /* longitude of the ascending node first part */
double NSec; /* longitude of the ascending node second part */
double iFirst; /* inclination to the ecliptic first part */
double af, double as,
double ef, double es,
double Mf, double Ms, FGTime *t);
+ CelestialBody(double Nf, double Ns,
+ double If, double Is,
+ double wf, double ws,
+ double af, double as,
+ double ef, double es,
+ double Mf, double Ms);
void getPos(double *ra, double *dec);
void getPos(double *ra, double *dec, double *magnitude);
+ double getRightAscension();
+ double getDeclination();
+ double getMagnitude();
double getLon();
double getLat();
void updatePosition(FGTime *t, Star *ourSun);
updateOrbElements(t);
};
+inline CelestialBody::CelestialBody(double Nf, double Ns,
+ double If, double Is,
+ double wf, double ws,
+ double af, double as,
+ double ef, double es,
+ double Mf, double Ms)
+{
+ NFirst = Nf; NSec = Ns;
+ iFirst = If; iSec = Is;
+ wFirst = wf; wSec = ws;
+ aFirst = af; aSec = as;
+ eFirst = ef; eSec = es;
+ MFirst = Mf; MSec = Ms;
+};
+
/****************************************************************************
* inline void CelestialBody::updateOrbElements(FGTime *t)
* given the current time, this private member calculates the actual
*magn = magnitude;
}
+inline double CelestialBody::getRightAscension() { return rightAscension; }
+inline double CelestialBody::getDeclination() { return declination; }
+inline double CelestialBody::getMagnitude() { return magnitude; }
+
inline double CelestialBody::getLon()
{
return lonEcl;