15 #include <tbb/spin_mutex.h>
23 class DtAisDataManagerJob;
25 namespace MAKVRinTerra
27 class DtFeatureGeometry;
52 static void tickCallback(
void* usr);
63 bool unownedOnly =
true)
override;
67 double startSimTime,
double endSimTime,
bool unownedOnly)
override;
107 virtual void loadAisData();
109 virtual bool isDataLoading()
const;
110 virtual bool timeToStop()
const;
115 friend class DtAisDataManagerJob;
118 virtual void performDataClear();
121 virtual void performDataReset();
124 virtual void startAisDataLoad();
128 virtual void calculateTrackTimeOffset();
DtAisTrackMap myTracksByMmsi
Index into the track data by MMSI.
Definition: aisDataManager.h:143
tbb::spin_mutex QueryQueueMutex
Definition: aisDataManager.h:151
DtSimulationServices * mySimulationServices
Definition: aisDataManager.h:157
std::atomic< bool > myLoadInProgress
Definition: aisDataManager.h:168
std::atomic< bool > myResetTimeOffset
Definition: aisDataManager.h:166
std::atomic< bool > myWarnedOnce
Definition: aisDataManager.h:170
virtual bool isDataLoaded() const =0
Returns true if AIS data has been loaded.
DtTime myFinalDataAisTime
Definition: aisDataManager.h:161
virtual double simTimeFromAisTime(double aisTime) const =0
Converts the AIS data time to sim time. Needed to understand how sim time relates to the timestamps i...
Abstract interface class to the AIS data service. This service provides access to Automatic Identific...
Definition: aisDataServiceInterface.h:28
JobQueue myJobQueue
Definition: aisDataManager.h:155
virtual bool getFirstPointAfterTime(const DtAisTrack &track, double simTime, DtPathPointIter &pathPointIter) const =0
Find the first point in the track's path that occurs after (or at) the specified sim time...
QueryQueueMutex myQueryQueueMutex
Definition: aisDataManager.h:152
DtTime myTrackTimeAtSimTime0
Definition: aisDataManager.h:158
virtual bool getLastPointBeforeTime(const DtAisTrack &track, double simTime, DtPathPointIter &pathPointIter) const =0
Find the last point in the track's path that occurs before (or at) the specified sim time...
virtual double aisTimeFromSimTime(double simTime) const =0
Converts a sim time to AIS data time. Needed to understand how sim time relates to the timestamps in ...
std::atomic< bool > myDataIsLoaded
Definition: aisDataManager.h:167
virtual void clearData()=0
Marks AIS data to be cleared. Data will be completely unloaded.
virtual DtAisDataJob::Ptr findTracksInAreaDuringTime(const DtVertexList &areaVertices, double startSimTime, double endSimTime, bool unownedOnly)=0
Starts a query for all tracks in the specified area. If unownedOnly is true (the default) then only u...
std::set< DtMmsi > DtMmsiSet
Definition: aisDataServiceInterface.h:34
std::list< DtAisDataJob::Ptr > JobQueue
Definition: aisDataManager.h:154
virtual DtAisDataJob::Ptr requestOwnershipOfTracks(const DtMmsiSet &trackIds)=0
Request ownership of the specified given tracks.
std::atomic< bool > myResetData
Definition: aisDataManager.h:165
DtTime myFinalDataSimTime
Definition: aisDataManager.h:162
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
virtual DtAisDataJob::Ptr releaseOwnershipOfTracks(const DtMmsiSet &trackIds)=0
Release ownership of the specified tracks.
std::atomic< bool > myTimeToStop
Definition: aisDataManager.h:171
std::list< DtAisTrack * > DtAisTrackList
Definition: aisDataManager.h:38
class DtVertexList:
Definition: vertexList.h:22
Class definition for one track created from AIS messages, i.e. the identifying information and time-s...
Definition: aisTrack.h:60
virtual DtPathPointIter getEndOfpath(const DtAisTrack &track) const =0
Returns an iterator to the end of the path (i.e. path.end()).
virtual const DtAisTrack * trackInfo(DtMmsi trackId) const =0
Returns information for the track with the specified MMSI, or nullptr if it could not be found...
std::unordered_map< DtMmsi, DtAisTrack * > DtAisTrackMap
Definition: aisDataManager.h:39
DtMmsiSet myUnusedTracks
List of the subset of tracks that are not in use.
Definition: aisDataManager.h:146
DtMmsiSet myTracksInUse
List of the subset of tracks that are in use.
Definition: aisDataManager.h:149
virtual void resetData()=0
Marks AIS data to be reset. Data will not be unloaded, but ownership of all tracks will be reset to u...
virtual double finalDataSimTime() const =0
Returns the sim time for the last point of AIS data available.
DtAisTrackBuffer myTracks
Buffer containing information on all loaded AIS tracks.
Definition: aisDataManager.h:140
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
std::map< double, DtPathPoint >::const_iterator DtPathPointIter
Definition: aisDataServiceInterface.h:36
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
std::vector< DtAisTrack > DtAisTrackBuffer
Definition: aisDataManager.h:37
DtTime myFirstDataAisTime
Definition: aisDataManager.h:159
std::atomic< bool > myClearData
Definition: aisDataManager.h:164
virtual DtAisDataJob::Ptr findTracksInArea(const DtVertexList &areaVertices, bool unownedOnly=true)=0
Starts a query for all tracks in the specified area. If unownedOnly is true (the default) then only u...
The DtAisDataManager loads and manages Automatic Identification System (AIS) data, which is used to track and monitor real world ships. This data can be used to create and simulate clutter entities in a simulation.
Definition: aisDataManager.h:33
DtAisDataServiceInterface & operator=(const DtAisDataServiceInterface &)
Assignment operator not implemented.
DtTime myFirstDataSimTime
Definition: aisDataManager.h:160