• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • astro
solarsystem.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2013 Gerhard Holtkamp
9 //
10 
11 #if !defined(__solarsystem_h)
12 #define __solarsystem_h
13 
14 #include "attlib.h"
15 #include "astrolib_export.h"
16 
17 class ASTROLIB_EXPORT SolarSystem // Calculate Positions of Solar System Bodies
18 {
19  public:
20  SolarSystem();
21  ~SolarSystem();
22 
23  void setTimezone(double d); // set timezone for I/O
24  void setDeltaTAI_UTC(double d); // set IERS Parameter TAI - UTC
25  void setAutoTAI_UTC(); // IERS Parameter TAI - UTC to auto
26  void setCurrentMJD(int year, int month, int day, int hour, int min, double sec); // set current time
27  void setCurrentMJD(); // sets current MJD to R/T
28  double getMJD(int year, int month, int day, int hour, int min, double sec) const; // get MJD from date
29  void getDatefromMJD(double mjd, int &year, int &month, int &day,
30  int &hour, int &min, double &sec) const; // convert MJD into date and time
31  void setEpoch (double yr); // set epoch of coordinates
32  void setNutation (bool nut); // specify whether nutation is to be included.
33  void setCentralBody (const char *pname); // select which planet is central body
34 
35  void getSun (double& ra, double& decl); // RA and Dec for the Sun
36  void getMoon (double& ra, double& decl); // RA and Dec for the Moon
37  void getMercury (double& ra, double& decl); // RA and Dec for Mercury
38  void getVenus (double& ra, double& decl); // RA and Dec for Venus
39  void getEarth (double& ra, double& decl); // RA and Dec for Earth (with regard to the Sun)
40  void getMars (double& ra, double& decl); // RA and Dec for Mars
41  void getJupiter (double& ra, double& decl); // RA and Dec for Jupiter
42  void getSaturn (double& ra, double& decl); // RA and Dec for Saturn
43  void getUranus (double& ra, double& decl); // RA and Dec for Uranus
44  void getNeptune (double& ra, double& decl); // RA and Dec for Neptune
45 
46  void getPhysSun (double &pdiam, double &pmag); // Physical elements Sun
47  void getPhysMercury(double &pdiam, double &pmag, double &pphase); // Physical elements Mercury
48  void getPhysVenus(double &pdiam, double &pmag, double &pphase); // Physical elements Venus
49  void getPhysEarth(double &pdiam, double &pmag, double &pphase); // Physical elements Earth
50  void getPhysMars(double &pdiam, double &pmag, double &pphase); // Physical elements Mars
51  void getPhysJupiter(double &pdiam, double &pmag, double &pphase); // Physical elements Jupiter
52  void getPhysSaturn(double &pdiam, double &pmag, double &pphase); // Physical elements Saturn
53  void getPhysUranus(double &pdiam, double &pmag, double &pphase); // Physical elements Uranus
54  void getPhysNeptune(double &pdiam, double &pmag, double &pphase); // Physical elements Neptune
55  double getDiamMoon (); // Apparent diameter for the Moon
56  void getLunarLibration (double &lblon, double &lblat, double &termt); // librations of the Moon and terminator position
57  void getLunarPhase (double &phase, double &ildisk, double &amag); // phase and mag of Moon
58 
59  Vec3 getPlanetocentric (double ra, double decl); // planetocentric position
60  void getPlanetographic (double ra, double decl, double &lng, double &lat);
61 
62  void putOrbitElements (double t0, double pdist, double ecc, double ran, double aper, double inc, double eclep);
63  void putEllipticElements (double t0, double a, double m0, double ecc, double ran, double aper, double inc, double eclep);
64  void getOrbitPosition (double& ra, double& decl);
65  double getDistance(); // distance in AU of Kepler object
66  double getCometMag(double g, double k); // apparent magnitude of comet
67  double getAsteroidMag(double h, double g); // apparent magnitude of asteroid
68 
69  static double DmsDegF (double h); // conversion from Format DDD.MMSS into d.fff
70  static double DegFDms (double h); // conversion from Format d.fff into DDD.MMSS
71 
72 
73  private:
74  void ssinit(); // initialize SolarSystem
75  static double atan23 (double y, double x); // atan without singularity for x,y=0
76  void DefTime (); // Get System Time and Date
77  static void getRaDec (Vec3 r1, double& ra, double& decl); // convert r1 into RA and DEC
78  void updateSolar(); // update all positions of planets according to current MJD.
79 
80  void MoonDetails();
81  static void MoonLibr (double jd, Vec3 rm, Vec3 sn, double &lblon, double &lblat, double &termt);
82  Vec3 SnPos (double &ep2, double &els) const;
83  Vec3 MnPos (double &ep2, double &els) const;
84  Mat3 getSelenographic() const;
85  void getConstSun(); // Sun constants
86  void getConstMoon(); // Moon planetary constants
87  void getConstMercury(); // Mercury planetary constants
88  void getConstVenus(); // Venus planetary constants
89  void getConstEarth(); // Earth planetary constants
90  void getConstMars(); // Mars planetary constants
91  void getConstJupiter(); // Jupiter planerary constants
92  void getConstSaturn(); // Saturn planerary constants
93  void getConstUranus(); // Uranus planerary constants
94  void getConstNeptune(); // Neptune planerary constants
95  void getPlanMat(); // get Matrix to convert from J2000.0 into planetary coordinates
96 
97  // data fields
98 
99  bool ss_update_called; // true if updateSolar() has already been called
100  bool ss_moon_called; // true if special Moon calculation called
101  bool ss_planmat_called; // true if matrix for planetary coordintes called
102  bool ss_kepler_stored; // true if Kepler elements for comet or asteroid stored
103  bool ss_kepler_called; // true if comet or asteroid position calculated
104 
105  int ss_day; // date
106  int ss_month;
107  int ss_year;
108  int ss_hour;
109  int ss_minute;
110  int ss_second;
111  double ss_time; // currently used MJD
112  double ss_tzone; // timezone in hours
113  double ss_del_tdut; // TDT - UT in sec
114  int ss_del_auto; // 1 = automatic del_tdut, 0 = manual
115  bool ss_RT; // true if calculations in Real Time, false if time manually set to MJD.
116  bool ss_nutation; // true if position corrected for nutation
117  double ss_epoch; // epoch of coordinates in MJD
118  int ss_central_body; // body defining the coordinate origin (0=sun,1=moon,2=mercury etc.)
119 
120  Vec3 ss_rm, ss_rs; // position of Moon and Sun in ecliptic of date (A.U.)
121  Vec3 ss_pmer, ss_pven, ss_pearth, ss_pmars, ss_pjup, ss_psat, ss_pura, ss_pnept; // positions of planets
122 
123  double ss_moon_mag; // apparent magnitude of the Moon
124  double ss_moon_lblon; // longitude of lunar libration
125  double ss_moon_lblat; // latitude of lunar libration
126  double ss_moon_term; // position of lunar terminator
127  double ss_moon_ildisk; // fraction of Moon's illuminated disk
128  double ss_moon_phase; // phase of Moon
129 
130  double ss_GM; // graviatational constant (m^3/s^2)
131  double ss_J2; // J2 gravitational term
132  double ss_R0; // equatorial radius (km)
133  double ss_flat; // flattening factor
134  double ss_axl0; // l-direction of rotation axis
135  double ss_axl1; // delta of axl0
136  double ss_axb0; // b-direction of rotation axis
137  double ss_axb1; // delta of axb0
138  double ss_W; // location of prime meridian
139  double ss_Wd; // daily variation of W.
140 
141  Mat3 ss_planmat; // matrix to convert from J2000.0 into planetary coordinates
142  double ss_lat; // planetary latitude (decimal degrees)
143  double ss_lng; // planetary longitude (decimal degrees)
144  double ss_height; // height above reference ellipsoid (km)
145 
146  double ss_t0; // time of perihelion passage or epoch of elliptical elements (MJD)
147  double ss_m0; // Mean Anomaly in degrees
148  double ss_a; // semi-major axis in AU
149  double ss_ecc; // eccentricity
150  double ss_ran; // right ascension of ascending node in degrees
151  double ss_aper; // argument of perihelion
152  double ss_inc; // inclination in degrees
153  double ss_eclep; // epoch of ecliptic and equator for these elements
154  Vec3 ss_comet; // position vector of comet or asteroid in AU
155 
156 };
157 
158 #endif // __solarsystem_h sentry.
159 
Mat3
Definition: attlib.h:63
Vec3
Definition: attlib.h:27
ASTROLIB_EXPORT
#define ASTROLIB_EXPORT
Definition: astrolib_export.h:20
attlib.h
SolarSystem
Definition: solarsystem.h:17
astrolib_export.h
mjd
double mjd(int day, int month, int year, double hour)
Definition: astrolib.cpp:94
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal