Skip to content

DIS_BPFL

huggins edited this page May 10, 2023 · 6 revisions

DIS BPFL

DIS Blueprint Function Library. Houses functions for common geospatial conversions and for common PDU accessor functions.

class UDIS_BPFL
  : public UBlueprintFunctionLibrary

Includes

Back to Top


Members

None

Back to Top


Functions

Access Return Name Description
Public Static void ApplyHeadingPitchRollToNorthEastDownVector(const FHeadingPitchRoll HeadingPitchRollDegrees, const FNorthEastDown NorthEastDownVectors, FVector& OutX, FVector& OutY, FVector& OutZ) Applies the given heading, pitch, and roll in degrees to the local East North Down vectors
Private Static void ApplyHeadingPitchToNorthEastDownVector(const float HeadingDegrees, const float PitchDegrees, const FNorthEastDown NorthEastDownVectors, FVector& OutX, FVector& OutY, FVector& OutZ) Rotates the given East, North, and Up vectors by the given Heading and Pitch
Private Static void ApplyRollToNorthEastDownVector(const float RollDegrees, const FNorthEastDown NorthEastDownVectors, FVector& OutX, FVector& OutY, FVector& OutZ) Rotates the given East, North, and Up vectors by the given Heading and Pitch
Public Static void CalculateEcefXYZFromLatLonHeight(const FLatLonHeightDouble LatLonHeightDegreesMeters, FEarthCenteredEarthFixedDouble& OutEcef) Converts Latitude, Longitude, and Height (LLH) to DIS X, Y, Z coordinates (ECEF) all in double (64-bit) precision
Public Static void CalculateEcefXYZFromLatLonHeight(const FLatLonHeightFloat LatLonHeightDegreesMeters, FEarthCenteredEarthFixedFloat& OutECEF) Converts Latitude, Longitude, and Height (LLH) to DIS X, Y, Z coordinates (ECEF) all in floating point (32-bit) precision
Public Static void CalculateHeadingPitchRollDegreesFromPsiThetaPhiDegreesAtLatLon(const FPsiThetaPhi PsiThetaPhiDegrees, const float LatitudeDegrees, const float LongitudeDegrees, FHeadingPitchRoll& HeadingPitchRollDegrees) Calculates the Heading, Pitch, and Roll in degrees from the given DIS orientation values Psi, Theta, and Phi in degrees at the given Latitude and Longitude
Public Static void CalculateHeadingPitchRollDegreesFromPsiThetaPhiRadiansAtLatLon(const FPsiThetaPhi PsiThetaPhiRadians, const float LatitudeDegrees, const float LongitudeDegrees, FHeadingPitchRoll& HeadingPitchRollDegrees) Calculates the Heading, Pitch, and Roll in degrees from the given DIS orientation values Psi, Theta, and Phi in radians at the given Latitude and Longitude
Public Static void CalculateHeadingPitchRollRadiansFromPsiThetaPhiDegreesAtLatLon(const FPsiThetaPhi PsiThetaPhiDegrees, const float LatitudeDegrees, const float LongitudeDegrees, FHeadingPitchRoll& HeadingPitchRollRadians) Calculates the Heading, Pitch, and Roll in radians from the given DIS orientation values Psi, Theta, and Phi in degrees at the given Latitude and Longitude
Public Static void CalculateHeadingPitchRollRadiansFromPsiThetaPhiRadiansAtLatLon(const FPsiThetaPhi PsiThetaPhiRadians, const float LatitudeDegrees, const float LongitudeDegrees, FHeadingPitchRoll& HeadingPitchRollRadians) Calculates the Heading, Pitch, and Roll in radians from the given DIS orientation values Psi, Theta, and Phi in radians at the given Latitude and Longitude
Public Static void CalculateLatLonFromNorthEastDownVectors(FNorthEastDown NorthEastDownVectors, float& LatitudeDegrees, float& LongitudeDegrees) Calculates the latitude and longitude at the given East, North, and Up vectors
Public Static void CalculateLatLonHeightFromEcefXYZ(const FEarthCenteredEarthFixedDouble Ecef, FLatLonHeightDouble& OutLatLonHeightDegreesMeters) Converts DIS X, Y, Z coordinates (ECEF) to Latitude, Longitude, and Height (LLH) all in double (64-bit) precision
Public Static void CalculateLatLonHeightFromEcefXYZ(const FEarthCenteredEarthFixedFloat Ecef, FLatLonHeightFloat& OutLatLonHeightDegreesMeters) Converts DIS X, Y, Z coordinates (ECEF) to Latitude, Longitude, and Height (LLH) all in double (32-bit) precision
Public Static void CalculateNorthEastDownVectorsFromLatLon(const float LatitudeDegrees, const float LongitudeDegrees, FNorthEastDown& OutNorthEastDownVectors) Calculates the East, North, and Up vectors at given latitude and longitude
Public Static void CalculatePsiThetaPhiDegreesFromHeadingPitchRollDegreesAtLatLon(const FHeadingPitchRoll HeadingPitchRollDegrees, const float LatitudeDegrees, const float LongitudeDegrees, FPsiThetaPhi& PsiThetaPhiDegrees) Calculates the DIS orientation values Psi, Theta, and Phi in degrees with the given Heading, Pitch, and Roll in degrees at the given Latitude and Longitude
Public Static void CalculatePsiThetaPhiDegreesFromHeadingPitchRollRadiansAtLatLon(const FHeadingPitchRoll HeadingPitchRollRadians, const float LatitudeDegrees, const float LongitudeDegrees, FPsiThetaPhi& PsiThetaPhiDegrees) Calculates the DIS orientation values Psi, Theta, and Phi in degrees with the given Heading, Pitch, and Roll in radians at the given Latitude and Longitude
Public Static void CalculatePsiThetaPhiRadiansFromHeadingPitchRollDegreesAtLatLon(const FHeadingPitchRoll HeadingPitchRollDegrees, const float LatitudeDegrees, const float LongitudeDegrees, FPsiThetaPhi& PsiThetaPhiRadians) Calculates the DIS orientation values Psi, Theta, and Phi in radians with the given Heading, Pitch, and Roll in degrees at the given Latitude and Longitude
Public Static void CalculatePsiThetaPhiRadiansFromHeadingPitchRollRadiansAtLatLon(const FHeadingPitchRoll HeadingPitchRollRadians, const float LatitudeDegrees, const float LongitudeDegrees, FPsiThetaPhi& PsiThetaPhiRadians) Calculates the DIS orientation values Psi, Theta, and Phi in radians with the given Heading, Pitch, and Roll in radians at the given Latitude and Longitude
Public Static FMatrix ConvertNedAndEnu(FMatrix StartingVectors) Convert between North, East, Down and East, North, Up orientation representation using double values
Public Static glm::dmat3 ConvertNedAndEnu(glm::dmat3 StartingVectors) Convert between North, East, Down and East, North, Up orientation representation using double values
Public Static FMatrix CreateNCrossXMatrix(FVector NVector) Creates a 4x4 n^x matrix used for creating a rotation matrix
Public Static glm::dmat3 CreateNCrossXMatrix(glm::dvec3 NVector) Creates a 3x3 n^x matrix used for creating a rotation matrix
Private Static void FMatrixCreateRotationMatrix(FVector AxisVector, float ThetaRadians, FMatrix& OutRotationMatrix) Creates a 4x4 rotation matrix around the given axis of rotation rotating by Theta radians
Private Static void glm::dmat3CreateRotationMatrix(glm::dvec3 AxisVector, float ThetaRadians, glm::dmat3& OutRotationMatrix) Creates a 3x3 rotation matrix around the given axis of rotation rotating by Theta radians
Public Static void GetEastNorthUpVectorsFromNorthEastDownVectors(FNorthEastDown NorthEastDownVectors, FEastNorthUp& EastNorthUpVectors) Get the East, North, and Up vectors from the North, East, and Down vector struct
Public Statc void GetEastNorthUpVectorsFromUnrealLocation(FVector UnrealLocation, AGeoReferencingSystem* GeoReferencingSystem, FEastNorthUp EastNorthUpVectors) Gets the East, North, and Up vector representation of the given Unreal location
Public Static void GetEcefXYZAndPsiThetaPhiDegreesFromUnreal(const FRotator UnrealRotation, FVector UnrealLocation, AGeoReferencingSystem* GeoReferencingSystem, FEarthCenteredEarthFixedFloat& EcefXYZ, FPsiThetaPhi& PsiThetaPhiDegrees) Gets the ECEF location and the Psi (Yaw), Theta (Pitch), and Phi (Roll) in degrees of the given Unreal rotation at the given Unreal location
Public Static void GetEcefXYZAndPsiThetaPhiRadiansFromUnreal(const FRotator UnrealRotation, const FVector UnrealLocation, AGeoReferencingSystem* GeoReferencingSystem, FEarthCenteredEarthFixedFloat& EcefXYZ, FPsiThetaPhi& PsiThetaPhiRadians) Gets the ECEF location and the Psi (Yaw), Theta (Pitch), and Phi (Roll) in radians of the given Unreal rotation at the given Unreal location
Public Static void GetEcefXYZFromUnrealLocation(const FVector UnrealLocation, AGeoReferencingSystem* GeoReferencingSystem, FEarthCenteredEarthFixedFloat& ECEF) Calculate the ECEF location of the given Unreal location
Public Static void GetHeadingPitchRollFromUnrealRotation(const FRotator UnrealRotation, const FVector UnrealLocation, AGeoReferencingSystem* GeoReferencingSystem, FHeadingPitchRoll& HeadingPitchRollDegrees) Gets the Heading, Pitch, and Roll in degrees of the given Unreal rotation at the given Unreal location
Public Static void GetLatLonHeightFromUnrealLocation(const FVector UnrealLocation, AGeoReferencingSystem* GeoReferencingSystem, FLatLonHeightFloat& LatLonHeightDegreesMeters) Calculate the latitude in degrees, longitude in degrees, and height in meters of the given Unreal location
Public Static void GetNorthEastDownVectorsFromEastNorthUpVectors(FEastNorthUp EastNorthUpVectors, FNorthEastDown& NorthEastDownVectors) Get the North, East, and Down vectors from the East, North, and Up vector struct
Public Static void GetNorthEastDownVectorsFromUnrealLocation(FVector UnrealLocation, AGeoReferencingSystem* GeoReferencingSystem, FNorthEastDown& NorthEastDownVectors) Gets the North, East, and Down vector representation of the given Unreal location
Public Static void GetPsiThetaPhiDegreesFromUnrealRotation(const FRotator UnrealRotation, const FVector UnrealLocation, AGeoReferencingSystem* GeoReferencingSystem, FPsiThetaPhi& PsiThetaPhiDegrees) Gets the Psi (Yaw), Theta (Pitch), and Phi (Roll) in degrees of the given Unreal rotation at the given Unreal location
Public Static void GetPsiThetaPhiRadiansFromUnrealRotation(const FRotator UnrealRotation, const FVector UnrealLocation, AGeoReferencingSystem* GeoReferencingSystem, FPsiThetaPhi& PsiThetaPhiRadians) Gets the Psi (Yaw), Theta (Pitch), and Phi (Roll) in radians of the given Unreal rotation at the given Unreal location
Public Static void GetUnrealLocationAndOrientationFromEntityStatePdu(const FEntityStatePDU EntityStatePdu, AGeoReferencingSystem* GeoReferencingSystem, FVector& UnrealLocation, FRotator& UnrealRotation) Gets the Unreal X, Y, Z coordinates and rotation from a DIS entity state PDU. Location values returned change depending on if GeoReferencing Subsystem is set to Flat Earth or Round Earth
Public Static void GetUnrealLocationFromEcefXYZ(const FEarthCenteredEarthFixedDouble EcefXYZ, AGeoReferencingSystem* GeoReferencingSystem, FVector& UnrealLocation) Get the Unreal location from the given ECEF XYZ location
Public Static void GetUnrealLocationFromEcefXYZ(const FEarthCenteredEarthFixedFloat EcefXYZ, AGeoReferencingSystem* GeoReferencingSystem, FVector& UnrealLocation) Get the Unreal location from the given ECEF XYZ location
Public Static void GetUnrealLocationFromEntityStatePdu(const FEntityStatePDU EntityStatePdu, AGeoReferencingSystem* GeoReferencingSystem, FVector& UnrealLocation) Gets the Unreal X, Y, Z coordinates of the entity from the given ECEF values in the DIS entity state pdu. Values returned change depending on if GeoReferencing Subsystem is set to Flat Earth or Round Earth
Public Static void GetUnrealLocationFromLatLonHeight(const FLatLonHeightFloat LatLonHeightDegreesMeters, AGeoReferencingSystem* GeoReferencingSystem, FVector& UnrealLocation) Get the Unreal location from the given latitude in degrees, longitude in degrees, and height in meters location
Public Static void GetUnrealRotationFromEntityStatePdu(const FEntityStatePDU EntityStatePdu, AGeoReferencingSystem* GeoReferencingSystem, FRotator& UnrealRotation) Gets Unreal rotation from a DIS entity state PDU
Public Static void GetUnrealRotationFromHeadingPitchRollDegreesAtLatLon(const FHeadingPitchRoll HeadingPitchRollDegrees, const float LatitudeDegrees, const float LongitudeDegrees, AGeoReferencingSystem* GeoReferencingSystem, FRotator& UnrealRotation) Get the Unreal rotation from the given Heading, Pitch, Roll rotation in degrees
Public Static void GetUnrealRotationFromHeadingPitchRollRadiansAtLatLon(const FHeadingPitchRoll HeadingPitchRollRadians, const float LatitudeDegrees, const float LongitudeDegrees, AGeoReferencingSystem* GeoReferencingSystem, FRotator& UnrealRotation) Get the Unreal rotation from the given Heading, Pitch, Roll rotation in radians
Public Static void GetUnrealRotationFromPsiThetaPhiDegreesAtLatLon(const FPsiThetaPhi PsiThetaPhiDegrees, const float LatitudeDegrees, const float LongitudeDegrees, AGeoReferencingSystem* GeoReferencingSystem, FRotator& UnrealRotation) Get the Unreal rotation from the given Psi, Theta, Phi rotation in degrees
Public Static void GetUnrealRotationFromPsiThetaPhiRadiansAtLatLon(const FPsiThetaPhi PsiThetaPhiRadians, const float LatitudeDegrees, const float LongitudeDegrees, AGeoReferencingSystem* GeoReferencingSystem, FRotator& UnrealRotation) Get the Unreal rotation from the given Psi, Theta, Phi rotation in radians
Public Static void RotateVectorAroundAxisByDegrees(FVector VectorToRotate, float ThetaDegrees, FVector AxisVector, FVector& OutRotatedVector) Rotates the vector VectorToRotate around given axis AxisVector by Theta degrees
Public Static void RotateVectorAroundAxisByDegrees(glm::dvec3 VectorToRotate, float ThetaDegrees,glm::dvec3 AxisVector, glm::dvec3& OutRotatedVector) Rotates the vector VectorToRotate around given axis AxisVector by Theta degrees
Public Static void RotateVectorAroundAxisByRadians(FVector VectorToRotate, float ThetaRadians, FVector AxisVector, FVector& OutRotatedVector) Rotates the vector VectorToRotate around given axis AxisVector by Theta radians
Public Static void RotateVectorAroundAxisByRadians(glm::dvec3 VectorToRotate, double ThetaRadians, glm::dvec3 AxisVector, glm::dvec3& OutRotatedVector) Rotates the vector VectorToRotate around given axis AxisVector by Theta radians

Back to Top


Details

ApplyHeadingPitchRollToNorthEastDownVector

public static void ApplyHeadingPitchRollToNorthEastDownVector
(
    const FHeadingPitchRoll HeadingPitchRollDegrees,
    const FNorthEastDown NorthEastDownVectors,
    FVector& OutX,
    FVector& OutY,
    FVector& OutZ
)

Applies the given heading, pitch, and roll in degrees to the local East North Down vectors.

Category: GRILL DIS|Unit Conversions

Parameter Description
HeadingPitchRollDegrees The degrees from North of the facing direction (heading), the degrees rotated about the local Y axis (pitch), and the degrees rotated about the local X axis (roll)
NorthEastDownVectors The vectors pointing to the North, to the East, and toward the center of the Earth
OutX The x axis (forward) vector with the heading and pitch applied
OutY The y axis (right) vector with the heading and pitch applied
OutZ The z axis (down) vector with the heading and pitch applied

Back to Top


ApplyHeadingPitchToNorthEastDownVector

private static void pplyHeadingPitchToNorthEastDownVector
(
    const float HeadingDegrees,
    const float PitchDegrees,
    const FNorthEastDown NorthEastDownVectors,
    FVector& OutX,
    FVector& OutY,
    FVector& OutZ
)

Rotates the given East, North, and Up vectors by the given Heading and Pitch.

Parameter Description
HeadingDegrees The degrees from North of the facing direction (spin left and right)
PitchDegrees The degrees rotated about the local Y axis (front tip up and down)
NorthEastDownVectors The vectors pointing to the North, to the East, and toward the center of the Earth
OutX The x axis (forward) vector with the heading and pitch applied
OutY The y axis (right) vector with the heading and pitch applied
OutZ the z axis (up) vector with the heading and pitch applied

Back to Top


ApplyRollToNorthEastDownVector

private static void ApplyRollToNorthEastDownVector
(
    const float RollDegrees,
    const FNorthEastDown NorthEastDownVectors,
    FVector& OutX,
    FVector& OutY,
    FVector& OutZ
)

Rotates the given East, North, and Up vectors by the given Heading and Pitch.

Parameter Description
RollDegrees The degrees rotated about the local X axis (tilt left and right)
NorthEastDownVectors The vectors pointing to the North, to the East, and toward the center of the Earth
OutX The x axis (forward) vector with the heading and pitch applied
OutY The y axis (right) vector with the heading and pitch applied
OutZ the z axis (up) vector with the heading and pitch applied

Back to Top


CalculateEcefXYZFromLatLonHeight

public static void CalculateEcefXYZFromLatLonHeight
(
    const FLatLonHeightDouble LatLonHeightDegreesMeters,
    FEarthCenteredEarthFixedDouble& OutEcef
)

Converts Latitude, Longitude, and Height (LLH) to DIS X, Y, Z coordinates (ECEF) all in double (64-bit) precision.

Parameter Description
LatLonHeightDegreesMeters The latitude in degrees, longitude in degrees, and height in meters
OutEcef The converted ECEF location

Back to Top


CalculateEcefXYZFromLatLonHeight

public static void CalculateEcefXYZFromLatLonHeight
(
    const FLatLonHeightFloat LatLonHeightDegreesMeters,
    FEarthCenteredEarthFixedFloat& OutECEF
)

Converts Latitude, Longitude, and Height (LLH) to DIS X, Y, Z coordinates (ECEF) all in floating point (32-bit) precision.

Category: GRILL DIS|Unit Conversions

Parameter Description
LatLonHeightDegreesMeters The latitude in degrees, longitude in degrees, and height in meters
OutECEF The converted ECEF location in double

Back to Top


CalculateHeadingPitchRollDegreesFromPsiThetaPhiDegreesAtLatLon

public static void CalculateHeadingPitchRollDegreesFromPsiThetaPhiDegreesAtLatLon
(
    const FPsiThetaPhi PsiThetaPhiDegrees,
    const float LatitudeDegrees,
    const float LongitudeDegrees,
    FHeadingPitchRoll& HeadingPitchRollDegrees
)

Calculates the Heading, Pitch, and Roll in degrees from the given DIS orientation values Psi, Theta, and Phi in degrees at the given Latitude and Longitude.

Category: GRILL DIS|Unit Conversions

Parameter Description
PsiThetaPhiDegrees The rotation about the Z axis in degrees (Psi),the rotation about the Y axis in degrees (Theta), the rotation about the X axis in degrees (Phi)
LatitudeDegrees The target latitude given in degrees
LongitudeDegrees The target longitude given in degrees
HeadingPitchRollDegrees The degrees from North of the facing direction (heading), the degrees rotated about the local Y axis (pitch), and the degrees rotated about the local X axis (roll)

Back to Top


CalculateHeadingPitchRollDegreesFromPsiThetaPhiRadiansAtLatLon

public static void CalculateHeadingPitchRollDegreesFromPsiThetaPhiRadiansAtLatLon
(
    const FPsiThetaPhi PsiThetaPhiRadians,
    const float LatitudeDegrees,
    const float LongitudeDegrees,
    FHeadingPitchRoll& HeadingPitchRollDegrees
)

Calculates the Heading, Pitch, and Roll in degrees from the given DIS orientation values Psi, Theta, and Phi in radians at the given Latitude and Longitude.

Category: GRILL DIS|Unit Conversions

Parameter Description
PsiThetaPhiRadians The rotation about the Z axis in radians (Psi),the rotation about the Y axis in radians (Theta), the rotation about the X axis in radians (Phi)
LatitudeDegrees The target latitude given in degrees
LongitudeDegrees The target longitude given in degrees
HeadingPitchRollDegrees The degrees from North of the facing direction (heading), the degrees rotated about the local Y axis (pitch), and the degrees rotated about the local X axis (roll)

Back to Top


CalculateHeadingPitchRollRadiansFromPsiThetaPhiDegreesAtLatLon

public static void CalculateHeadingPitchRollRadiansFromPsiThetaPhiDegreesAtLatLon
(
    const FPsiThetaPhi PsiThetaPhiDegrees,
    const float LatitudeDegrees,
    const float LongitudeDegrees,
    FHeadingPitchRoll& HeadingPitchRollRadians
)

Calculates the Heading, Pitch, and Roll in radians from the given DIS orientation values Psi, Theta, and Phi in degrees at the given Latitude and Longitude.

Category: GRILL DIS|Unit Conversions

Parameter Description
PsiThetaPhiDegrees The rotation about the Z axis in degrees (Psi),the rotation about the Y axis in degrees (Theta), the rotation about the X axis in degrees (Phi)
LatitudeDegrees The target latitude given in degrees
LongitudeDegrees The target longitude given in degrees
HeadingPitchRollRadians The radians from North of the facing direction (heading), the radians rotated about the local Y axis (pitch), and the radians rotated about the local X axis (roll)

Back to Top


CalculateHeadingPitchRollRadiansFromPsiThetaPhiRadiansAtLatLon

public static void CalculateHeadingPitchRollRadiansFromPsiThetaPhiRadiansAtLatLon
(
    const FPsiThetaPhi PsiThetaPhiRadians,
    const float LatitudeDegrees,
    const float LongitudeDegrees,
    FHeadingPitchRoll& HeadingPitchRollRadians
)

Calculates the Heading, Pitch, and Roll in radians from the given DIS orientation values Psi, Theta, and Phi in radians at the given Latitude and Longitude.

Category: GRILL DIS|Unit Conversions

Parameter Description
PsiThetaPhiRadians The rotation about the Z axis in radians (Psi),the rotation about the Y axis in radians (Theta), the rotation about the X axis in radians (Phi)
LatitudeDegrees The target latitude given in degrees
LongitudeDegrees The target longitude given in degrees
HeadingPitchRollRadians The radians from North of the facing direction (heading), the radians rotated about the local Y axis (pitch), and the radians rotated about the local X axis (roll)

Back to Top


CalculateLatLonFromNorthEastDownVectors

public static void CalculateLatLonFromNorthEastDownVectors
(
    FNorthEastDown NorthEastDownVectors,
    float& LatitudeDegrees,
    float& LongitudeDegrees
)

Calculates the latitude and longitude at the given East, North, and Up vectors.

Category: GRILL DIS|Unit Conversions

Parameter Description
NorthEastDownVectors The vectors pointing to the North, to the East, and toward the center of the Earth
LatitudeDegrees The target latitude given in degrees
LongitudeDegrees The target longitude given in degrees

Back to Top


CalculateLatLonHeightFromEcefXYZ

public static void CalculateLatLonHeightFromEcefXYZ
(
    const FEarthCenteredEarthFixedDouble Ecef,
    FLatLonHeightDouble& OutLatLonHeightDegreesMeters
)

Converts DIS X, Y, Z coordinates (ECEF) to Latitude, Longitude, and Height (LLH) all in double (64-bit) precision.

Parameter Description
Ecef The ECEF location
OutLatLonHeightDegreesMeters The converted latitude in degrees, longitude in degrees, and height in meters

Back to Top


CalculateLatLonHeightFromEcefXYZ

public static void CalculateLatLonHeightFromEcefXYZ
(
    const FEarthCenteredEarthFixedFloat Ecef,
    FLatLonHeightFloat& OutLatLonHeightDegreesMeters
)

Converts DIS X, Y, Z coordinates (ECEF) to Latitude, Longitude, and Height (LLH) all in double (32-bit) precision.

Category: GRILL DIS|Unit Conversions

Parameter Description
Ecef The ECEF location
OutLatLonHeightDegreesMeters The converted latitude in degrees, longitude in degrees, and height in meters

Back to Top


CalculateNorthEastDownVectorsFromLatLon

public static void CalculateNorthEastDownVectorsFromLatLon
(
    const float LatitudeDegrees,
    const float LongitudeDegrees,
    FNorthEastDown& OutNorthEastDownVectors
)

Calculates the East, North, and Up vectors at given latitude and longitude.

Category: GRILL DIS|Unit Conversions

Parameter Description
LatitudeDegrees The target latitude given in degrees
LongitudeDegrees The target longitude given in degrees
OutNorthEastDownVectors The local vectors pointing North, pointing East, and toward the center of the Earth at the given latitude and longitude

Back to Top


CalculatePsiThetaPhiDegreesFromHeadingPitchRollDegreesAtLatLon

public static void CalculatePsiThetaPhiDegreesFromHeadingPitchRollDegreesAtLatLon
(
    const FHeadingPitchRoll HeadingPitchRollDegrees,
    const float LatitudeDegrees,
    const float LongitudeDegrees,
    FPsiThetaPhi& PsiThetaPhiDegrees
)

Calculates the DIS orientation values Psi, Theta, and Phi in degrees with the given Heading, Pitch, and Roll in degrees at the given Latitude and Longitude.

Category: GRILL DIS|Unit Conversions

Parameter Description
HeadingPitchRollDegrees The degrees from North of the facing direction (heading), the degrees rotated about the local Y axis (pitch), and the degrees rotated about the local X axis (roll)
LatitudeDegrees The target latitude given in degrees
LongitudeDegrees The target longitude given in degrees
PsiThetaPhiDegrees The rotation about the Z axis in degrees (Psi),the rotation about the Y axis in degrees (Theta), the rotation about the X axis in degrees (Phi)

Back to Top


CalculatePsiThetaPhiDegreesFromHeadingPitchRollRadiansAtLatLon

public static void CalculatePsiThetaPhiDegreesFromHeadingPitchRollRadiansAtLatLon
(
    const FHeadingPitchRoll HeadingPitchRollRadians,
    const float LatitudeDegrees,
    const float LongitudeDegrees,
    FPsiThetaPhi& PsiThetaPhiDegrees
)

Calculates the DIS orientation values Psi, Theta, and Phi in degrees with the given Heading, Pitch, and Roll in radians at the given Latitude and Longitude.

Category: GRILL DIS|Unit Conversions

Parameter Description
HeadingPitchRollRadians The radians from North of the facing direction (heading), the radians rotated about the local Y axis (pitch), and the radians rotated about the local X axis (roll)
LatitudeDegrees The target latitude given in degrees
LongitudeDegrees The target longitude given in degrees
PsiThetaPhiDegrees The rotation about the Z axis in degrees (Psi),the rotation about the Y axis in degrees (Theta), the rotation about the X axis in degrees (Phi)

Back to Top


CalculatePsiThetaPhiRadiansFromHeadingPitchRollDegreesAtLatLon

public static void CalculatePsiThetaPhiRadiansFromHeadingPitchRollDegreesAtLatLon
(
    const FHeadingPitchRoll HeadingPitchRollDegrees,
    const float LatitudeDegrees,
    const float LongitudeDegrees,
    FPsiThetaPhi& PsiThetaPhiRadians
)

Calculates the DIS orientation values Psi, Theta, and Phi in radians with the given Heading, Pitch, and Roll in degrees at the given Latitude and Longitude.

Category: GRILL DIS|Unit Conversions

Parameter Description
HeadingPitchRollDegrees The degrees from North of the facing direction (heading), the degrees rotated about the local Y axis (pitch), and the degrees rotated about the local X axis (roll)
LatitudeDegrees The target latitude given in degrees
LongitudeDegrees The target longitude given in degrees
PsiThetaPhiRadians The rotation about the Z axis in radians (Psi),the rotation about the Y axis in radians (Theta), the rotation about the X axis in radians (Phi)

Back to Top


CalculatePsiThetaPhiRadiansFromHeadingPitchRollRadiansAtLatLon

public static void CalculatePsiThetaPhiRadiansFromHeadingPitchRollRadiansAtLatLon
(
    const FHeadingPitchRoll HeadingPitchRollRadians,
    const float LatitudeDegrees,
    const float LongitudeDegrees,
    FPsiThetaPhi& PsiThetaPhiRadians
)

Calculates the DIS orientation values Psi, Theta, and Phi in radians with the given Heading, Pitch, and Roll in radians at the given Latitude and Longitude.

Category: GRILL DIS|Unit Conversions

Parameter Description
HeadingPitchRollRadians The radians from North of the facing direction (heading), the radians rotated about the local Y axis (pitch), and the radians rotated about the local X axis (roll)
LatitudeDegrees The target latitude given in degrees
LongitudeDegrees The target longitude given in degrees
PsiThetaPhiRadians The rotation about the Z axis in radians (Psi),the rotation about the Y axis in radians (Theta), the rotation about the X axis in radians (Phi)

Back to Top


ConvertNedAndEnu

public static FMatrix ConvertNedAndEnu
(
    FMatrix StartingVectors
)

Convert between North, East, Down and East, North, Up orientation representation using double values.

Parameter Description
StartingVectors The matrix representation of the starting vectors (each vector is a column and the final vector is 0)
Returns
The resulting conversion of swapping the first two vectors and negating the third

Back to Top


ConvertNedAndEnu

public static glm::dmat3 ConvertNedAndEnu
(
    glm::dmat3 StartingVectors
)

Convert between North, East, Down and East, North, Up orientation representation using double values.

Parameter Description
StartingVectors The matrix representation of the starting vectors (each vector is a column)
Returns
The resulting conversion of swapping the first two vectors and negating the last

Back to Top


CreateNCrossXMatrix

public static FMatrix CreatNCrossXMatrix
(
    FVector NVector
)

Creates a 4x4 n^x matrix used for creating a rotation matrix.

Parameter Description
NVector A 3x1 vector representing the axis of rotation
Returns
A 4x4 n^x matrix used for creating a rotation matrix

Back to Top


CreateNCrossXMatrix

public static glm::dmat3 CreateNCrossXMatrix
(
    glm::dvec3 NVector
)

Creates a 3x3 n^x matrix used for creating a rotation matrix

Parameter Description
NVector A 3x1 vector representing the axis of rotation
Returns
A 3x3 n^x matrix used for creating a rotation matrix

Back to Top


CreateRotationMatrix

private static void CreateRotationMatrix
(
    FVector AxisVector,
    float ThetaRadians,
    FMatrix& OutRotationMatrix
)

Creates a 4x4 rotation matrix around the given axis of rotation rotating by Theta radians.

Parameter Description
AxisVector A 3x1 vector representing the axis of rotation
ThetaRadians The amount to rotate given in radians
OutRotationMatrix The resultant rotation matrix to rotate Theta radians around axis AxisVector

Back to Top


CreateRotationMatrix

private static void CreateRotationMatrix
(
    glm::dvec3 AxisVector,
    float ThetaRadians,
    glm::dmat3& OutRotationMatrix
)

Creates a 3x3 rotation matrix around the given axis of rotation rotating by Theta radians.

Parameter Description
AxisVector A 3x1 vector representing the axis of rotation
ThetaRadians The amount to rotate given in radians
OutRotationMatrix The resultant rotation matrix to rotate Theta radians around axis AxisVector

Back to Top


GetEastNorthUpVectorsFromNorthEastDownVectors

public static void GetEastNorthUpVectorsFromNorthEastDownVectors
(
    FNorthEastDown NorthEastDownVectors,
    FEastNorthUp& EastNorthUpVectors
)

Get the East, North, and Up vectors from the North, East, and Down vector struct.

Category: GRILL DIS|Unit Conversions

Parameter Description
NorthEastDownVectors The North, East, and Down vectors representing the current orientation
EastNorthUpVectors The resulting East, North, and Up vectors representing the current orientation

Back to Top


GetEastNorthUpVectorsFromUnrealLocation

public static void GetEastNorthUpVectorsFromUnrealLocation
(
    FVector UnrealLocation,
    AGeoReferencingSystem* GeoReferencingSystem,
    FEastNorthUp& EastNorthUpVectors
)

Gets the East, North, and Up vector representation of the given Unreal location.

Category: GRILL DIS|Unit Conversions

Parameter Description
UnrealLocation The location in Unreal units
GeoReferencingSystem The GeoReferencing Subsystem reference
EastNorthUpVectors The East, North, and Up vectors for the given Unreal location

Back to Top


GetEcefXYZAndPsiThetaPhiDegreesFromUnreal

public static void GetEcefXYZAndPsiThetaPhiDegreesFromUnreal
(
    const FRotator UnrealRotation,
    const FVector UnrealLocation,
    AGeoReferencingSystem* GeoReferencingSystem,
    FEarthCenteredEarthFixedFloat& EcefXYZ,
    FPsiThetaPhi& PsiThetaPhiDegrees
)

Gets the ECEF location and the Psi (Yaw), Theta (Pitch), and Phi (Roll) in degrees of the given Unreal rotation at the given Unreal location.

Category: GRILL DIS|Unit Conversions

Parameter Description
UnrealRotation The Unreal rotation in world space
UnrealLocation The Unreal location in world space
GeoReferencingSystem The GeoReferencing Subsystem reference
EcefXYZ The ECEF location of the given Unreal location
PsiThetaPhiDegrees The Psi (Yaw), Theta (Pitch), and Phi (Roll) in degrees

Back to Top


GetEcefXYZAndPsiThetaPhiRadiansFromUnreal

public static void GetEcefXYZAndPsiThetaPhiRadiansFromUnreal
(
    const FRotator UnrealRotation,
    const FVector UnrealLocation,
    AGeoReferencingSystem* GeoReferencingSystem,
    FEarthCenteredEarthFixedFloat& EcefXYZ,
    FPsiThetaPhi& PsiThetaPhiRadians
)

Gets the ECEF location and the Psi (Yaw), Theta (Pitch), and Phi (Roll) in radians of the given Unreal rotation at the given Unreal location

Category: GRILL DIS|Unit Conversions

Parameter Description
UnrealRotation The Unreal rotation in world space
UnrealLocation The Unreal location in world space
GeoReferencingSystem The GeoReferencing Subsystem reference
EcefXYZ The ECEF location of the given Unreal location
PsiThetaPhiRadians The Psi (Yaw), Theta (Pitch), and Phi (Roll) in radians

Back to Top


GetEcefXYZFromUnrealLocation

static void GetEcefXYZFromUnrealLocation
(
    const FVector UnrealLocation,
    AGeoReferencingSystem* GeoReferencingSystem,
    FEarthCenteredEarthFixedFloat& ECEF
) 

Calculate the ECEF location of the given Unreal location.

Category: GRILL DIS|Unit Conversions

Parameter Description
UnrealLocation The Unreal location to convert to ECEF
GeoReferencingSystem The GeoReferencing Subsystem reference
ECEF The ECEF location of the given Unreal location

Back to Top


GetHeadingPitchRollFromUnrealRotation

public static void GetHeadingPitchRollFromUnrealRotation
(
    const FRotator UnrealRotation,
    const FVector UnrealLocation,
    AGeoReferencingSystem* GeoReferencingSystem,
    FHeadingPitchRoll& HeadingPitchRollDegrees
)

Gets the Heading, Pitch, and Roll in degrees of the given Unreal rotation at the given Unreal location

Category: GRILL DIS|Unit Conversions

Parameter Description
UnrealRotation The Unreal rotation in world space
UnrealLocation The Unreal location in world space
GeoReferencingSystem The GeoReferencing Subsystem reference
HeadingPitchRollDegrees The heading from North, pitch, and roll in degrees

Back to Top


GetLatLonHeightFromUnrealLocation

public static void GetLatLonHeightFromUnrealLocation
(
    const FVector UnrealLocation,
    AGeoReferencingSystem* GeoReferencingSystem,
    FLatLonHeightFloat& LatLonHeightDegreesMeters
)

Calculate the latitude in degrees, longitude in degrees, and height in meters of the given Unreal location.

Category: GRILL DIS|Unit Conversions

Parameter Description
UnrealLocation The Unreal location to convert to latitude, longitude, height
GeoReferencingSystem The GeoReferencing Subsystem reference
LatLonHeightDegreesMeters The latitude in degrees, longitude in degrees, and height in meters of the given Unreal location

Back to Top


GetNorthEastDownVectorsFromEastNorthUpVectors

public static void GetNorthEastDownVectorsFromEastNorthUpVectors
(
    FEastNorthUp EastNorthUpVectors,
    FNorthEastDown& NorthEastDownVectors
)

Get the North, East, and Down vectors from the East, North, and Up vector struct.

Category: GRILL DIS|Unit Conversions

Parameter Description
EastNorthUpVectors The East, North, and Up vectors representing the current orientation
NorthEastDownVectors The resulting North, East, and Down vectors representing the current orientation

Back to Top


GetNorthEastDownVectorsFromUnrealLocation

public static void GetNorthEastDownVectorsFromUnrealLocation
(
    FVector UnrealLocation,
    AGeoReferencingSystem* GeoReferencingSystem,
    FNorthEastDown& NorthEastDownVectors
)

Gets the North, East, and Down vector representation of the given Unreal location.

Category: GRILL DIS|Unit Conversions

Parameter Description
UnrealLocation The location in Unreal units
GeoReferencingSystem The GeoReferencing Subsystem reference
NorthEastDownVectors The North, East, and Down vectors for the given Unreal location

Back to Top


GetPsiThetaPhiDegreesFromUnrealRotation

public static void GetPsiThetaPhiDegreesFromUnrealRotation
(
    const FRotator UnrealRotation, const FVector UnrealLocation, AGeoReferencingSystem* GeoReferencingSystem, FPsiThetaPhi& PsiThetaPhiDegrees
)

Gets the Psi (Yaw), Theta (Pitch), and Phi (Roll) in degrees of the given Unreal rotation at the given Unreal location

Category: GRILL DIS|Unit Conversions

Parameter Description
UnrealRotation The Unreal rotation in world space
UnrealLocation The Unreal location in world space
GeoReferencingSystem The GeoReferencing Subsystem reference
PsiThetaPhiDegrees The Psi (Yaw), Theta (Pitch), and Phi (Roll) in degrees

Back to Top


GetPsiThetaPhiRadiansFromUnrealRotation

public static void GetPsiThetaPhiRadiansFromUnrealRotation
(
    const FRotator UnrealRotation,
    const FVector UnrealLocation,
    AGeoReferencingSystem* GeoReferencingSystem,
    FPsiThetaPhi& PsiThetaPhiRadians
)

Gets the Psi (Yaw), Theta (Pitch), and Phi (Roll) in radians of the given Unreal rotation at the given Unreal location.

Category: GRILL DIS|Unit Conversions

Parameter Description
UnrealRotation The Unreal rotation in world space
UnrealLocation The Unreal location in world space
GeoReferencingSystem The GeoReferencing Subsystem reference
PsiThetaPhiDegrees The Psi (Yaw), Theta (Pitch), and Phi (Roll) in radians

Back to Top


GetUnrealLocationAndOrientationFromEntityStatePdu

public static void GetUnrealLocationAndOrientationFromEntityStatePdu
(
    const FEntityStatePDU EntityStatePdu,
    AGeoReferencingSystem* GeoReferencingSystem,
    FVector& UnrealLocation,
    FRotator& UnrealRotation
)

Gets the Unreal X, Y, Z coordinates and rotation from a DIS entity state PDU. Location values returned change depending on if GeoReferencing Subsystem is set to Flat Earth or Round Earth.

Category: GRILL DIS|Unit Conversions

Parameter Description
EntityStatePdu The DIS PDU struct indicating the current state of the DIS entity
GeoReferencingSystem The GeoReferencing Subsystem reference
UnrealLocation The location of the entity in Unreal
UnrealRotation The rotation of the entity in Unreal

Back to Top


GetUnrealLocationFromEcefXYZ

public static void GetUnrealLocationFromEcefXYZ
(
    const FEarthCenteredEarthFixedDouble EcefXYZ,
    AGeoReferencingSystem* GeoReferencingSystem,
    FVector& UnrealLocation
)

Get the Unreal location from the given ECEF XYZ location.

Parameter Description
EcefXYZ The ECEF XYZ location to get the Unreal location from
GeoReferencingSystem The GeoReferencing Subsystem reference
UnrealLocation The Unreal location of the given ECEF XYZ location

Back to Top


GetUnrealLocationFromEcefXYZ

public static void GetUnrealLocationFromEcefXYZ
(
    const FEarthCenteredEarthFixedFloat EcefXYZ,
    AGeoReferencingSystem* GeoReferencingSystem,
    FVector& UnrealLocation
)

Get the Unreal location from the given ECEF XYZ location.

Category: GRILL DIS|Unit Conversions

Parameter Description
EcefXYZ The ECEF XYZ location to get the Unreal location from
GeoReferencingSystem The GeoReferencing Subsystem reference
UnrealLocation The Unreal location of the given ECEF XYZ location

Back to Top


GetUnrealLocationFromEntityStatePdu

public static void GetUnrealLocationFromEntityStatePdu
(
    const FEntityStatePDU EntityStatePdu,
    AGeoReferencingSystem* GeoReferencingSystem,
    FVector& UnrealLocation
)

Gets the Unreal X, Y, Z coordinates of the entity from the given ECEF values in the DIS entity state pdu. Values returned change depending on if GeoReferencing Subsystem is set to Flat Earth or Round Earth.

Category: GRILL DIS|Unit Conversions

Parameter Description
EntityStatePdu The DIS PDU struct indicating the current state of the DIS entity
GeoReferencingSystem The GeoReferencing Subsystem reference
UnrealLocation The resulting Unreal XYZ location of the entity in Unreal units

Back to Top


GetUnrealLocationFromLatLonHeight

public static void GetUnrealLocationFromLatLonHeight
(
    const FLatLonHeightFloat LatLonHeightDegreesMeters,
    AGeoReferencingSystem* GeoReferencingSystem,
    FVector& UnrealLocation
)

Get the Unreal location from the given latitude in degrees, longitude in degrees, and height in meters location.

Category: GRILL DIS|Unit Conversions

Parameter Description
LatLonHeightDegreesMeters The LLH location to get the Unreal location from
GeoReferencingSystem The GeoReferencing Subsystem reference
UnrealLocation The Unreal location of the given LLH location

Back to Top


GetUnrealRotationFromEntityStatePdu

public static void GetUnrealRotationFromEntityStatePdu
(
    const FEntityStatePDU EntityStatePdu,
    AGeoReferencingSystem* GeoReferencingSystem,
    FRotator& UnrealRotation
)

Gets Unreal rotation from a DIS entity state PDU.

Category: GRILL DIS|Unit Conversions

Parameter Description
EntityStatePdu The DIS PDU struct indicating the current state of the DIS entity
GeoReferencingSystem The GeoReferencing Subsystem reference
UnrealRotation The rotation of the entity in Unreal

Back to Top


GetUnrealRotationFromHeadingPitchRollDegreesAtLatLon

public static void GetUnrealRotationFromHeadingPitchRollDegreesAtLatLon
(
    const FHeadingPitchRoll HeadingPitchRollDegrees,
    const float LatitudeDegrees,
    const float LongitudeDegrees,
    AGeoReferencingSystem* GeoReferencingSystem,
    FRotator& UnrealRotation
)

Get the Unreal rotation from the given Heading, Pitch, Roll rotation in degrees.

Category: GRILL DIS|Unit Conversions

Parameter Description
HeadingPitchRollDegrees The Heading, Pitch, Roll rotation in degrees to get the Unreal rotation from
LatitudeDegrees The target latitude given in degrees
LongitudeDegrees The target longitude given in degrees
GeoReferencingSystem The GeoReferencing Subsystem reference
UnrealRotation The Unreal rotation of the given Heading, Pitch, Roll rotation

Back to Top


GetUnrealRotationFromHeadingPitchRollRadiansAtLatLon

public static void GetUnrealRotationFromHeadingPitchRollRadiansAtLatLon
(
    const FHeadingPitchRoll HeadingPitchRollRadians,
    const float LatitudeDegrees,
    const float LongitudeDegrees,
    AGeoReferencingSystem* GeoReferencingSystem,
    FRotator& UnrealRotation
)

Get the Unreal rotation from the given Heading, Pitch, Roll rotation in radians.

Category: GRILL DIS|Unit Conversions

Parameter Description
HeadingPitchRollRadians The Heading, Pitch, Roll rotation in radians to get the Unreal rotation from
LatitudeDegrees The target latitude given in degrees
LongitudeDegrees The target longitude given in degrees
GeoReferencingSystem The GeoReferencing Subsystem reference
UnrealRotation The Unreal rotation of the given Heading, Pitch, Roll rotation

Back to Top


GetUnrealRotationFromPsiThetaPhiDegreesAtLatLon

public static void GetUnrealRotationFromPsiThetaPhiDegreesAtLatLon
(
    const FPsiThetaPhi PsiThetaPhiDegrees,
    const float LatitudeDegrees,
    const float LongitudeDegrees,
    AGeoReferencingSystem* GeoReferencingSystem,
    FRotator& UnrealRotation
)

Get the Unreal rotation from the given Psi, Theta, Phi rotation in degrees.

Category: GRILL DIS|Unit Conversions

Parameter Description
PsiThetaPhiDegrees The Psi, Theta, Phi rotation in degrees to get the Unreal rotation from
LatitudeDegrees The target latitude given in degrees
LongitudeDegrees The target longitude given in degrees
GeoReferencingSystem The GeoReferencing Subsystem reference
UnrealRotation The Unreal rotation of the given Psi, Theta, Phi rotation

Back to Top


GetUnrealRotationFromPsiThetaPhiRadiansAtLatLon

public static void GetUnrealRotationFromPsiThetaPhiRadiansAtLatLon
(
    const FPsiThetaPhi PsiThetaPhiRadians,
    const float LatitudeDegrees,
    const float LongitudeDegrees,
    AGeoReferencingSystem* GeoReferencingSystem,
    FRotator& UnrealRotation
)

Get the Unreal rotation from the given Psi, Theta, Phi rotation in radians.

Category: GRILL DIS|Unit Conversions

Parameter Description
PsiThetaPhiRadians The Psi, Theta, Phi rotation in radians to get the Unreal rotation from
LatitudeDegrees The target latitude given in degrees
LongitudeDegrees The target longitude given in degrees
GeoReferencingSystem The GeoReferencing Subsystem reference
UnrealRotation The Unreal rotation of the given Psi, Theta, Phi rotation

Back to Top


RotateVectorAroundAxisByDegrees

public static void RotateVectorAroundAxisByDegrees
(
    FVector VectorToRotate,
    float ThetaDegrees,
    FVector AxisVector,
    FVector& OutRotatedVector
)

Rotates the vector VectorToRotate around given axis AxisVector by Theta degrees.

Category: GRILL DIS|Unit Conversions

Parameter Description
VectorToRotate The target vector to rotate
ThetaDegrees The desired amount to rotation in degrees
AxisVector The vector indicating the axis of rotation
OutRotatedVector The resultant rotated vector

Back to Top


RotateVectorAroundAxisByDegrees

public static void RotateVectorAroundAxisByDegrees
(
    glm::dvec3 VectorToRotate,
    float ThetaDegrees,
    glm::dvec3 AxisVector,
    glm::dvec3& OutRotatedVector
)

Rotates the vector VectorToRotate around given axis AxisVector by Theta degrees

Parameter Description
VectorToRotate The target vector to rotate
ThetaDegrees The desired amount to rotation in degrees
AxisVector The vector indicating the axis of rotation
OutRotatedVector The resultant rotated vector

Back to Top


RotateVectorAroundAxisByRadians

public static void RotateVectorAroundAxisByRadians
(
    FVector VectorToRotate,
    float ThetaRadians,
    FVector AxisVector,
    FVector& OutRotatedVector
)

Rotates the vector VectorToRotate around given axis AxisVector by Theta radians

Category: GRILL DIS|Unit Conversions

Parameter Description
VectorToRotate The target vector to rotate
ThetaRadians The desired amount to rotation in radians
AxisVector The vector indicating the axis of rotation
OutRotatedVector The resultant rotated vector

Back to Top


RotateVectorAroundAxisByRadians

public static void RotateVectorAroundAxisByRadians
(
    glm::dvec3 VectorToRotate,
    double ThetaRadians,
    glm::dvec3 AxisVector,
    glm::dvec3& OutRotatedVector
)

Rotates the vector VectorToRotate around given axis AxisVector by Theta radians.

Parameter Description
VectorToRotate The target vector to rotate
ThetaRadians The desired amount to rotation in radians
AxisVector The vector indicating the axis of rotation
OutRotatedVector The resultant rotated vector

Back to Top


Clone this wiki locally