kstars
ksmoon.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KSMOON_H
00019 #define KSMOON_H
00020
00021 #include "ksplanetbase.h"
00022 #include "dms.h"
00023
00034 class KStarsData;
00035 class KSSun;
00036
00037 class KSMoon : public KSPlanetBase {
00038 public:
00042 KSMoon(KStarsData *kd);
00043
00045 ~KSMoon();
00046
00052 void findPhase( const KSSun *Sun );
00053
00056 dms phase( void ) const { return Phase; }
00057
00060 double illum( void ) const { return 0.5*(1.0 - cos( phase().radians() ) ); }
00061
00064 QString phaseName( void ) const;
00065
00068 virtual bool loadData();
00069
00070 protected:
00083 virtual bool findGeocentricPosition( const KSNumbers *num, const KSPlanetBase* );
00084
00085 private:
00086 dms Phase;
00087 static bool data_loaded;
00088
00096 class MoonLRData {
00097 public:
00098 int nd;
00099 int nm;
00100 int nm1;
00101 int nf;
00102 double Li;
00103 double Ri;
00104
00105 MoonLRData( int pnd, int pnm, int pnm1, int pnf, double pLi, double pRi ):
00106 nd(pnd), nm(pnm), nm1(pnm1), nf(pnf), Li(pLi), Ri(pRi) {}
00107 };
00108
00109 static QPtrList<MoonLRData> LRData;
00110
00118 class MoonBData {
00119 public:
00120 int nd;
00121 int nm;
00122 int nm1;
00123 int nf;
00124 double Bi;
00125
00126 MoonBData( int pnd, int pnm, int pnm1, int pnf, double pBi ):
00127 nd(pnd), nm(pnm), nm1(pnm1), nf(pnf), Bi(pBi) {}
00128 };
00129
00130 static QPtrList<MoonBData> BData;
00131 };
00132
00133 #endif