13#ifndef WSFEXTENTITYDEADRECKON_HPP
14#define WSFEXTENTITYDEADRECKON_HPP
16#include "wsf_export.h"
20#include "UtCallback.hpp"
21#include "UtCallbackHolder.hpp"
135 void UpdateDeadReckon(
double aSimTime,
WsfPlatform* aPlatformPtr,
bool aForceUpdate);
137 bool IsStateAccurate(
double aSimTime,
PlatformDR& aState,
bool aForceUpdate);
139 void HandlePlatformDeleted(
double aSimTime,
WsfPlatform* aPlatformPtr);
140 void HandlePlatformAdded(
double aSimTime,
WsfPlatform* aPlatformPtr);
141 void HandleMoverUpdated(
double aSimTime,
WsfMover* aMoverPtr);
143 double HandleHeartbeat(
double aSimTime,
size_t aPlatformIndex);
145 double CalculateHeartbeatTimer(
double aAverageHeartbeatTimer,
double aMultiplier)
const;
149 class HeartbeatEvent :
public WsfEvent
152 HeartbeatEvent() =
delete;
156 , mPlatformIndex(aPlatformIndex)
159 EventDisposition Execute()
override;
162 size_t mPlatformIndex;
165 UtCallbackHolder mCallbacks;
167 std::map<size_t, PlatformDR> mDeadReckonData;
168 bool mExternalEntitiesRequired;
171 bool mHeartbeatRequired;
174 bool mUseSimpleExtrapolations;
175 bool mUseInitialDistrubutionInterval;
176 double mHeartbeatTimerOverride;
177 double mInitialDistributionStart;
179 WsfExtInterface* mExtInterfacePtr;
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
Definition WsfEvent.hpp:29
Definition WsfExtEntityDeadReckon.hpp:46
UpdateType
Definition WsfExtEntityDeadReckon.hpp:100
@ cHEARTBEAT
Definition WsfExtEntityDeadReckon.hpp:103
@ cDR_CHANGE
Definition WsfExtEntityDeadReckon.hpp:102
@ cNO_CHANGE
Definition WsfExtEntityDeadReckon.hpp:101
double GetInitialDistributionInterval() const
Definition WsfExtEntityDeadReckon.hpp:75
void UseInitialDistributionInterval()
Requests that the initial distribution interval is to be used.
Definition WsfExtEntityDeadReckon.hpp:61
void SetHeartbeatTimerOverride(double aTime)
Set the current heartbeat timer for this individual platform.
Definition WsfExtEntityDeadReckon.hpp:67
double GetHeartbeatTimer() const
Return the heartbeat timer (seconds).
Definition WsfExtEntityDeadReckon.hpp:64
UtCallbackListN< void(double, PlatformDR &)> MoverUpdated
Definition WsfExtEntityDeadReckon.hpp:132
double GetMoverUpdateTimer() const
Definition WsfExtEntityDeadReckon.hpp:80
void SetInitialDistributionInterval(double aValue)
Allow the initial distribution interval to be set.
Definition WsfExtEntityDeadReckon.hpp:78
WsfExtEntityDeadReckon(WsfExtInterface *aExtInterfacePtr)
Definition WsfExtEntityDeadReckon.cpp:24
void RequireExternalEntities(bool aExternalEntitiesRequired)
Definition WsfExtEntityDeadReckon.cpp:299
double GetEntityPositionThreshold() const
Return the position threshold (meters).
Definition WsfExtEntityDeadReckon.hpp:73
void RequestService(bool aHeartbeatRequired)
Definition WsfExtEntityDeadReckon.cpp:71
void SetMoverUpdateTimer(double aMoverUpdateTimer)
Definition WsfExtEntityDeadReckon.hpp:81
bool ProcessInput(UtInput &aInput)
Definition WsfExtEntityDeadReckon.cpp:87
UtCallbackListN< void(double, PlatformDR &)> DeadReckonChanged
Definition WsfExtEntityDeadReckon.hpp:128
double GetEntityOrientationThreshold() const
Return the orientation threshold (radians).
Definition WsfExtEntityDeadReckon.hpp:70
void Initialize()
Definition WsfExtEntityDeadReckon.cpp:37
void ForceUpdate(double aSimTime, WsfPlatform *aPlatformPtr, bool aForceSend=false)
Definition WsfExtEntityDeadReckon.cpp:94
The WSF Ext is code which is shared between common external interfaces like DIS and HLA.
Definition WsfExtInterface.hpp:183
Definition WsfMover.hpp:37
double mEntityOrientationThreshold
Definition WsfExtEntityDeadReckon.hpp:39
double mMoverUpdateTimer
Definition WsfExtEntityDeadReckon.hpp:35
double mHeartbeatTimer
Definition WsfExtEntityDeadReckon.hpp:34
bool mDR_ServiceRequested
Definition WsfExtEntityDeadReckon.hpp:33
double mEntityPositionThreshold
Definition WsfExtEntityDeadReckon.hpp:38
double mInitialDistributionInterval
Definition WsfExtEntityDeadReckon.hpp:36
WsfExtEntityDeadReckonSetup()
Definition WsfExtEntityDeadReckon.cpp:428
Stores the state of an entity.
Definition WsfExtEntityDeadReckon.hpp:85
double mAccelerationWCS[3]
Definition WsfExtEntityDeadReckon.hpp:92
double mOrientationWCS[3]
Definition WsfExtEntityDeadReckon.hpp:93
void LoadFromPlatform(double aSimTime, WsfPlatform &aPlatform)
Definition WsfExtEntityDeadReckon.cpp:380
double mPastOrientationWCS[3]
Definition WsfExtEntityDeadReckon.hpp:94
DR_State()
Definition WsfExtEntityDeadReckon.cpp:366
void Extrapolate(double aDeltaTime, WsfPlatform &aPlatform, DR_State &aExtrapState)
Definition WsfExtEntityDeadReckon.cpp:316
double mVelocityWCS[3]
Definition WsfExtEntityDeadReckon.hpp:91
double mPastAngularRateWCS[3]
Definition WsfExtEntityDeadReckon.hpp:96
double mLocationWCS[3]
Definition WsfExtEntityDeadReckon.hpp:90
double mAngularRateWCS[3]
Definition WsfExtEntityDeadReckon.hpp:95