OpenCPN Partial API docs
Loading...
Searching...
No Matches
instrument.h File Reference

Dashboard instrument base class. More...

#include <bitset>
#include <wx/wxprec.h>
#include <wx/wx.h>
#include <wx/dcbuffer.h>
#include <wx/dcgraph.h>
#include <wx/fontdata.h>
#include "ocpn_plugin.h"

Go to the source code of this file.

Classes

class  InstrumentProperties
 
class  DashboardInstrument
 
class  DashboardInstrument_Single
 
class  DashboardInstrument_Position
 

Macros

#define wxGCDC   wxDC
 
#define DefaultWidth   150
 
#define N_INSTRUMENTS    ((int)OCPN_DBP_STC_LAST)
 

Typedefs

using CapType = std::bitset< N_INSTRUMENTS >
 

Enumerations

enum  DASH_CAP {
  OCPN_DBP_STC_LAT = 0 , OCPN_DBP_STC_LON , OCPN_DBP_STC_SOG , OCPN_DBP_STC_COG ,
  OCPN_DBP_STC_STW , OCPN_DBP_STC_HDM , OCPN_DBP_STC_HDT , OCPN_DBP_STC_HMV ,
  OCPN_DBP_STC_BRG , OCPN_DBP_STC_AWA , OCPN_DBP_STC_AWS , OCPN_DBP_STC_TWA ,
  OCPN_DBP_STC_TWS , OCPN_DBP_STC_DPT , OCPN_DBP_STC_TMP , OCPN_DBP_STC_VMG ,
  OCPN_DBP_STC_VMGW , OCPN_DBP_STC_RSA , OCPN_DBP_STC_SAT , OCPN_DBP_STC_GPS ,
  OCPN_DBP_STC_PLA , OCPN_DBP_STC_PLO , OCPN_DBP_STC_CLK , OCPN_DBP_STC_MON ,
  OCPN_DBP_STC_ATMP , OCPN_DBP_STC_TWD , OCPN_DBP_STC_TWS2 , OCPN_DBP_STC_VLW1 ,
  OCPN_DBP_STC_VLW2 , OCPN_DBP_STC_MDA , OCPN_DBP_STC_MCOG , OCPN_DBP_STC_PITCH ,
  OCPN_DBP_STC_HEEL , OCPN_DBP_STC_ALTI , OCPN_DBP_STC_HUM , OCPN_DBP_STC_WCC ,
  OCPN_DBP_STC_LAST
}
 

Functions

wxString toSDMM (int NEflag, double a)
 
wxColour GetColourSchemeBackgroundColour (wxColour co)
 
wxColour GetColourSchemeFont (wxColour co)
 

Variables

const wxString DEGREE_SIGN = wxString::Format("%c", 0x00B0)
 
wxFontData * g_pFontTitle
 
wxFontData * g_pFontData
 
wxFontData * g_pFontLabel
 
wxFontData * g_pFontSmall
 
wxFontData * g_pUSFontTitle
 
wxFontData * g_pUSFontData
 
wxFontData * g_pUSFontLabel
 
wxFontData * g_pUSFontSmall
 
wxAlignment g_TitleAlignment
 
double g_TitleVerticalOffset
 
int g_iTitleMargin
 
bool g_bShowUnit
 
wxAlignment g_DataAlignment
 
int g_iDataMargin
 
int g_iInstrumentSpacing
 

Detailed Description

Dashboard instrument base class.

Definition in file instrument.h.

Macro Definition Documentation

◆ DefaultWidth

#define DefaultWidth   150

Definition at line 47 of file instrument.h.

◆ N_INSTRUMENTS

#define N_INSTRUMENTS    ((int)OCPN_DBP_STC_LAST)

Definition at line 120 of file instrument.h.

◆ wxGCDC

#define wxGCDC   wxDC

Definition at line 37 of file instrument.h.

Typedef Documentation

◆ CapType

using CapType = std::bitset<N_INSTRUMENTS>

Definition at line 123 of file instrument.h.

Enumeration Type Documentation

◆ DASH_CAP

enum DASH_CAP
Enumerator
OCPN_DBP_STC_LAT 

Latitude.

OCPN_DBP_STC_LON 

Longitude.

OCPN_DBP_STC_SOG 

Speed over ground.

OCPN_DBP_STC_COG 

Course over ground.

OCPN_DBP_STC_STW 

Speed through water.

OCPN_DBP_STC_HDM 

Heading magnetic North.

OCPN_DBP_STC_HDT 

Heading true North.

OCPN_DBP_STC_HMV 

Magnetic variation from NMEA device if available (not from WMM)

OCPN_DBP_STC_BRG 

Bearing.

OCPN_DBP_STC_AWA 

Apparent wind angle.

OCPN_DBP_STC_AWS 

Apparent wind speed.

OCPN_DBP_STC_TWA 

True wind angle.

OCPN_DBP_STC_TWS 

True wind speed.

OCPN_DBP_STC_DPT 

Depth.

OCPN_DBP_STC_TMP 

Water temperature.

OCPN_DBP_STC_VMG 

Velocity made good.

OCPN_DBP_STC_VMGW 

Velocity made good to windward.

OCPN_DBP_STC_RSA 

Rudder angle.

OCPN_DBP_STC_SAT 

Satellite count in use.

OCPN_DBP_STC_GPS 

GPS status.

OCPN_DBP_STC_PLA 

Cursor latitude.

OCPN_DBP_STC_PLO 

Cursor longitude.

OCPN_DBP_STC_CLK 

Clock.

OCPN_DBP_STC_ATMP 

Air Temperature.

OCPN_DBP_STC_TWD 

True Wind Direction (from NMEA device if available, otherwise TWA + magnetic variation)

OCPN_DBP_STC_TWS2 

True Wind Speed, same calculation as TWS.

OCPN_DBP_STC_VLW1 

Trip Log.

OCPN_DBP_STC_VLW2 

Sum Log.

OCPN_DBP_STC_MDA 

Barometic pressure.

OCPN_DBP_STC_MCOG 

Magnetic Course over Ground.

OCPN_DBP_STC_PITCH 

Pitch.

OCPN_DBP_STC_HEEL 

Heel.

OCPN_DBP_STC_ALTI 

Altitude.

OCPN_DBP_STC_HUM 

Humidity.

OCPN_DBP_STC_WCC 

Windlass.

Definition at line 77 of file instrument.h.

Function Documentation

◆ GetColourSchemeBackgroundColour()

wxColour GetColourSchemeBackgroundColour ( wxColour  co)

Definition at line 43 of file instrument.cpp.

◆ GetColourSchemeFont()

wxColour GetColourSchemeFont ( wxColour  co)

Definition at line 77 of file instrument.cpp.

◆ toSDMM()

wxString toSDMM ( int  NEflag,
double  a 
)

Definition at line 539 of file instrument.cpp.

Variable Documentation

◆ DEGREE_SIGN

const wxString DEGREE_SIGN = wxString::Format("%c", 0x00B0)

Definition at line 50 of file instrument.h.

◆ g_bShowUnit

bool g_bShowUnit
extern

Definition at line 102 of file dashboard_pi.cpp.

◆ g_DataAlignment

wxAlignment g_DataAlignment
extern

Definition at line 103 of file dashboard_pi.cpp.

◆ g_iDataMargin

int g_iDataMargin
extern

Definition at line 104 of file dashboard_pi.cpp.

◆ g_iInstrumentSpacing

int g_iInstrumentSpacing
extern

Definition at line 105 of file dashboard_pi.cpp.

◆ g_iTitleMargin

int g_iTitleMargin
extern

Definition at line 101 of file dashboard_pi.cpp.

◆ g_pFontData

wxFontData* g_pFontData
extern

Definition at line 57 of file dashboard_pi.cpp.

◆ g_pFontLabel

wxFontData* g_pFontLabel
extern

Definition at line 58 of file dashboard_pi.cpp.

◆ g_pFontSmall

wxFontData* g_pFontSmall
extern

Definition at line 59 of file dashboard_pi.cpp.

◆ g_pFontTitle

wxFontData* g_pFontTitle
extern

Definition at line 56 of file dashboard_pi.cpp.

◆ g_pUSFontData

wxFontData* g_pUSFontData
extern

Definition at line 67 of file dashboard_pi.cpp.

◆ g_pUSFontLabel

wxFontData* g_pUSFontLabel
extern

Definition at line 68 of file dashboard_pi.cpp.

◆ g_pUSFontSmall

wxFontData* g_pUSFontSmall
extern

Definition at line 69 of file dashboard_pi.cpp.

◆ g_pUSFontTitle

wxFontData* g_pUSFontTitle
extern

Definition at line 66 of file dashboard_pi.cpp.

◆ g_TitleAlignment

wxAlignment g_TitleAlignment
extern

Definition at line 99 of file dashboard_pi.cpp.

◆ g_TitleVerticalOffset

double g_TitleVerticalOffset
extern

Definition at line 100 of file dashboard_pi.cpp.