• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

ksmoon.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           ksmoon.h  -  K Desktop Planetarium
00003                              -------------------
00004     begin                : Sun Aug 26 2001
00005     copyright            : (C) 2001 by Jason Harris
00006     email                : kstars@30doradus.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
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

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal