15#include "wsf_export.h"
21#include "UtMatrix.hpp"
22#include "UtSphericalEarth.hpp"
32template<
class T1,
class T2>
35template<
class T1,
class T2>
45 assert((aNumBits >= 1) && (aNumBits <= 32));
50 else if (aNumBits >= 32)
54 return 0xFFFFFFFF >> (32 - aNumBits);
58 const double aMoverVelWCS[3],
59 const double aTargetLocWCS[3],
60 double aClosestLocWCS[3]);
63 const double aMoverVelWCS[3],
64 const double aTargetLocWCS[3],
65 double aClosestLocWCS[3]);
71 const double& aBearing1,
72 const double& aElevation1,
73 const double aOriginWCS_2[3],
74 const double& aBearing2,
75 const double& aElevation2,
76 double aLocationWCS[3]);
86 double aElevationError,
89void WSF_EXPORT ErrorNED(
double aRange,
double aBearing,
double aRangeError,
double aBearingError,
double aErrorNED[3]);
96 double& aSemiMajorAxis,
97 double& aSemiMinorAxis,
101 const UtVec3d& aVelocityWCS,
102 double aStopAltitude,
103 UtVec3d& aPropagatedLocationWCS,
104 UtVec3d& aPropagatedVelocityWCS);
115 unsigned short& aValidity,
120 double& aStDevHeading);
123void WSF_EXPORT PrintLLA(
const std::string& aLabel,
double aLat,
double aLon,
double aAlt);
137template<
class T1,
class T2>
151template<
class T1,
class T2>
160 aSource.GetLocationLLA(sourceLat, sourceLon, sourceAlt);
161 aDest.GetLocationLLA(destLat, destLon, destAlt);
164 UtSphericalEarth::GreatCircleHeadingAndDistance(sourceLat, sourceLon, destLat, destLon, heading, distance);
175template<
class T1,
class T2>
178 double sourceLocWCS[3];
179 double destLocWCS[3];
180 aSource.GetLocationWCS(sourceLocWCS);
181 aDest.GetLocationWCS(destLocWCS);
183 UtVec3d::Subtract(targetVec, destLocWCS, sourceLocWCS);
184 return UtVec3d::Magnitude(targetVec);
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Contains the data required to create a simulation, and acts as the entry point for input file process...
Definition WsfScenario.hpp:111
Definition WsfTrackId.hpp:33
An object that represents an 'track' (perception) of something.
Definition WsfTrack.hpp:120
A set of utilities that perform generic calculations among WSF objects.
Definition WsfAttributeContainer.hpp:54
static const unsigned short cSPEED_ERROR_VALID
Definition WsfUtil.hpp:111
bool WSF_EXPORT TriangulateLocation(const double aOriginWCS_1[3], const double &aBearing1, const double &aElevation1, const double aOriginWCS_2[3], const double &aBearing2, const double &aElevation2, double aLocationWCS[3])
Definition WsfUtil.cpp:277
WsfTrackId WSF_EXPORT IntToTrackId(int aIntTrackId)
Definition WsfUtil.cpp:261
double DistanceToDestination(T1 &aSource, T2 &aDest)
Calculate the great circle distance from a source to a destination.
Definition WsfUtil.hpp:152
double SlantRange(T1 &aSource, T2 &aDest)
Calculate the slant range distance from a source to a destination (second parameter is const).
Definition WsfUtil.hpp:176
void WSF_EXPORT PrintLLA(const std::string &aLabel, double aLocationWCS[3])
Calls PrintLLA() for the LLA representation of aLocationWCS.
Definition WsfUtil.cpp:625
void WSF_EXPORT ClosestApproachPoint2D(const double aMoverLocWCS[3], const double aMoverVelWCS[3], const double aTargetLocWCS[3], double aClosestLocWCS[3])
Definition WsfUtil.cpp:62
static const unsigned short cLLA_ERROR_VALID
Validity Masks associated with the "aValidity" parameter in the following method:
Definition WsfUtil.hpp:110
double TimeToDestination(T1 &aSource, T2 &aDest, const double aVel[3])
Calculate the time it would take an object (e.g., a WsfPlatform) to traverse a great circle distance ...
Definition WsfUtil.hpp:138
void WSF_EXPORT CovarianceToEllipse_2x2(std::vector< double > &aMatrix, double &aSemiMajorAxis, double &aSemiMinorAxis, double &aBearingRad)
Definition WsfUtil.cpp:338
void WSF_EXPORT GetErrorEstimateLLA_SpeedHeading(const WsfTrack &aTrack, unsigned short &aValidity, double &aStDevLat, double &aStDevLon, double &aStDevAlt, double &aStDevSpeed, double &aStDevHeading)
Definition WsfUtil.cpp:564
void WSF_EXPORT PrintLength(const std::string &aLabel, double aLength)
Definition WsfUtil.cpp:646
void WSF_EXPORT ErrorNED(double aRange, double aBearing, double aElevation, double aRangeError, double aBearingError, double aElevationError, double aErrorNED[3])
Definition WsfUtil.cpp:411
double WSF_EXPORT BallisticPropagate(const UtVec3d &aLocationWCS, const UtVec3d &aVelocityWCS, double aStopAltitude, UtVec3d &aPropagatedLocationWCS, UtVec3d &aPropagatedVelocityWCS)
Definition WsfUtil.cpp:457
int WSF_EXPORT CountBitsOn(unsigned int aBitMask)
Definition WsfUtil.cpp:40
static const unsigned short cHEADING_ERROR_VALID
Definition WsfUtil.hpp:112
bool WSF_EXPORT PotentiallyWithinRange(double aSimTime, WsfPlatform *aObject1Ptr, WsfPlatform *aObject2Ptr, double aMaximumRange)
Definition WsfUtil.cpp:198
void WSF_EXPORT ConvertRangeBearing(const double aFromLocationWCS[3], UtEntity *aToEntity, double &aRange, double &aBearing)
Definition WsfUtil.cpp:398
void WSF_EXPORT MakeTrack(double aSimTime, WsfTrack &aTrack, WsfPlatform &aTarget, WsfPlatform &aSource)
Fill a track with truth information on aTarget with aSource as the track source.
Definition WsfUtil.cpp:505
int WSF_EXPORT TrackIdToInt(const WsfTrackId &aTrackId)
Definition WsfUtil.cpp:250
double WSF_EXPORT ClosestApproachPoint3D(const double aMoverLocWCS[3], const double aMoverVelWCS[3], const double aTargetLocWCS[3], double aClosestLocWCS[3])
Definition WsfUtil.cpp:143
unsigned int GenerateBitMask(int aNumBits)
Definition WsfUtil.hpp:43