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

kstars

JupiterMoons Class Reference

Implements the four largest moons of Jupiter. More...

#include <jupitermoons.h>

List of all members.


Public Member Functions

void EquatorialToHorizontal (const dms *LSTh, const dms *lat)
void findPosition (const KSNumbers *num, const KSPlanet *jup, const KSSun *ksun)
bool inFront (int id) const
 JupiterMoons ()
int moonNamed (const QString &name) const
QString name (int id) const
SkyPoint * pos (int id)
double x (int i) const
double y (int i) const
double z (int i) const
 ~JupiterMoons ()

Detailed Description

Implements the four largest moons of Jupiter.

See Chapter 43 of "Astronomical Algorithms"by Jean Meeus for details

TODO: make the moons SkyObjects, rather than just points.

Author:
Jason Harris
Version:
1.0

Definition at line 36 of file jupitermoons.h.


Constructor & Destructor Documentation

JupiterMoons::JupiterMoons (  ) 

Constructor.

Assign the name of each moon, and initialize their XYZ positions to zero.

Definition at line 25 of file jupitermoons.cpp.

JupiterMoons::~JupiterMoons (  ) 

Destructor (empty).

Definition at line 38 of file jupitermoons.cpp.


Member Function Documentation

void JupiterMoons::EquatorialToHorizontal ( const dms *  LSTh,
const dms *  lat 
)

Convert the RA,Dec coordinates of each moon to Az,Alt.

Parameters:
LSTh pointer to the current local sidereal time
lat pointer to the geographic latitude

Definition at line 48 of file jupitermoons.cpp.

void JupiterMoons::findPosition ( const KSNumbers *  num,
const KSPlanet *  jup,
const KSSun *  ksun 
)

Find the positions of each Moon, relative to Jupiter.

We use an XYZ coordinate system, centered on Jupiter, where the X-axis corresponds to Jupiter's Equator, the Y-Axis is parallel to Jupiter's Poles, and the Z-axis points along the line joining the Earth and Jupiter. Once the XYZ positions are known, this function also computes the RA,Dec positions of each Moon, and sets the inFront bool variable to indicate whether the Moon is nearer to us than Jupiter or not (this information is used to determine whether the Moon should be drawn on top of Jupiter, or vice versa).

See "Astronomical Algorithms" bu Jean Meeus, Chapter 43.

Parameters:
num pointer to the KSNumbers object describing the date/time at which to find the positions.
jup pointer to the jupiter object
ksun pointer to the Sun object

Definition at line 53 of file jupitermoons.cpp.

bool JupiterMoons::inFront ( int  id  )  const [inline]

Returns:
TRUE if the Moon is nearer to Earth than Jupiter.
Parameters:
id which moon? 0=Io, 1=Europa, 2=Ganymede, 3=Callisto

Definition at line 75 of file jupitermoons.h.

int JupiterMoons::moonNamed ( const QString &  name  )  const

Returns:
ID number of a moon, given its name: 0=Io, 1=Europa, 2=Ganymede, 3=Callisto. Return -1 if the name does not match one of these.

Definition at line 41 of file jupitermoons.cpp.

QString JupiterMoons::name ( int  id  )  const [inline]

Returns:
the name of a moon.
Parameters:
id which moon? 0=Io, 1=Europa, 2=Ganymede, 3=Callisto

Definition at line 80 of file jupitermoons.h.

SkyPoint* JupiterMoons::pos ( int  id  )  [inline]

Returns:
pointer to the stored RA,Dec position of a moon.
Parameters:
id which moon? 0=Io, 1=Europa, 2=Ganymede, 3=Callisto

Definition at line 70 of file jupitermoons.h.

double JupiterMoons::x ( int  i  )  const [inline]

Returns:
the X-coordinate in the Jupiter-centered coord. system.
Parameters:
i which moon? 0=Io, 1=Europa, 2=Ganymede, 3=Callisto.

Definition at line 97 of file jupitermoons.h.

double JupiterMoons::y ( int  i  )  const [inline]

Returns:
the Y-coordinate in the Jupiter-centered coord. system.
Parameters:
i which moon? 0=Io, 1=Europa, 2=Ganymede, 3=Callisto.

Definition at line 102 of file jupitermoons.h.

double JupiterMoons::z ( int  i  )  const [inline]

Returns:
the Z-coordinate in the Jupiter-centered coord. system.
Parameters:
i which moon? 0=Io, 1=Europa, 2=Ganymede, 3=Callisto.

Definition at line 107 of file jupitermoons.h.


The documentation for this class was generated from the following files:
  • jupitermoons.h
  • jupitermoons.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