WSF
WsfSolarTerminator Namespace Reference

A set of utilities relating to the Solar terminator. More...

Enumerations

enum class  PhaseOfDay { cDAY = 1 , cTWILIGHT = 2 , cNIGHT = 3 }
enum class  PlatformSolarIllumination { cINVALID_PLATFORM = 0 , cILLUMINATED = 1 , cEARTH_PENUMBRA = 2 , cEARTH_UMBRA = 3 }

Functions

PhaseOfDay GetPhaseOfDay (double aLatDegrees, double aLonDegrees, const UtCalendar &aTime, double aLimitDegrees)
bool MaskedByHorizon (const double aObserverWCS[3], const double aTargetWCS[3])
PlatformSolarIllumination GetPlatformSolarIllumination (WsfPlatform *aPlatformPtr)

Variables

constexpr double cTWILIGHT_CIVIL = 96.0
constexpr double cTWILIGHT_NAUTICAL = 102.0
constexpr double cTWILIGHT_ASTRONOMICAL = 108.0

Detailed Description

A set of utilities relating to the Solar terminator.

Enumeration Type Documentation

◆ PhaseOfDay

enum class WsfSolarTerminator::PhaseOfDay
strong
Enumerator
cDAY 
cTWILIGHT 
cNIGHT 

◆ PlatformSolarIllumination

Enumerator
cINVALID_PLATFORM 
cILLUMINATED 
cEARTH_PENUMBRA 
cEARTH_UMBRA 

Function Documentation

◆ GetPhaseOfDay()

WSF_SPACE_EXPORT PhaseOfDay WsfSolarTerminator::GetPhaseOfDay ( double aLatDegrees,
double aLonDegrees,
const UtCalendar & aTime,
double aLimitDegrees )

Return the given location's state with respect to the solar terminator.

Parameters
aLatDegreesThe latitude of interest.
aLonDegreesThe longitude of interest.
aTimeThe time of interest.
aLimitDegreesThe angle limit giving the end of twilight.
Returns
The phase of the day at the given surface location.

References cDAY, cNIGHT, and cTWILIGHT.

Referenced by UT_DEFINE_SCRIPT_METHOD().

◆ GetPlatformSolarIllumination()

WSF_SPACE_EXPORT PlatformSolarIllumination WsfSolarTerminator::GetPlatformSolarIllumination ( WsfPlatform * aPlatformPtr)

Return qualitatively how much illumination the given platform is receiving from the sun. This will determine based on the location of the platform as of its most recent update if the platform is illuminated, in the Earth's penumbra, or in the Earth's umbra. This method will only given valid results for a platform that is part of a simulation.

Note
This method does not currently account for refraction through Earth's atmosphere.
Parameters
aPlatformPtrThe platform in question.
Returns
The illumination by the Sun of the given platform.

References cEARTH_PENUMBRA, cEARTH_UMBRA, cILLUMINATED, cINVALID_PLATFORM, WsfDateTime::GetCurrentTime(), WsfSimulation::GetDateTime(), WsfPlatform::GetLastUpdateTime(), WsfPlatform::GetSimulation(), and MaskedByHorizon().

Referenced by UT_DEFINE_SCRIPT_METHOD().

◆ MaskedByHorizon()

WSF_SPACE_EXPORT bool WsfSolarTerminator::MaskedByHorizon ( const double aObserverWCS[3],
const double aTargetWCS[3] )

Return if the given target location is masked by the horizon when viewed from the observer location. Note that this does not take terrain into account.

Parameters
aObserverWCSThe observer's location.
aTargetWCSThe target's location.
Returns
true if the target is not visible from the observer; false otherwise

Referenced by GetPlatformSolarIllumination().

Variable Documentation

◆ cTWILIGHT_ASTRONOMICAL

double WsfSolarTerminator::cTWILIGHT_ASTRONOMICAL = 108.0
constexpr

Referenced by UT_DEFINE_SCRIPT_METHOD().

◆ cTWILIGHT_CIVIL

double WsfSolarTerminator::cTWILIGHT_CIVIL = 96.0
constexpr

Referenced by UT_DEFINE_SCRIPT_METHOD().

◆ cTWILIGHT_NAUTICAL

double WsfSolarTerminator::cTWILIGHT_NAUTICAL = 102.0
constexpr

Referenced by UT_DEFINE_SCRIPT_METHOD().

Copyrights Multiple, All Rights Reserved