Navigation
API > API/Plugins > API/Plugins/CelestialVault
Units Conventions Distances: Distances are expressed in Astronomical units - Specified by the "AU" mention in the function name
Time: Local/UTC Time: All function parameters contains either the "Local" or "UTC" prefix in their name to specify if they expect a Local or UTC Time.
Most Celestial functions are expecting an absolute time expressed using a Julian Date. When the name "JulianDay" is used, it means the Julian Date when t=0 (midnight, beginning of the day) By definition, a Julian Date is finishing by 0.5 at Midnight.
Angles: GMST and GAST angle are expressed in Degrees Some Celestial data involve ArcSeconds (1 Degree = 3600 Arcseconds) - Conversion functions are provided
| Name | UCelestialMaths |
| Type | class |
| Header File | /Engine/Plugins/Runtime/CelestialVault/Source/CelestialVault/Public/CelestialMaths.h |
| Include Path | #include "CelestialMaths.h" |
Syntax
UCLASS ()
class UCelestialMaths : public UBlueprintFunctionLibrary
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UBlueprintFunctionLibrary → UCelestialMaths
Classes
| Name | Remarks |
|---|---|
| WGS84 |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AstronomicalUnitsMeters | const double | CelestialMaths.h | |
| NewMoonReferenceJulianDate | const double | CelestialMaths.h | |
| ParsecAstronomicalUnits | const double | CelestialMaths.h | |
| SpeedOfLightMetersPerSeconds | const double | CelestialMaths.h | |
| SynodicMonthAverage | const double | Static const Members. | CelestialMaths.h |
| VSOPEclipticToFK5Equatorial | const FMatrix | CelestialMaths.h |
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static double ArcsecondsToDegrees
(
double Arcseconds |
Convert Arcseconds to Degrees1 Degree = 3600 Arcseconds | CelestialMaths.h |
|
static double ArcsecondsToRadians
(
double Arcseconds |
Convert Arcseconds to Radians2 PI Rad = 360 Degrees = 360 * 3600 Arcseconds | CelestialMaths.h |
|
static double AstronomicalUnitsToMeters
(
double AU |
Convert Astronomical Unit (UA) to meters1 AU = 149 597 870 700 m | CelestialMaths.h |
|
static double AstronomicalUnitsToParsec
(
double AU |
Convert Astronomical Unit (UA) to Parsecs1 Parsec = 206 264.806 AU | CelestialMaths.h |
|
static FLinearColor BVtoLinearColor
(
float BV |
Returns the RGB normalized components [0..1] from the Color Index (B-V) Value | CelestialMaths.h |
|
static FVector ComputeAberration
(
const FVector& TopocentricTargetLocationAU, |
Compute the Aberration of an object located far from the Earth. | CelestialMaths.h |
|
static FString Conv_CelestialBodyToString
(
const FCelestialBody& CelestialBody |
Celestial Body String Builder | CelestialMaths.h |
|
static FString Conv_DeclinationToString
(
const double& DecDegrees |
Declination String Builder | CelestialMaths.h |
|
static FString Conv_DegreesToDMSString
(
double Degrees |
DMS String Builder | CelestialMaths.h |
|
static FString Conv_DegreesToHMSString
(
double Degrees |
HMS String Builder | CelestialMaths.h |
|
static FString Conv_DMSToString
(
bool Sign, |
DMS String Builder | CelestialMaths.h |
|
static FString Conv_HMSToString
(
int32 Hours, |
HMS String Builder | CelestialMaths.h |
|
static FString Conv_PlanetaryBodyToString
(
const FPlanetaryBody& PlanetaryBody |
Planetary Body String Builder | CelestialMaths.h |
|
static FString Conv_RightAscensionToString
(
const double& RightAscensionHours |
Right Ascension String Builder | CelestialMaths.h |
|
static FString Conv_StellarBodyToString
(
const FStellarBody& StellarBody |
Stellar Body ToString String Builder | CelestialMaths.h |
|
static double DateTimeToGreenwichMeanSiderealTime
(
FDateTime UTCDateTime |
Return the Greenwich Mean Sidereal Time (GMST) for a specific DateTime, in Degrees | CelestialMaths.h |
|
static double DateTimeToGreenwichMeanSiderealTimeUnwrapped
(
FDateTime UTCDateTime |
Return the Greenwich Mean Sidereal Time (GMST) for a specific DateTime, in Degrees, without doing any ModPositive, so unwrapped | CelestialMaths.h |
|
static double DaysToSeconds
(
double Days |
Converts decimal Days to Seconds | CelestialMaths.h |
|
static double DegreesToArcseconds
(
double Degrees |
Convert Degrees to Arcseconds1 Degree = 3600 Arcseconds | CelestialMaths.h |
|
static void DegreesToDMS
(
double DecimalDegrees, |
Convert decimal degrees to Degrees, Minutes, Seconds, with the appropriate Sign (True if Positive) | CelestialMaths.h |
|
static void DegreesToHMS
(
double DecimalDegrees, |
Convert Decimal degrees to Hours, Minutes, Seconds ( One Hour equals 15 degrees) | CelestialMaths.h |
|
static void ECEFXYZAUToGeodeticLatLon
(
FVector ECEFLocationAU, |
Converts a ECEF Location for the WGS84 Ellipsoid into Geodetic Latitude and Longitude. | CelestialMaths.h |
|
static double EquationOfTheEquinoxes
(
double JulianDate |
Return the nutation in right ascension ( aka the equation of the equinoxes) in Degrees | CelestialMaths.h |
|
static int32 FloorForJulianDate
(
double JulianDate |
Because the Dates are expressed around Jan 1, 4713 BC, we need a special Floor function to have the right years continuity | CelestialMaths.h | |
static FVector GeodeticLatLonToECEFXYZAU
(
double Latitude, |
Convert Geodetic Lat Lon to Geocentric XYZ position vector in ECEF coordinates, for the WGS84 Ellipsoid. | CelestialMaths.h |
|
static void GetBodyCelestialCoordinatesAU
(
double JulianDate, |
Return the location of a Planetary Body relative to the Earth, expressed in Celestial Coordinates (RA, DEC, Distance) It requires the Observer location on Earth for more precise computations This function also returns the distance between bodies, as it can help for Magnitude computations | CelestialMaths.h |
|
static void GetBodyCelestialCoordinatesAU_UsingKnownState
(
double JulianDate, |
Return the location of a Planetary Body relative to the Earth, expressed in Celestial Coordinates (RA, DEC, Distance) It requires the Observer location on Earth for more precise computations This function also returns the distance between bodies, as it can help for Magnitude computations | CelestialMaths.h |
|
static FTransform GetEarthCenterTransformECEF
(
double Latitude, |
Return the Transformation to apply to a WGS84 Ellipsoid model so that its location in Lat,long,Altitude is tangent to the Origin The Transform is expressed in the ECEF Frame (Location units are meters, right-handed ECEF Frame) | CelestialMaths.h |
|
static FTransform GetEarthCenterTransformUEFrame
(
double Latitude, |
Return the Transformation to apply to a WGS84 Ellipsoid model so that its location in Lat,long,Altitude is tangent to the Origin It's used to locate the Rotating Celestial Vault for a specific UE Origin The Transform is expressed in the UE Frame (Location units are UE Units, left-handed Unreal Frame) | CelestialMaths.h |
|
static double GetEarthRotationAngle
(
double JulianDate |
Retrurn the Earth Rotation Angle (In Degrees) as measured by GMST (Greenwich Mean Sidereal Time) | CelestialMaths.h |
|
static double GetIlluminationPercentage
(
double NormalizedAge |
Return the illumination factor (0..1) of a Body, considering his normalized age and the crescent effects | CelestialMaths.h |
|
static double GetLeapSeconds
(
double JulianDate |
Returns the Leap Seconds for a specific Julian Date | CelestialMaths.h |
|
static double GetMoonNormalizedAgeSimple
(
double JulianDate |
Returns the Moon Phase for a specific Date | CelestialMaths.h |
|
static FMatrix GetNutationMatrix
(
double JulianDate |
Return the Nutation Matrix The Nutation matrix accounts for Nutation, the small, periodic wobble of Earth’s rotation axis – when transforming between “mean” and “true” celestial coordinate frames. | CelestialMaths.h |
|
static FVector GetObserverGeocentricLocationAU
(
double Latitude, |
Return the Geocentric position of an observer located at the Earth surface, considering the rotation at this specific JulianDate, using the Greenwich Apparent Didereal Time. | CelestialMaths.h |
|
static FPlanetaryBodyKinematicState GetPlanetaryBodyKinematicState_AU
(
double JulianDate, |
Returns the Body location and velocity in the VSOP87 and FK5J2000 frames | CelestialMaths.h |
|
static double GetPlanetaryBodyMagnitude
(
EVSOP87BodyType VSOP87BodyType, |
Return the Magnitude of a Planetary Body as seen from the Earth | CelestialMaths.h |
|
static FMatrix GetPrecessionMatrix
(
double JulianDate |
Return the Precession Matrix The Precession matrix transforms coordinates from one equatorial reference epoch to another by accounting for Earth’s long-term, secular drift of its rotation axis (precession of the equinox). | CelestialMaths.h |
|
static FString GetPreciseVectorString
(
FVector Vector, |
Returns a String displaying a vector with a large number of digits | CelestialMaths.h |
|
static FMatrix GetRotationXMatrix
(
double AngleRadians |
Return a Rotation Matrix around X, for Precession/Nutation computations | CelestialMaths.h | |
static FMatrix GetRotationYMatrix
(
double AngleRadians |
Return a Rotation Matrix around Y, for Precession/Nutation computations | CelestialMaths.h | |
static FMatrix GetRotationZMatrix
(
double AngleRadians |
Return a Rotation Matrix around Z, for Precession/Nutation computations | CelestialMaths.h | |
static FVector GetSolarSystemBodyLocation_VSOP87_Relativistic
(
FVector ReferenceBodyLocation_Heliocentric_AU, |
Returns the location of a specific Solar System Body, in the VSOP Coordinate system | CelestialMaths.h |
|
static void GetSolarSystemBodyLocationVelocity_VSOP87_AU
(
EVSOP87BodyType VSOP87BodyType, |
Returns the location of a specific Solar System body, in the VSOP Coordinate system | CelestialMaths.h |
|
static double GetSpeedOfLight() |
Returns the Speed of Light 299 792 458 (m/s) | CelestialMaths.h |
|
static FStellarBody GetSunInformation
(
double JulianDate, |
Compute all Sun Properties for a specific JulianDate | CelestialMaths.h |
|
static FStellarBody GetSunInformation_UsingKnownState
(
double JulianDate, |
Compute all Sun Properties for a specific JulianDate | CelestialMaths.h |
|
static double InternationalAtomicTimeToTerrestrialTime
(
double TAI |
Returns the Terrestrial Time in SI secondsTT = TAI + 32.184 seconds; | CelestialMaths.h |
|
static double JulianDateToGreenwichApparentSiderealTime
(
double JulianDate |
Return the Greenwich Apparent Sidereal Time (GAST) for a specific UTC DateTime, in Degrees. | CelestialMaths.h |
|
static double JulianDateToGreenwichMeanSiderealTime
(
double JulianDate |
Return the Greenwich Mean Sidereal Time (GMST) for a specific Julian Date, In Degrees | CelestialMaths.h |
|
static double JulianDateToInternationalAtomicTime
(
double JulianDate |
Returns the International Atomic Time in SI seconds | CelestialMaths.h |
|
static double JulianDateToJulianCenturies
(
double JulianDate |
Returns the Julien CenturiesJulian Centuries = (JulianDate - 2451545.0) / 36525.0 | CelestialMaths.h |
|
static FDateTime JulianDateToUTCDateTime
(
double JulianDate |
Return the UTC Time for a specific Julian Date | CelestialMaths.h |
|
static double JulianDateToVSOP87Time
(
double JulianDate |
Converts a Julian Date to a proper VSOP87Time, suitable for the VSOP87 computations | CelestialMaths.h |
|
static double LocalSideralTime
(
double LongitudeDegrees, |
Return the Sidereal Time for a specific Longitude and GMST | CelestialMaths.h |
|
| Return the UTC for a specific Local Time, using the TimeZone and Daylight Saving Information | CelestialMaths.h |
|
|
static double MetersToAstronomicalUnits
(
double Meters |
Convert meters to Astronomical Unit (UA)1 AU = 149 597 870 700 m | CelestialMaths.h |
|
static double ModPositive
(
double Value, |
Special Mod function that makes sure to always return positive values | CelestialMaths.h |
|
static void Nutation2000BTruncated
(
double JulianDate, |
Approximation of the IAU2000A/B nutation model used in the Equation Of The Equinoxes, accurate enough for VSOP87 computations | CelestialMaths.h |
|
static double ParsecsToAstronomicalUnits
(
double Parsecs |
Convert Parsecs to Astronomical Unit (UA)1 Parsec = 206 264.806 AU | CelestialMaths.h |
|
static FVector RADECToXYZ_RH
(
double RADegrees, |
Convert Polar Coordinates to Cartesian Coordinates, using a Righ-Handed Frame | CelestialMaths.h |
|
static double SecondsToDay
(
double Seconds |
Converts Seconds to Decimal Days | CelestialMaths.h |
|
static double UTCDateTimeToJulianDate
(
FDateTime UTCDateTime |
Return the Julian Date for a specific UTC Time | CelestialMaths.h |
|
| Return the Local Time for a specific UTC Time, using the TimeZone and Daylight Saving Information | CelestialMaths.h |
|
|
static double WGS84GeocentricRadius
(
double Latitude |
Return the WGS84 Radius (in Meters) for a specific Latitude | CelestialMaths.h |
|
static void XYZToRADEC_RH
(
FVector XYZ, |
Convert Cartesian Coordinates to Polar Coordinates, using a Righ-Handed Frame | CelestialMaths.h |
|