24#ifndef AIS_TARGET_DATA_H_
25#define AIS_TARGET_DATA_H_
30#include <unordered_map>
32#include <wx/datetime.h>
39#define SHIP_NAME_LEN 35
40#define DESTINATION_LEN 21
41#define CALL_SIGN_LEN 8
44#define AIS_TARGETDATA_MAX_CANVAS 6
46void make_hash_ERI(
int key,
const wxString& description);
47void clear_hash_ERI(
void);
49typedef enum ais_nav_status {
50 UNDERWAY_USING_ENGINE = 0,
53 RESTRICTED_MANOEUVRABILITY,
67 ATON_VIRTUAL_ONPOSITION,
68 ATON_VIRTUAL_OFFPOSITION,
76typedef enum ais_transponder_class {
88} _ais_transponder_class;
91typedef enum ais_alert_type {
94 AIS_ALERT_NO_DIALOG_SET
105enum Ais8_001_22_AreaShapeEnum {
106 AIS8_001_22_SHAPE_ERROR = -1,
107 AIS8_001_22_SHAPE_CIRCLE = 0,
108 AIS8_001_22_SHAPE_RECT = 1,
109 AIS8_001_22_SHAPE_SECTOR = 2,
110 AIS8_001_22_SHAPE_POLYLINE = 3,
111 AIS8_001_22_SHAPE_POLYGON = 4,
112 AIS8_001_22_SHAPE_TEXT = 5,
113 AIS8_001_22_SHAPE_RESERVED_6 = 6,
114 AIS8_001_22_SHAPE_RESERVED_7 = 7
119 float longitude, latitude;
131typedef std::vector<Ais8_001_22_SubArea> Ais8_001_22_SubAreaList;
140 int duration_minutes;
141 wxDateTime start_time;
142 wxDateTime expiry_time;
143 Ais8_001_22_SubAreaList sub_areas;
146struct AisTargetCallbacks {
147 std::function<double(
double)> get_mag;
148 AisTargetCallbacks() : get_mag([](
double a) {
return toMagnetic(a); }) {}
152 friend class AisTargetDataMaker;
158 wxString BuildQueryResult(
void);
159 wxString GetRolloverString(
void);
160 wxString Get_vessel_type_string(
bool b_short =
false);
161 wxString Get_class_string(
bool b_short =
false);
162 wxString GetFullName(
void);
163 wxString GetCountryCode(
bool b_CntryLongStr);
164 wxString GetNatureofDistress(
int dscnature);
165 void Toggle_AIS_CPA(
void);
166 void ToggleShowTrack(
void);
167 void CloneFrom(AisTargetData* q);
168 bool IsValidMID(
int);
172 ais_transponder_class Class;
181 double Lat_projected;
182 double Lon_projected;
185 char CallSign[CALL_SIGN_LEN];
186 char ShipName[SHIP_NAME_LEN];
187 char ShipNameExtension[15];
188 unsigned char ShipType;
199 char Euro_VIN[EURO_VIN_LEN];
213 char Destination[DESTINATION_LEN];
215 time_t PositionReportTicks;
216 time_t LastPositionReportTicks;
217 time_t StaticReportTicks;
218 bool b_VDM_secure_Pos;
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;
260 bool b_show_track_old;
263 std::vector<AISTargetTrackPoint> m_ptrack;
265 std::unordered_map<int, Ais8_001_22> area_notices;
266 bool b_SarAircraftPosnReport;
268 bool b_nameFromCache;
270 short last_scale[AIS_TARGETDATA_MAX_CANVAS];
283class AisTargetDataMaker {
285 static AisTargetDataMaker& GetInstance() {
286 static AisTargetDataMaker instance;
290 AisTargetDataMaker(
const AisTargetDataMaker&) =
delete;
291 AisTargetDataMaker& operator=(
const AisTargetDataMaker&) =
delete;
293 std::shared_ptr<AisTargetData> GetTargetData() {
294 return std::make_shared<AisTargetData>(m_callbacks);
303wxString trimAISField(
char* data);
304wxString ais_get_status(
int index);
306wxString ais_get_type(
int index);
307wxString ais_get_short_type(
int index);
Meteo points are Meteorological and Hydrographic data received by NMEA0183 (AIS) VDM message 8 dac:00...
Navigation Utility Functions without GUI dependencies.