OpenCPN Partial API docs
Loading...
Searching...
No Matches
IDX_entry.h
1/******************************************************************************
2 *
3 * Project: OpenCPN
4 *
5 ***************************************************************************
6 * Copyright (C) 2013 by David S. Register *
7 * *
8 * This program is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU General Public License as published by *
10 * the Free Software Foundation; either version 2 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This program is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this program; if not, write to the *
20 * Free Software Foundation, Inc., *
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
22 ***************************************************************************
23 */
24
25#ifndef __IDX_ENTRY_H__
26#define __IDX_ENTRY_H__
27
28#include <wx/dynarray.h>
29
30#define MAXNAMELEN 90
31
32class TCDataSource;
33class Station_Data;
34
35typedef enum {
36 SOURCE_TYPE_UNKNOWN,
37 SOURCE_TYPE_ASCII_HARMONIC,
38 SOURCE_TYPE_BINARY_HARMONIC,
39} source_data_t;
40
41class IDX_entry {
42public:
43 IDX_entry();
44 ~IDX_entry();
45
46 source_data_t source_data_type;
47 TCDataSource *pDataSource;
48 char source_ident[MAXNAMELEN]; // actually, the file name
49
50 int IDX_rec_num; // Keeps track of multiple entries w/same name
51 char IDX_type; // Entry "TCtcIUu" identifier
52 char IDX_zone[40]; // Alpha region/country/state ID
53 char IDX_station_name[MAXNAMELEN]; // Name of station
54 double IDX_lon; // Longitude (+East)
55 double IDX_lat; // Latitude (+North)
56 int IDX_ht_time_off; // High tide offset in minutes
57 float IDX_ht_mpy; // High tide multiplier (nom 1.0)
58 float IDX_ht_off; // High tide level offset (feet?)
59 int IDX_lt_time_off; // Low tide offset in minutes
60 float IDX_lt_mpy; // Low tide multiplier (nom 1.0)
61 float IDX_lt_off; // Low tide level offset (feet?)
62 int IDX_sta_num; // Subordinate station number, **UNUSED**
63 int IDX_flood_dir; // Added DSR opencpn
64 int IDX_ebb_dir;
65 int IDX_Useable;
66 int Valid15;
67 float Value15;
68 float Dir15;
69 bool Ret15;
70 char *IDX_tzname; // Timezone name
71 int IDX_ref_file_num; // # of reference file where reference station is
72 char IDX_reference_name[MAXNAMELEN]; // Name of reference station
73 int IDX_ref_dbIndex; // tcd index of reference station
74 double max_amplitude;
75 int have_offsets;
76 int station_tz_offset; // Offset in seconds to convert from harmonic data
77 // (epochs) to the station time zone. Depends on
78 // Master Station reference only. For ASCII data,
79 // typically 0 For Binary data, probably
80 // -(IDX_time_zone * 60)-(tiderec->zone_offset * 3600)
81 int IDX_time_zone; // Station location minutes offset from UTC
82
83 Station_Data *pref_sta_data; // Pointer to the Reference Station Data
84
85 int num_nodes; // These are copies of relevant data pointers
86 int num_csts; // allocated during invariant harmonic loading
87 int num_epochs; // and owned by the DataSource
88 double *m_cst_speeds;
89 double **m_cst_nodes;
90 double **m_cst_epochs;
91 double *m_work_buffer;
92 int first_year;
93 time_t epoch;
94 int epoch_year;
95 int current_depth;
96 bool b_skipTooDeep;
97
98 // Cached values
99 time_t recent_highlow_calc_time;
100 float recent_high_level;
101 time_t recent_high_time;
102 float recent_low_level;
103 time_t recent_low_time;
104};
105
106WX_DECLARE_OBJARRAY(IDX_entry, ArrayOfIDXEntry);
107
108#endif
Definition: IDX_entry.h:41