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 "model/ais_bitstring.h"
51#include "AISTargetListDialog.h"
52#include "model/ais_target_data.h"
53#include "model/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
66enum {
67 tlTRK = 0,
68 tlNAME,
69 tlCALL,
70 tlMMSI,
71 tlCLASS,
72 tlTYPE,
73 tlNAVSTATUS,
74 tlBRG,
75 tlRNG,
76 tlCOG,
77 tlSOG,
78 tlCPA,
79 tlTCPA
80}; // AISTargetListCtrl Columns;
81
82// Describe NavStatus variable
83// IMO Circ. 289 Area Notices, based on libais
84const size_t AIS8_001_22_NUM_NAMES = 128;
85const size_t AIS8_001_22_SUBAREA_SIZE = 87;
86
87extern wxString ais8_001_22_notice_names[];
88// WX_DECLARE_LIST(Ais8_001_22_SubArea, Ais8_001_22_SubAreaList);
89
90//---------------------------------------------------------------------------------
91//
92// AisDecoder Helpers
93//
94//---------------------------------------------------------------------------------
95WX_DEFINE_SORTED_ARRAY(AisTargetData *, ArrayOfAISTarget);
96
97// Implement the AISTargetList as a wxHashMap
98
99void AISDrawAreaNotices(ocpnDC &dc, ViewPort &vp, ChartCanvas *cp);
100void AISDraw(ocpnDC &dc, ViewPort &vp, ChartCanvas *cp);
101bool AnyAISTargetsOnscreen(ChartCanvas *cc, ViewPort &vp);
102
103#endif
Chart display canvas.
Definition chcanv.h:135
Represents the view port for chart display in OpenCPN.
Definition viewport.h:84
Device context class that can use either wxDC or OpenGL for drawing.
Definition ocpndc.h:64
General purpose GUI support.