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

kstars

KSPlanet Class Reference

A subclass of KSPlanetBase for seven of the major planets in the solar system (Earth and Pluto have their own specialized classes derived from KSPlanetBase). More...

#include <ksplanet.h>

Inheritance diagram for KSPlanet:

Inheritance graph
[legend]

List of all members.


Classes

class  OrbitData
 This class contains doubles A,B,C which represent a single term in a planet's positional expansion sums (each sum-term is A*COS(B+C*T)). More...
class  OrbitDataColl
 OrbitDataColl contains three groups of six QPtrVectors. More...
class  OrbitDataManager
 OrbitDataManager places the OrbitDataColl objects for all planets in a QDict indexed by the planets' names. More...

Public Member Functions

virtual void calcEcliptic (double jm, EclipticPosition &ret) const
 KSPlanet (KStarsData *kd, QString s="unnamed", QString image_file="", double pSize=0)
virtual bool loadData ()
virtual ~KSPlanet ()

Protected Types

typedef QPtrVector< OrbitData > OBArray [6]

Protected Member Functions

virtual bool findGeocentricPosition (const KSNumbers *num, const KSPlanetBase *Earth=NULL)

Protected Attributes

bool data_loaded

Static Protected Attributes

static OrbitDataManager odm

Detailed Description

A subclass of KSPlanetBase for seven of the major planets in the solar system (Earth and Pluto have their own specialized classes derived from KSPlanetBase).

Note:
The Sun is subclassed from KSPlanet.
KSPlanet contains internal classes to manage the computations of a planet's position. The position is computed as a series of sinusoidal sums, similar to a Fourier transform. See "Astronomical Algorithms" by Jean Meeus or the file README.planetmath for details. Provides necessary information about objects in the solar system.
Author:
Jason Harris
Version:
1.0

Definition at line 44 of file ksplanet.h.


Member Typedef Documentation

typedef QPtrVector<OrbitData> KSPlanet::OBArray[6] [protected]

Definition at line 104 of file ksplanet.h.


Constructor & Destructor Documentation

KSPlanet::KSPlanet ( KStarsData *  kd,
QString  s = "unnamed",
QString  image_file = "",
double  pSize = 0 
)

Constructor.

Parameters:
kd Some kind of data
s Name of planet
image_file filename of the planet's image
pSize physical diameter of the planet, in km
Todo:
figure out what kd does.

Definition at line 147 of file ksplanet.cpp.

virtual KSPlanet::~KSPlanet (  )  [inline, virtual]

Destructor (empty).

Definition at line 59 of file ksplanet.h.


Member Function Documentation

void KSPlanet::calcEcliptic ( double  jm,
EclipticPosition &  ret 
) const [virtual]

Calculate the ecliptic longitude and latitude of the planet for the given date (expressed in Julian Millenia since J2000).

A reference to the ecliptic coordinates is returned as the second object.

Parameters:
jm Julian Millenia (=jd/1000)
ret The ecliptic coordinates are returned by reference through this argument.

Definition at line 155 of file ksplanet.cpp.

bool KSPlanet::findGeocentricPosition ( const KSNumbers *  num,
const KSPlanetBase *  Earth = NULL 
) [protected, virtual]

Calculate the geocentric RA, Dec coordinates of the Planet.

Note:
reimplemented from KSPlanetBase
Parameters:
num pointer to object with time-dependent values for the desired date
Earth pointer to the planet Earth (needed to calculate geocentric coords)
Returns:
true if position was successfully calculated.

Implements KSPlanetBase.

Reimplemented in KSSun.

Definition at line 221 of file ksplanet.cpp.

bool KSPlanet::loadData (  )  [virtual]

Preload the data used by findPosition.

Implements KSPlanetBase.

Reimplemented in KSSun.

Definition at line 151 of file ksplanet.cpp.


Member Data Documentation

bool KSPlanet::data_loaded [protected]

Definition at line 75 of file ksplanet.h.

KSPlanet::OrbitDataManager KSPlanet::odm [static, protected]

Definition at line 156 of file ksplanet.h.


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