OpenCPN Partial API docs
Loading...
Searching...
No Matches
tcmgr.cpp File Reference

Tide and Current Manager. More...

#include <wx/wxprec.h>
#include <wx/wx.h>
#include <wx/hashmap.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include "model/georef.h"
#include "model/logger.h"
#include "gui_lib.h"
#include "dychart.h"
#include "navutil.h"
#include "tcmgr.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
#include <assert.h>

Go to the source code of this file.

Classes

struct  TIDE_INDEX
 

Macros

#define intervalwidth   15
 
#define stretchfactor   3
 
#define compare_int(a, b)   (((int)(a)) - ((int)(b)))
 
#define DEFAULT_HEADER_SIZE   4096
 
#define DEFAULT_NUMBER_OF_RECORDS   0
 
#define DEFAULT_LEVEL_UNIT_TYPES   5
 
#define DEFAULT_DIR_UNIT_TYPES   3
 
#define DEFAULT_RESTRICTION_TYPES   2
 
#define DEFAULT_RESTRICTION_BITS   4
 
#define DEFAULT_TZFILES   406
 
#define DEFAULT_TZFILE_BITS   10
 
#define DEFAULT_COUNTRIES   240
 
#define DEFAULT_COUNTRY_BITS   9
 
#define DEFAULT_DATUM_TYPES   61
 
#define DEFAULT_DATUM_BITS   7
 
#define DEFAULT_LEGALESES   1
 
#define DEFAULT_LEGALESE_BITS   4
 
#define DEFAULT_SPEED_SCALE   10000000
 
#define DEFAULT_EQUILIBRIUM_SCALE   100
 
#define DEFAULT_NODE_SCALE   10000
 
#define DEFAULT_AMPLITUDE_BITS   19
 
#define DEFAULT_AMPLITUDE_SCALE   10000
 
#define DEFAULT_EPOCH_BITS   16
 
#define DEFAULT_EPOCH_SCALE   100
 
#define DEFAULT_RECORD_TYPE_BITS   4
 
#define DEFAULT_LATITUDE_BITS   25
 
#define DEFAULT_LATITUDE_SCALE   100000
 
#define DEFAULT_LONGITUDE_BITS   26
 
#define DEFAULT_LONGITUDE_SCALE   100000
 
#define DEFAULT_RECORD_SIZE_BITS   16
 
#define DEFAULT_STATION_BITS   18
 
#define DEFAULT_DATUM_OFFSET_BITS   28
 
#define DEFAULT_DATUM_OFFSET_SCALE   10000
 
#define DEFAULT_DATE_BITS   27
 
#define DEFAULT_MONTHS_ON_STATION_BITS   10
 
#define DEFAULT_CONFIDENCE_VALUE_BITS   4
 
#define DEFAULT_NUMBER_OF_CONSTITUENTS_BITS   8
 
#define DEFAULT_TIME_BITS   13
 
#define DEFAULT_LEVEL_ADD_BITS   17
 
#define DEFAULT_LEVEL_ADD_SCALE   1000
 
#define DEFAULT_LEVEL_MULTIPLY_BITS   16
 
#define DEFAULT_LEVEL_MULTIPLY_SCALE   1000
 
#define DEFAULT_DIRECTION_BITS   9
 
#define DEFAULT_CONSTITUENT_SIZE   10
 
#define DEFAULT_LEVEL_UNIT_SIZE   15
 
#define DEFAULT_DIR_UNIT_SIZE   15
 
#define DEFAULT_RESTRICTION_SIZE   30
 
#define DEFAULT_DATUM_SIZE   70
 
#define DEFAULT_LEGALESE_SIZE   70
 
#define DEFAULT_TZFILE_SIZE   30
 
#define DEFAULT_COUNTRY_SIZE   50
 
#define INFERRED_SEMI_DIURNAL_COUNT   10
 
#define INFERRED_DIURNAL_COUNT   10
 
#define require(expr)
 

Functions

double BOGUS_amplitude (double mpy, IDX_entry *pIDX)
 BOGUS amplitude stuff - Added mgh For knots^2 current stations, returns square root of (value * amplitude), For normal stations, returns value * amplitude.
 
double time2atide (time_t t, IDX_entry *pIDX)
 
int next_big_event (time_t *tm, IDX_entry *pIDX)
 
double time2mean (time_t t, IDX_entry *pIDX)
 
double time2asecondary (time_t t, IDX_entry *pIDX)
 
double _time2dt_tide (time_t t, int deriv, IDX_entry *pIDX)
 
double blend_tide (time_t t, unsigned int deriv, int first_year, double blend, IDX_entry *pIDX)
 
void figure_max_amplitude (IDX_entry *pIDX)
 
void figure_multipliers (IDX_entry *pIDX, int year)
 
int compare_tm (struct tm *a, struct tm *b)
 
time_t tm2gmt (struct tm *ht)
 
NV_U_INT32 calculate_bits (NV_U_INT32 value)
 
void bit_pack (NV_U_BYTE *, NV_U_INT32, NV_U_INT32, NV_INT32)
 
NV_U_INT32 bit_unpack (NV_U_BYTE *, NV_U_INT32, NV_U_INT32)
 
NV_INT32 signed_bit_unpack (NV_U_BYTE buffer[], NV_U_INT32 start, NV_U_INT32 numbits)
 
void dump_tide_record (const TIDE_RECORD *rec)
 
const NV_CHAR * get_country (NV_INT32 num)
 
const NV_CHAR * get_tzfile (NV_INT32 num)
 
const NV_CHAR * get_station (NV_INT32 num)
 
const NV_CHAR * get_constituent (NV_INT32 num)
 
const NV_CHAR * get_level_units (NV_INT32 num)
 
const NV_CHAR * get_dir_units (NV_INT32 num)
 
const NV_CHAR * get_restriction (NV_INT32 num)
 
const NV_CHAR * get_datum (NV_INT32 num)
 
const NV_CHAR * get_legalese (NV_INT32 num)
 
NV_FLOAT64 get_speed (NV_INT32 num)
 
NV_FLOAT32 get_equilibrium (NV_INT32 num, NV_INT32 year)
 
NV_FLOAT32 * get_equilibriums (NV_INT32 num)
 
NV_FLOAT32 get_node_factor (NV_INT32 num, NV_INT32 year)
 
NV_FLOAT32 * get_node_factors (NV_INT32 num)
 
NV_BOOL get_partial_tide_record (NV_INT32 num, TIDE_STATION_HEADER *rec)
 
NV_INT32 get_next_partial_tide_record (TIDE_STATION_HEADER *rec)
 
NV_INT32 get_nearest_partial_tide_record (NV_FLOAT64 lat, NV_FLOAT64 lon, TIDE_STATION_HEADER *rec)
 
NV_INT32 get_time (const NV_CHAR *string)
 
NV_CHAR * ret_time (NV_INT32 time)
 
NV_CHAR * ret_time_neat (NV_INT32 time)
 
NV_CHAR * ret_date (NV_U_INT32 date)
 
DB_HEADER_PUBLIC get_tide_db_header ()
 
NV_INT32 search_station (const NV_CHAR *string)
 
NV_INT32 find_station (const NV_CHAR *name)
 
NV_INT32 find_tzfile (const NV_CHAR *name)
 
NV_INT32 find_country (const NV_CHAR *name)
 
NV_INT32 find_level_units (const NV_CHAR *name)
 
NV_INT32 find_dir_units (const NV_CHAR *name)
 
NV_INT32 find_datum (const NV_CHAR *name)
 
NV_INT32 find_legalese (const NV_CHAR *name)
 
NV_INT32 find_constituent (const NV_CHAR *name)
 
NV_INT32 find_restriction (const NV_CHAR *name)
 
void set_speed (NV_INT32 num, NV_FLOAT64 value)
 
void set_equilibrium (NV_INT32 num, NV_INT32 year, NV_FLOAT32 value)
 
void set_node_factor (NV_INT32 num, NV_INT32 year, NV_FLOAT32 value)
 
NV_INT32 add_tzfile (const NV_CHAR *name, DB_HEADER_PUBLIC *db)
 
NV_INT32 add_country (const NV_CHAR *name, DB_HEADER_PUBLIC *db)
 
NV_INT32 add_datum (const NV_CHAR *name, DB_HEADER_PUBLIC *db)
 
NV_INT32 add_legalese (const NV_CHAR *name, DB_HEADER_PUBLIC *db)
 
NV_INT32 add_restriction (const NV_CHAR *name, DB_HEADER_PUBLIC *db)
 
NV_INT32 find_or_add_restriction (const NV_CHAR *name, DB_HEADER_PUBLIC *db)
 
NV_INT32 find_or_add_tzfile (const NV_CHAR *name, DB_HEADER_PUBLIC *db)
 
NV_INT32 find_or_add_country (const NV_CHAR *name, DB_HEADER_PUBLIC *db)
 
NV_INT32 find_or_add_datum (const NV_CHAR *name, DB_HEADER_PUBLIC *db)
 
NV_INT32 find_or_add_legalese (const NV_CHAR *name, DB_HEADER_PUBLIC *db)
 
NV_BOOL open_tide_db (const NV_CHAR *file)
 
void close_tide_db ()
 
NV_BOOL create_tide_db (const NV_CHAR *file, NV_U_INT32 constituents, NV_CHAR const *const constituent[], const NV_FLOAT64 *speed, NV_INT32 start_year, NV_U_INT32 num_years, NV_FLOAT32 const *const equilibrium[], NV_FLOAT32 const *const node_factor[])
 
NV_INT32 read_next_tide_record (TIDE_RECORD *rec)
 
NV_INT32 read_tide_record (NV_INT32 num, TIDE_RECORD *rec)
 
NV_BOOL add_tide_record (TIDE_RECORD *rec, DB_HEADER_PUBLIC *db)
 
NV_BOOL update_tide_record (NV_INT32 num, TIDE_RECORD *rec, DB_HEADER_PUBLIC *db)
 
NV_BOOL infer_constituents (TIDE_RECORD *rec)
 
void bit_pack (NV_U_BYTE buffer[], NV_U_INT32 start, NV_U_INT32 numbits, NV_INT32 value)
 
NV_U_INT32 bit_unpack (NV_U_BYTE buffer[], NV_U_INT32 start, NV_U_INT32 numbits)
 

Variables

TCMgrptcmgr
 Global instance.
 
wxDateTime gTimeSource
 
const NV_CHAR * inferred_semi_diurnal [INFERRED_SEMI_DIURNAL_COUNT]
 
const NV_CHAR * inferred_diurnal [INFERRED_DIURNAL_COUNT]
 
NV_FLOAT32 semi_diurnal_coeff [INFERRED_SEMI_DIURNAL_COUNT]
 
NV_FLOAT32 diurnal_coeff [INFERRED_DIURNAL_COUNT]
 
NV_FLOAT32 coeff [2] = {.9085, .3771}
 
NV_CHAR level_unit [DEFAULT_LEVEL_UNIT_TYPES][DEFAULT_LEVEL_UNIT_SIZE]
 
NV_CHAR dir_unit [DEFAULT_DIR_UNIT_TYPES][DEFAULT_DIR_UNIT_SIZE]
 
NV_CHAR restriction [DEFAULT_RESTRICTION_TYPES][DEFAULT_RESTRICTION_SIZE]
 
NV_CHAR legalese [DEFAULT_LEGALESES][DEFAULT_LEGALESE_SIZE] = {"NULL"}
 
NV_CHAR datum [DEFAULT_DATUM_TYPES][DEFAULT_DATUM_SIZE]
 
NV_CHAR country [DEFAULT_COUNTRIES][DEFAULT_COUNTRY_SIZE]
 
NV_CHAR tzfile [DEFAULT_TZFILES][DEFAULT_TZFILE_SIZE]
 

Detailed Description

Tide and Current Manager.

Definition in file tcmgr.cpp.

Macro Definition Documentation

◆ compare_int

#define compare_int (   a,
 
)    (((int)(a)) - ((int)(b)))

Definition at line 559 of file tcmgr.cpp.

◆ DEFAULT_AMPLITUDE_BITS

#define DEFAULT_AMPLITUDE_BITS   19

Definition at line 1134 of file tcmgr.cpp.

◆ DEFAULT_AMPLITUDE_SCALE

#define DEFAULT_AMPLITUDE_SCALE   10000

Definition at line 1135 of file tcmgr.cpp.

◆ DEFAULT_CONFIDENCE_VALUE_BITS

#define DEFAULT_CONFIDENCE_VALUE_BITS   4

Definition at line 1149 of file tcmgr.cpp.

◆ DEFAULT_CONSTITUENT_SIZE

#define DEFAULT_CONSTITUENT_SIZE   10

Definition at line 1157 of file tcmgr.cpp.

◆ DEFAULT_COUNTRIES

#define DEFAULT_COUNTRIES   240

Definition at line 1125 of file tcmgr.cpp.

◆ DEFAULT_COUNTRY_BITS

#define DEFAULT_COUNTRY_BITS   9

Definition at line 1126 of file tcmgr.cpp.

◆ DEFAULT_COUNTRY_SIZE

#define DEFAULT_COUNTRY_SIZE   50

Definition at line 1164 of file tcmgr.cpp.

◆ DEFAULT_DATE_BITS

#define DEFAULT_DATE_BITS   27

Definition at line 1147 of file tcmgr.cpp.

◆ DEFAULT_DATUM_BITS

#define DEFAULT_DATUM_BITS   7

Definition at line 1128 of file tcmgr.cpp.

◆ DEFAULT_DATUM_OFFSET_BITS

#define DEFAULT_DATUM_OFFSET_BITS   28

Definition at line 1145 of file tcmgr.cpp.

◆ DEFAULT_DATUM_OFFSET_SCALE

#define DEFAULT_DATUM_OFFSET_SCALE   10000

Definition at line 1146 of file tcmgr.cpp.

◆ DEFAULT_DATUM_SIZE

#define DEFAULT_DATUM_SIZE   70

Definition at line 1161 of file tcmgr.cpp.

◆ DEFAULT_DATUM_TYPES

#define DEFAULT_DATUM_TYPES   61

Definition at line 1127 of file tcmgr.cpp.

◆ DEFAULT_DIR_UNIT_SIZE

#define DEFAULT_DIR_UNIT_SIZE   15

Definition at line 1159 of file tcmgr.cpp.

◆ DEFAULT_DIR_UNIT_TYPES

#define DEFAULT_DIR_UNIT_TYPES   3

Definition at line 1120 of file tcmgr.cpp.

◆ DEFAULT_DIRECTION_BITS

#define DEFAULT_DIRECTION_BITS   9

Definition at line 1156 of file tcmgr.cpp.

◆ DEFAULT_EPOCH_BITS

#define DEFAULT_EPOCH_BITS   16

Definition at line 1136 of file tcmgr.cpp.

◆ DEFAULT_EPOCH_SCALE

#define DEFAULT_EPOCH_SCALE   100

Definition at line 1137 of file tcmgr.cpp.

◆ DEFAULT_EQUILIBRIUM_SCALE

#define DEFAULT_EQUILIBRIUM_SCALE   100

Definition at line 1132 of file tcmgr.cpp.

◆ DEFAULT_HEADER_SIZE

#define DEFAULT_HEADER_SIZE   4096

Definition at line 1117 of file tcmgr.cpp.

◆ DEFAULT_LATITUDE_BITS

#define DEFAULT_LATITUDE_BITS   25

Definition at line 1139 of file tcmgr.cpp.

◆ DEFAULT_LATITUDE_SCALE

#define DEFAULT_LATITUDE_SCALE   100000

Definition at line 1140 of file tcmgr.cpp.

◆ DEFAULT_LEGALESE_BITS

#define DEFAULT_LEGALESE_BITS   4

Definition at line 1130 of file tcmgr.cpp.

◆ DEFAULT_LEGALESE_SIZE

#define DEFAULT_LEGALESE_SIZE   70

Definition at line 1162 of file tcmgr.cpp.

◆ DEFAULT_LEGALESES

#define DEFAULT_LEGALESES   1

Definition at line 1129 of file tcmgr.cpp.

◆ DEFAULT_LEVEL_ADD_BITS

#define DEFAULT_LEVEL_ADD_BITS   17

Definition at line 1152 of file tcmgr.cpp.

◆ DEFAULT_LEVEL_ADD_SCALE

#define DEFAULT_LEVEL_ADD_SCALE   1000

Definition at line 1153 of file tcmgr.cpp.

◆ DEFAULT_LEVEL_MULTIPLY_BITS

#define DEFAULT_LEVEL_MULTIPLY_BITS   16

Definition at line 1154 of file tcmgr.cpp.

◆ DEFAULT_LEVEL_MULTIPLY_SCALE

#define DEFAULT_LEVEL_MULTIPLY_SCALE   1000

Definition at line 1155 of file tcmgr.cpp.

◆ DEFAULT_LEVEL_UNIT_SIZE

#define DEFAULT_LEVEL_UNIT_SIZE   15

Definition at line 1158 of file tcmgr.cpp.

◆ DEFAULT_LEVEL_UNIT_TYPES

#define DEFAULT_LEVEL_UNIT_TYPES   5

Definition at line 1119 of file tcmgr.cpp.

◆ DEFAULT_LONGITUDE_BITS

#define DEFAULT_LONGITUDE_BITS   26

Definition at line 1141 of file tcmgr.cpp.

◆ DEFAULT_LONGITUDE_SCALE

#define DEFAULT_LONGITUDE_SCALE   100000

Definition at line 1142 of file tcmgr.cpp.

◆ DEFAULT_MONTHS_ON_STATION_BITS

#define DEFAULT_MONTHS_ON_STATION_BITS   10

Definition at line 1148 of file tcmgr.cpp.

◆ DEFAULT_NODE_SCALE

#define DEFAULT_NODE_SCALE   10000

Definition at line 1133 of file tcmgr.cpp.

◆ DEFAULT_NUMBER_OF_CONSTITUENTS_BITS

#define DEFAULT_NUMBER_OF_CONSTITUENTS_BITS   8

Definition at line 1150 of file tcmgr.cpp.

◆ DEFAULT_NUMBER_OF_RECORDS

#define DEFAULT_NUMBER_OF_RECORDS   0

Definition at line 1118 of file tcmgr.cpp.

◆ DEFAULT_RECORD_SIZE_BITS

#define DEFAULT_RECORD_SIZE_BITS   16

Definition at line 1143 of file tcmgr.cpp.

◆ DEFAULT_RECORD_TYPE_BITS

#define DEFAULT_RECORD_TYPE_BITS   4

Definition at line 1138 of file tcmgr.cpp.

◆ DEFAULT_RESTRICTION_BITS

#define DEFAULT_RESTRICTION_BITS   4

Definition at line 1122 of file tcmgr.cpp.

◆ DEFAULT_RESTRICTION_SIZE

#define DEFAULT_RESTRICTION_SIZE   30

Definition at line 1160 of file tcmgr.cpp.

◆ DEFAULT_RESTRICTION_TYPES

#define DEFAULT_RESTRICTION_TYPES   2

Definition at line 1121 of file tcmgr.cpp.

◆ DEFAULT_SPEED_SCALE

#define DEFAULT_SPEED_SCALE   10000000

Definition at line 1131 of file tcmgr.cpp.

◆ DEFAULT_STATION_BITS

#define DEFAULT_STATION_BITS   18

Definition at line 1144 of file tcmgr.cpp.

◆ DEFAULT_TIME_BITS

#define DEFAULT_TIME_BITS   13

Definition at line 1151 of file tcmgr.cpp.

◆ DEFAULT_TZFILE_BITS

#define DEFAULT_TZFILE_BITS   10

Definition at line 1124 of file tcmgr.cpp.

◆ DEFAULT_TZFILE_SIZE

#define DEFAULT_TZFILE_SIZE   30

Definition at line 1163 of file tcmgr.cpp.

◆ DEFAULT_TZFILES

#define DEFAULT_TZFILES   406

Definition at line 1123 of file tcmgr.cpp.

◆ INFERRED_DIURNAL_COUNT

#define INFERRED_DIURNAL_COUNT   10

Definition at line 1169 of file tcmgr.cpp.

◆ INFERRED_SEMI_DIURNAL_COUNT

#define INFERRED_SEMI_DIURNAL_COUNT   10

Definition at line 1168 of file tcmgr.cpp.

◆ require

#define require (   expr)
Value:
{ \
int require_expr; \
require_expr = (int)(expr); \
assert(require_expr); \
}

Definition at line 1941 of file tcmgr.cpp.

Function Documentation

◆ _time2dt_tide()

double _time2dt_tide ( time_t  t,
int  deriv,
IDX_entry pIDX 
)

Definition at line 387 of file tcmgr.cpp.

◆ add_country()

NV_INT32 add_country ( const NV_CHAR *  name,
DB_HEADER_PUBLIC db 
)

Definition at line 3754 of file tcmgr.cpp.

◆ add_datum()

NV_INT32 add_datum ( const NV_CHAR *  name,
DB_HEADER_PUBLIC db 
)

Definition at line 3813 of file tcmgr.cpp.

◆ add_legalese()

NV_INT32 add_legalese ( const NV_CHAR *  name,
DB_HEADER_PUBLIC db 
)

Definition at line 3856 of file tcmgr.cpp.

◆ add_restriction()

NV_INT32 add_restriction ( const NV_CHAR *  name,
DB_HEADER_PUBLIC db 
)

Definition at line 3915 of file tcmgr.cpp.

◆ add_tide_record()

NV_BOOL add_tide_record ( TIDE_RECORD rec,
DB_HEADER_PUBLIC db 
)

Definition at line 6743 of file tcmgr.cpp.

◆ add_tzfile()

NV_INT32 add_tzfile ( const NV_CHAR *  name,
DB_HEADER_PUBLIC db 
)

Definition at line 3695 of file tcmgr.cpp.

◆ bit_pack()

void bit_pack ( NV_U_BYTE  buffer[],
NV_U_INT32  start,
NV_U_INT32  numbits,
NV_INT32  value 
)

Definition at line 7202 of file tcmgr.cpp.

◆ bit_unpack()

NV_U_INT32 bit_unpack ( NV_U_BYTE  buffer[],
NV_U_INT32  start,
NV_U_INT32  numbits 
)

Definition at line 7314 of file tcmgr.cpp.

◆ blend_tide()

double blend_tide ( time_t  t,
unsigned int  deriv,
int  first_year,
double  blend,
IDX_entry pIDX 
)

Definition at line 443 of file tcmgr.cpp.

◆ BOGUS_amplitude()

double BOGUS_amplitude ( double  mpy,
IDX_entry pIDX 
)

BOGUS amplitude stuff - Added mgh For knots^2 current stations, returns square root of (value * amplitude), For normal stations, returns value * amplitude.

Definition at line 67 of file tcmgr.cpp.

◆ calculate_bits()

NV_U_INT32 calculate_bits ( NV_U_INT32  value)

Definition at line 7163 of file tcmgr.cpp.

◆ close_tide_db()

void close_tide_db ( )

Definition at line 5335 of file tcmgr.cpp.

◆ compare_tm()

int compare_tm ( struct tm *  a,
struct tm *  b 
)

Definition at line 560 of file tcmgr.cpp.

◆ create_tide_db()

NV_BOOL create_tide_db ( const NV_CHAR *  file,
NV_U_INT32  constituents,
NV_CHAR const *const  constituent[],
const NV_FLOAT64 *  speed,
NV_INT32  start_year,
NV_U_INT32  num_years,
NV_FLOAT32 const *const  equilibrium[],
NV_FLOAT32 const *const  node_factor[] 
)

Definition at line 5466 of file tcmgr.cpp.

◆ dump_tide_record()

void dump_tide_record ( const TIDE_RECORD rec)

Definition at line 2338 of file tcmgr.cpp.

◆ figure_max_amplitude()

void figure_max_amplitude ( IDX_entry pIDX)

Definition at line 532 of file tcmgr.cpp.

◆ figure_multipliers()

void figure_multipliers ( IDX_entry pIDX,
int  year 
)

Definition at line 547 of file tcmgr.cpp.

◆ find_constituent()

NV_INT32 find_constituent ( const NV_CHAR *  name)

Definition at line 3485 of file tcmgr.cpp.

◆ find_country()

NV_INT32 find_country ( const NV_CHAR *  name)

Definition at line 3267 of file tcmgr.cpp.

◆ find_datum()

NV_INT32 find_datum ( const NV_CHAR *  name)

Definition at line 3415 of file tcmgr.cpp.

◆ find_dir_units()

NV_INT32 find_dir_units ( const NV_CHAR *  name)

Definition at line 3351 of file tcmgr.cpp.

◆ find_legalese()

NV_INT32 find_legalese ( const NV_CHAR *  name)

Definition at line 3442 of file tcmgr.cpp.

◆ find_level_units()

NV_INT32 find_level_units ( const NV_CHAR *  name)

Definition at line 3309 of file tcmgr.cpp.

◆ find_or_add_country()

NV_INT32 find_or_add_country ( const NV_CHAR *  name,
DB_HEADER_PUBLIC db 
)

Definition at line 3982 of file tcmgr.cpp.

◆ find_or_add_datum()

NV_INT32 find_or_add_datum ( const NV_CHAR *  name,
DB_HEADER_PUBLIC db 
)

Definition at line 3993 of file tcmgr.cpp.

◆ find_or_add_legalese()

NV_INT32 find_or_add_legalese ( const NV_CHAR *  name,
DB_HEADER_PUBLIC db 
)

Definition at line 4004 of file tcmgr.cpp.

◆ find_or_add_restriction()

NV_INT32 find_or_add_restriction ( const NV_CHAR *  name,
DB_HEADER_PUBLIC db 
)

Definition at line 3960 of file tcmgr.cpp.

◆ find_or_add_tzfile()

NV_INT32 find_or_add_tzfile ( const NV_CHAR *  name,
DB_HEADER_PUBLIC db 
)

Definition at line 3971 of file tcmgr.cpp.

◆ find_restriction()

NV_INT32 find_restriction ( const NV_CHAR *  name)

Definition at line 3522 of file tcmgr.cpp.

◆ find_station()

NV_INT32 find_station ( const NV_CHAR *  name)

Definition at line 3190 of file tcmgr.cpp.

◆ find_tzfile()

NV_INT32 find_tzfile ( const NV_CHAR *  name)

Definition at line 3225 of file tcmgr.cpp.

◆ get_constituent()

const NV_CHAR * get_constituent ( NV_INT32  num)

Definition at line 2516 of file tcmgr.cpp.

◆ get_country()

const NV_CHAR * get_country ( NV_INT32  num)

Definition at line 2433 of file tcmgr.cpp.

◆ get_datum()

const NV_CHAR * get_datum ( NV_INT32  num)

Definition at line 2653 of file tcmgr.cpp.

◆ get_dir_units()

const NV_CHAR * get_dir_units ( NV_INT32  num)

Definition at line 2574 of file tcmgr.cpp.

◆ get_equilibrium()

NV_FLOAT32 get_equilibrium ( NV_INT32  num,
NV_INT32  year 
)

Definition at line 2723 of file tcmgr.cpp.

◆ get_equilibriums()

NV_FLOAT32 * get_equilibriums ( NV_INT32  num)

Definition at line 2737 of file tcmgr.cpp.

◆ get_legalese()

const NV_CHAR * get_legalese ( NV_INT32  num)

Definition at line 2666 of file tcmgr.cpp.

◆ get_level_units()

const NV_CHAR * get_level_units ( NV_INT32  num)

Definition at line 2545 of file tcmgr.cpp.

◆ get_nearest_partial_tide_record()

NV_INT32 get_nearest_partial_tide_record ( NV_FLOAT64  lat,
NV_FLOAT64  lon,
TIDE_STATION_HEADER rec 
)

Definition at line 2882 of file tcmgr.cpp.

◆ get_next_partial_tide_record()

NV_INT32 get_next_partial_tide_record ( TIDE_STATION_HEADER rec)

Definition at line 2856 of file tcmgr.cpp.

◆ get_node_factor()

NV_FLOAT32 get_node_factor ( NV_INT32  num,
NV_INT32  year 
)

Definition at line 2766 of file tcmgr.cpp.

◆ get_node_factors()

NV_FLOAT32 * get_node_factors ( NV_INT32  num)

Definition at line 2780 of file tcmgr.cpp.

◆ get_partial_tide_record()

NV_BOOL get_partial_tide_record ( NV_INT32  num,
TIDE_STATION_HEADER rec 
)

Definition at line 2813 of file tcmgr.cpp.

◆ get_restriction()

const NV_CHAR * get_restriction ( NV_INT32  num)

Definition at line 2603 of file tcmgr.cpp.

◆ get_speed()

NV_FLOAT64 get_speed ( NV_INT32  num)

Definition at line 2694 of file tcmgr.cpp.

◆ get_station()

const NV_CHAR * get_station ( NV_INT32  num)

Definition at line 2487 of file tcmgr.cpp.

◆ get_tide_db_header()

DB_HEADER_PUBLIC get_tide_db_header ( )

Definition at line 3031 of file tcmgr.cpp.

◆ get_time()

NV_INT32 get_time ( const NV_CHAR *  string)

Definition at line 2922 of file tcmgr.cpp.

◆ get_tzfile()

const NV_CHAR * get_tzfile ( NV_INT32  num)

Definition at line 2460 of file tcmgr.cpp.

◆ infer_constituents()

NV_BOOL infer_constituents ( TIDE_RECORD rec)

Definition at line 7050 of file tcmgr.cpp.

◆ next_big_event()

int next_big_event ( time_t *  tm,
IDX_entry pIDX 
)

Definition at line 93 of file tcmgr.cpp.

◆ open_tide_db()

NV_BOOL open_tide_db ( const NV_CHAR *  file)

Definition at line 5299 of file tcmgr.cpp.

◆ read_next_tide_record()

NV_INT32 read_next_tide_record ( TIDE_RECORD rec)

Definition at line 6355 of file tcmgr.cpp.

◆ read_tide_record()

NV_INT32 read_tide_record ( NV_INT32  num,
TIDE_RECORD rec 
)

Definition at line 6699 of file tcmgr.cpp.

◆ ret_date()

NV_CHAR * ret_date ( NV_U_INT32  date)

Definition at line 3000 of file tcmgr.cpp.

◆ ret_time()

NV_CHAR * ret_time ( NV_INT32  time)

Definition at line 2959 of file tcmgr.cpp.

◆ ret_time_neat()

NV_CHAR * ret_time_neat ( NV_INT32  time)

Definition at line 2979 of file tcmgr.cpp.

◆ search_station()

NV_INT32 search_station ( const NV_CHAR *  string)

Definition at line 3140 of file tcmgr.cpp.

◆ set_equilibrium()

void set_equilibrium ( NV_INT32  num,
NV_INT32  year,
NV_FLOAT32  value 
)

Definition at line 3600 of file tcmgr.cpp.

◆ set_node_factor()

void set_node_factor ( NV_INT32  num,
NV_INT32  year,
NV_FLOAT32  value 
)

Definition at line 3633 of file tcmgr.cpp.

◆ set_speed()

void set_speed ( NV_INT32  num,
NV_FLOAT64  value 
)

Definition at line 3563 of file tcmgr.cpp.

◆ signed_bit_unpack()

NV_INT32 signed_bit_unpack ( NV_U_BYTE  buffer[],
NV_U_INT32  start,
NV_U_INT32  numbits 
)

Definition at line 7406 of file tcmgr.cpp.

◆ time2asecondary()

double time2asecondary ( time_t  t,
IDX_entry pIDX 
)

Definition at line 185 of file tcmgr.cpp.

◆ time2atide()

double time2atide ( time_t  t,
IDX_entry pIDX 
)

Definition at line 81 of file tcmgr.cpp.

◆ time2mean()

double time2mean ( time_t  t,
IDX_entry pIDX 
)

Definition at line 162 of file tcmgr.cpp.

◆ tm2gmt()

time_t tm2gmt ( struct tm *  ht)

Definition at line 584 of file tcmgr.cpp.

◆ update_tide_record()

NV_BOOL update_tide_record ( NV_INT32  num,
TIDE_RECORD rec,
DB_HEADER_PUBLIC db 
)

Definition at line 6935 of file tcmgr.cpp.

Variable Documentation

◆ coeff

NV_FLOAT32 coeff[2] = {.9085, .3771}

Definition at line 1186 of file tcmgr.cpp.

◆ country

NV_CHAR country[DEFAULT_COUNTRIES][DEFAULT_COUNTRY_SIZE]

Definition at line 1280 of file tcmgr.cpp.

◆ datum

NV_CHAR datum[DEFAULT_DATUM_TYPES][DEFAULT_DATUM_SIZE]

Definition at line 1215 of file tcmgr.cpp.

◆ dir_unit

NV_CHAR dir_unit[DEFAULT_DIR_UNIT_TYPES][DEFAULT_DIR_UNIT_SIZE]
Initial value:
= {
"Unknown", "degrees true", "degrees"}

Definition at line 1201 of file tcmgr.cpp.

◆ diurnal_coeff

NV_FLOAT32 diurnal_coeff[INFERRED_DIURNAL_COUNT]
Initial value:
= {
.0163, .0209, .0297, .0142, .0730, .0097, .1755, .0103, .0076, .0042}

Definition at line 1181 of file tcmgr.cpp.

◆ gTimeSource

wxDateTime gTimeSource
extern

Definition at line 102 of file gui_vars.cpp.

◆ inferred_diurnal

const NV_CHAR* inferred_diurnal[INFERRED_DIURNAL_COUNT]
Initial value:
= {
"OO1", "M1", "J1", "RHO1", "Q1", "2Q1", "P1", "PI1", "PHI1", "PSI1"}

Definition at line 1177 of file tcmgr.cpp.

◆ inferred_semi_diurnal

const NV_CHAR* inferred_semi_diurnal[INFERRED_SEMI_DIURNAL_COUNT]
Initial value:
= {
"N2", "NU2", "MU2", "2N2", "LDA2", "T2", "R2", "L2", "K2", "KJ2"}

Definition at line 1175 of file tcmgr.cpp.

◆ legalese

NV_CHAR legalese[DEFAULT_LEGALESES][DEFAULT_LEGALESE_SIZE] = {"NULL"}

Definition at line 1211 of file tcmgr.cpp.

◆ level_unit

NV_CHAR level_unit[DEFAULT_LEVEL_UNIT_TYPES][DEFAULT_LEVEL_UNIT_SIZE]
Initial value:
= {
"Unknown", "feet", "meters", "knots", "knots^2"}

Definition at line 1196 of file tcmgr.cpp.

◆ ptcmgr

TCMgr* ptcmgr

Global instance.

Definition at line 42 of file tcmgr.cpp.

◆ restriction

NV_CHAR restriction[DEFAULT_RESTRICTION_TYPES][DEFAULT_RESTRICTION_SIZE]
Initial value:
= {
"Public Domain", "DoD/DoD Contractors Only"}

Definition at line 1206 of file tcmgr.cpp.

◆ semi_diurnal_coeff

NV_FLOAT32 semi_diurnal_coeff[INFERRED_SEMI_DIURNAL_COUNT]
Initial value:
= {
.1759, .0341, .0219, .0235, .0066, .0248, .0035, .0251, .1151, .0064}

Definition at line 1179 of file tcmgr.cpp.

◆ tzfile

NV_CHAR tzfile[DEFAULT_TZFILES][DEFAULT_TZFILE_SIZE]

Definition at line 1524 of file tcmgr.cpp.