25#ifndef _AIS_TARGET_DATA_H__
26#define _AIS_TARGET_DATA_H__
32#include <wx/datetime.h>
33#include <unordered_map>
36#define SHIP_NAME_LEN 35
37#define DESTINATION_LEN 21
38#define CALL_SIGN_LEN 8
41#define AIS_TARGETDATA_MAX_CANVAS 6
43void make_hash_ERI(
int key,
const wxString& description);
44void clear_hash_ERI(
void);
46typedef enum ais_nav_status {
47 UNDERWAY_USING_ENGINE = 0,
50 RESTRICTED_MANOEUVRABILITY,
64 ATON_VIRTUAL_ONPOSITION,
65 ATON_VIRTUAL_OFFPOSITION,
74typedef enum ais_transponder_class {
84} _ais_transponder_class;
88typedef enum ais_alert_type {
91 AIS_ALERT_NO_DIALOG_SET
102enum Ais8_001_22_AreaShapeEnum {
103 AIS8_001_22_SHAPE_ERROR = -1,
104 AIS8_001_22_SHAPE_CIRCLE = 0,
105 AIS8_001_22_SHAPE_RECT = 1,
106 AIS8_001_22_SHAPE_SECTOR = 2,
107 AIS8_001_22_SHAPE_POLYLINE = 3,
108 AIS8_001_22_SHAPE_POLYGON = 4,
109 AIS8_001_22_SHAPE_TEXT = 5,
110 AIS8_001_22_SHAPE_RESERVED_6 = 6,
111 AIS8_001_22_SHAPE_RESERVED_7 = 7
116 float longitude, latitude;
128typedef std::vector<Ais8_001_22_SubArea> Ais8_001_22_SubAreaList;
137 int duration_minutes;
138 wxDateTime start_time;
139 wxDateTime expiry_time;
140 Ais8_001_22_SubAreaList sub_areas;
144 std::function<double(
double)> get_mag;
156 wxString BuildQueryResult(
void);
157 wxString GetRolloverString(
void);
158 wxString Get_vessel_type_string(
bool b_short =
false);
159 wxString Get_class_string(
bool b_short =
false);
160 wxString GetFullName(
void);
161 wxString GetCountryCode(
bool b_CntryLongStr);
162 wxString GetNatureofDistress(
int dscnature);
163 void Toggle_AIS_CPA(
void);
164 void ToggleShowTrack(
void);
169 ais_transponder_class Class;
180 char CallSign[CALL_SIGN_LEN];
181 char ShipName[SHIP_NAME_LEN];
182 char ShipNameExtension[15];
183 unsigned char ShipType;
194 char Euro_VIN[EURO_VIN_LEN];
208 char Destination[DESTINATION_LEN];
210 time_t PositionReportTicks;
211 time_t StaticReportTicks;
217 ais_alert_type n_alert_state;
218 bool b_suppress_audio;
219 bool b_positionDoubtful;
220 bool b_positionOnceValid;
231 bool b_mPropPersistTrack;
236 wxString m_date_string;
238 wxDateTime m_ack_time;
239 bool b_in_ack_timeout;
244 wxString MSG_14_text;
255 std::vector<AISTargetTrackPoint> m_ptrack;
257 std::unordered_map<int, Ais8_001_22> area_notices;
258 bool b_SarAircraftPosnReport;
260 bool b_nameFromCache;
262 short last_scale[AIS_TARGETDATA_MAX_CANVAS];
265 long dsc_NatureOfDistress;
287 std::shared_ptr<AisTargetData> GetTargetData() {
return std::make_shared<AisTargetData>(m_callbacks); }
296wxString trimAISField(
char *data);
297wxString ais_get_status(
int index);
299wxString ais_get_type(
int index);
300wxString ais_get_short_type(
int index);