|
WSF
|
#include <WsfGeoPoint.hpp>


Public Member Functions | |
| WsfGeoPoint () | |
| WsfGeoPoint (const double aPointWCS[3]) | |
| WsfGeoPoint (double aLat, double aLon, double aAlt) | |
| WsfGeoPoint (const WsfGeoPoint &aSrc) | |
| Copy constructor (for Clone()). | |
| WsfGeoPoint & | operator= (const WsfGeoPoint &) |
| Assignment operator. | |
| ~WsfGeoPoint () override=default | |
| Public Member Functions inherited from WsfSimpleComponentT< WsfPlatformComponent > | |
| WsfSimpleComponentT ()=default | |
| Empty constructor for serialization. | |
| WsfSimpleComponentT (int aRole, WsfStringId aName) | |
| WsfSimpleComponentT (int aRole) | |
| WsfSimpleComponentT (WsfStringId aName) | |
| WsfSimpleComponentT (const WsfSimpleComponentT &aSrc) | |
| WsfSimpleComponentT & | operator= (const WsfSimpleComponentT &aRhs) |
| ~WsfSimpleComponentT () override=default | |
| WsfStringId | GetComponentName () const override |
| const int * | GetComponentRoles () const override |
| Public Member Functions inherited from WsfComponentT< WsfPlatform > | |
| WsfComponentT () | |
| WsfComponentT (const WsfComponentT &) noexcept | |
| WsfComponentT & | operator= (const WsfComponentT &) noexcept |
| ~WsfComponentT () override=default | |
| virtual void | ComponentParentChanged (ParentType *aParentPtr) |
| ParentType * | GetComponentParent () const |
| void | SetComponentParent (ParentType *aParentPtr) |
| Public Member Functions inherited from WsfComponent | |
| virtual | ~WsfComponent ()=default |
| virtual int | GetComponentInitializationOrder () const |
| template<typename T> | |
| bool | QueryInterfaceT (T *&aRolePtr) |
| bool | ComponentHasRole (int aRole) |
| Returns true if the component has the specified role. | |
| virtual bool | PreInitialize (double aSimTime) |
| virtual bool | Initialize (double aSimTime) |
| virtual bool | Initialize2 (double aSimTime) |
| virtual void | PreInput () |
| Public Member Functions inherited from WsfNamed | |
| WsfNamed () | |
| WsfNamed (WsfStringId aName) | |
| WsfNamed (const WsfNamed &)=default | |
| WsfNamed & | operator= (const WsfNamed &)=default |
| virtual | ~WsfNamed ()=default |
| const std::string & | GetName () const |
| WsfStringId | GetNameId () const |
| void | SetName (WsfStringId aName) |
Static Public Member Functions | |
| static void | RegisterComponentFactory (WsfScenario &aScenario) |
Component infrastructure methods | |
| WsfComponent * | CloneComponent () const override |
| void * | QueryInterface (int aRole) override |
| virtual WsfGeoPoint * | Clone () const |
| bool | ProcessInput (UtInput &aInput) override |
| Process input from a generic source. | |
| void | GetLocationWCS (double aLocationWCS[3]) const |
| double | GetDistanceFrom (double aLocationWCS[3]) const |
| double | GetDistanceFrom (const WsfGeoPoint &aRefPoint) const |
| void | SetLocationWCS (const double aLocationWCS[3]) |
| Set the geo point location in world coordinates. | |
| void | GetLocationECI (const UtCalendar &aTime, double aLocationECI[3]) const |
| double | GetLat () const |
| double | GetLon () const |
| double | GetAlt () const |
| void | GetLocationLLA (double &aLat, double &aLon, double &aAlt) const |
| void | SetLocationLLA (double aLat, double aLon, double aAlt) |
| void | AddOffset (double aHeading, const double aOffset[3]) |
| void | AddOffsetNED (const double aOffsetNED[3]) |
| void | Extrapolate (double aHeading, double aDistance) |
| void | SetAltitudeMSL (double aAltitude) |
| Sets the altitude in meters above sea level. | |
| double | TrueBearingTo (const WsfGeoPoint &aRhs) const |
| Returns the true bearing to another geopoint in radians. | |
| double | GroundRangeTo (const WsfGeoPoint &aRhs) const |
| Returns the ground range to a location. | |
| double | GetApparentTime (const UtCalendar &aEpoch) const |
Return the apparent time in hours since midnight of this point at the given aEpoch. | |
| double | SlantRangeTo (const WsfGeoPoint &aRhs, const bool aUseSpherical=true) const |
| Returns the slant range to a location. | |
| template<typename AR> | |
| void | Serialize (AR &aAr) |
| For XIO (de)serialization. | |
Additional Inherited Members | |
| Public Types inherited from WsfComponentT< WsfPlatform > | |
| typedef WsfPlatform | ParentType |
| This is needed to support the WsfComponentList template. | |
| int | mRoles [2] |
A representation of a geographical point. A geo point represents a point on the earth. The geo point interface accommodates both world coordinates (WCS) and (lat, lon, alt) systems.
| WsfGeoPoint::WsfGeoPoint | ( | ) |
References cWSF_COMPONENT_GEOPOINT.
Referenced by Clone(), GetDistanceFrom(), GroundRangeTo(), operator=(), SlantRangeTo(), TrueBearingTo(), and WsfGeoPoint().
|
explicit |
Constructor from an input point in world coordinates (WCS).
| aPointWCS | The world coordinates of the geo point. |
References cWSF_COMPONENT_GEOPOINT, and SetLocationWCS().
| WsfGeoPoint::WsfGeoPoint | ( | double | aLat, |
| double | aLon, | ||
| double | aAlt ) |
Constructor from an input in (lat, lon, alt).
| aLat | The latitude of the geo point. |
| aLon | The longitude of the geo point. |
| aAlt | The altitude of the geo point. |
References cWSF_COMPONENT_GEOPOINT, and SetLocationLLA().
| WsfGeoPoint::WsfGeoPoint | ( | const WsfGeoPoint & | aSrc | ) |
Copy constructor (for Clone()).
References WsfGeoPoint().
|
overridedefault |
| void WsfGeoPoint::AddOffset | ( | double | aHeading, |
| const double | aOffset[3] ) |
Add an offset to the current location define by the geo point.
The addition takes place in a local frame whose origin is the current point. The X-Y plane is tangent to the Earth's surface at the location of the current point, with the X-axis aligned pointed in the direction specified by the first argument. The Z-axis points down and the Y-axis is formed such that the resulting coordinate system is right-handed (i.e.: Y = Z cross X).
| aHeading | The heading that defines the X-axis (radians CW from North). |
| aOffset | The offset to be applied (X/Y/Z) (meters). |
| void WsfGeoPoint::AddOffsetNED | ( | const double | aOffsetNED[3] | ) |
Add an north-east-down offset to the current location define by the geo point.
The addition takes place in the local NED frame whose origin is the current point.
| aOffsetNED | The offset to be applied (North/East/Down) (meters). |
|
inlinevirtual |
|
inlineoverridevirtual |
Clones a component. May return null if component does not support clone.
Implements WsfComponent.
References Clone().
| void WsfGeoPoint::Extrapolate | ( | double | aHeading, |
| double | aDistance ) |
Extrapolate a geo point for a given distance along a heading.
| aHeading | The heading along which the extrapolation should occur (radians CW from North) |
| aDistance | The extrapolation distance (meters). |
References SetLocationLLA().
Referenced by WsfPathComputer::CreateTarget().
| double WsfGeoPoint::GetAlt | ( | ) | const |
Get the altitude of a geo point.
Referenced by WsfInterceptCalculator::CanIntercept(), wsf::comm::ComponentHW_Subsurface::CanSendTo(), WsfRouteFinder::DrawRoute(), WsfPathFinder::FindClosestPointInQuadrant(), WsfNavigationMesh::FindClosestValidPoint(), WsfPathFinder::FindClosestValidPoint(), WsfPathFinder::FindPath(), WsfNavigationMesh::GetCellForPoint(), WsfNavigationMesh::GetCellsForPoint(), ZoneUtils::PointIsInAngularExtents(), WsfSA_Predict::ProjectPositionRollAndPull(), WsfSA_Predict::ProjectPositionTurnToHeading(), WsfRouteFinder::Route(), WsfZoneRouteFinder::RouteAroundZones(), XWsfOSM_Traffic::ScriptGoOffroad(), WsfBMStatusMessage::SetPosition(), WsfBMTrackMessage::SetPosition(), WsfScriptGeoPointClass::ToString(), WsfScriptGeoPointClass::ToStringMGRS(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and ZoneUtils::WithinAltitudeBounds().
| double WsfGeoPoint::GetApparentTime | ( | const UtCalendar & | aEpoch | ) | const |
Return the apparent time in hours since midnight of this point at the given aEpoch.
Referenced by UT_DEFINE_SCRIPT_METHOD().
| double WsfGeoPoint::GetDistanceFrom | ( | const WsfGeoPoint & | aRefPoint | ) | const |
Get the distance from one geo point to another.
| aRefPoint | The reference geo point. |
References WsfGeoPoint().
| double WsfGeoPoint::GetDistanceFrom | ( | double | aLocationWCS[3] | ) | const |
Get the distance from a world coordinate location to a geo point.
| aLocationWCS | The reference location in world coordinates. |
Referenced by WsfWMAIEngagementMod::AddBehaviorsToStack(), WsfSA_GroupUtils::DistanceFromCentroid(), WsfPathFinder::FindClosestPointInQuadrant(), WsfPathFinder::FindClosestPointOnEdge(), WsfPathFinder::FindClosestValidPoint(), WsfNavigationMesh::FindPath(), ZoneUtils::isProjectedInsideZonePointHeading(), WsfPathFinder::pf_cost_func::operator()(), WsfRouteFinder::Route(), WsfZoneRouteFinder::RouteAroundZones(), wsf::comm::ComponentHW_Subsurface::SetSubmarineRadioValues(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and WsfPFEdge::WsfPFEdge().
| double WsfGeoPoint::GetLat | ( | ) | const |
Get the latitude of a geo point.
Referenced by WsfInterceptCalculator::CanIntercept(), WsfNavigationMesh::CleanUpDuplicatePoints(), WsfPathComputer::CreateTarget(), WsfRouteFinder::DrawRoute(), WsfRouteMover::FindAndSetPath(), WsfPathFinder::FindClosestPointInQuadrant(), WsfPathFinder::FindClosestPointOnEdge(), WsfNavigationMesh::FindClosestValidPoint(), WsfPathFinder::FindClosestValidPoint(), ZoneUtils::FindIntersection(), WsfPathFinder::FindPath(), WsfNavigationMesh::GetCellForPoint(), WsfNavigationMesh::GetCellsForPoint(), WsfPathFinder::GetClosestNode(), WsfTerrainPathFinder::GetClosestNodePos(), ZoneUtils::GetLatLonPoints(), WsfTerrainPathFinder::Initialize(), ZoneUtils::PointIsInAngularExtents(), WsfSA_Predict::ProjectPositionGoToPoint(), WsfSA_Predict::ProjectPositionRollAndPull(), WsfSA_Predict::ProjectPositionTurnToHeading(), WsfRouteFinder::Route(), WsfZoneRouteFinder::RouteAroundZones(), XWsfOSM_Traffic::ScriptGoOffroad(), WsfBMStatusMessage::SetPosition(), WsfBMTrackMessage::SetPosition(), WsfZoneDefinition::SetReference(), wsf::comm::ComponentHW_Subsurface::SetSubmarineRadioValues(), WsfScriptGeoPointClass::ToString(), WsfScriptGeoPointClass::ToStringMGRS(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
| void WsfGeoPoint::GetLocationECI | ( | const UtCalendar & | aTime, |
| double | aLocationECI[3] ) const |
Get the geo point location in earth-centered inertial coordinates.
| aTime | The epoch at which the ECI location is desired. |
| aLocationECI | The returned ECI location. |
| void WsfGeoPoint::GetLocationLLA | ( | double & | aLat, |
| double & | aLon, | ||
| double & | aAlt ) const |
Get the location of the geo point in (lat, lon, alt) format.
| aLat | [output] The geodetic latitude in degrees in the range [-90, 90] |
| aLon | [output] The longitude in degrees in the range [-180, 180] |
| aAlt | [output] The altitude (in meters) above the ellipsoid. |
Referenced by WsfNavigationCell::AddVertex(), WsfNavigationMesh::CleanUpDuplicatePoints(), WsfConvexHull::ConvexHull(), WsfPathFinder::DebugDrawGrid(), WsfNavigationMesh::FindPath(), WsfPathFinder::FindPath(), WsfNavigationMesh::GetRandomLocation(), WsfNavigationMesh::GetRouteIntersectionPoints(), WsfGuidedMover::InitiateMotion(), WsfDisWeaponEvents::InitiateWeaponTransfer(), WsfNavigationMesh::LineOfSightTest(), WsfNavigationMesh::MovePointAlongPath(), WsfNavigationMesh::MovePointTowardsCentroid(), SetAltitudeMSL(), wsf::comm::ComponentHW_Subsurface::SetSubmarineRadioValues(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and while().
| void WsfGeoPoint::GetLocationWCS | ( | double | aLocationWCS[3] | ) | const |
Get the geo point location in world coordinates.
| aLocationWCS | [output] The geo point location in world coordinates. |
Referenced by WsfSA_PerceivedItem::AngleOffHeadingFromOwningPlatform_deg(), WsfInterceptCalculator::CanIntercept(), WsfNoiseCloud::CheckIntersections(), WsfClusterCorrelation::ClusterRawTracksIntoLocalTracks(), WsfWaypointMover::CornerVelocity(), WsfClusterManager::CrossLength(), WsfClusterManager::CrossLength(), WsfClusterManager::CrossLength(), WsfClusterManager::CrossLength(), WsfPathFinder::FindClosestValidPoint(), WsfNavigationMesh::GetCellZoneInteraction(), ZoneUtils::GetClosestPointInZone(), ZoneUtils::GetDistanceFromEllipseToPoint(), ZoneUtils::GetDistanceFromPointToZone(), ZoneUtils::GetDistanceFromPointToZoneCenter(), wsf::six_dof::Mover::GetInitialState(), WsfP6DOF_Mover::GetInitialState(), ZoneUtils::GetLatLonPoints(), GroundRangeTo(), WsfGuidanceComputer::Initialize2(), ZoneUtils::PointIsInAngularExtents(), WsfNavigationMesh::ProcessInput(), WsfPathFinder::ProcessInput(), WsfRouteFinder::Route(), SlantRangeTo(), TrueBearingTo(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
| double WsfGeoPoint::GetLon | ( | ) | const |
Get the longitude of a geo point.
Referenced by WsfInterceptCalculator::CanIntercept(), WsfNavigationMesh::CleanUpDuplicatePoints(), WsfPathComputer::CreateTarget(), WsfRouteFinder::DrawRoute(), WsfRouteMover::FindAndSetPath(), WsfPathFinder::FindClosestPointInQuadrant(), WsfPathFinder::FindClosestPointOnEdge(), WsfNavigationMesh::FindClosestValidPoint(), WsfPathFinder::FindClosestValidPoint(), ZoneUtils::FindIntersection(), WsfPathFinder::FindPath(), WsfNavigationMesh::GetCellForPoint(), WsfNavigationMesh::GetCellsForPoint(), WsfPathFinder::GetClosestNode(), WsfTerrainPathFinder::GetClosestNodePos(), ZoneUtils::GetLatLonPoints(), WsfTerrainPathFinder::Initialize(), ZoneUtils::PointIsInAngularExtents(), WsfSA_Predict::ProjectPositionGoToPoint(), WsfSA_Predict::ProjectPositionRollAndPull(), WsfSA_Predict::ProjectPositionTurnToHeading(), WsfRouteFinder::Route(), WsfZoneRouteFinder::RouteAroundZones(), XWsfOSM_Traffic::ScriptGoOffroad(), WsfBMStatusMessage::SetPosition(), WsfBMTrackMessage::SetPosition(), WsfZoneDefinition::SetReference(), wsf::comm::ComponentHW_Subsurface::SetSubmarineRadioValues(), WsfScriptGeoPointClass::ToString(), WsfScriptGeoPointClass::ToStringMGRS(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
| double WsfGeoPoint::GroundRangeTo | ( | const WsfGeoPoint & | aRhs | ) | const |
Returns the ground range to a location.
References GetLocationWCS(), and WsfGeoPoint().
Referenced by WsfWMAIEngagementMod::AddBehaviorsToStack(), WsfRoadMover::CreateRoute(), ZoneUtils::FindIntersection(), ZoneUtils::GetClosestPointInZone(), ZoneUtils::GetDistanceFromEllipseToPoint(), ZoneUtils::GetDistanceFromPointToZone(), ZoneUtils::GetDistanceFromPointToZoneCenter(), and WsfWMAIEngagementMod::Intercept::isFinished().
| WsfGeoPoint & WsfGeoPoint::operator= | ( | const WsfGeoPoint & | aRhs | ) |
Assignment operator.
References WsfSimpleComponentT< WsfPlatformComponent >::operator=(), and WsfGeoPoint().
|
overridevirtual |
Process input from a generic source.
Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.
| aInput | a reference to a UtInput object. |
Reimplemented from WsfComponent.
References WsfNamed::SetName().
Referenced by WsfNavigationMesh::ProcessInput(), WsfPathFinder::ProcessInput(), and WsfTerrainPathFinder::ProcessInput().
|
inlineoverridevirtual |
Requests a component's role interface. A component can support one or more roles.
| aRole | The role whose interface is to be returned. |
Implements WsfComponent.
References WsfSimpleComponentT< WsfPlatformComponent >::mRoles.
|
static |
References WsfScenario::RegisterComponentFactory().
|
inline |
For XIO (de)serialization.
| void WsfGeoPoint::SetAltitudeMSL | ( | double | aAltitude | ) |
Sets the altitude in meters above sea level.
References GetLocationLLA(), and SetLocationLLA().
Referenced by WsfRouteFinder::Route(), and WsfZoneRouteFinder::RouteAroundZones().
| void WsfGeoPoint::SetLocationLLA | ( | double | aLat, |
| double | aLon, | ||
| double | aAlt ) |
Set the location of the geo point in (lat, lon, alt) format.
| aLat | The GEODETIC latitude in degrees in the range [-90, 90] |
| aLon | The longitude in degrees in the range [-180, 180] |
| aAlt | The altitude (in meters) above the ellipsoid. |
Referenced by WsfWMAIEngagementMod::AddBehaviorsToStack(), wsf::comm::ComponentHW_Subsurface::CanSendTo(), WsfNoiseCloud::CheckIntersections(), WsfRoadMover::CreateRoute(), Extrapolate(), WsfPathFinder::FindClosestValidPoint(), WsfPathFinder::FindPath(), WsfLaunchComputer::GetInterceptPoint(), WsfPathFinder::GetNodeLocation(), WsfBMStatusMessage::GetPosition(), WsfTerrainPathFinder::Initialize(), WsfWMAIEngagementMod::Intercept::isFinished(), WsfNavigationMesh::MovePointAlongPath(), WsfNavigationMesh::MovePointTowardsCentroid(), ZoneUtils::RecalcCentroid(), SetAltitudeMSL(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and WsfGeoPoint().
| void WsfGeoPoint::SetLocationWCS | ( | const double | aLocationWCS[3] | ) |
Set the geo point location in world coordinates.
Referenced by WsfClusterManager::CrossLength(), WsfClusterManager::CrossLength(), WsfClusterManager::CrossLength(), WsfClusterManager::CrossLength(), WsfPathFinder::FindClosestValidPoint(), ZoneUtils::GetClosestPointInZone(), ZoneUtils::GetDistanceFromPointToZone(), ZoneUtils::GetDistanceFromPointToZoneCenter(), WsfClusterManager::NearestEdgePoint(), WsfClusterManager::NearestEdgePoint(), WsfClusterManager::NearestEdgePoint(), WsfClusterManager::NearestEdgePoint(), ZoneUtils::RecalcCentroid(), and WsfGeoPoint().
| double WsfGeoPoint::SlantRangeTo | ( | const WsfGeoPoint & | aRhs, |
| const bool | aUseSpherical = true ) const |
Returns the slant range to a location.
References GetLocationWCS(), and WsfGeoPoint().
| double WsfGeoPoint::TrueBearingTo | ( | const WsfGeoPoint & | aRhs | ) | const |
Returns the true bearing to another geopoint in radians.
References GetLocationWCS(), and WsfGeoPoint().
Referenced by ZoneUtils::GetDistanceFromEllipseToPoint(), and UT_DEFINE_SCRIPT_METHOD().