TacticsInstrument_Compass::TacticsInstrument_Compass( wxWindow *parent, wxWindowID id, wxString title, int cap_flag) : TacticsInstrument_Dial( parent, id, title, cap_flag, 0, 360, 0, 360) { SetOptionMarker(5, DIAL_MARKER_SIMPLE, 2); SetOptionLabel(20, DIAL_LABEL_ROTATED); SetOptionMainValue( _T("%.0f"), DIAL_POSITION_INSIDE); }
DashboardInstrument_Compass::DashboardInstrument_Compass( wxWindow *parent, wxWindowID id, wxString title, int cap_flag) : DashboardInstrument_Dial( parent, id, title, cap_flag, 0, 360, 0, 360) { SetOptionMarker(5, DIAL_MARKER_SIMPLE, 2); SetOptionLabel(20, DIAL_LABEL_ROTATED); SetOptionMainValue(_T("%5.0f Deg"), DIAL_POSITION_TOPRIGHT); SetInstrumentWidth(200); }
TacticsInstrument_BearingCompass::TacticsInstrument_BearingCompass(wxWindow *parent, wxWindowID id, wxString title, int cap_flag) : TacticsInstrument_Dial(parent, id, title, cap_flag, 0, 360, 0, 360) { SetOptionMarker(5, DIAL_MARKER_SIMPLE, 2); SetOptionLabel(20, DIAL_LABEL_ROTATED); SetOptionMainValue(_T("%.0f"), DIAL_POSITION_INSIDE); // Get a pointer to the opencpn configuration object m_pconfig = GetOCPNConfigObject(); LoadConfig(); m_Bearing = NAN; m_lat = NAN; m_lon = NAN; m_CurrDir = NAN; m_CurrSpeed = NAN; m_ExtraValueDTW = NAN; m_MainValue = NAN; m_Leeway = 0; m_AngleStart = 0; m_ExpSmoothDegRange = 0; mExpSmDegRange = new ExpSmooth(g_dalphaDeltCoG); m_Cog = -999; m_Hdt = -999; m_diffCogHdt = 0; m_predictedSog = NAN; m_TWA = NAN; m_AWA = -999; m_TWS = NAN; m_TWD = NAN; m_StW = 0.0; m_ToWpt = _T("---"); alpha_diffCogHdt = 0.1; m_ExpSmoothDiffCogHdt = 0; m_oldExpSmoothDiffCogHdt = 0; for (int i = 0; i < COGRANGE; i++) m_COGRange[i] = 0; }