1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
/***********************************************/
/**
* @file eclipseConical.h
*
* @brief Shadowing of satellites by moon and Earth.
* @see Eclipse
*
* @author Torsten Mayer-Guerr
* @date 2020-03-08
*
*/
/***********************************************/
#ifndef __GROOPS_ECLIPSECONICAL__
#define __GROOPS_ECLIPSECONICAL__
// Latex documentation
#ifdef DOCSTRING_Eclipse
static const char *docstringEclipseConical = R"(
\subsection{Conical}
\fig{!hb}{0.8}{eclipseConical}{fig:eclipseConical}{Modelling umbra and penumbra.}
)";
#endif
/***********************************************/
#include "classes/eclipse/eclipse.h"
/***** CLASS ***********************************/
/** @brief Shadowing of satellites by moon and Earth.
* @ingroup eclipseGroup
* @see Eclipse */
class EclipseConical : public Eclipse
{
public:
EclipseConical(Config &/*config*/) {}
virtual Double factor(const Time &timeGPS, const Vector3d &position, EphemeridesPtr ephemerides) const override;
};
/***********************************************/
inline Double EclipseConical::factor(const Time &timeGPS, const Vector3d &position, EphemeridesPtr ephemerides) const
{
try
{
if(!ephemerides)
throw(Exception("No ephemerides given"));
const Vector3d posSun = ephemerides->position(timeGPS, Ephemerides::SUN);
const Vector3d posMoon = ephemerides->position(timeGPS, Ephemerides::MOON);
return shadowScalingFactor(position, posSun, Vector3d(), R_Earth)
* shadowScalingFactor(position, posSun, posMoon, R_Moon);
}
catch(std::exception &e)
{
GROOPS_RETHROW(e)
}
}
/***********************************************/
#endif
|