VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aisTrack.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 #include "vrfutil/vrfutilDefines.h"
13 #include <vlutil/vlTime.h>
14 #include <vlpi/disEnums.h>
15 #include "list"
16 #include <map>
17 #include <string>
18 #include "vlpi/disEnums.h"
20 
21 
25 {
26 public:
27  DtPathPoint();
28  ~DtPathPoint();
29 
38  DtAisNavigationStatus myNavStatus;
39  bool myHasSOG;
42  bool myHasCOG;
45 };
46 
47 namespace DtBufferSerialize
48 {
49  DT_DLL_vrfutil const int getSize(const DtPathPoint& val);
50  DT_DLL_vrfutil char* encode(const DtPathPoint& val, char* buffer);
51  DT_DLL_vrfutil const char* decode(DtPathPoint& val, const char* buffer);
52 }
53 
54 typedef std::map<double, DtPathPoint> DtAisPathPointMap;
55 
61 {
62 public:
63  DtAisTrack();
64  ~DtAisTrack();
65 
73  virtual bool computePathBoundingBox(bool debug = false);
74 
77  virtual int netRepSize() const;
78 
81  virtual bool setFromNet(const char* contentBuffer,
82  unsigned contentSize = 0);
83 
87  virtual bool setToNet(char* contentBuffer);
88 
92  void setMmsi(const int mmsi);
93  int mmsi() const;
94 
97  void setShipType(const std::string);
98  std::string shipType() const;
99 
100  void setShipName(const std::string);
101  std::string shipName() const;
102 
103  void setCallSign(const std::string);
104  std::string callSign() const;
105 
107  void setCountryCode(const std::string);
108  std::string countryCode() const;
109 
111  void setImoNumber(const int);
112  int imoNumber() const;
113 
116  void setLength(const double);
117  double length() const;
118 
121  void setWidth(const double);
122  double width() const;
123 
127  void setDistanceToBow(const double);
128  double distanceToBow() const;
129 
133  void setDistanceToStarboard(const double);
134  double distanceToStarboard() const;
135 
138  void setDraft(const double);
139  double draft() const;
140 
142  void setDestination(const std::string);
143  std::string destination() const;
144 
146  void setEta(const DtTime eta);
147  DtTime eta() const;
148 
151  void addPathPoint(const DtPathPoint& point);
152 
154  const DtAisPathPointMap& path() const;
155  DtAisPathPointMap& path();
156 
169  double maxNorth() const;
170  double maxSouth() const;
171  double maxEast()const;
172  double maxWest() const;
173  bool crosses180Line() const;
174  DtTime startTime() const;
175  DtTime endTime() const;
177 
178 protected:
181  int myMmsi;
183  std::string myShipType;
184  std::string myName;
185  std::string myCallSign;
186  std::string myCountryCode;
190  float myLength;
191  float myWidth;
194  float myDraft;
196  std::string myDestination;
200 
203  float myMaxNorth;
204  float myMaxSouth;
205  float myMaxEast;
206  float myMaxWest;
211 };
212 
DtTime myEndTime
Derived values.
Definition: aisTrack.h:209
DT_DLL_readerWriter int getSize(const DtString &val)
The number of bytes required to encode the value.
float myDistanceToBow
In meters:
Definition: aisTrack.h:192
float myMaxEast
Derived values.
Definition: aisTrack.h:205
std::string myDestination
Definition: aisTrack.h:196
DtFixedPointAngle32 myLatitude
The representation of lat-lon in the AIS data is 10e-4 minutes, or about 27-28 bits.
Definition: aisTrack.h:33
DtTime myTimeStamp
Definition: aisTrack.h:30
This class hold ship data that is obtained from AIS messages. It is generated initially by the proces...
Definition: aisTrack.h:24
bool myHasHeading
an enumeration. Indicator for whether the above data has been speci...
Definition: aisTrack.h:43
bool myCrosses180Line
Derived values.
Definition: aisTrack.h:207
std::string myShipType
2 characters
Definition: aisTrack.h:183
DtFixedPointAngle16 myCourseOverGround
mps
Definition: aisTrack.h:36
float myDraft
In meters:
Definition: aisTrack.h:194
DtFixedPointAngle16 myHeading
radians (a heading)
Definition: aisTrack.h:37
bool myHasCOG
an enumeration. Indicator for whether the above data has been speci...
Definition: aisTrack.h:42
DtAisPathPointMap myPath
The key is the timestamp.
Definition: aisTrack.h:199
Class definition for one track created from AIS messages, i.e. the identifying information and time-s...
Definition: aisTrack.h:60
int myMmsi
Should be a 9-digit number. If shorter, the first 3 (most significant) digits still represent the Mar...
Definition: aisTrack.h:181
DtFixedPointAngle32 myLongitude
radians
Definition: aisTrack.h:34
float mySpeedOverGround
radians
Definition: aisTrack.h:35
float myLength
In meters:
Definition: aisTrack.h:190
float myMaxNorth
Derived values.
Definition: aisTrack.h:203
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...
float myDistanceToStarboard
In meters:
Definition: aisTrack.h:193
float myMaxSouth
Derived values.
Definition: aisTrack.h:204
std::string myCallSign
Definition: aisTrack.h:185
DtAisNavigationStatus myNavStatus
radians, 0 - 2pi. Ignore if &lt; 0.
Definition: aisTrack.h:38
DT_DLL_VRVCORE double length(const makVrv::DtCoordinateSystem &, const std::vector< DtVector > &vertices)
Returns the total distance of a segmented line defined by the provided vector of vertices. Coordinates are in local database coordinates. The coordinate system is used to convert between the local database coordinates and geocentric. All distance is in 2D – the Z value is ignored.
int myImoNumber
Definition: aisTrack.h:187
std::string myName
Definition: aisTrack.h:184
#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
DtTime myStartTime
Derived values.
Definition: aisTrack.h:208
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 myCountryCode
Definition: aisTrack.h:186
std::map< double, DtPathPoint > DtAisPathPointMap
Definition: aisTrack.h:54
float myMaxWest
Derived values.
Definition: aisTrack.h:206
DtTime myEta
Definition: aisTrack.h:197
float myWidth
In meters:
Definition: aisTrack.h:191

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)