25 #ifndef _AIS_TARGET_DATA_H__
26 #define _AIS_TARGET_DATA_H__
31 #include <unordered_map>
33 #include <wx/datetime.h>
35 #include <wx/string.h>
37 #include "model/meteo_points.h"
38 #include "model/navutil_base.h"
40 #define SHIP_NAME_LEN 35
41 #define DESTINATION_LEN 21
42 #define CALL_SIGN_LEN 8
43 #define EURO_VIN_LEN 9
45 #define AIS_TARGETDATA_MAX_CANVAS 6
47 void make_hash_ERI(
int key,
const wxString& description);
48 void clear_hash_ERI(
void);
50 typedef enum ais_nav_status {
51 UNDERWAY_USING_ENGINE = 0,
54 RESTRICTED_MANOEUVRABILITY,
68 ATON_VIRTUAL_ONPOSITION,
69 ATON_VIRTUAL_OFFPOSITION,
78 typedef enum ais_transponder_class {
89 } _ais_transponder_class;
93 typedef enum ais_alert_type {
96 AIS_ALERT_NO_DIALOG_SET
107 enum Ais8_001_22_AreaShapeEnum {
108 AIS8_001_22_SHAPE_ERROR = -1,
109 AIS8_001_22_SHAPE_CIRCLE = 0,
110 AIS8_001_22_SHAPE_RECT = 1,
111 AIS8_001_22_SHAPE_SECTOR = 2,
112 AIS8_001_22_SHAPE_POLYLINE = 3,
113 AIS8_001_22_SHAPE_POLYGON = 4,
114 AIS8_001_22_SHAPE_TEXT = 5,
115 AIS8_001_22_SHAPE_RESERVED_6 = 6,
116 AIS8_001_22_SHAPE_RESERVED_7 = 7
121 float longitude, latitude;
133 typedef std::vector<Ais8_001_22_SubArea> Ais8_001_22_SubAreaList;
142 int duration_minutes;
143 wxDateTime start_time;
144 wxDateTime expiry_time;
145 Ais8_001_22_SubAreaList sub_areas;
149 std::function<double(
double)> get_mag;
161 wxString BuildQueryResult(
void);
162 wxString GetRolloverString(
void);
163 wxString Get_vessel_type_string(
bool b_short =
false);
164 wxString Get_class_string(
bool b_short =
false);
165 wxString GetFullName(
void);
166 wxString GetCountryCode(
bool b_CntryLongStr);
167 wxString GetNatureofDistress(
int dscnature);
168 void Toggle_AIS_CPA(
void);
169 void ToggleShowTrack(
void);
171 bool IsValidMID(
int);
175 ais_transponder_class Class;
186 char CallSign[CALL_SIGN_LEN];
187 char ShipName[SHIP_NAME_LEN];
188 char ShipNameExtension[15];
189 unsigned char ShipType;
200 char Euro_VIN[EURO_VIN_LEN];
214 char Destination[DESTINATION_LEN];
216 time_t PositionReportTicks;
217 time_t LastPositionReportTicks;
218 time_t StaticReportTicks;
224 ais_alert_type n_alert_state;
225 bool b_suppress_audio;
226 bool b_positionDoubtful;
227 bool b_positionOnceValid;
233 long dsc_NatureOfDistress;
239 bool b_mPropPersistTrack;
244 wxString m_date_string;
246 wxDateTime m_ack_time;
247 bool b_in_ack_timeout;
252 wxString MSG_14_text;
262 std::vector<AISTargetTrackPoint> m_ptrack;
264 std::unordered_map<int, Ais8_001_22> area_notices;
265 bool b_SarAircraftPosnReport;
267 bool b_nameFromCache;
269 short last_scale[AIS_TARGETDATA_MAX_CANVAS];
293 std::shared_ptr<AisTargetData> GetTargetData() {
return std::make_shared<AisTargetData>(m_callbacks); }
302 wxString trimAISField(
char *data);
303 wxString ais_get_status(
int index);
305 wxString ais_get_type(
int index);
306 wxString ais_get_short_type(
int index);
Meteo points are Meteorological and Hydrographic data received by NMEA0183 (AIS) VDM message 8 dac:00...