VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
adsbTrack.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2022 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
11 
12 
13 #include <vlutil/vlTime.h>
14 #include "list"
15 #include <map>
16 #include "vrfutil/vrfutilDefines.h"
17 #include <string>
18 
19 
20 namespace DtAdsb
21 {
25  {
26  public:
27  DtPathPoint();
28  ~DtPathPoint();
29 
33  double myLatitude;
34  double myLongitude;
36  float mySpeed;
38  float myHeading;
39  bool myHasSpeed;
47 
50  std::string myCallSign;
51  std::string myFlightNumber;
53  std::string mySquawkCode;
54  };
55 }
56 
57 namespace DtBufferSerialize
58 {
59  DT_DLL_vrfutil const int getSize(const DtAdsb::DtPathPoint& val);
60  DT_DLL_vrfutil char* encode(const DtAdsb::DtPathPoint& val, char* buffer);
61  DT_DLL_vrfutil const char* decode(DtAdsb::DtPathPoint& val, const char* buffer);
62 }
63 
65 typedef std::map<double, DtAdsb::DtPathPoint> DtAdsbPathPointMap;
66 
72 {
73 public:
74  DtAdsbTrack();
75  ~DtAdsbTrack();
76 
84  //wc virtual bool computePathBoundingBox(bool debug = false);
85 
87 
90  virtual int netRepSize() const;
91 
94  virtual bool setFromNet(const char* contentBuffer,
95  unsigned contentSize = 0);
96 
100  virtual bool setToNet(char* contentBuffer);
101 
103  void setIcaoAddress(const int icaoAddr);
104  int icaoAddress() const;
105 
107  void setAircraftType(const std::string);
108  std::string aircraftType() const;
109 
110  void setTailNumber(const std::string);
111  std::string tailNumber() const;
112 
114  void setMaxSpeedFlown(const double s);
115  double maxSpeedFlown() const;
117  void checkAndSetMaxSpeed(const double s);
118 
120  void setMaxAltitudeFlown(const double a);
121  double maxAltitudeFlown()const;
123  void checkAndSetMaxAltitude(const double a);
124 
126  void setMaxFlightDistance(const double d);
127  double maxFlightDistance() const;
129  void checkAndsetMaxFlightDistance(const double d);
130 
131 
134  DtAdsbPathPointMap::iterator addPathPoint(const DtAdsb::DtPathPoint& point);
135 
137  const DtAdsbPathPointMap& path() const;
138  DtAdsbPathPointMap& path();
139 
141  void setSquawkChangedTimestamp(const double t);
142  double squawkChangedTimestamp() const;
143 
145  bool isSquawkChanged(const double t) const;
146 
147 protected:
156 
159 
161  std::string myAircraftType;
162  std::string myTailNumber;
163 
166 
167 #if 0
168 
172  float myMaxNorth;
173  float myMaxSouth;
174  float myMaxEast;
175  float myMaxWest;
176  bool myCrosses180Line;
177  DtTime myStartTime;
178  DtTime myEndTime;
180 #endif
181 };
182 
bool myHasHeading
radians, 0 - 2pi. Ignore if &lt; 0. Indicator for whether the above data has been specif...
Definition: adsbTrack.h:43
double mySquawkChangedTimestamp
The timestamp when mySquawkCode changes in a future path point.
Definition: adsbTrack.h:165
DT_DLL_readerWriter int getSize(const DtString &val)
The number of bytes required to encode the value.
bool myHasVerticalSpeed
radians, 0 - 2pi. Ignore if &lt; 0. Indicator for whether the above data has been specif...
Definition: adsbTrack.h:42
DtTime myTimeStamp
Definition: adsbTrack.h:30
bool myIsOnGround
radians, 0 - 2pi. Ignore if &lt; 0. Indicator for whether the above data has been specif...
Definition: adsbTrack.h:45
DtAdsbPathPointMap myPath
The key is the timestamp.
Definition: adsbTrack.h:158
double myMaxSpeedFlown
The maximum speed this aircraft flew in the processed data.
Definition: adsbTrack.h:151
std::string myCallSign
These might change during the day as an aircraft lands at an airport and becomes a new flight to a ne...
Definition: adsbTrack.h:50
std::string mySquawkCode
This IFF code could change during a flight.
Definition: adsbTrack.h:53
float myHeading
mps
Definition: adsbTrack.h:38
int myIcaoAddress
Integer representation of 6-hex-digit value in file.
Definition: adsbTrack.h:149
Class definition for one dynamic point of a track.
Definition: adsbTrack.h:24
float mySpeed
meters
Definition: adsbTrack.h:36
std::string myTailNumber
Definition: adsbTrack.h:162
std::string myAircraftType
ICAO type.
Definition: adsbTrack.h:161
DT_DLL_readerWriter char * encode(const DtFilename &val, char *buffer)
Serializes the provided value val into buffer. buffer must have at least the number of bytes returned...
double myLongitude
radians
Definition: adsbTrack.h:34
double myAltitudeBarometric
radians
Definition: adsbTrack.h:35
double myMaxAltitudeFlown
The maximum altitude this aircraft flew in the processed data.
Definition: adsbTrack.h:153
double myLatitude
The representation of lat-lon in the ADSB data is 10e-4 minutes, or about 27-28 bits. Since float is (?) 24 bits, use double.
Definition: adsbTrack.h:33
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
Class definition for one track created from ADSB messages, i.e. the identifying information and time-...
Definition: adsbTrack.h:71
DT_DLL_readerWriter const char * decode(DtString &val, const char *buffer)
Decodes a value from buffer and places the result in val of the type specified by val...
std::string myFlightNumber
Definition: adsbTrack.h:51
bool myHasAltitude
radians, 0 - 2pi. Ignore if &lt; 0. Indicator for whether the above data has been specif...
Definition: adsbTrack.h:44
double myMaxFlightDistance
The maximum distance this aircraft flew in the processed data.
Definition: adsbTrack.h:155
std::map< double, DtAdsb::DtPathPoint > DtAdsbPathPointMap
This will map a time stamp to a point (location)
Definition: adsbTrack.h:65
float myVerticalSpeed
mps
Definition: adsbTrack.h:37

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)