File indexing completed on 2024-04-21 03:48:39

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2014 Gerhard Holtkamp
0004 //
0005 
0006 #if !defined(__astr2lib_h)
0007 #define __astr2lib_h
0008 
0009 #include "attlib.h"
0010 #include "astrolib_export.h"
0011 
0012 /***********************************************************************
0013     Definitions of Astr2lib Functions
0014 
0015 
0016   Author: Gerhard HOLTKAMP                   25-MAR-2014
0017  ***********************************************************************/
0018 
0019 class ASTROLIB_EXPORT Plan200      // Calculating the Planets in epoch J2000.0 coordinates
0020  {
0021   public:
0022     Plan200();
0023     Vec3 velocity();   // return last calculated planet velocity
0024     void state (Vec3& rs, Vec3& vs);  // return last state vector
0025     Vec3 Mercury (double t);   // position of Mercury at time t
0026     Vec3 Venus (double t);   // position of Venus at time t
0027     Vec3 Mars (double t);   // position of Mars at time t
0028     Vec3 Jupiter (double t);   // position of Jupiter at time t
0029     Vec3 Saturn (double t);   // position of Saturn at time t
0030     Vec3 Uranus (double t);   // position of Uranus at time t
0031       Vec3 Neptune (double t);   // position of Neptune at time t
0032       Vec3 Pluto (double t);   // position of Pluto at time t
0033 
0034   private:
0035      double c3[19], s3[19];
0036      double c[11], s[11];
0037      double m1, m2, m3, m4, m5, m6, m7, m8;
0038      double d, a, uu, tt;
0039      double u, v, dl, dr, db, l, b, r;
0040      Vec3       rp, vp;   // state vector of planet
0041 
0042     void addthe (double c1, double s1, double c2, double s2,
0043                     double& cc, double& ss);
0044     void term (int i1, int i, int it, double dlc, double dls, double drc,
0045               double drs, double dbc, double dbs);
0046     void posvel ();  
0047  };
0048 
0049    ASTROLIB_EXPORT void MarPhobos (double t, Vec3& rs, Vec3& vs); // State vector of Phobos
0050    ASTROLIB_EXPORT void MarDeimos (double t, Vec3& rs, Vec3& vs); // State vector of Deimos
0051    ASTROLIB_EXPORT Vec3 PosJIo (double t);      // Position of Io
0052    ASTROLIB_EXPORT Vec3 PosEuropa (double t);   // Position of Europa
0053    ASTROLIB_EXPORT Vec3 PosGanymede (double t); // Position of Ganymede
0054    ASTROLIB_EXPORT Vec3 PosCallisto (double t); // Position of Callisto
0055    ASTROLIB_EXPORT Vec3 PosSMimas (double t); // Position of Mimas
0056    ASTROLIB_EXPORT Vec3 PosSEnceladus (double t); // Position of Enceladus
0057    ASTROLIB_EXPORT Vec3 PosSDione (double t); // Position of Dione
0058    ASTROLIB_EXPORT void JupIo (double t, Vec3& rs, Vec3& vs);       // state vector of Io
0059    ASTROLIB_EXPORT void JupEuropa (double t, Vec3& rs, Vec3& vs);   // state vector of Europa
0060    ASTROLIB_EXPORT void JupGanymede (double t, Vec3& rs, Vec3& vs); // state vector of Ganymede
0061    ASTROLIB_EXPORT void JupCallisto (double t, Vec3& rs, Vec3& vs); // state vector of Callisto
0062    ASTROLIB_EXPORT void SatRhea (double t, Vec3& rs, Vec3& vs);   // state vector of Rhea
0063    ASTROLIB_EXPORT void SatTitan (double t, Vec3& rs, Vec3& vs);  // state vector of Titan
0064    ASTROLIB_EXPORT void NepTriton (double t, Vec3& rs, Vec3& vs); // state vector of Triton
0065    ASTROLIB_EXPORT void PluCharon (double t, Vec3& rs, Vec3& vs); // state vector of Charon
0066 
0067 #endif         // __astr2lib_h sentry.
0068