File indexing completed on 2024-04-14 03:43:09

0001 /*
0002     SPDX-FileCopyrightText: 2002 Jason Harris <kstars@30doradus.org>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QString>
0010 #include <QVector>
0011 #include "planetmoons.h"
0012 
0013 class KSNumbers;
0014 class KSPlanet;
0015 class KSSun;
0016 
0017 /**
0018   *@class JupiterMoons
0019   *Implements the four largest moons of Jupiter.
0020   *See Chapter 43 of "Astronomical Algorithms"by Jean Meeus for details
0021   *
0022   *TODO: make the moons SkyObjects, rather than just points.
0023   *
0024   *@author Jason Harris
0025   *@version 1.0
0026   */
0027 class JupiterMoons : public PlanetMoons
0028 {
0029     public:
0030         /**
0031               *Constructor.  Assign the name of each moon,
0032               *and initialize their XYZ positions to zero.
0033               */
0034         JupiterMoons();
0035 
0036         /**
0037               *Destructor.  Delete moon objects.
0038               */
0039         ~JupiterMoons() override;
0040 
0041         /**
0042               *@short Find the positions of each Moon, relative to Jupiter.
0043               *We use an XYZ coordinate system, centered on Jupiter,
0044               *where the X-axis corresponds to Jupiter's Equator,
0045               *the Y-Axis is parallel to Jupiter's Poles, and the
0046               *Z-axis points along the line joining the Earth and
0047               *Jupiter.  Once the XYZ positions are known, this
0048               *function also computes the RA,Dec positions of each
0049               *Moon, and sets the inFront bool variable to indicate
0050               *whether the Moon is nearer to us than Jupiter or not
0051               *(this information is used to determine whether the
0052               *Moon should be drawn on top of Jupiter, or vice versa).
0053               *
0054               *See "Astronomical Algorithms" bu Jean Meeus, Chapter 43.
0055               *
0056               *@param num pointer to the KSNumbers object describing
0057               *the date/time at which to find the positions.
0058               *@param jup pointer to the jupiter object
0059               *@param sunptr pointer to the Sun object
0060               */
0061         void findPosition(const KSNumbers *num, const KSPlanetBase *jup, const KSSun *sunptr) override;
0062 };
0063