OpenCPN Partial API docs
Loading...
Searching...
No Matches
gps.h
Go to the documentation of this file.
1/**************************************************************************
2 * Copyright (C) 2010 by Jean-Eudes Onfray *
3 * Copyright (C) 2010 by David S. Register *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, see <https://www.gnu.org/licenses/>. *
17 **************************************************************************/
18
25#ifndef GpS_H_
26#define GpS_H_
27
28// For compilers that support precompilation, includes "wx/wx.h".
29#include <wx/wxprec.h>
30
31// for all others, include the necessary headers (this file is usually all you
32// need because it includes almost all "standard" wxWidgets headers)
33#ifndef WX_PRECOMP
34#include <wx/wx.h>
35#endif
36
37#include "instrument.h"
38
39// Required for struct SAT_INFO
40#include "SatInfo.h"
41
43public:
44 DashboardInstrument_GPS(wxWindow* parent, wxWindowID id, wxString title,
45 InstrumentProperties* Properties);
46
47 ~DashboardInstrument_GPS() override = default;
48
49 wxSize GetSize(int orient, wxSize hint) override;
50 void SetData(DASH_CAP, double, wxString) override {};
51 void SetSatInfo(int cnt, int seq, wxString talk, SAT_INFO sats[4]);
52
53private:
54protected:
55#define GNSS_SYSTEM 6
56 int m_cx, m_cy, m_radius, m_ref_dim, m_scale_delta, m_scale_base;
57 int m_sat_count;
58 int m_max_sat_count;
59 wxString talker_id;
60 SAT_INFO m_sat_info[12];
61 bool b_shift;
62 wxDateTime m_last_shift;
63 wxDateTime m_gtime[GNSS_SYSTEM];
64 int m_master;
65 wxString m_talker;
66 void Draw(wxGCDC* dc) override;
67 void DrawFrame(wxGCDC* dc);
68 void DrawBackground(wxGCDC* dc);
69 void DrawForeground(wxGCDC* dc);
70};
71
72#endif // GpS_H_
Dashboard instrument base class.
DASH_CAP
Definition instrument.h:77