VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
adsbDataServiceInterface.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2022 MAK Technologies, Inc.
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include "matrix/vlVector.h"
13 #include "vrfcore/vrfcoreDefines.h"
14 //#include <vrfutil/scriptGeometry.h>
15 
16 #include <unordered_map>
17 #include <map>
18 #include <memory>
19 #include <set>
20 
21 class DtVertexList;
22 class DtAdsbTrack;
23 class DtPathPoint;
24 
25 
26 
28 
35 {
36 public:
37  virtual ~DtAdsbTrackHandle() {};
38 
39  virtual bool isValid() const = 0;
40  virtual int icaoAddress() const = 0;
42  virtual std::string aircraftType() const = 0;
43  virtual std::string tailNumber() const = 0;
44  virtual double maxSpeedFlown() const = 0;
45  virtual double maxAltitudeFlown() const = 0;//
46  virtual double maxFlightDistance() const = 0;
47  virtual bool isSquawkChanged(const double simTime) const = 0;
48 
49 protected:
56 };
57 
60 typedef std::shared_ptr<DtAdsbTrackHandle> DtTrackHandlePtr;
61 
65 {
66 public:
67  virtual ~DtAdsbPathPointHandle() {};
68 
70  virtual bool isValid() const = 0;
72  virtual double timeStamp() const = 0;
74  virtual double latitude() const = 0;
75  virtual double longitude() const = 0;
77  virtual double altitude() const = 0;
79  virtual double speed() const = 0;
81  virtual double heading() const = 0;
82  virtual std::string callSign() const = 0;
83  virtual std::string flightNumber() const = 0;
85  virtual std::string squawkCode() const = 0;
86  virtual bool isOnGround() const = 0;
87 
88  virtual int icaoAddress() const = 0;
89 
96  virtual DtAdsbPathPointHandle& operator++() = 0;
97 
100  virtual bool operator==(const DtAdsbPathPointHandle& other) const = 0;
101 
102 protected:
109 };
110 
113 typedef std::shared_ptr<DtAdsbPathPointHandle> DtPointHandlePtr;
114 
116 
122 {
123 
124 public:
125 
127  using DtIcaoAddrSet = std::set<DtIcaoAddress>;
128 
132  {
133  public:
134  using Ptr = std::shared_ptr<DtAdsbDataJob>;
135 
137  virtual ~DtAdsbDataJob() { };
138 
140  virtual bool complete() const = 0;
141 
143  virtual void tick() = 0;
144 
146  virtual bool success() const = 0;
147 
149  virtual void cancel() = 0;
150 
152  virtual const DtAdsbDataServiceInterface::DtIcaoAddrSet& tracks() const = 0;
153  };
154 
156 
158 
161  virtual bool isDataLoading() const = 0;
162 
165  virtual bool isFileLoadError() const = 0;
166 
171  virtual DtAdsbDataJob::Ptr findTracksInArea(const DtVertexList& areaVertices,
172  bool unownedOnly = true) = 0;
173 
180  virtual DtAdsbDataJob::Ptr findTracksInAreaDuringTime(const DtVertexList & areaVertices,
181  double startSimTime, double endSimTime, bool unownedOnly) = 0;
182 
188  virtual DtTrackHandlePtr trackHandleForAddress(DtIcaoAddress trackId) const = 0;
189 
195  virtual DtAdsbDataJob::Ptr requestOwnershipOfTracks(const DtIcaoAddrSet& trackIds,
196  const double lastSimTime) = 0;
197 
199  virtual DtAdsbDataJob::Ptr releaseOwnershipOfTracks(const DtIcaoAddrSet& trackIds) = 0;
200 
203  virtual double adsbTimeFromSimTime(double simTime) const = 0;
204 
207  virtual std::string stringForEpochTime(double t) const = 0;
208 
211  virtual double simTimeFromAdsbTime(double adsbTime) const = 0;
212 
214  virtual double finalDataSimTime() const = 0;
215 
220  virtual DtPointHandlePtr firstPointAfterTime(
221  const DtTrackHandlePtr track, double simTime) const = 0;
222 
227  virtual DtPointHandlePtr lastPointBeforeTime(
228  const DtTrackHandlePtr track, double simTime) const = 0;
229 
233  virtual DtPointHandlePtr clonePoint(const DtPointHandlePtr p) const = 0;
234 
239  virtual void updateSquawkChangedTimestamp(const int icaoAddress, const double& simTime) = 0;
240 
246  virtual double barometricAltitudeAdjustment(const DtVector& localPosition, const double simTime) const = 0;
247 
253  virtual void resetData() = 0;
254 
255 private:
256 
259 
262 };
virtual std::string aircraftType() const =0
ICAO type.
virtual double maxAltitudeFlown() const =0
virtual std::string flightNumber() const =0
virtual ~DtAdsbPathPointHandle()
Definition: adsbDataServiceInterface.h:67
virtual double maxSpeedFlown() const =0
DtAdsbDataJob()
Definition: adsbDataServiceInterface.h:136
virtual bool isValid() const =0
virtual std::string callSign() const =0
virtual bool isOnGround() const =0
virtual std::string tailNumber() const =0
virtual double timeStamp() const =0
Time of point in ADSB data (not sim time). Epoch time.
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
A handle to a point, for the same reasons as above. Functions return 0 or &quot;&quot; if the point is not vali...
Definition: adsbDataServiceInterface.h:64
This class hold ship data that is obtained from AIS messages. It is generated initially by the proces...
Definition: aisTrack.h:24
virtual double altitude() const =0
Barometric altitude in ADSB data, in meters.
virtual DtAdsbPathPointHandle & operator++()=0
Makes this handle point to the next path point. If it starts at the last point, incrementing it will ...
virtual std::string squawkCode() const =0
String representation of octal number.
virtual double latitude() const =0
Radians.
Definition: asyncJobServer.h:37
Abstract interface class to the ADSB data service. This service provides access to Automatic Dependen...
Definition: adsbDataServiceInterface.h:121
virtual bool isSquawkChanged(const double simTime) const =0
std::shared_ptr< DtAdsbTrackHandle > DtTrackHandlePtr
Shared_ptr so that copy constructor will work on the pointer without destroying the rhs...
Definition: adsbDataServiceInterface.h:60
class DtVertexList:
Definition: vertexList.h:22
virtual ~DtAdsbTrackHandle()
Definition: adsbDataServiceInterface.h:37
DtAdsbDataServiceInterface()
Definition: adsbDataServiceInterface.h:155
In order to prevent clients from accessing the underlying data storage, this interface defines handle...
Definition: adsbDataServiceInterface.h:34
virtual bool operator==(const DtAdsbPathPointHandle &other) const =0
Note that when using the defined type DtPointHandlePtr, the typical usage will be (*pHandle1) == (*p...
virtual int icaoAddress() const =0
virtual bool isValid() const =0
Point is valid if track is valid and the point exists in the track&#39;s (current) path.
virtual double speed() const =0
Airspeed in ADSB data, in mps.
Base class for all ADSB data jobs. Provides an interface for getting the status of an ongoing job...
Definition: adsbDataServiceInterface.h:131
std::set< DtIcaoAddress > DtIcaoAddrSet
Definition: adsbDataServiceInterface.h:127
virtual ~DtAdsbDataServiceInterface()
Definition: adsbDataServiceInterface.h:157
virtual double maxFlightDistance() const =0
std::shared_ptr< DtAdsbPathPointHandle > DtPointHandlePtr
Shared_ptr so that copy constructor will work on the pointer without destroying the rhs...
Definition: adsbDataServiceInterface.h:113
Class definition for one track created from ADSB messages, i.e. the identifying information and time-...
Definition: adsbTrack.h:71
std::shared_ptr< DtAdsbDataJob > Ptr
Definition: adsbDataServiceInterface.h:134
DtAdsbTrackHandle()
Users of this interface will not need to construct objects. The manager that implements the interface...
Definition: adsbDataServiceInterface.h:55
virtual double longitude() const =0
virtual int icaoAddress() const =0
virtual ~DtAdsbDataJob()
Definition: adsbDataServiceInterface.h:137
virtual double heading() const =0
True heading in ADSB data, in radians.
#define DT_DLL_vrfcore
This file is used to determine how to build.
Definition: vrfcoreDefines.h:25
DtAdsbPathPointHandle()
Users of this interface will not need to construct objects. The manager that implements the interface...
Definition: adsbDataServiceInterface.h:108

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)