]> git.mxchange.org Git - simgear.git/blobdiff - simgear/ephemeris/celestialBody.hxx
Added gdbm to SimGear. Many systems will already have gdbm installed so
[simgear.git] / simgear / ephemeris / celestialBody.hxx
index 3deccc09f15d7892cd243482fb9b631af1c75c4d..59611ef44839d6e6db720a8b0b78f86e3a1f029f 100644 (file)
 #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 */
@@ -71,8 +72,17 @@ public:
                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);
@@ -114,6 +124,21 @@ inline CelestialBody::CelestialBody(double Nf, double Ns,
   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 
@@ -170,6 +195,10 @@ inline void CelestialBody::getPos(double* ra, double* dec, double* magn)
   *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;