OpenCPN Partial API docs
Loading...
Searching...
No Matches
meteo_points.h
1/**************************************************************************
2 * Copyright (C) 2023 Håkan Svensson
3 * Copyright (C) 2023 Alec Leamas
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, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 **************************************************************************/
20
21#ifndef _METEO_POINTS_H__
22#define _METEO_POINTS_H__
23
30 // Ais8_001_31, Ais8_367_33 Meteo data
31 int original_mmsi;
32 int stationID; // SignalK ID
33 int month; // UTC 0
34 int day; // UTC 0
35 int hour; // UTC 24
36 int minute; // UTC 60
37 int pos_acc; // low = 0 GNSS
38 int wind_kn; // NAN=127
39 int wind_gust_kn; // kn NAN=127/122
40 int wind_dir; // NAN=360
41 int wind_gust_dir; // NAN=360
42 double air_temp; // C NAN = -102.4
43 int rel_humid; // % NAN = 101
44 double dew_point; // NAN = 501(50.1)
45 int airpress; // value+799 hPa NAN = 511(1310)
46 int airpress_tend; // NAN = 3
47 double hor_vis; // NAN = 127(12.7)
48 bool hor_vis_GT; // Greater than
49 double water_lev_dev; // Water level deviation (incl.tide) NAN = 30
50 double water_level; // Water level NAN = -32,768
51 int water_lev_trend; // NAN = 3
52 double current; // kn NAN = 255(25.5)
53 int curr_dir; // NAN = 360
54 double wave_height; // m NAN=255(24.5)
55 int wave_period; // s NAN = 63
56 int wave_dir; // NAN = 360
57 double swell_height; // m NAN = 255 (25.5)
58 int swell_per; // s NAN = 63
59 int swell_dir; // NAN=360
60 int seastate; // Bf NAN=13
61 double water_temp; // C NAN = 501(50.1)
62 int precipitation; // type NAN=7
63 double salinity; // ‰ NAN=510(50.0)
64 int ice; // NAN=3
65 int vertical_ref; // NAN=14
66};
67
72public:
73 const int mmsi;
74 const wxString lat;
75 const wxString lon;
76 const int siteID;
77 const int orig_mmsi;
78 AisMeteoPoint(int mmsi, const wxString& lat, const wxString& lon, int siteID,
79 int orig_mmsi)
80 : mmsi(mmsi), lat(lat), lon(lon), siteID(siteID), orig_mmsi(orig_mmsi) {}
81};
82
92public:
93 static AisMeteoPoints& GetInstance() {
94 static AisMeteoPoints me;
95 return me;
96 }
97 std::vector<AisMeteoPoint>& GetPoints() { return points; }
98
99 void operator=(const AisMeteoPoints&) = delete;
100 AisMeteoPoints(AisMeteoPoints& other) = delete;
101
102private:
103 AisMeteoPoints() = default;
104 std::vector<AisMeteoPoint> points;
105};
106
107#endif
Add a new point to the list of Meteo stations.
List of Meteo stations, a singleton.
Meteo points are Meteorological and Hydrographic data received by NMEA0183 (AIS) VDM message 8 dac:00...