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

Dashboard Plugin. More...

#include <wx/wxprec.h>
#include <cassert>
#include <cmath>
#include <typeinfo>
#include <wx/wx.h>
#include <wx/filename.h>
#include <wx/fontdlg.h>
#include "gui/ocpn_fontdlg.h"
#include "manual/manual.h"
#include "altitude.h"
#include "baro_history.h"
#include "clock.h"
#include "depth.h"
#include "compass.h"
#include "dashboard_pi.h"
#include "from_ownship.h"
#include "gps.h"
#include "icons.h"
#include "jsonreader.h"
#include "jsonwriter.h"
#include "N2KParser.h"

Go to the source code of this file.

Macros

#define NAN   (*(double *)&lNaN)
 

Enumerations

enum  {
  ID_DBP_I_POS , ID_DBP_I_SOG , ID_DBP_D_SOG , ID_DBP_I_COG ,
  ID_DBP_D_COG , ID_DBP_I_STW , ID_DBP_I_HDT , ID_DBP_D_AW ,
  ID_DBP_D_AWA , ID_DBP_I_AWS , ID_DBP_D_AWS , ID_DBP_D_TW ,
  ID_DBP_I_DPT , ID_DBP_D_DPT , ID_DBP_I_TMP , ID_DBP_I_VMG ,
  ID_DBP_D_VMG , ID_DBP_I_RSA , ID_DBP_D_RSA , ID_DBP_I_SAT ,
  ID_DBP_D_GPS , ID_DBP_I_PTR , ID_DBP_I_GPSUTC , ID_DBP_I_SUN ,
  ID_DBP_D_MON , ID_DBP_I_ATMP , ID_DBP_I_AWA , ID_DBP_I_TWA ,
  ID_DBP_I_TWD , ID_DBP_I_TWS , ID_DBP_D_TWD , ID_DBP_I_HDM ,
  ID_DBP_D_HDT , ID_DBP_D_WDH , ID_DBP_I_VLW1 , ID_DBP_I_VLW2 ,
  ID_DBP_D_MDA , ID_DBP_I_MDA , ID_DBP_D_BPH , ID_DBP_I_FOS ,
  ID_DBP_M_COG , ID_DBP_I_PITCH , ID_DBP_I_HEEL , ID_DBP_D_AWA_TWA ,
  ID_DBP_I_GPSLCL , ID_DBP_I_CPULCL , ID_DBP_I_SUNLCL , ID_DBP_I_ALTI ,
  ID_DBP_D_ALTI , ID_DBP_I_VMGW , ID_DBP_I_HUM , ID_DBP_D_STW ,
  ID_DBP_I_WCC , ID_DBP_LAST_ENTRY
}
 

Functions

DECL_EXP opencpn_plugincreate_pi (void *ppimgr)
 
DECL_EXP void destroy_pi (opencpn_plugin *p)
 
bool IsObsolete (int id)
 
wxString getInstrumentCaption (unsigned int id)
 
void getListItemForInstrument (wxListItem &item, unsigned int id)
 
int GetRandomNumber (int range_min, int range_max)
 
wxString GetUUID ()
 
wxString MakeName ()
 
double GetJsonDouble (wxJSONValue &value)
 
void GetFontData (OCPNFontButton *FontButton, wxFontData &UnScaledFont, wxFontData &ScaledFont, double scaler)
 
bool isArrayIntEqual (const wxArrayInt &l1, const wxArrayOfInstrument &l2)
 

Variables

wxFontData * g_pFontTitle
 
wxFontData * g_pFontData
 
wxFontData * g_pFontLabel
 
wxFontData * g_pFontSmall
 
wxFontData g_FontTitle
 
wxFontData g_FontData
 
wxFontData g_FontLabel
 
wxFontData g_FontSmall
 
wxFontData * g_pUSFontTitle
 
wxFontData * g_pUSFontData
 
wxFontData * g_pUSFontLabel
 
wxFontData * g_pUSFontSmall
 
wxFontData g_USFontTitle
 
wxFontData g_USFontData
 
wxFontData g_USFontLabel
 
wxFontData g_USFontSmall
 
int g_iDashSpeedMax
 
int g_iDashCOGDamp
 
int g_iDashSpeedUnit
 
int g_iDashSOGDamp
 
int g_iDashAWADamp
 
int g_iDashAWSDamp
 
int g_iDashDepthUnit
 
int g_iDashDistanceUnit
 
int g_iDashWindSpeedUnit
 
int g_iUTCOffset
 
double g_dDashDBTOffset
 
bool g_bUseInternSumLog
 
double g_dSumLogNM
 
double d_tripNM
 
int logCount
 
int confprint
 
bool g_bDBtrueWindGround
 
double g_dHDT
 
double g_dSOG
 
double g_dCOG
 
int g_iDashTempUnit
 
int g_dashPrefWidth
 
int g_dashPrefHeight
 
wxColor g_BackgroundColor
 
bool g_ForceBackgroundColor
 
wxAlignment g_TitleAlignment
 
double g_TitleVerticalOffset
 
int g_iTitleMargin
 
bool g_bShowUnit
 
wxAlignment g_DataAlignment
 
int g_iDataMargin
 
int g_iInstrumentSpacing
 
PI_ColorScheme aktuellColorScheme
 
wxString talker_N2k = wxEmptyString
 

Detailed Description

Dashboard Plugin.

Definition in file dashboard_pi.cpp.

Macro Definition Documentation

◆ NAN

#define NAN   (*(double *)&lNaN)

Definition at line 110 of file dashboard_pi.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ID_DBP_I_GPSLCL 

GNSS Clock formatted in local time.

ID_DBP_I_CPULCL 

Computer Clock formatted in local time.

ID_DBP_I_SUNLCL 

Sunrise/Sunset time formatted in local time.

Definition at line 202 of file dashboard_pi.cpp.

Function Documentation

◆ create_pi()

DECL_EXP opencpn_plugin * create_pi ( void *  ppimgr)

Definition at line 119 of file dashboard_pi.cpp.

◆ destroy_pi()

DECL_EXP void destroy_pi ( opencpn_plugin p)

Definition at line 123 of file dashboard_pi.cpp.

◆ GetFontData()

void GetFontData ( OCPNFontButton FontButton,
wxFontData &  UnScaledFont,
wxFontData &  ScaledFont,
double  scaler 
)
inline

Definition at line 5086 of file dashboard_pi.cpp.

◆ getInstrumentCaption()

wxString getInstrumentCaption ( unsigned int  id)

Definition at line 264 of file dashboard_pi.cpp.

◆ GetJsonDouble()

double GetJsonDouble ( wxJSONValue value)

Definition at line 738 of file dashboard_pi.cpp.

◆ getListItemForInstrument()

void getListItemForInstrument ( wxListItem &  item,
unsigned int  id 
)

Definition at line 371 of file dashboard_pi.cpp.

◆ GetRandomNumber()

int GetRandomNumber ( int  range_min,
int  range_max 
)

Definition at line 438 of file dashboard_pi.cpp.

◆ GetUUID()

wxString GetUUID ( )

Definition at line 446 of file dashboard_pi.cpp.

◆ isArrayIntEqual()

bool isArrayIntEqual ( const wxArrayInt &  l1,
const wxArrayOfInstrument &  l2 
)

Definition at line 5853 of file dashboard_pi.cpp.

◆ IsObsolete()

bool IsObsolete ( int  id)

Definition at line 262 of file dashboard_pi.cpp.

◆ MakeName()

wxString MakeName ( )

Definition at line 483 of file dashboard_pi.cpp.

Variable Documentation

◆ aktuellColorScheme

PI_ColorScheme aktuellColorScheme

Definition at line 107 of file dashboard_pi.cpp.

◆ confprint

int confprint

Definition at line 90 of file dashboard_pi.cpp.

◆ d_tripNM

double d_tripNM

Definition at line 89 of file dashboard_pi.cpp.

◆ g_BackgroundColor

wxColor g_BackgroundColor

Definition at line 97 of file dashboard_pi.cpp.

◆ g_bDBtrueWindGround

bool g_bDBtrueWindGround

Definition at line 91 of file dashboard_pi.cpp.

◆ g_bShowUnit

bool g_bShowUnit

Definition at line 102 of file dashboard_pi.cpp.

◆ g_bUseInternSumLog

bool g_bUseInternSumLog

Definition at line 87 of file dashboard_pi.cpp.

◆ g_dashPrefHeight

int g_dashPrefHeight

Definition at line 95 of file dashboard_pi.cpp.

◆ g_dashPrefWidth

int g_dashPrefWidth

Definition at line 95 of file dashboard_pi.cpp.

◆ g_DataAlignment

wxAlignment g_DataAlignment

Definition at line 103 of file dashboard_pi.cpp.

◆ g_dCOG

double g_dCOG

Definition at line 93 of file dashboard_pi.cpp.

◆ g_dDashDBTOffset

double g_dDashDBTOffset

Definition at line 86 of file dashboard_pi.cpp.

◆ g_dHDT

double g_dHDT

Definition at line 92 of file dashboard_pi.cpp.

◆ g_dSOG

double g_dSOG

Definition at line 93 of file dashboard_pi.cpp.

◆ g_dSumLogNM

double g_dSumLogNM

Definition at line 88 of file dashboard_pi.cpp.

◆ g_FontData

wxFontData g_FontData

Definition at line 62 of file dashboard_pi.cpp.

◆ g_FontLabel

wxFontData g_FontLabel

Definition at line 63 of file dashboard_pi.cpp.

◆ g_FontSmall

wxFontData g_FontSmall

Definition at line 64 of file dashboard_pi.cpp.

◆ g_FontTitle

wxFontData g_FontTitle

Definition at line 61 of file dashboard_pi.cpp.

◆ g_ForceBackgroundColor

bool g_ForceBackgroundColor

Definition at line 98 of file dashboard_pi.cpp.

◆ g_iDashAWADamp

int g_iDashAWADamp

Definition at line 80 of file dashboard_pi.cpp.

◆ g_iDashAWSDamp

int g_iDashAWSDamp

Definition at line 81 of file dashboard_pi.cpp.

◆ g_iDashCOGDamp

int g_iDashCOGDamp

Definition at line 77 of file dashboard_pi.cpp.

◆ g_iDashDepthUnit

int g_iDashDepthUnit

Definition at line 82 of file dashboard_pi.cpp.

◆ g_iDashDistanceUnit

int g_iDashDistanceUnit

Definition at line 83 of file dashboard_pi.cpp.

◆ g_iDashSOGDamp

int g_iDashSOGDamp

Definition at line 79 of file dashboard_pi.cpp.

◆ g_iDashSpeedMax

int g_iDashSpeedMax

Definition at line 76 of file dashboard_pi.cpp.

◆ g_iDashSpeedUnit

int g_iDashSpeedUnit

Definition at line 78 of file dashboard_pi.cpp.

◆ g_iDashTempUnit

int g_iDashTempUnit

Definition at line 94 of file dashboard_pi.cpp.

◆ g_iDashWindSpeedUnit

int g_iDashWindSpeedUnit

Definition at line 84 of file dashboard_pi.cpp.

◆ g_iDataMargin

int g_iDataMargin

Definition at line 104 of file dashboard_pi.cpp.

◆ g_iInstrumentSpacing

int g_iInstrumentSpacing

Definition at line 105 of file dashboard_pi.cpp.

◆ g_iTitleMargin

int g_iTitleMargin

Definition at line 101 of file dashboard_pi.cpp.

◆ g_iUTCOffset

int g_iUTCOffset

Definition at line 85 of file dashboard_pi.cpp.

◆ g_pFontData

wxFontData* g_pFontData

Definition at line 57 of file dashboard_pi.cpp.

◆ g_pFontLabel

wxFontData* g_pFontLabel

Definition at line 58 of file dashboard_pi.cpp.

◆ g_pFontSmall

wxFontData* g_pFontSmall

Definition at line 59 of file dashboard_pi.cpp.

◆ g_pFontTitle

wxFontData* g_pFontTitle

Definition at line 56 of file dashboard_pi.cpp.

◆ g_pUSFontData

wxFontData* g_pUSFontData

Definition at line 67 of file dashboard_pi.cpp.

◆ g_pUSFontLabel

wxFontData* g_pUSFontLabel

Definition at line 68 of file dashboard_pi.cpp.

◆ g_pUSFontSmall

wxFontData* g_pUSFontSmall

Definition at line 69 of file dashboard_pi.cpp.

◆ g_pUSFontTitle

wxFontData* g_pUSFontTitle

Definition at line 66 of file dashboard_pi.cpp.

◆ g_TitleAlignment

wxAlignment g_TitleAlignment

Definition at line 99 of file dashboard_pi.cpp.

◆ g_TitleVerticalOffset

double g_TitleVerticalOffset

Definition at line 100 of file dashboard_pi.cpp.

◆ g_USFontData

wxFontData g_USFontData

Definition at line 72 of file dashboard_pi.cpp.

◆ g_USFontLabel

wxFontData g_USFontLabel

Definition at line 73 of file dashboard_pi.cpp.

◆ g_USFontSmall

wxFontData g_USFontSmall

Definition at line 74 of file dashboard_pi.cpp.

◆ g_USFontTitle

wxFontData g_USFontTitle

Definition at line 71 of file dashboard_pi.cpp.

◆ logCount

int logCount

Definition at line 90 of file dashboard_pi.cpp.

◆ talker_N2k

wxString talker_N2k = wxEmptyString

Definition at line 2272 of file dashboard_pi.cpp.