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

kstars

KSMoon Class Reference

A subclass of SkyObject that provides information needed for the Moon. More...

#include <ksmoon.h>

Inheritance diagram for KSMoon:

Inheritance graph
[legend]

List of all members.


Public Member Functions

void findPhase (const KSSun *Sun)
double illum (void) const
 KSMoon (KStarsData *kd)
virtual bool loadData ()
dms phase (void) const
QString phaseName (void) const
 ~KSMoon ()

Protected Member Functions

virtual bool findGeocentricPosition (const KSNumbers *num, const KSPlanetBase *)

Detailed Description

A subclass of SkyObject that provides information needed for the Moon.

Specifically, KSMoon provides a moon-specific findPosition() function. Also, there is a method findPhase(), which returns the lunar phase as a floating-point number between 0.0 and 1.0. Provides necessary information about the Moon.

Author:
Jason Harris
Version:
1.0

Definition at line 37 of file ksmoon.h.


Constructor & Destructor Documentation

KSMoon::KSMoon ( KStarsData *  kd  ) 

Default constructor.

Set name="Moon".

Definition at line 29 of file ksmoon.cpp.

KSMoon::~KSMoon (  ) 

Destructor (empty).

Definition at line 35 of file ksmoon.cpp.


Member Function Documentation

bool KSMoon::findGeocentricPosition ( const KSNumbers *  num,
const KSPlanetBase *   
) [protected, virtual]

Reimplemented from KSPlanetBase, this function employs unique algorithms for estimating the lunar coordinates.

Finding the position of the moon is much more difficult than the other planets. For one thing, the Moon is a lot closer, so we can detect smaller deviations in its orbit. Also, the Earth has a significant effect on the Moon's orbit, and their interaction is complex and nonlinear. As a result, the positions as calculated by findPosition() are only accurate to about 10 arcseconds (10 times less precise than the planets' positions!) moon-specific coordinate finder

Parameters:
num KSNumbers pointer for the target date/time
Note:
we don't use the Earth pointer here

Implements KSPlanetBase.

Definition at line 78 of file ksmoon.cpp.

void KSMoon::findPhase ( const KSSun *  Sun  ) 

Determine the phase angle of the moon, and assign the appropriate moon image.

Parameters:
Sun The current Sun object.

Definition at line 180 of file ksmoon.cpp.

double KSMoon::illum ( void   )  const [inline]

Returns:
the illuminated fraction of the Moon as seen from Earth

Definition at line 60 of file ksmoon.h.

bool KSMoon::loadData (  )  [virtual]

reimplemented from KSPlanetBase

Implements KSPlanetBase.

Definition at line 42 of file ksmoon.cpp.

dms KSMoon::phase ( void   )  const [inline]

Returns:
the moon's current phase angle, as a dms angle

Definition at line 56 of file ksmoon.h.

QString KSMoon::phaseName ( void   )  const

Returns:
a short string describing the moon's phase

Definition at line 198 of file ksmoon.cpp.


The documentation for this class was generated from the following files:
  • ksmoon.h
  • ksmoon.cpp

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