OpenCPN Partial API docs
Loading...
Searching...
No Matches
ais.h
1/******************************************************************************
2 *
3 * Project: OpenCPN
4 * Purpose: AIS Decoder Object
5 * Author: David Register
6 *
7 ***************************************************************************
8 * Copyright (C) 2010 by David S. Register *
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 * This program is distributed in the hope that it will be useful, *
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 * GNU General Public License for more details. *
19 * *
20 * You should have received a copy of the GNU General Public License *
21 * along with this program; if not, write to the *
22 * Free Software Foundation, Inc., *
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
24 ***************************************************************************
25 *
26 */
27
28#ifndef __AIS_H__
29#define __AIS_H__
30
31#include <wx/wxprec.h>
32
33#ifndef WX_PRECOMP
34#include <wx/wx.h>
35#endif // precompiled headers
36
37#include <wx/datetime.h>
38#include <wx/listctrl.h>
39#include <wx/spinctrl.h>
40#include <wx/aui/aui.h>
41#include <wx/wxhtml.h>
42
43#include <vector>
44
45#include <wx/sound.h>
46
47#include "gui_lib.h"
48#include "navutil.h"
49#include "OCPN_Sound.h"
50#include "ais_bitstring.h"
51#include "AISTargetListDialog.h"
52#include "ais_target_data.h"
53#include "ais_defs.h"
54
55// FWD definitions
56class ChartCanvas;
57
58// Constants
59#ifndef PI
60#define PI 3.1415926535897931160E0 /* pi */
61#endif
62
63#define TIMER_AIS_MSEC 998
64#define TIMER_AIS_AUDIO_MSEC 2000
65
66
67enum {
68 tlTRK = 0,
69 tlNAME,
70 tlCALL,
71 tlMMSI,
72 tlCLASS,
73 tlTYPE,
74 tlNAVSTATUS,
75 tlBRG,
76 tlRNG,
77 tlCOG,
78 tlSOG,
79 tlCPA,
80 tlTCPA
81}; // AISTargetListCtrl Columns;
82
83// Describe NavStatus variable
84// IMO Circ. 289 Area Notices, based on libais
85const size_t AIS8_001_22_NUM_NAMES = 128;
86const size_t AIS8_001_22_SUBAREA_SIZE = 87;
87
88extern wxString ais8_001_22_notice_names[];
89// WX_DECLARE_LIST(Ais8_001_22_SubArea, Ais8_001_22_SubAreaList);
90
91//---------------------------------------------------------------------------------
92//
93// AisDecoder Helpers
94//
95//---------------------------------------------------------------------------------
96WX_DEFINE_SORTED_ARRAY(AisTargetData *, ArrayOfAISTarget);
97
98// Implement the AISTargetList as a wxHashMap
99
100
101void AISDrawAreaNotices(ocpnDC &dc, ViewPort &vp, ChartCanvas *cp);
102void AISDraw(ocpnDC &dc, ViewPort &vp, ChartCanvas *cp);
103bool AnyAISTargetsOnscreen(ChartCanvas *cc, ViewPort &vp);
104
105#endif
Definition: ocpndc.h:55