diff --git a/CMakeLists.txt b/CMakeLists.txt index d301211b..a2078b6f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,8 +14,8 @@ SET(VERBOSE_NAME ShipDriver) SET(TITLE_NAME ShipDriver) SET(CPACK_PACKAGE_CONTACT "Mike Rossiter") -SET(VERSION_MAJOR "2") -SET(VERSION_MINOR "0") +SET(VERSION_MAJOR "0") +SET(VERSION_MINOR "5") #SET(CMAKE_BUILD_TYPE Debug) @@ -43,26 +43,14 @@ SET(SRC_ShipDriver src/ShipDrivergui_impl.cpp src/ShipDrivergui_impl.h src/ocpn_plugin.h + src/folder.xpm src/AisMaker.h src/AisMaker.cpp - src/GribRecord.cpp - src/tinystr.h - src/tinyxml.h - src/tinyxml.cpp - src/tinyxmlerror.cpp - src/tinyxmlparser.cpp - - src/wxJSON/jsonval.cpp - src/wxJSON/jsonreader.cpp - src/wxJSON/jsonwriter.cpp - ) ADD_LIBRARY(${PACKAGE_NAME} SHARED ${SRC_ShipDriver}) -ADD_DEFINITIONS(-DTIXML_USE_STL) - INCLUDE("cmake/PluginInstall.cmake") INCLUDE("cmake/PluginLocalization.cmake") INCLUDE("cmake/PluginPackage.cmake") diff --git a/ShipDriver_pi.fbp b/ShipDriver_pi.fbp index b3001472..8a69e854 100644 --- a/ShipDriver_pi.fbp +++ b/ShipDriver_pi.fbp @@ -1,8 +1,8 @@ - + - + C++ 1 source_name @@ -16,9 +16,9 @@ none 1 ShipDriver - + ./src - + 1 1 1 @@ -31,65 +31,65 @@ wxAUI_MGR_DEFAULT 201,201,201 wxBOTH - + 1 1 impl_virtual - - + + Arial,90,92,10,74,0 0 wxID_ANY - - 300,250 + + -1,-1 ShipDriverBase - + -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + OnClose - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + bSizer10 wxVERTICAL none @@ -98,7 +98,7 @@ wxEXPAND 0 - + bSizer14 wxVERTICAL none @@ -107,7 +107,7 @@ wxEXPAND 0 - + bSizer92 wxHORIZONTAL none @@ -120,17 +120,17 @@ 0 0 0 - - - - - + + + + + 255,0,0 - + 1 0 1 - + 1 0 Dock @@ -139,63 +139,63 @@ 1 255,0,0 0 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_gaugeRudderPort 1 - - + + public 1 - + 30 Resizable 1 -1,-1 wxGA_HORIZONTAL - + 0 - - + + wxFILTER_NONE wxDefaultValidator - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -207,17 +207,17 @@ 0 0 0 - - - - - + + + + + 0,255,0 - + 1 0 1 - + 1 0 Dock @@ -226,63 +226,63 @@ 1 0,255,0 0 - + 0 0 wxID_ANY - + 0 - - + + 0 - + 1 m_gaugeRudderStbd 1 - - + + public 1 - + 30 Resizable 1 -1,-1 wxGA_HORIZONTAL - + 0 - - + + wxFILTER_NONE wxDefaultValidator - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -292,7 +292,7 @@ wxEXPAND 0 - + bSizer13 wxHORIZONTAL none @@ -305,17 +305,17 @@ 1 1 1 - - - - - + + + + + 201,201,201 - + 1 0 1 - + 1 0 Dock @@ -324,84 +324,84 @@ 1 wxSYS_COLOUR_WINDOW 1 - + 0 0 wxID_ANY 60 - + 0 - + 0 - + 0 - + 1 m_SliderRudder 1 - - + + public 1 - + Resizable 1 300,-1 wxSL_AUTOTICKS|wxSL_BOTH|wxSL_HORIZONTAL - + 0 Tiller Control - + wxFILTER_NONE wxDefaultValidator - + 30 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -411,7 +411,7 @@ wxEXPAND|wxALIGN_CENTER_VERTICAL 1 - + bSizer6 wxVERTICAL none @@ -420,7 +420,7 @@ wxEXPAND 1 - + bSizer131 wxHORIZONTAL none @@ -443,86 +443,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 Arial,90,92,10,74,0 0 0 wxID_ANY - + 0 - - - + + + 0 - + 1 m_textCtrlRudderPort 1 - - + + protected 1 - + Resizable 1 - - wxTE_CENTRE|wxTE_READONLY - + + wxTE_READONLY|wxTE_CENTER + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -534,17 +534,17 @@ 1 1 1 - - - - - + + + + + 250,203,107 - + 1 0 1 - + 1 0 0 @@ -552,156 +552,156 @@ 0 Left 1 - + 1 Arial,90,92,11,74,0 0 0 wxID_ANY | - + 0 - - + + 0 - + 1 m_buttonMid 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 Midships - + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnMidships - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + 0 - wxALIGN_CENTER_VERTICAL + wxALIGN_BOTTOM|wxALIGN_CENTER_VERTICAL 0 1 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 Arial,90,92,10,74,0 0 0 wxID_ANY - + 0 - - - + + + 0 - + 1 m_textCtrlRudderStbd 1 - - + + protected 1 - + Resizable 1 - - wxTE_CENTRE|wxTE_READONLY - + + wxTE_READONLY|wxTE_CENTER + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -721,7 +721,7 @@ wxEXPAND 1 - + bSizer16 wxHORIZONTAL none @@ -744,17 +744,17 @@ 1 1 1 - - - - - + + + + + 0,255,0 - + 1 0 1 - + 1 0 0 @@ -769,58 +769,58 @@ 0 wxID_ANY Start - + 0 - - + + 0 - + 1 m_bpPlay 1 - - + + protected 1 - + Resizable 1 -1,-1 - - + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnStart - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -832,17 +832,17 @@ 1 1 1 - - - - - + + + + + 255,0,0 - + 1 0 1 - + 1 0 0 @@ -850,65 +850,65 @@ 0 Center 1 - + 1 Arial,90,92,12,74,0 0 0 wxID_ANY Stop - + 0 - - + + 0 -1,-1 1 m_bpStop 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnStop - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -928,7 +928,7 @@ wxEXPAND|wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL 1 - + bSizer7 wxHORIZONTAL none @@ -951,78 +951,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 Arial,90,92,12,74,0 0 0 wxID_ANY Heading: - + 0 - - + + 0 - + 1 m_staticTextHeading 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1034,78 +1034,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 Arial,90,92,12,74,0 0 0 wxID_ANY 000 - + 0 - - + + 0 - + 1 m_stHeading 1 - - + + public 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1117,78 +1117,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 Arial,90,92,12,74,0 0 0 wxID_ANY Speed: - + 0 - - + + 0 - + 1 m_staticTextKnots 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1200,78 +1200,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 Arial,90,92,12,74,0 0 0 wxID_ANY 0 - + 0 - - + + 0 - + 1 m_stSpeed 1 - - + + public 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1283,78 +1283,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 Arial,90,92,12,74,0 0 0 wxID_ANY Kts - + 0 - - + + 0 - + 1 m_staticText81 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1378,7 +1378,7 @@ wxEXPAND 1 - + bSizer12 wxHORIZONTAL none @@ -1391,78 +1391,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 Arial,90,92,12,74,0 0 0 wxID_ANY 0 - + 0 - - + + 0 - + 1 m_staticText7 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1474,17 +1474,17 @@ 1 1 1 - - - - - + + + + + 201,201,201 - + 1 0 1 - + 1 0 Dock @@ -1498,79 +1498,79 @@ 0 wxID_ANY 100 - + 0 - + 0 - + 0 -1,-1 1 m_SliderSpeed 1 - - + + public 1 - + Resizable 1 300,-1 - - + + 0 Speed Control - + wxFILTER_NONE wxDefaultValidator - + 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1582,78 +1582,78 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 Arial,90,92,12,74,0 0 0 wxID_ANY 100 - + 0 - - + + 0 - + 1 m_staticText8 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1668,7 +1668,7 @@ 0,1,2,3 0,1 0 - + fgSizer82 wxFLEX_GROWMODE_SPECIFIED none @@ -1683,17 +1683,17 @@ 1 1 1 - - - - - + + + + + 0,255,0 - + 1 0 1 - + 1 0 0 @@ -1701,65 +1701,65 @@ 0 Left 1 - + 1 Arial,90,92,12,74,0 0 0 wxID_ANY Stby - + 0 - - + + 0 50,-1 1 m_buttonStandby 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 Hand Steering - + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnStandby - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1771,17 +1771,17 @@ 1 1 1 - - - - - + + + + + 255,255,255 - + 1 0 1 - + 1 0 0 @@ -1789,65 +1789,65 @@ 0 Left 1 - + 1 Arial,90,92,12,74,0 0 0 wxID_ANY Auto - + 0 - - + + 0 50,-1 1 m_buttonAuto 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 Autopilot Control - + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnAuto - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1859,17 +1859,17 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 0 @@ -1877,65 +1877,65 @@ 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - - + + 0 50,-1 1 m_button7 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1947,17 +1947,17 @@ 1 1 1 - - - - - - 0,255,0 - + + + + + + + 1 0 1 - + 1 0 0 @@ -1965,65 +1965,65 @@ 0 Left 1 - + 1 - Arial,90,92,12,74,0 + 0 0 wxID_ANY - Sail - + + 0 - - + + 0 50,-1 1 - m_buttonWind + m_button8 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - Using Sails - + + wxFILTER_NONE wxDefaultValidator - - - - - OnWind - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2035,17 +2035,17 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 0 @@ -2053,65 +2053,65 @@ 0 Left 1 - + 1 Arial,90,92,12,74,0 0 0 wxID_ANY -1 - + 0 - - + + 0 50,-1 1 m_buttonMinus1 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnMinus1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2123,17 +2123,17 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 0 @@ -2141,65 +2141,65 @@ 0 Left 1 - + 1 Arial,90,92,12,74,0 0 0 wxID_ANY -10 - + 0 - - + + 0 50,-1 1 m_buttonMinus10 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnMinus10 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2211,17 +2211,17 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 0 @@ -2229,65 +2229,65 @@ 0 Left 1 - + 1 Arial,90,92,12,74,0 0 0 wxID_ANY +10 - + 0 - - + + 0 50,-1 1 m_buttonPlus10 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnPlus10 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2299,17 +2299,17 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 0 @@ -2317,65 +2317,65 @@ 0 Left 1 - + 1 Arial,90,92,12,74,0 0 0 wxID_ANY +1 - + 0 - - + + 0 50,-1 1 m_buttonPlus1 1 - - + + protected 1 - + Resizable 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnPlus1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2394,74 +2394,74 @@ 0 wxAUI_MGR_DEFAULT - + wxBOTH - + 1 1 impl_virtual - - - + + + 0 wxID_ANY - - + + shipdriverPreferences - + -1,-1 wxCAPTION|wxRESIZE_BORDER ; forward_declare Preferences - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + wxID_ANY AIS - + sbSizer1 wxVERTICAL 1 none - + 5 wxEXPAND @@ -2469,10 +2469,10 @@ 1 wxBOTH - - + + 0 - + fgSizer2 wxFLEX_GROWMODE_SPECIFIED none @@ -2487,83 +2487,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Transmit - + 0 - - + + 0 - + 1 m_cbTransmitAis 1 - - + + public 1 - + Resizable 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2575,83 +2575,83 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Save to file - + 0 - - + + 0 - + 1 m_cbAisToFile 1 - - + + public 1 - + Resizable 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2663,12 +2663,12 @@ wxID_ANY MMSI - + sbSizer2 wxVERTICAL 1 none - + 5 wxALL @@ -2678,86 +2678,86 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - - + + + 0 - + 1 m_textCtrlMMSI 1 - - + + public 1 - + Resizable 1 - - + + ; forward_declare 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2775,17 +2775,17 @@ 1 0 0 - + m_sdbSizer1 protected - - - - - - - - + + + + + + + + diff --git a/src/ShipDriver_pi.cpp b/src/ShipDriver_pi.cpp index cfae4b1b..c22264eb 100644 --- a/src/ShipDriver_pi.cpp +++ b/src/ShipDriver_pi.cpp @@ -35,6 +35,7 @@ #include "ShipDrivergui_impl.h" #include "ShipDrivergui.h" #include "ocpn_plugin.h" +#include "folder.xpm" class ShipDriver_pi; class Dlg; @@ -87,7 +88,7 @@ ShipDriver_pi::~ShipDriver_pi(void) if (pConf) { - pConf->SetPath(_T("/Settings/ShipDriver_pi")); + pConf->SetPath(_T("/Settings/otidalroute")); pConf->Write(_T("shipdriverUseAis"), m_bCopyUseAis); pConf->Write(_T("shipdriverUseFile"), m_bCopyUseFile); @@ -146,7 +147,6 @@ int ShipDriver_pi::Init(void) WANTS_NMEA_SENTENCES| WANTS_AIS_SENTENCES| WANTS_PREFERENCES| - WANTS_PLUGIN_MESSAGING | WANTS_CONFIG ); } @@ -265,7 +265,6 @@ void ShipDriver_pi::ShowPreferencesDialog(wxWindow* parent) SaveConfig(); - RequestRefresh(m_parent_window); // refresh main window } @@ -403,122 +402,6 @@ void ShipDriver_pi::SetCursorLatLon(double lat, double lon) m_cursor_lon = lon; } -void ShipDriver_pi::SetPluginMessage(wxString &message_id, wxString &message_body) -{ - if (message_id == _T("GRIB_TIMELINE")) - { - wxJSONReader r; - wxJSONValue v; - r.Parse(message_body, &v); - - wxDateTime time; - time.Set - (v[_T("Day")].AsInt(), (wxDateTime::Month)v[_T("Month")].AsInt(), v[_T("Year")].AsInt(), - v[_T("Hour")].AsInt(), v[_T("Minute")].AsInt(), v[_T("Second")].AsInt()); - - wxString dt; - dt = time.Format(_T("%Y-%m-%d %H:%M ")); - - if (m_pDialog){ - m_pDialog->m_GribTimelineTime = time.ToUTC(); - //m_pDialog->m_textCtrl1->SetValue(dt); - } - } - if (message_id == _T("GRIB_TIMELINE_RECORD")) - { - wxJSONReader r; - wxJSONValue v; - r.Parse(message_body, &v); - - static bool shown_warnings; - if (!shown_warnings) { - shown_warnings = true; - - int grib_version_major = v[_T("GribVersionMajor")].AsInt(); - int grib_version_minor = v[_T("GribVersionMinor")].AsInt(); - - int grib_version = 1000 * grib_version_major + grib_version_minor; - int grib_min = 1000 * GRIB_MIN_MAJOR + GRIB_MIN_MINOR; - int grib_max = 1000 * GRIB_MAX_MAJOR + GRIB_MAX_MINOR; - - if (grib_version < grib_min || grib_version > grib_max) { - wxMessageDialog mdlg(m_parent_window, - _("Grib plugin version not supported.") - + _T("\n\n") + - wxString::Format(_("Use versions %d.%d to %d.%d"), GRIB_MIN_MAJOR, GRIB_MIN_MINOR, GRIB_MAX_MAJOR, GRIB_MAX_MINOR), - _("Weather Routing"), wxOK | wxICON_WARNING); - mdlg.ShowModal(); - } - } - - wxString sptr = v[_T("TimelineSetPtr")].AsString(); - wxCharBuffer bptr = sptr.To8BitData(); - const char* ptr = bptr.data(); - - GribRecordSet *gptr; - sscanf(ptr, "%p", &gptr); - - double dir, spd; - - m_bGribValid = GribCurrent(gptr, m_grib_lat, m_grib_lon, dir, spd); - - m_tr_spd = spd; - m_tr_dir = dir; - - //wxMessageBox(wxString::Format(_T("%5.2f"), spd)); - } -} - -bool ShipDriver_pi::GribWind(GribRecordSet *grib, double lat, double lon, - double &WG, double &VWG) -{ - if (!grib) - return false; - - if (!GribRecord::getInterpolatedValues(VWG, WG, - grib->m_GribRecordPtrArray[Idx_WIND_VX], - grib->m_GribRecordPtrArray[Idx_WIND_VY], lon, lat)) - return false; - - VWG *= 3.6 / 1.852; // knots - return true; -} - -wxString ShipDriver_pi::StandardPath() -{ - wxStandardPathsBase& std_path = wxStandardPathsBase::Get(); - wxString s = wxFileName::GetPathSeparator(); - -#if defined(__WXMSW__) - wxString stdPath = std_path.GetConfigDir(); -#elif defined(__WXGTK__) || defined(__WXQT__) - wxString stdPath = std_path.GetUserDataDir(); -#elif defined(__WXOSX__) - wxString stdPath = (std_path.GetUserConfigDir() + s + _T("opencpn")); -#endif - - stdPath += s + _T("plugins"); - if (!wxDirExists(stdPath)) - wxMkdir(stdPath); - - stdPath += s + _T("ShipDriver"); - -#ifdef __WXOSX__ - // Compatibility with pre-OCPN-4.2; move config dir to - // ~/Library/Preferences/opencpn if it exists - wxString oldPath = (std_path.GetUserConfigDir() + s + _T("plugins") + s + _T("ShipDriver")); - if (wxDirExists(oldPath) && !wxDirExists(stdPath)) { - wxLogMessage("ShipDriver_pi: moving config dir %s to %s", oldPath, stdPath); - wxRenameFile(oldPath, stdPath); - } -#endif - - if (!wxDirExists(stdPath)) - wxMkdir(stdPath); - - stdPath += s; // is this necessary? - return stdPath; -} diff --git a/src/ShipDriver_pi.h b/src/ShipDriver_pi.h index 5b75433f..d7d290dd 100644 --- a/src/ShipDriver_pi.h +++ b/src/ShipDriver_pi.h @@ -39,48 +39,15 @@ #include "ocpn_plugin.h" //Required for OCPN plugin functions #include "ShipDrivergui_impl.h" -#include "wx/jsonreader.h" -#include "wx/jsonwriter.h" -#include -#include "GribRecordSet.h" -// Define minimum and maximum versions of the grib plugin supported -#define GRIB_MAX_MAJOR 4 -#define GRIB_MAX_MINOR 1 -#define GRIB_MIN_MAJOR 4 -#define GRIB_MIN_MINOR 1 - - - -#define PLUGIN_VERSION_MAJOR 2 -#define PLUGIN_VERSION_MINOR 0 +#define PLUGIN_VERSION_MAJOR 0 +#define PLUGIN_VERSION_MINOR 5 #define MY_API_VERSION_MAJOR 1 #define MY_API_VERSION_MINOR 6 class Dlg; -static inline bool GribCurrent(GribRecordSet *grib, double lat, double lon, - double &C, double &VC) -{ - if (!grib) - return false; - - if (!GribRecord::getInterpolatedValues(VC, C, - grib->m_GribRecordPtrArray[Idx_WIND_VX], - grib->m_GribRecordPtrArray[Idx_WIND_VY], - lon, lat)) - return false; - - VC *= 3.6 / 1.852; // knots - - //C += 180; - if (C > 360) - C -= 360; - return true; -} - - //---------------------------------------------------------------------------------------------------------- // The PlugIn Class Definition //---------------------------------------------------------------------------------------------------------- @@ -135,15 +102,6 @@ class ShipDriver_pi : public opencpn_plugin_16 double GetCursorLon(void) { return m_cursor_lon; } void ShowPreferencesDialog(wxWindow* parent); - void SetPluginMessage(wxString &message_id, wxString &message_body); - bool GribWind(GribRecordSet *grib, double lat, double lon, double &WG, double &VWG); - - bool m_bGribValid; - double m_grib_lat, m_grib_lon; - double m_tr_spd; - double m_tr_dir; - - wxString StandardPath(); private: diff --git a/src/ShipDrivergui.cpp b/src/ShipDrivergui.cpp index c6b0f9cf..5a1d8efa 100644 --- a/src/ShipDrivergui.cpp +++ b/src/ShipDrivergui.cpp @@ -78,7 +78,7 @@ ShipDriverBase::ShipDriverBase( wxWindow* parent, wxWindowID id, const wxString& m_textCtrlRudderStbd = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CENTRE|wxTE_READONLY ); m_textCtrlRudderStbd->SetFont( wxFont( 10, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxT("Arial") ) ); - bSizer131->Add( m_textCtrlRudderStbd, 0, wxALIGN_CENTER_VERTICAL, 0 ); + bSizer131->Add( m_textCtrlRudderStbd, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_VERTICAL, 0 ); bSizer131->Add( 0, 0, 1, wxEXPAND, 5 ); @@ -217,13 +217,10 @@ ShipDriverBase::ShipDriverBase( wxWindow* parent, wxWindowID id, const wxString& fgSizer82->Add( m_button7, 1, wxALL|wxEXPAND, 2 ); - m_buttonWind = new wxButton( this, wxID_ANY, _("Sail"), wxDefaultPosition, wxDefaultSize, 0 ); - m_buttonWind->SetFont( wxFont( 12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxT("Arial") ) ); - m_buttonWind->SetBackgroundColour( wxColour( 0, 255, 0 ) ); - m_buttonWind->SetToolTip( _("Using Sails") ); - m_buttonWind->SetMinSize( wxSize( 50,-1 ) ); + m_button8 = new wxButton( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_button8->SetMinSize( wxSize( 50,-1 ) ); - fgSizer82->Add( m_buttonWind, 1, wxALL|wxEXPAND, 2 ); + fgSizer82->Add( m_button8, 1, wxALL|wxEXPAND, 2 ); m_buttonMinus1 = new wxButton( this, wxID_ANY, _("-1"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonMinus1->SetFont( wxFont( 12, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxT("Arial") ) ); @@ -255,7 +252,6 @@ ShipDriverBase::ShipDriverBase( wxWindow* parent, wxWindowID id, const wxString& this->SetSizer( bSizer10 ); this->Layout(); - bSizer10->Fit( this ); m_timer1.SetOwner( this, wxID_ANY ); this->Centre( wxBOTH ); @@ -267,7 +263,6 @@ ShipDriverBase::ShipDriverBase( wxWindow* parent, wxWindowID id, const wxString& m_bpStop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ShipDriverBase::OnStop ), NULL, this ); m_buttonStandby->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ShipDriverBase::OnStandby ), NULL, this ); m_buttonAuto->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ShipDriverBase::OnAuto ), NULL, this ); - m_buttonWind->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ShipDriverBase::OnWind ), NULL, this ); m_buttonMinus1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ShipDriverBase::OnMinus1 ), NULL, this ); m_buttonMinus10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ShipDriverBase::OnMinus10 ), NULL, this ); m_buttonPlus10->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ShipDriverBase::OnPlus10 ), NULL, this ); @@ -284,7 +279,6 @@ ShipDriverBase::~ShipDriverBase() m_bpStop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ShipDriverBase::OnStop ), NULL, this ); m_buttonStandby->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ShipDriverBase::OnStandby ), NULL, this ); m_buttonAuto->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ShipDriverBase::OnAuto ), NULL, this ); - m_buttonWind->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ShipDriverBase::OnWind ), NULL, this ); m_buttonMinus1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ShipDriverBase::OnMinus1 ), NULL, this ); m_buttonMinus10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ShipDriverBase::OnMinus10 ), NULL, this ); m_buttonPlus10->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ShipDriverBase::OnPlus10 ), NULL, this ); @@ -335,7 +329,6 @@ shipdriverPreferences::shipdriverPreferences( wxWindow* parent, wxWindowID id, c this->SetSizer( sbSizer1 ); this->Layout(); - sbSizer1->Fit( this ); this->Centre( wxBOTH ); } diff --git a/src/ShipDrivergui.h b/src/ShipDrivergui.h index 9f3d0ab8..b3532447 100644 --- a/src/ShipDrivergui.h +++ b/src/ShipDrivergui.h @@ -51,7 +51,7 @@ class ShipDriverBase : public wxDialog wxButton* m_buttonStandby; wxButton* m_buttonAuto; wxButton* m_button7; - wxButton* m_buttonWind; + wxButton* m_button8; wxButton* m_buttonMinus1; wxButton* m_buttonMinus10; wxButton* m_buttonPlus10; @@ -64,7 +64,6 @@ class ShipDriverBase : public wxDialog virtual void OnStop( wxCommandEvent& event ) { event.Skip(); } virtual void OnStandby( wxCommandEvent& event ) { event.Skip(); } virtual void OnAuto( wxCommandEvent& event ) { event.Skip(); } - virtual void OnWind( wxCommandEvent& event ) { event.Skip(); } virtual void OnMinus1( wxCommandEvent& event ) { event.Skip(); } virtual void OnMinus10( wxCommandEvent& event ) { event.Skip(); } virtual void OnPlus10( wxCommandEvent& event ) { event.Skip(); } @@ -81,7 +80,7 @@ class ShipDriverBase : public wxDialog wxSlider* m_SliderSpeed; wxTimer m_timer1; - ShipDriverBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ShipDriverBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 300,300 ), long style = wxDEFAULT_DIALOG_STYLE ); ~ShipDriverBase(); }; @@ -103,7 +102,7 @@ class shipdriverPreferences : public wxDialog wxCheckBox* m_cbAisToFile; wxTextCtrl* m_textCtrlMMSI; - shipdriverPreferences( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Preferences"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxRESIZE_BORDER ); + shipdriverPreferences( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Preferences"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 222,214 ), long style = wxCAPTION ); ~shipdriverPreferences(); }; diff --git a/src/ShipDrivergui_impl.cpp b/src/ShipDrivergui_impl.cpp index 3c50ca0b..cabeef9c 100644 --- a/src/ShipDrivergui_impl.cpp +++ b/src/ShipDrivergui_impl.cpp @@ -31,17 +31,19 @@ #include #include "ShipDriver_pi.h" +#include "folder.xpm" #include #include #include "wx/textfile.h" -class GribRecordSet; void assign(char *dest, char *arrTest2) { strcpy(dest, arrTest2); } + + #define BUFSIZE 0x10000 Dlg::Dlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : ShipDriverBase(parent, id, title, pos, size, style) @@ -55,13 +57,8 @@ Dlg::Dlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& m_bUseStop = true; m_bUsePause = false; m_sNmeaTime = wxEmptyString; - - m_bUsingWind = false; - m_bInvalidPolarsFile = false; - m_bInvalidGribFile = false; - m_bShipDriverHasStarted = false; - - wxFileConfig *pConf = GetOCPNConfigObject(); + + wxFileConfig *pConf = GetOCPNConfigObject(); if (pConf) { pConf->SetPath(_T("/Settings/ShipDriver_pi")); @@ -70,6 +67,7 @@ Dlg::Dlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pConf->Read(_T("shipdriverUseFile"), &m_bUseFile, 0); pConf->Read(_T("shipdriverMMSI"), &m_tMMSI, "12345"); } + } @@ -88,39 +86,26 @@ void Dlg::OnStart(wxCommandEvent& event) { return; } - m_bShipDriverHasStarted = true; - m_bUsingWind = false; - if (!m_tMMSI.ToLong(&m_iMMSI)) { wxMessageBox(_("MMSI must be a number, please change in Preferences")); return; } if (m_bUseFile){ - - wxString caption = wxT("Choose a file"); - wxString wildcard = wxT("Text files (*.txt)|*.txt|All files (*.*)|*.*"); - - wxString s = _T("/"); - wxString defaultDir = *GetpSharedDataLocation() + _T("plugins") - + s + _T("ShipDriver_pi") + s + _T("data") + s; - - wxString defaultFilename = wxEmptyString; - wxFileDialog filedlg(this->m_parent, caption, defaultDir, defaultFilename, wildcard, wxFD_SAVE | wxFD_OVERWRITE_PROMPT); - - - if (filedlg.ShowModal() != wxID_OK) + wxFileDialog filedlg(this->m_parent, "Save AIS .txt file...", + "", "", + "Save Files (*.txt) | *.txt | All files (*.*)|*.*", wxFD_OPEN | wxFD_OVERWRITE_PROMPT); + if (filedlg.ShowModal() == wxID_OK) { - wxMessageBox(_("ShipDriver has been stopped")); - return; - } - else{ nmeafile = new wxTextFile(filedlg.GetPath()); + nmeafile->Open(); nmeafile->Clear(); } + else { + m_bUseFile = false; + } } - m_textCtrlRudderStbd->SetValue(_T("")); m_textCtrlRudderPort->SetValue(_T("")); initSpd = 0; // 5 knots @@ -152,16 +137,11 @@ void Dlg::OnStop(wxCommandEvent& event) { m_bUseSetTime = false; m_bUseStop = true; m_bAuto = false; - m_bUsingWind = false; - - m_buttonWind->SetBackgroundColour(wxColour(0, 255, 0)); if (m_bUseFile){ nmeafile->Write(); nmeafile->Close(); } - initSpd = 0.0; - m_stSpeed->SetLabel(wxString::Format(_T("%3.1f"), initSpd)); } void Dlg::OnMidships(wxCommandEvent& event){ @@ -267,21 +247,7 @@ void Dlg::Notify() wxString mystring = wxString::Format(wxT("%03.0f"), myDir); m_stHeading->SetLabel(mystring); - if (m_bUsingWind){ - double polarBoatSpeed = GetPolarSpeed(initLat, initLon, myDir); - if (polarBoatSpeed != -1){ - initSpd = polarBoatSpeed; - } - } - - m_stSpeed->SetLabel(wxString::Format(_T("%3.1f"), initSpd)); - - if (m_bUsingWind){ - double polarBoatSpeed = GetPolarSpeed(initLat, initLon, myDir); - if (polarBoatSpeed != -1){ - initSpd = polarBoatSpeed; - } - } + m_stSpeed->SetLabel(wxString::Format(_T("%3.0f"), initSpd)); SetNextStep(initLat, initLon, myDir, initSpd/7200, stepLat, stepLon); @@ -295,25 +261,11 @@ void Dlg::Notify() wxTimeSpan mySeconds = wxTimeSpan::Seconds(ss); wxDateTime mdt = dt.Add(mySeconds); - double wspd, wdir; - bool m_bGrib = GetGribSpdDir(dt, initLat, initLon, wspd, wdir); - if (m_bGrib && m_bUsingWind){ - MWVA = createMWVASentence(initSpd, myDir, wdir, wspd); - MWVT = createMWVTSentence(initSpd, myDir, wdir, wspd); - PushNMEABuffer(MWVA + _T("\n")); - PushNMEABuffer(MWVT + _T("\n")); - } - GLL = createGLLSentence(mdt, initLat, initLon, initSpd, myDir); VTG = createVTGSentence(initSpd, myDir); - HDG = createHDGSentence(myDir); - VHW = createVHWSentence(initSpd, myDir); - PushNMEABuffer(GLL + _T("\n")); PushNMEABuffer(VTG + _T("\n")); - PushNMEABuffer(VHW + _T("\n")); - if (m_bUseAis) PushNMEABuffer(myNMEAais + _T("\n")); initLat = stepLat; @@ -330,219 +282,6 @@ void Dlg::SetInterval(int interval) m_Timer->Start(m_interval, wxTIMER_CONTINUOUS); // restart timer with new interval } -wxString Dlg::createVHWSentence(double stw, double hdg){ - /* - VHW Water Speed and Heading - 1 2 3 4 5 6 7 8 9 - | | | | | | | | | - $--VHW, x.x, T, x.x, M, x.x, N, x.x, K*hh - 1) Degress True - 2) T = True - 3) Degrees Magnetic - 4) M = Magnetic - 5) Knots(speed of vessel relative to the water) - 6) N = Knots - 7) Kilometers (speed of vessel relative to the water) - 8) K = Kilometres - 9) Checksum - */ - wxString nVHW; - wxString nDir; - wxString nTrueMag; - wxString nSpd; - wxString nValid; - wxString nForCheckSum; - wxString nFinal; - wxString nUnits; - wxString nC = _T(","); - wxString nA = _T("A"); - nUnits = _T("N"); - nVHW = _T("IIVHW"); - nTrueMag = _T("T"); - wxString ndlr = _T("$"); - wxString nast = _T("*"); - - nSpd = wxString::Format(_T("%f"), stw); - nDir = wxString::Format(_T("%f"), hdg); - - nForCheckSum = nVHW + nC + nDir + nC + nTrueMag + nC + nC + nC + nSpd + nC + nUnits; - nFinal = ndlr + nForCheckSum + nast + makeCheckSum(nForCheckSum); - return nFinal; - -} - -wxString Dlg::createMWVTSentence(double spd, double hdg, double winddirection, double windspeed){ - /* - 1 2 3 4 5 - | | | | | - $--MWV, x.x, a, x.x, a*hh - - Field Number : - 1. Wind Angle, 0 to 360 degrees - 2.Reference, R = Relative, T = True (theoretical) - 3.Wind Speed - 4.Wind Speed Units, K / M / N - 5.Status, A = Data Valid - Checksum - */ - - /* - + * $WIMWD,<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>*hh - + * - + * NMEA 0183 standard Wind Direction and Speed, with respect to north. - + * - + * <1> Wind direction, 0.0 to 359.9 degrees True, to the nearest 0.1 degree - + * <2> T = True - + * <3> Wind direction, 0.0 to 359.9 degrees Magnetic, to the nearest 0.1 - degree - + * <4> M = Magnetic - + * <5> Wind speed, knots, to the nearest 0.1 knot. - + * <6> N = Knots - + * <7> Wind speed, meters/second, to the nearest 0.1 m/s. - + * <8> M = Meters/second - + - */ - - double twa = 360 - ((hdg - winddirection) - 360); - if (twa > 360){ - twa -= 360; - if (twa > 360){ - twa -= 360; - } - } - - double tws = windspeed; - - wxString nMWV; - wxString nMWD; - wxString nDir; - wxString nRelTrue; - wxString nSpd; - wxString nValid; - wxString nForCheckSum; - wxString nFinal; - wxString nUnits; - wxString nC = _T(","); - wxString nA = _T("A"); - nUnits = _T("N"); - nMWV = _T("WIMWV"); - nMWD = _T("WIMWD"); - nRelTrue = _T("T"); - nValid = _T("A,A"); - wxString ndlr = _T("$"); - wxString nast = _T("*"); - - nSpd = wxString::Format(_T("%f"), tws); - nDir = wxString::Format(_T("%f"), twa); - - nForCheckSum = nMWV + nC + nDir + nC + nRelTrue + nC + nSpd + nC + nUnits + nC + nA; - //$--MWD, x.x, T, x.x, M, x.x, N, x.x, M*hh - //MWD,270.7,T,,,20.5,N,, - //nForCheckSum = nMWD + nC + nDir + nC + nRelTrue + nC + nC + nC + nSpd + nC + nUnits + nC + nC ; - nFinal = ndlr + nForCheckSum + nast + makeCheckSum(nForCheckSum); - return nFinal; - -} - -wxString Dlg::createMWVASentence(double spd, double hdg, double winddirection, double windspeed){ - /* - 1 2 3 4 5 - | | | | | - $--MWV, x.x, a, x.x, a*hh - - Field Number : - 1. Wind Angle, 0 to 360 degrees - 2.Reference, R = Relative, T = True (theoretical) - 3.Wind Speed - 4.Wind Speed Units, K / M / N - 5.Status, A = Data Valid - Checksum - */ - - /* - + * $WIMWD,<1>,<2>,<3>,<4>,<5>,<6>,<7>,<8>*hh - + * - + * NMEA 0183 standard Wind Direction and Speed, with respect to north. - + * - + * <1> Wind direction, 0.0 to 359.9 degrees True, to the nearest 0.1 degree - + * <2> T = True - + * <3> Wind direction, 0.0 to 359.9 degrees Magnetic, to the nearest 0.1 - degree - + * <4> M = Magnetic - + * <5> Wind speed, knots, to the nearest 0.1 knot. - + * <6> N = Knots - + * <7> Wind speed, meters/second, to the nearest 0.1 m/s. - + * <8> M = Meters/second - + - */ - - double twa = 360 - ((hdg - winddirection) - 360); - if (twa > 360){ - twa -= 360; - if (twa > 360){ - twa -= 360; - } - } - wxString leftright = wxEmptyString; - - if (twa <= 180){ - leftright = _T("R"); - } - if (twa > 180){ - leftright = _T("L"); - twa = 360 - twa; - } - - double aws, twd, tws, awd, awa; - twa = 180 - twa; // we need the complement of the twa for the internal angle of the triangle - twa = twa * M_PI / 180; // convert to radians - tws = windspeed; - double alpha, bravo, charlie, delta; - alpha = pow(spd, 2) + pow(windspeed, 2) - 2 * spd*windspeed*cos(twa); - aws = sqrt(alpha); - - //spd / charlie = aws / twa; - - charlie = spd * sin(twa) / aws; - charlie = asin(charlie); - twa = M_PI - twa; // complement in radians - awa = twa - charlie; - awa = awa * 180 / M_PI; // back to degrees - - if (leftright == _T("L")) { - awa = 360 - awa; - } - - wxString nMWV; - wxString nMWD; - wxString nDir; - wxString nRelTrue; - wxString nSpd; - wxString nValid; - wxString nForCheckSum; - wxString nFinal; - wxString nUnits; - wxString nC = _T(","); - wxString nA = _T("A"); - nUnits = _T("N"); - nMWV = _T("WIMWV"); - nMWD = _T("WIMWD"); - nRelTrue = _T("R"); - nValid = _T("A,A"); - wxString ndlr = _T("$"); - wxString nast = _T("*"); - - nSpd = wxString::Format(_T("%f"), aws); - nDir = wxString::Format(_T("%f"), awa); - - nForCheckSum = nMWV + nC + nDir + nC + nRelTrue + nC + nSpd + nC + nUnits + nC + nA; - //$--MWD, x.x, T, x.x, M, x.x, N, x.x, M*hh - //MWD,270.7,T,,,20.5,N,, - //nForCheckSum = nMWD + nC + nDir + nC + nRelTrue + nC + nC + nC + nSpd + nC + nUnits + nC + nC ; - nFinal = ndlr + nForCheckSum + nast + makeCheckSum(nForCheckSum); - return nFinal; - -} wxString Dlg::createRMCSentence(wxDateTime myDateTime, double myLat, double myLon, double mySpd, double myDir){ //$GPRMC, 110858.989, A, 4549.9135, N, 00612.2671, E, 003.7, 207.5, 050513, , , A * 60 //$GPRMC,110858.989,A,4549.9135,N,00612.2671,E,003.7,207.5,050513,,,A*60 @@ -646,40 +385,6 @@ wxString Dlg::createVTGSentence(double mySpd, double myDir){ return nFinal; } -wxString Dlg::createHDGSentence(double myDir){ - /* - 1 2 3 - | | | - $--HDT, x.x, T*hh - */ - wxString nSpd; - wxString nDir; - wxString nTime; - wxString nDate; - wxString nValid; - wxString nForCheckSum; - wxString nFinal; - wxString nC = _T(","); - wxString nA = _T("A"); - wxString nT = _T("T,"); - wxString nM = _T("M,"); - wxString nN = _T("N,"); - wxString nK = _T("K,"); - - wxString nHDG = _T("IIHDG,"); - nValid = _T("A,A"); - wxString ndlr = _T("$"); - wxString nast = _T("*"); - - nDir = wxString::Format(_T("%f"), myDir); - - nForCheckSum = nHDG + nDir + nC + nT; - - nFinal = ndlr + nForCheckSum + nast + makeCheckSum(nForCheckSum); - //wxMessageBox(nFinal); - return nFinal; -} - wxString Dlg::makeCheckSum(wxString mySentence){ int i; @@ -887,237 +592,7 @@ wxString Dlg::DateTimeToDateString(wxDateTime myDT) { void Dlg::OnContextMenu(double m_lat, double m_lon){ - m_buttonWind->SetBackgroundColour(wxColour(0, 255, 0)); - m_bUsingWind = false; - initLat = m_lat; initLon = m_lon; } -void Dlg::RequestGrib(wxDateTime time){ - - wxJSONValue v; - time = time.FromUTC(); - - v[_T("Day")] = time.GetDay(); - v[_T("Month")] = time.GetMonth(); - v[_T("Year")] = time.GetYear(); - v[_T("Hour")] = time.GetHour(); - v[_T("Minute")] = time.GetMinute(); - v[_T("Second")] = time.GetSecond(); - - wxJSONWriter w; - wxString out; - w.Write(v, out); - - SendPluginMessage(wxString(_T("GRIB_TIMELINE_RECORD_REQUEST")), out); - - Lock(); - m_bNeedsGrib = false; - Unlock(); -} - -bool Dlg::GetGribSpdDir(wxDateTime dt, double lat, double lon, double &spd, double &dir){ - - wxDateTime dtime = dt; - - plugin->m_grib_lat = lat; - plugin->m_grib_lon = lon; - RequestGrib(dtime); - if (plugin->m_bGribValid){ - spd = plugin->m_tr_spd; - dir = plugin->m_tr_dir; - return true; - } - else { - return false; - } - -} - -void Dlg::OnWind(wxCommandEvent& event){ - - if (initLat == 0.0){ - wxMessageBox(_("Please right-click and choose vessel start position")); - return; - } - if (!m_bShipDriverHasStarted){ - wxMessageBox(_("Please start ShipDriver")); - return; - } - - m_SliderSpeed->SetValue(0); - - if (!m_bUsingWind){ - m_buttonWind->SetBackgroundColour(wxColour(255, 0, 0)); - m_bUsingWind = true; - double myPolarSpeed = GetPolarSpeed(initLat, initLon, initDir); - if (myPolarSpeed == -1){ - if (m_bInvalidPolarsFile){ - wxMessageBox(_T("Invalid Boat Polars file")); - } - - if (m_bInvalidGribFile){ - wxMessageBox(_T("Grib data is not available for the present date/time or location")); - } - m_buttonWind->SetBackgroundColour(wxColour(0, 255, 0)); - m_bUsingWind = false; - } - } - else { - m_buttonWind->SetBackgroundColour(wxColour(0, 255, 0)); - m_bUsingWind = false; - } -} - -double Dlg::GetPolarSpeed(double lat, double lon, double cse){ - double lati = lat; - double loni = lon; - double spd; - double dir; - - wxDateTime dt; - dt = wxDateTime::UNow(); - - bool m_bGrib = GetGribSpdDir(dt, lati, loni, spd, dir); - if (!m_bGrib){ - m_bInvalidGribFile = true; - return -1; - } - - wxString error; - wxString s = _T("/"); - wxString polars_path = *GetpSharedDataLocation() + _T("plugins") - + s + _T("ShipDriver_pi") + s + _T("data") + s; - wxString myFile = polars_path + _T("arcona.xml"); - - double twa = 360 - ((cse - dir) - 360); - if (twa > 360){ - twa -= 360; - if (twa > 360){ - twa -= 360; - } - } - - if (twa > 180){ - twa = 360 - twa; - } - /* - double relWind = cse - dir; - - relWind = abs(relWind); - if (relWind > 180){ - relWind = 360 - relWind; - } - */ - //wxMessageBox(wxString::Format(_T("%f"), relWind)); - - double polarSpeed = ReadPolars(myFile, twa, spd); - return polarSpeed; -} - -double Dlg::ReadPolars(wxString filename, double windangle, double windspeed){ - - bool foundWindAngle = false; - bool foundWindSpeed = false; - bool foundPreviousWindAngle = false; - - double myWindAngle = -1; - double myWindSpeed = -1; - double prevAngle = -1; - double prevSpeed = -1; - double dSpeed = -1; - double prevPolarSpeed = -1; - wxString myPolarSpeed; - - wxString theWindAngle; - - TiXmlDocument doc; - wxString error; - - wxFileName fn(filename); - - if (!doc.LoadFile(filename.mb_str())){ - m_bInvalidPolarsFile = true; - return -1; - } - else { - TiXmlHandle root(doc.RootElement()); - - if (strcmp(root.Element()->Value(), "ShipDriver")){ - m_bInvalidPolarsFile = true; - return -1; - } - - int count = 0; - for (TiXmlElement* e = root.FirstChild().Element(); e; e = e->NextSiblingElement()) - count++; - - int i = 0; - for (TiXmlElement* e = root.FirstChild().Element(); e; e = e->NextSiblingElement(), i++) { - - if (!strcmp(e->Value(), "TWA") && windangle > myWindAngle && !foundWindAngle && !foundWindSpeed) { - myWindAngle = AttributeDouble(e, "WindAngle", NAN); - if (prevAngle < windangle && windangle < myWindAngle){ - theWindAngle = wxString::Format(_T("%5.2f"), prevAngle); - foundWindAngle = true; - break; - } - prevAngle = myWindAngle; - } - } - - if (foundWindAngle){ - - // we have found the polar for the next highest wind speed - // need to move back to the previous polar ... given by windAngle - - TiXmlElement* e; - for (e = root.FirstChild().Element(); e; e = e->NextSiblingElement(), i++) { - - if (!strcmp(e->Value(), "TWA")) { - myWindAngle = AttributeDouble(e, "WindAngle", NAN); - wxString angleOut = wxString::Format(_T("%5.2f"), myWindAngle); - if (angleOut == theWindAngle){ // we have found the correct section of the polars file for the relative wind - for (TiXmlElement* g = e->FirstChildElement(); g; g = g->NextSiblingElement()) { - - if (!strcmp(g->Value(), "SPD") && windspeed > myWindSpeed) { - myWindSpeed = AttributeDouble(g, "WindSpeed", NAN); - wxString myPolarSpeed = g->GetText(); - double dSpeed; - myPolarSpeed.ToDouble(&dSpeed); - - if (prevSpeed < windspeed && windspeed < myWindSpeed){ - //wxString boatSpeed = wxString::Format(_T("%5.2f"), prevPolarSpeed); - return prevPolarSpeed; - } - - prevSpeed = myWindSpeed;// attribute for wind speed - prevPolarSpeed = dSpeed; // value for boat speed - - } - } - } - } - } - - } - - } - - m_bInvalidPolarsFile = true; - return -1; - -} - -double Dlg::AttributeDouble(TiXmlElement *e, const char *name, double def) -{ - const char *attr = e->Attribute(name); - if (!attr) - return def; - char *end; - double d = strtod(attr, &end); - if (end == attr) - return def; - return d; -} \ No newline at end of file diff --git a/src/ShipDrivergui_impl.h b/src/ShipDrivergui_impl.h index a24e1b2b..c5bd0118 100644 --- a/src/ShipDrivergui_impl.h +++ b/src/ShipDrivergui_impl.h @@ -41,13 +41,6 @@ #include #include #include "wx/process.h" -#include "wx/jsonreader.h" -#include "wx/jsonwriter.h" -#include -#include "tinyxml.h" -#include "tinystr.h" -#include -#include "ocpn_plugin.h" #ifdef __WXOSX__ #define SHIPDRIVER_DLG_STYLE wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSTAY_ON_TOP @@ -87,13 +80,9 @@ class Dlg : public ShipDriverBase Dlg( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("ShipDriver"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = SHIPDRIVER_DLG_STYLE ); ShipDriver_pi *plugin; - wxString createVHWSentence(double stw, double hdg); - wxString createMWVTSentence(double spd, double hdg, double winddirection, double windspeed); - wxString createMWVASentence(double spd, double hdg, double winddirection, double windspeed); wxString createRMCSentence(wxDateTime myTime, double myLat, double myLon, double mySpd, double myDir); wxString createGLLSentence(wxDateTime myTime, double myLat, double myLon, double mySpd, double myDir); wxString createVTGSentence(double mySpd, double myDir); - wxString createHDGSentence(double myDir); wxString LatitudeToString(double mLat); wxString LongitudeToString(double mLon); @@ -120,14 +109,9 @@ class Dlg : public ShipDriverBase bool m_bUseFile; wxString m_tMMSI; - wxDateTime m_GribTimelineTime; - -protected: - bool m_bNeedsGrib; - private: void Notify(); - wxString VHW, MWVA, MWVT, GLL, VTG, HDG; + wxString GLL, VTG; double initDir, initSpd, initRudder, myDir; wxDateTime dt; @@ -168,24 +152,6 @@ class Dlg : public ShipDriverBase bool m_bAuto; long m_iMMSI; - virtual void Lock() { routemutex.Lock(); } - virtual void Unlock() { routemutex.Unlock(); } - wxMutex routemutex; - - - void RequestGrib(wxDateTime time); - bool GetGribSpdDir(wxDateTime dt, double lat, double lon, double &spd, double &dir); - void OnWind(wxCommandEvent& event); - double GetPolarSpeed(double lat, double lon, double cse); - - double AttributeDouble(TiXmlElement *e, const char *name, double def); - double ReadPolars(wxString filename, double windangle, double windspeed); - - bool m_bUsingWind; - bool m_bInvalidPolarsFile; - bool m_bInvalidGribFile; - bool m_bShipDriverHasStarted; - }; #endif diff --git a/src/folder.xpm b/src/folder.xpm new file mode 100644 index 00000000..eb2ab30a --- /dev/null +++ b/src/folder.xpm @@ -0,0 +1,1119 @@ +/* XPM */ +static const char *next[] = { +/* width height num_colors chars_per_pixel */ +" 32 32 32 1", +/* colors */ +"` c #343264", +". c #9c9d9c", +"# c #d0d0d1", +"a c #66678c", +"b c #b7b7bc", +"c c #ececec", +"d c #84859f", +"e c #acacb1", +"f c #4e4f78", +"g c #e1e0e1", +"h c #c4c4c6", +"i c #a4a2a4", +"j c #767795", +"k c #9190a9", +"l c #404070", +"m c #f8f8f8", +"n c #d9d8d9", +"o c #5c5b84", +"p c #747292", +"q c #949694", +"r c #bcbec1", +"s c #b4b2b7", +"t c #3c3a6c", +"u c #f4f2f4", +"v c #54567c", +"w c #e4e6e4", +"x c #cccacc", +"y c #7c7e9c", +"z c #444674", +"A c #fcfefc", +"B c #9c9ab0", +"C c #a4a5b7", +/* pixels */ +"Amb..ii.ii.ii.ii.ii.ii.ii.ii.icA", +"mirummmmmmAmmmmmAmmmmmAmmmmmmn.w", +"hbmjkcmmmmmmmmmmmmmmmmmmmmmmmm#i", +"enup`zCuuuuuuuuuuuuuuuuuuuuuuuu.", +"igcp```vrucucucucucucucucucucuc.", +".gcp`````a#wccccccccccccccccccc.", +"inwj``````tynwcwwwwwwwwwwwwwwwc.", +".nwj````````lkgwwwwwwwwwwwwwcww.", +"ingp``````````fCwwgwgwgwgwgwgggi", +".#gj````````````vbggggggggggggg.", +".#nj````````````t`arnnnnnnnnnnn.", +"ixnj````t``t```````tjxnnnnnnnnn.", +".x#j``````````t``````td#n#nn#nn.", +".h#j````````t``````````zk######.", +".h#j````t````````````````f.###x.", +".hxj```````t```````````````vexx.", +".rxj`````t`````````````````vCxxq", +".hhj`````````t``t``t``t``zkhxhx.", +".rxj````t``````````````lyhxxxxx.", +".hxj```````t`````````tpr#x#xxx#q", +".hxj`````t````t``t``ob#x#x#xx##.", +".h#j```t``````````fC###########.", +".x#y```````t````zk############n.", +".xnj`````t````ld#nnnnnnnnnnnn#n.", +".#ny```t`````ahnnnnnnnnnnnnnnnn.", +".#gy```````vbggggngngngngngnggn.", +".#gy`````zBgwggggwwwwwggwgwggwg.", +"inwy```ldgwwwwwwwwwwwwwwwwwwwww.", +"excd``a#cccccccccwcwcwcwcwccwcwq", +"xicdvxuuucuucuccucucucuuuuuuuurs", +"msirgwgwwwwwwwwwwwwwwwwwwwggnb.c", +"AAxei..................B....ebcA" +}; +static const char *prev[] = { +/* width height num_colors chars_per_pixel */ +" 32 32 32 1", +/* colors */ +"` c #343264", +". c #9c9c9d", +"# c #cfd0d0", +"a c #676789", +"b c #b4b6b8", +"c c #84859f", +"d c #4f507c", +"e c #acacae", +"f c #ecebec", +"g c #c4c4c5", +"h c #949294", +"i c #e0e0e0", +"j c #444370", +"k c #a4a2a6", +"l c #7c7b96", +"m c #d9d8d9", +"n c #5c5c84", +"o c #f8f8f8", +"p c #747294", +"q c #3c3c6c", +"r c #bcbec1", +"s c #b4b2be", +"t c #94969c", +"u c #cccacc", +"v c #bcbacc", +"w c #8f90a9", +"x c #8c8aa4", +"y c #f4f2f4", +"z c #e4e6e4", +"A c #4c4a74", +"B c #646288", +"C c #fcfefc", +/* pixels */ +"CCg.hhhhhhhhhhhhhhhhhhhhhhhhtsyC", +"CebfoCooCooCooCooCooCooCooCo#u.f", +"#eoooooooooooooooooooooooovdwoue", +"emyyyyyyyyyyyyyyyyyyyyyy#n``wyyt", +"kifyfyfyfyfyfyfyfyfyfyic````wyy.", +".iffffffffffffffffffz.q`````wzf.", +"kmzfzffzffzffzffzffbA```````xff.", +".mzzzzzzzzzzzzzzzuB`````````wzzk", +"kmiziziziziziziml```````````xzi.", +".#iiiiiiiiiiimtq````````````ciik", +"k#mimmimmimmkA``````````````xmm.", +".#mmmmmmmmbn````````q``q``q`cmm.", +".um#mm#mra``````````````````cmm.", +".g####glq```````````````````c##.", +".g#uuwj```````````q``q``q```c##.", +".gu.A```````````q```````````luu.", +".gusa`````````q````````````qluut", +".ruuued`````q```````````q```luu.", +".guuuuu.d`````````q``q``````l#ut", +".ruuuu#ugwj`````q```````````luu.", +".gu#u#u###rcq```````````q```l##t", +".g######u###rp```````q``````l##.", +".u#########m##rnq``q``````q`p##.", +".ummmm#mmmm#m#m#ed``````````l#m.", +".ummmmmmmmmmmmmmmm.j````q```lmm.", +".#immmimimimimiimimmcq``````pii.", +".miiiiiiiiiiiiiiiiziz#l````qpzi.", +"kmizzzzzzzzzzzzzzzzzzzzrB```pzz.", +"k#zfzfzfzfffzfzfzfzfzzfffbd`lfzt", +"geyyyyyyyfyfyyyfyyfyfyfyfyf.cyge", +"oeeifffyfyfyyfyyfyyyyyyyfyfozr.z", +"Cork.......tt.tt.ttttttt.t.t.bzC" +}; +static const char *now[] = { +/* width height num_colors chars_per_pixel */ +" 32 32 32 1", +/* colors */ +"` c #0a0504", +". c #049afc", +"# c #a7868c", +"a c #cbcac9", +"b c #fb8963", +"c c #864027", +"d c #d4aca0", +"e c #e9e9e9", +"f c #d46640", +"g c #dadad9", +"h c #d8b9b0", +"i c #eb7044", +"j c #dc9a80", +"k c #572a1a", +"l c #e3c9be", +"m c #fb7a4d", +"n c #a7a7a7", +"o c #5090c4", +"p c #a95033", +"q c #341a11", +"r c #c48274", +"s c #743824", +"t c #bdbbba", +"u c #2f93df", +"v c #708cb0", +"w c #f4f4f4", +"x c #eda992", +"y c #9c9a9c", +"z c #e7b9ab", +"A c #f39779", +"B c #b95736", +"C c #9c4a2c", +/* pixels */ +"wwenyyyyyyyyyyyyyyyyyyyyyyyyntww", +"wangeweeeweeeweeeweeeweeeweeeaye", +"eywwwwwwwwwwwwwwwwwwwwwwwwwwwwgn", +"tawwwwwwwwwwwwwwwwwwwwwwwwwwwwwy", +"ngewwwwwwwwwwwwwwwwwwwwwwwwwwewn", +"ngeeeeeeeeeeeeeeeeeeeeeeeeeeewen", +"ngeeeeeeeeeeeeeeeeeeeeeeeeeeeeen", +"naeeeeeeeeeeeeeeeeeeeeeeeeeeeeen", +"naegegegegegegegegegegegegegegen", +"nagggeggelzxAAbbbAAAzzgegeggeggn", +"nagegglAbmmmmmmmmmmmmmmbxlgggggn", +"naggzbmmmmmmmmmmmmmmmmmmmmAggggn", +"ntgAmmmiimmimmmmmmmmmmmmmmmmzggn", +"ntAmmmms`mmsBmmmmmmmmmmmmmmmmxan", +"ndmmmmmskcmsBmBsciipmBBmpimmmman", +"njmmmmmsBqisBiqfpkmqmkkmqmmmmmhy", +"njmmmmmsppssBpcmmqmkfkkfkimmmmhn", +"ntmmmmmsBmqkBpsmmqipkcCkcmmmmbay", +"ntdmmmmsBmB`Bmqpkcmi`Bi`fmmmmaan", +"ntahmmmfimmBimipBmmiBmmBmmmbaaay", +"ntaabmimmmmmmmmmmmmmmmmmmbdaaaan", +"ntaammvvmmmmmmmmmmmmmmAxhagagagy", +"ntghmmu.oimmmmmmmmmmxaagagagaagy", +"ntgxmm...uimmmimbxlgggggaggagggn", +"ntgxm#..uvrmmAxggggaggagggggggan", +"nagbm##imbxzggeggggggggggggggggn", +"nagmmmbxlggegeggegegegegeggegegn", +"nalbxleeeeeeeeeeeegeeeeeeeeegeen", +"naeeeeeeeeeeeeeeeeeeeeeeeeeeeeen", +"anwewweweeweeeeeeweweeeeewewwegy", +"wnnewwwwwwwwwwwwwwwwwwwwwwwwwaya", +"wwayyyyyyyyyyyyyyyyyyyyyyyyyyngw" +}; +/* XPM */ +static char * openfile[] = { +"32 32 17 1", +" c None", +". c #000100", +"+ c #00349A", +"@ c #0E65CC", +"# c #0083DA", +"$ c #919390", +"% c #CB9A00", +"& c #C9CBC8", +"* c #CFD1CE", +"= c #D5D7D4", +"- c #DEE0DD", +"; c #E4E6E3", +"> c #E8EAE7", +", c #FFFF01", +"' c #EFF1EE", +") c #F4F7F3", +"! c #F7F9F6", +" $$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", +" $!!!!!!!!!!!!!!!!!!!!!!!!!!!$$ ", +"$)))))))))))))))))))))))))))))$$", +"$''''''''''''''''''''''''''''''$", +"$''''''''''''''''''''''''''''''$", +"$>>>>>>>>>>>>>>>>>>>>>..>>>>>>>$", +"$>>>>>>>>>>>>>>>>>>>..+.>>>>>>>$", +"$;;;;;;;;;;..;;;;;..,,,+;;;;;;;$", +"$--------..,,.--..,,,,,,.------$", +"$------..,,,,...,,,,,,,,+..----$", +"$====..,,,,,,,,,,,,,,,+..=.====$", +"$==..@,,,,,,,...,,,,...%%%#====$", +"$=.+,,,,,,=..%%%....%%%%%%%.===$", +"$**.,,,@..*%%%%%.*%%%%%%%%%.***$", +"$**.+,,.#%%%%%%%%%%%%%%%%%%%.**$", +"$&&&.,,.%%%%%%%%%%%%%%%%%%%%.&&$", +"$&&&&.,+&%%%%%%%%%%%%%%%%%%%.&&$", +"$&&&&.+,.%%%%%%%%%%%%%%%%%%%%.&$", +"$&&&&&.,.%%%%%%%%%%%%%%%%%%%%.&$", +"$&&&&&&.@.%%%%%%%%%%%%%%%%%%%&&$", +"$&&&&&&.&.%%%%%%%%%%%%%%%%%#..&$", +"$*******.**%%%%%%%%%%%%%%*..***$", +"$********..%%%%%%%%%%%%..******$", +"$========..%%%%%%%%%=..========$", +"$=========..%%%%%%..===========$", +"$----------.%%%-..-------------$", +"$----------....----------------$", +"$;;;;;;;;;;;.;;;;;;;;;;;;;;;;;;$", +"$>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>$", +"$$''''''''''''''''''''''''''''$'", +" $$))))))))))))))))))))))))))$$ ", +" $$$$$$$$$$$$$$$$$$$$$$$$$$$! "}; + +/* XPM */ +static char * setting[] = { +"32 32 5 1", +" c None", +". c #333366", +"+ c #939393", +"@ c #DEFFFF", +"# c #FFFFFF", +" ++++++++++++++++++++++++++++ ", +" ++###########################+ ", +"#+#############################+", +"+##############################+", +"+############......############+", +"+############......############+", +"+############......############+", +"+#############.....############+", +"+##########..........####.#####+", +"+#####..##.................####+", +"+#####.........@@@.........####+", +"+####........@@@@@@@........###+", +"+####.......@@@@@@@@@.......###+", +"+###.......@@@@@@@@@@@.....####+", +"+#####.....@@@@@@@@@@@....#####+", +"+######...@@@@@@@@@@@@@...#####+", +"+######...@@@@@@@@@@@@@...#####+", +"+######....@@@@@@@@@@@....#####+", +"+######....@@@@@@@@@@@.....####+", +"+#######...@@@@@@@@@@@.......##+", +"+#####......@@@@@@@@@.......###+", +"+####.........@@@@@.........###+", +"+#####.....................####+", +"+######...............###..####+", +"+#######..##.........##########+", +"+##############.....###########+", +"+##############.....###########+", +"+##############.....###########+", +"+##############################+", +"#+#############################+", +" ++##########################++ ", +" #+++++++++++++++++++++++++++ "}; + +static const char *request[] = { +/* width height num_colors chars_per_pixel */ +" 32 32 32 1", +/* colors */ +"` c #060505", +". c #878629", +"# c #c4c228", +"a c #484a2c", +"b c #cbcbcb", +"c c #24241d", +"d c #a8a92c", +"e c #e7e714", +"f c #646227", +"g c #e9eae9", +"h c #36351c", +"i c #a6a6a6", +"j c #878884", +"k c #191916", +"l c #dada19", +"m c #fcfe04", +"n c #777826", +"o c #54522f", +"p c #9c9b9c", +"q c #94932f", +"r c #d8d9d8", +"s c #f4f4f4", +"t c #b6b7b6", +"u c #b8ba2c", +"v c #747474", +"w c #666660", +"x c #5b5c5b", +"y c #4b4b4b", +"z c #9c9c28", +"A c #3a3932", +"B c #cccc22", +"C c #2c2b24", +/* pixels */ +"ssrippppppppppppppppppppppppibss", +"stiggggggggggggggggggggggggggtis", +"rissssssssssssssssssssssssssssbt", +"irssssssssssssssssssssssssssssgp", +"irssssssssssssssssssssssssssssgi", +"irsggggggsgggsgggsgggsgggsggggsp", +"irgggggggggggrjyc``kCxtggggggggp", +"prgggggggggrw``fd#Bu.C`Abggggggp", +"irrrgrrgrrbc`dmmmmmmmm#`kbrgrgri", +"prrgrgrrgrckemmmmmmmmmme`ygrrrgp", +"pbrrrrrgrx`emmmmmmmmmmmm.`tgrrrp", +"ibrrrrrri`zmmmlh``.maBmml`jrrrrp", +"pbrrrrrrx`mmme`Cdqkh`emmm`wrrrrp", +"pbrbrbrb`.mmmcCmmmlk`mmmm`xbrbrp", +"pbbbbbbi`BmmB`dmmmmykmmmm`wbbbbp", +"ptbbbbbv`mmmn`mmmmmCfmmmm`vbbbbp", +"pbbbbbbx`mmmhhmmmmm`zmmml`pbbbbp", +"ptbbbbby`mmm`ommmmB`Bmmmq`tbbbbp", +"pbbbbbbAkmmm`ammmmh`emmmkybbbbbp", +"ptbbbbbykmmmhkemBCc`ummn`tbbbbbp", +"pbbbbbbx`mmmB``c`nmf`Ck`jbbbbbbp", +"pbbrbrbj`lmmmeddemmmBqftrbrbrbbp", +"pbbrbbrt`nmmmmmmmmmmmmjbrbrbrbrp", +"pbrrrrrry`Bmmmmmmmmmmeirrrrrbrrp", +"pbrrrrbrbk`ummmmmmmmm#rrrrrrrrrp", +"pbrrrrrrrbA`kqBlelBzoprrrrrrrrrp", +"irrgrgrgrgriyk`````cxrrgrgrgrgri", +"prgggrggggggggrbbbrggggrgggrgggp", +"irgggggggggggggggggggggggggggggp", +"tisggsgsgggggsgsgssgsggsgsgsggbi", +"sitgsssssssssssssssssssssssssbpr", +"sstppppppppppppppppppppppppppirs" +}; +/* XPM */ +static char * play[] = { +"32 32 5 1", +" c None", +". c #280B0B", +"+ c #333366", +"@ c #939393", +"# c #FFFFFF", +" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@###########################@ ", +"@@#.###########################@", +"@##...#########################@", +"@##.....#######################@", +"@##.......#####################@", +"@##.........###################@", +"@##..........##################@", +"@##............################@", +"@##..............##############@", +"@##................############@", +"@##..................##########@", +"@##...................#########@", +"@##.....................#######@", +"@##.......................#####@", +"@##.........................###@", +"@##.........................###@", +"@##.......................#####@", +"@##......................######@", +"@##....................########@", +"@##..................##########@", +"@##................############@", +"@##..............+#############@", +"@##.............###############@", +"@##...........#################@", +"@##.........###################@", +"@##+......#####################@", +"@##+.....######################@", +"@##+...########################@", +"#@#+.##########################@", +" @@+##########################@ ", +" #@@@@@@@@@@@@@@@@@@@@@@@@@@@ "}; + +/* XPM */ +static char * stop[] = { +"32 32 5 1", +" c None", +". c #28170B", +"+ c #333366", +"@ c #939393", +"# c #FFFFFF", +" #@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@##........+###############@@ ", +"@@###........................#@@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@####........................##@", +"@@###........................##@", +" @############################@ ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ "}; + +static const char *zoomto[] = { +/* width height num_colors chars_per_pixel */ +" 32 32 32 1", +/* colors */ +"` c #0a090a", +". c #8a8b8a", +"# c #4b4c4b", +"a c #cdcccd", +"b c #acacac", +"c c #696a69", +"d c #9293ca", +"e c #29282d", +"f c #7b7c7b", +"g c #57585c", +"h c #9d9edd", +"i c #353739", +"j c #ecedec", +"k c #19191c", +"l c #9d9cf9", +"m c #9b9a9b", +"n c #696987", +"o c #bdbdbd", +"p c #dcdcdc", +"q c #a4a6f0", +"r c #f5f7f5", +"s c #8b8bb7", +"t c #747698", +"u c #61617d", +"v c #4c4d62", +"w c #404046", +"x c #111112", +"y c #303033", +"z c #616061", +"A c #212125", +"B c #717096", +"C c #7f80a7", +/* pixels */ +"rrammmmmmmmmmmmmmmmmmmmmmmmmbarr", +"rbojjjjjjjjjjjjjjjjjjjjjjjjjpbor", +"oorrrrrrrrrrrrrrrrrrrrrrrrrrrrba", +"mjjb.ajrrrrrrrrrrrrrrrrrrja.gapb", +"mjrbxyx#fojjjjjjjjjjjpbfw`in`jjm", +"mjjpxllhti`cpjjjjjjjo`vChllhwjpm", +"mjjjAqllllsxojjjjjjjjesllllCfjpm", +"mpjpgdllldx.jpjpjpjpjfkdlllibjpm", +"mpjp.nllsAsxmpjppjppfAhkdll`pppm", +"mpppoAlCeqllx.pppppfeqlqkhhipppm", +"mppppxnAullllAcpppByllllAxvcppam", +"mpppp#zoinllllezaziqlllwgmkoppam", +"mapapappaynllllxyellllvwapaappam", +"mapaapaaaaenlluAoynllgyaaaapaaam", +"maaaaaaaaaoeBveoaokCneaaapaaaaam", +"maaaaaaaaaaokwaaaabxAoaaaaaaaaom", +"maaaaaaaaaabkfaaaabxwaaaaaoaaaom", +"maoaaaaaaaokuxmoamxBecaaoaaaoaom", +"maaaoaoaooenld`m.xdllAfaaaoaaaom", +"maaaaaaaayulllCkxullllkfaaaaaaam", +"maaaamcaw#lllle#bkBllllk.m#maaom", +"maaaaekyillllABaaoAulllhykvzaaam", +"maaaoxqAClllAfapapoyvlldkldiapam", +"mppp.gllAslkfapapapawwsklllxapam", +"mapazClllAi.pppppppapykllllybpam", +"mpppeqlllhkbppppppppcAqllllBfpam", +"mppaxllllhgwppppppppbAkuslld#ppm", +"mjjmwdBi`inmjjpjjpjjpjomgAxwkjpm", +"mpjckv.opjjjjjjjjjjjjjjjpjamuppm", +"bajprjjjjjjjjjjjjjjjjjjjrjrjjjbo", +"pmajrrrrrrrrrrrrrrrrrrrrrrrrjomr", +"rpbmmmmmmmmmmmmmmmmmmmmmmmmmmojr" +}; +static const char *grabber[] = { +/* width height num_colors chars_per_pixel */ +" 16 32 16 1", +/* colors */ +"` c #000000", +". c #111111", +"# c #222222", +"a c #333333", +"b c #444444", +"c c #555555", +"d c #666666", +"e c #777777", +"f c #888888", +"g c #999999", +"h c #aaaaaa", +"i c #bbbbbb", +"j c #cccccc", +"k c #dddddd", +"l c #eeeeee", +"m c #ffffff", +/* pixels */ +"mmmmmmmmmmmmmmmm", +"mmmmmmmmmmmll`mm", +"mmmmmmmmmmmm``mm", +"mmmmmmmmll`mmmmm", +"mmmmmmmmm``mmmmm", +"mmmmmmmmmmmml`mm", +"mmmmmmmmmmmm``mm", +"mmmmmmmmll`mmmmm", +"mmmmmmmml``mmmmm", +"mmmmmmmmmmmml`mm", +"mmmmmmmmmmml``mm", +"mmmmmmmmll`mmmmm", +"mmmmmmmml``mmmmm", +"mmmmmmmmmmmml`mm", +"mmmmmmmmmmmm``mm", +"mmmmmmmmmm`mmmmm", +"mmmmmmmmm``mmmmm", +"mmmmmmmmmmmml`mm", +"mmmmmmmmmmmm``mm", +"mmmmmmmmll`mmmmm", +"mmmmmmmmm``mmmmm", +"mmmmmmmmmmmmm`mm", +"mmmmmmmmmmmm``mm", +"mmmmmmmmmm`mmmmm", +"mmmmmmmmm``mmmmm", +"mmmmmmmmmmmmm`mm", +"mmmmmmmmmmmm``mm", +"mmmmmmmmmm`mmmmm", +"mmmmmmmmm``mmmmm", +"mmmmmmmmmmmmm`mm", +"mmmmmmmmmmmm``mm", +"mmmmmmmmmmmmmmmm" +}; +static const char *curdata[] = { +/* width height num_colors chars_per_pixel */ +" 32 32 32 1", +/* colors */ +"` c #0b0c0b", +". c #898789", +"# c #c5c4c3", +"a c #fc8e04", +"b c #e2b173", +"c c #e8e7e8", +"d c #494949", +"e c #f2c48c", +"f c #f4af5f", +"g c #a5a4a5", +"h c #d4d4d4", +"i c #debc96", +"j c #f0a03c", +"k c #666566", +"l c #292829", +"m c #d7c3ac", +"n c #e4b77f", +"o c #9c9b9c", +"p c #ecdecc", +"q c #f6f5f6", +"r c #b9bab9", +"s c #787778", +"t c #373737", +"u c #585858", +"v c #ecbc84", +"w c #ac9a84", +"x c #fa9824", +"y c #eca750", +"z c #d8ccc4", +"A c #cccccc", +"B c #f4ce9c", +"C c #dcdcdc", +/* pixels */ +"qqAoooooooooooooooooooooooooogqq", +"qrrcqqqqqqqqqqqqqqqqqqqqqqqqqAoc", +"hossqqqqq.dsqqqqcktoqqqqqqqqqqhg", +"g.dtqqqqqtgtoqqqh.glhqqqqqqqqqqo", +"gCqtcqqqqcqrkqqqcqcsgqqqqqqqqcqg", +"gCctcccccqcrkcccccqkrccccccccccg", +"ghctccccccckoccccrtdcccccccccccg", +"ghclcccccchlccccc#.l#ccccccccccg", +"gActCccCcCuoCcCcCcc..CcCcCcCccCg", +"gACtCCCCcgtcCCCCCCC.sCCCCCCCCCco", +"g#rlrCCCClorACCCrrhdgCCCCCCCCCCg", +"go```#Chh```uhhCg``dhChChCChChhg", +"o#hhhhhhhhChhbihhAAhhhhhhhhhhhhg", +"g#hhhhhhhhAhhjaaxbmhhhAhhhhhhhho", +"o#AAAAAAAAAAAnaaaaaxyiAAAAAAAAAo", +"grAAAA#AAAAAAmaaaaaaaaajbmAAAAAo", +"orA#A#A#A#A#A#xaaaaaaaaaaaajb#Ao", +"grAAAAAAAAAAA#yaaaaaaaaaaaaaaaxw", +"grAAA#AA#A#AAAbaaaaaaaaaaaaaaabo", +"grAAAAAAAAAAAA#aaaaaaaaaaaaaayAo", +"o#AAAAAAAAAAAAAxaaaaaaaaaaaabAAo", +"g#AhhAhhAhAhAhAyaaaaaaaaaaayAAho", +"o#hhAhhhhhhhhAhnaaaaaaaaaabAhhho", +"g#hhhhhhhhhhhhhzaaaaaaaaabhhhhhg", +"g#ChCChChChChCChxaaaaaaabhChChCo", +"oACCCCCCCCCCCCCCfaaaaaabCCCCCCCg", +"gAcCCCCCCCcCCcCCeaaaaafCcCpCCCCg", +"ghccccccccccccccpaaaavcccccccccg", +"gAcccccccccccccccxaavcccccccccco", +"Agcqqqqqqqqqcqqcqfavqcqcqqcqqq#g", +"qrgCcqcqccqcqcqqqBeqcqqqcqqccrgC", +"qq#gooooooooooooooooooooooooorcq" +}; +static const char *ncurdata[] = { +/* width height num_colors chars_per_pixel */ +" 32 32 32 1", +/* colors */ +"` c #120c09", +". c #989798", +"# c #cecdcd", +"a c #fc8f07", +"b c #b85034", +"c c #ee8d75", +"d c #dab98e", +"e c #f1f0f0", +"f c #848284", +"g c #ead1c9", +"h c #f0ad90", +"i c #565756", +"j c #e6e1e0", +"k c #adadad", +"l c #fb3d0c", +"m c #d1bdb4", +"n c #fc530e", +"o c #d07660", +"p c #2c2b29", +"q c #6f6e6d", +"r c #f86914", +"s c #b18d84", +"t c #efa84f", +"u c #f07b59", +"v c #e8c09c", +"w c #a8a09c", +"x c #675e5e", +"y c #3c3c3c", +"z c #ea9e8a", +"A c #1c1c1c", +"B c #dadada", +"C c #fc7f07", +/* pixels */ +"eeB..........................kee", +"emweeeeeeeeeeeeeeeeeeeeeeeeeemoj", +"jwloeeeeekfBeeeeeffeeeeeeeeejlzw", +"kiAlceee#pxAjeee.xiyeeeeeeejlhew", +"kmkqnceejjeqkeeeeeepeeeeeejlheek", +"k#kqjlceeeef.eeeeeeyjeeeeglheeew", +"kBkqejncjejy#jejewxiejeeglhjejjk", +"k#kqjjjlcj#yjjejj.yiejj#lzjjjjew", +"k#kxjjjBlcykjjjjjjjy#jmlzjjjjjjk", +"k#kxjBjBBlbBBjBBBBjik#lzjjjjjBjw", +"w#wxBBBB#pluBBBB#BBpmlcBBBBBBBBk", +"ki``pBBBw``lbBBBipAxlcBBBBBBBBBw", +"kkkkkBBB#wkwlcB#B..lc#B#B#B#BB#k", +"wm#########Bmlrm#mlc###B###B###w", +"kkB##########clnClum###########w", +"w############tCllnaaadd########w", +"wk###########mCllnaaaaaatdm####.", +"kk##########mmlnalnaaaCaCaCatdmw", +"wm#######k##klraaClnaaaaaaaaaaaw", +"kk####m####mludaaaalnaCaaaaCaamw", +"w#########mlo#maCaaClnaaCaaaam#w", +"wk#######mlc#B#aaaaaClnaaaCamB#w", +"k#######mlc###BtaaCaaalnaaag###k", +"wmBBBBBmlz#BBB#daaaaaCalnag#BBBw", +"k##BBBmlzBBBBBB#CaaCaaaaluBBBB#k", +"w#BBB#lzBBBBBBBjaaaaaaCagnuBBBBk", +"w#BBBlzjjjBjBjBjtaaCaaaBjBlujjBk", +"k#jBlzejjjjjjjjjvaaaaajjjjjnujjk", +"k#BlhejejeeeeeeegaaCajeeejejnue.", +"#.nheeeeeeeeeeeeeaaaeeeeeeeejnuw", +"emsBeeeeeeeeeeeeetaeeeeeeeeeems#", +"ee#k.............ws..........kBe" +}; +static const char *selzone[] = { +/* width height num_colors chars_per_pixel */ +" 32 32 32 1", +/* colors */ +"` c #0a0a0a", +". c #868746", +"# c #c8c820", +"a c #f3090f", +"b c #d2d1d1", +"c c #51521a", +"d c #eb9191", +"e c #f05355", +"f c #eeefee", +"g c #9b9a9b", +"h c #e9e918", +"i c #676614", +"j c #292822", +"k c #e9d3d2", +"l c #f03436", +"m c #b1b119", +"n c #d06c6c", +"o c #ababab", +"p c #d0b7b6", +"q c #696866", +"r c #d3d34c", +"s c #46463c", +"t c #eeadae", +"u c #a7a64c", +"v c #fcfd06", +"w c #979835", +"x c #787822", +"y c #3a3932", +"z c #d9d91c", +"A c #575757", +"B c #78796c", +"C c #ea7677", +/* pixels */ +"ffkoggggggggggggggggggggggggopff", +"fpobfffffffffffffffffffffffffpof", +"boketkfffffffffffffffffffffdelpo", +"obfaaadfffffffffffffffffffeaalfg", +"offlaeffffffffffffffffffffflaCfg", +"gbfdlkedkffffffffffffffkteakekfo", +"obfkffaaaCfffgAy```jsBbCaaaffffg", +"gkffkfealkkq``yw###mx``ACaefkfkg", +"gbfbfkdlkpj`.hvvvvvvvvw`jCtkfbfg", +"obbfbfbbb``rvvvvvvvvvvv#`Akfbfbo", +"gbbfbbkby`rvvvvvvvvvvvvvc`bbbbfg", +"gbbbbfbB`wvvvvi``jzh`vvvz`Bfbbbg", +"gbbbbbbjjhvvv`j.uc`y`vvvv`qbbbfg", +"gbbbbbo`.vvvc`rvvvi`cvvvv`Abbbbg", +"gbbbbbq`rvvv`xvvvvz`.vvvv`Abbbbg", +"gpbbbby`hvvw`rvvvvm`#vvvh`Bbbbbg", +"gbpbpb`jvvvijvvvvvx`hvvv#`gpbpbg", +"gpbbbb`yvvvyyvvvvvc`vvvvx`pbbbbg", +"gbpbpb`yvvvjyvvvvw`jvvvv`Abbpbpg", +"gpbbbb`yvvvi`#vhi`j`hvvc`pbbbbbg", +"gbbbbpjjhvvh``j`jzh``y``obbbpbbg", +"gpbbbby`hvvvvmwzvvvvmwqbbbbbbbbg", +"gbbbbbB`BvvvvvvvvvvvvvBbbppbbbbg", +"gbbbbbdj`rvvvvvvvvvvvhobpatbbbbg", +"gbbbbpan``uvvvvvvvvvvubbaanbbbbo", +"gbbfbdaanj``.#zhhzm.cpbCaaakbkbg", +"gbfeblaaebgAj``````ygbfbkdnkldko", +"obpaldbfkffkfbbpbbfkfffffkflalfg", +"obCaalkffffffffffffffkfkffCaaafg", +"pollCtfffffffffffffffffffffkdepg", +"fooffffffffffffffffffffffffffbgb", +"ffpggggggggggggggggggggggogogobf" +}; +static const char *request_end[] = { +/* width height num_colors chars_per_pixel */ +" 32 32 32 1", +/* colors */ +"` c #070606", +". c #91901a", +"# c #cccb0e", +"a c #f15d85", +"b c #cbcbcb", +"c c #f18ca7", +"d c #535318", +"e c #e9e8e9", +"f c #eea7b9", +"g c #868586", +"h c #27271b", +"i c #efc8d3", +"j c #66671a", +"k c #fafc05", +"l c #eed8dd", +"m c #ecbac9", +"n c #acad14", +"o c #a7a6a7", +"p c #67665f", +"q c #f27898", +"r c #4a4947", +"s c #ddde25", +"t c #969640", +"u c #353724", +"v c #b9b9b6", +"w c #777875", +"x c #595952", +"y c #78771c", +"z c #171710", +"A c #d9d9d9", +"B c #f5f5f5", +"C c #9c9b9c", +/* pixels */ +"BBAoCCCCCCCCCCCCCCCCCCCCCCCCobBB", +"BvoeeeeBeeeeeeeeeeBeeeBeeeBeevCB", +"AoBmmBcBBBcmBBflBBcfBBBBBBBBBBbv", +"oABBqlffaBcclqalBBccBamqqlfqlBeC", +"oABBqqlqaicqficlBfqalqiafmqaiBBC", +"oAeelqBqqlfflcqlBcelffBqclqcieeo", +"CAeeeeeeeeeeeeevCgwgCbeeBeeeeeeC", +"oAeeeeeeeeeebxz`zhuh``hgeeeeeeeC", +"CAeAeeAeAelw`h.kkkkkk#r`ulAeAeeC", +"CAAeAAeAeAx`.kkkkkkkkkkt`xAeAAAo", +"CbAAAAAAAg`nkkkkkkkkkkkkx`vAeAAC", +"obAAAAAAb`dkkkkny.sk#skks`wAAAAC", +"CbAAAAAAx`kkkkuht.hyz#kkk`rAAAAC", +"CbbAbAbbzjkkkdhskksz`kkkkzrbbAbC", +"Cbbbbbbo`#kks`tkkkkp`kkkk`rbbbbC", +"Cvbbbbbw`kkky`kkkkkudkkkk`pbbbbC", +"Cbbbbbbx`kkkuukkkkk`tkkks`gbbbbC", +"Cvbbbbbr`kkkzrkkkk#`#kkk.`vbbbbC", +"Cbbbbbbr`kkkzhkkk#z`skkk`xbbbbbC", +"Cvbbbbbx`kkky`ynj`tzdsshhbbbbbbC", +"Cbbbbbbw`kkkkj`zjkksu`zxbbbbbbbC", +"CbbbAbbo`nkkkkkkkkkkkkvbbbAbAbbC", +"CbbAbAbAu`kkkkkkkkkkkkwAbAAbbAAC", +"CbAAbAAbvzzskkkkkkkkksoAAbAAAAbC", +"CbAAAAAAAvh`dnskkks#.yAAAAAAAAAC", +"CbAAAAAAAAACrh`````zxoAAAAAAAAAC", +"oAAeAeffeAeAeAAvbfAAeAeAeAeAeAeC", +"CAeeeqmblffefclafmmfmmemeffeeeAo", +"obeeeqeemfcmqfmqeqqbqcAcfqaAeeeC", +"vveBecilmfcmcmmceccecfiamcleBebo", +"BoveBBffefmBleeiiilBiefmBmfBBbCA", +"BBvCCCCCCCCCCCCCCCCCCCCCCCCCgoAB" +}; +static const char *altitude[] = { +/* width height num_colors chars_per_pixel */ +" 32 32 32 1", +/* colors */ +"` c #0b0c0a", +". c #5a8f3e", +"# c #7ccc58", +"a c #cccccb", +"b c #404442", +"c c #bce2a4", +"d c #a6a6a6", +"e c #21291f", +"f c #446e2c", +"g c #99fb63", +"h c #c4d5c1", +"i c #e7e7e7", +"j c #333831", +"k c #9a9f9b", +"l c #e4a89a", +"m c #f5f6f6", +"n c #858989", +"o c #b2cdb6", +"p c #676868", +"q c #525352", +"r c #dcfdfb", +"s c #abee87", +"t c #b7b8b8", +"u c #b4e0a0", +"v c #e4b6aa", +"w c #9b999b", +"x c #d8d7d7", +"y c #151813", +"z c #767878", +"A c #9cb6b4", +"B c #81da57", +"C c #5c625c", +/* pixels */ +"mmakwwwwwwwwwwwwwwwwwwwwwwwwwdim", +"mttimmmmmmmmmmmmmmmmmmmmmmmmmxki", +"xdmmmmmmmmmmmmmmmmmmmmmmmmximmxd", +"tammmmmmmmmmmmmmmmmmmmrmrredmmmk", +"dxmimmmimmmmrmrmrrrrrrrrrzqmmimd", +"dximiiieaviaxxvrrrrrrrrrhyxiiimd", +"dxiiiiwbalrlvvxirllvrrrrjniiiiid", +"dxiiiieAmrvvlvxxmvvvrrrzbiiiiiid", +"daixiderilivxxvmrxitnb`jaxiiiiid", +"daxixbkrrrrrmrrrApeyCwaixixxxxxd", +"daxxtyrrrrrrhnb`bztxxxxxxxxixixd", +"daxxbnrrrAzeyqnaxxxxxxCynxxxxxxd", +"dtxdyonb`jztaxxxxxxxxt`Bepxxxxxk", +"daaq`yCnaaxaxaxaaaxaaj.gBjCaaaxk", +"dtapnaaaaaaaaaaaxaaazeggggeCaaad", +"dtaaaan`aaaaaaaaaaaCyggggggeCaak", +"dtaaatyynaaaaaaaatebggggggggepak", +"dtaaaj.#`pwdttaaz`.ggggggssuAtak", +"ktaapjggBfeey``eeBssuuhaaaaaaaak", +"dtad`Bggggggssokhaaaaaaaaaaaaaak", +"dtaj.sscchaaaahaaaahaaaaaaaaaaak", +"dtxtxaaaaxaaxaaxaxaaaaaaaaaaaaad", +"daaxxaxxaxaxaxaxaxaxxxxxxxxxxxad", +"dttzztxxtpxxxxxxxxxxaxaxaxxtaxxk", +"dtjddpxxkxxxxxxxxxxxxxxxxxxqxxxd", +"dCkxixxnqbatbbkxxxqqbtabqzAyCaxd", +"dqaxzzxqadzCaxbiixbxaCnkxbiqxiik", +"dCtiajxezztbiiqiiibiiqztiqxqiiid", +"ddbxxbibxiazdaqiiijadzdzibiqaiww", +"adtCCtixpCaizpxmimqzpimnqaitpizd", +"mtdximmimimmimimmiqmmmimmimmitwx", +"mmadwwwwwwwwwwwwwwnwwwwwwwwwwtim" +}; +static const char *slider[] = { +/* width height num_colors chars_per_pixel */ +" 32 32 32 1", +/* colors */ +"` c #04329c", +". c #9c9a9c", +"# c #cfcfcf", +"a c #4868ac", +"b c #b4b6b7", +"c c #ececec", +"d c #2c56a4", +"e c #7c7c96", +"f c #c4c5c5", +"g c #acacb1", +"h c #243a84", +"i c #e0e0e0", +"j c #8c8ba4", +"k c #f4f6f4", +"l c #cccacc", +"m c #1446a4", +"n c #a4a4a7", +"o c #5874b0", +"p c #344284", +"q c #1c327c", +"r c #343264", +"s c #d8d8d8", +"t c #345eac", +"u c #8486a4", +"v c #949694", +"w c #bcbebc", +"x c #b4b2bc", +"y c #f4f2f4", +"z c #e4e6e4", +"A c #fcfefc", +"B c #bcbabf", +"C c #1c4294", +/* pixels */ +"AA#g........................nfAA", +"AxgicccccccccccccccccccccccczBnk", +"#gkkAkkAkkAkkAkkAkkAkkAkkAkkkkBw", +"niyyykyykyykyykyykyykyykyykkkyyv", +".zyc#gngzycyycyycyycyycyycyyycyv", +".iccjrrrlcccccccccccccccccccccc.", +".iccjrrr#cczcczcczcczcczcczczccv", +".iizurrhlzzzzzzzzzzzzzzzzzzzzzz.", +"vszijrrrfizziziizizizizizizizii.", +".siiurrrfiiiiiiiiiiiiiiiiiiiiii.", +"vammhrrrCmmCmCmCmCmCmCmCmCCmCma.", +".d``qrrr``````````````````````tv", +"voddprrrddddddddddddddddddddddo.", +"vl##errrB####################s#v", +".f##erhrb######################.", +"vfl#errrxllll#l#l#l#l#l#l#l#lllv", +".fllerrrxllllllll#l#l#lllllllllv", +"vfflerrrxllllllllflllflllllllllv", +"vfllerrrblfllfllllllllllflflfllv", +".fl#errrbllllllllllllllll#ll#llv", +"vf#lerrhxl#####l##l##l##l##l###v", +".f##neeew######################v", +".l########################s####v", +"v#sssssssss#ssssssssssssss#ssssv", +".#sssssssssssssssssssssssssssssv", +".ssississisississssssssssisissiv", +"vsiiiiiiiiiiiziiziziziziiiiiiiiv", +".iizzzzzzzzzzzzzzzzzzzzzzzzzzzzv", +".sccczcczcczczzczzczczczcczcczzv", +"Bbccycycyccycyycyyycyycycycycyfg", +"cnwckkykkkkkkkkkkkkkkkkkkkkkylvi", +"Acx..........v..v.v.v.v.v.v.vgiA" +}; +/* XPM */ +static char * calendar_clock[] = { +"32 32 2 1", +" c None", +". c #000000", +" .. .. ", +" .. .. ", +" .. .. ", +" .. .. ", +" ........................ ", +".......................... ", +".... .............. .... ", +".......................... ", +".......................... ", +".......................... ", +".. .. ", +".. .. ", +".. .... .... .... .. ", +".. .... .... .... .. ", +".. .... .... .... ", +".. .... .... .... ", +".. ...... ", +".. .......... ", +".. .... .... .... .... ", +".. .... .... ... ... ", +".. .... .... .. .. .. ", +".. .... .... ... .. ...", +".. .. .. ..", +".. .. .. ..", +".............. .. ...... ..", +" ............. .. ...... ..", +" ... ...", +" .. .. ", +" ... ... ", +" .... .... ", +" .......... ", +" ...... "}; + +/* XPM */ +static char * find_time[] = { +"32 32 5 1", +" c None", +". c #000000", +"+ c #333366", +"@ c #939393", +"# c #FFFFFF", +" #@@@@@@@@@@@@@@@@@@@@@@@@@@@ ", +" @@##########################@@ ", +"@@###.########.###############@@", +"@####..#######..###############@", +"@####...######...##############@", +"@####....#####....#############@", +"@####.....####.....############@", +"@####......###......###########@", +"@####.......##.......##########@", +"@####.................#########@", +"@####..................########@", +"@####...................#######@", +"@####....................######@", +"@####.....................#####@", +"@####......................####@", +"@####.......................###@", +"@####......................####@", +"@####.....................#####@", +"@####....................######@", +"@####...................#######@", +"@####..................########@", +"@####.................#########@", +"@####.......##.......##########@", +"@####......###......###########@", +"@####.....####.....############@", +"@####....#####....#############@", +"@####...######...##############@", +"@####..#######..###############@", +"@####.+#######.################@", +"@@###+########################@@", +" @@##########################@@ ", +" @@@@@@@@@@@@@@@@@@@@@@@@@@@@ "}; +/* XPM */ +static char * analyse[] = { +"32 32 5 1", +" c None", +". c #333366", +"+ c #939393", +"@ c #DEFFFF", +"# c #FFFFFF", +" ++++++++++++++++++++++++++++ ", +" ++###########################+ ", +"#+#############################+", +"+##############################+", +"+############......############+", +"+############......############+", +"+############......############+", +"+#############.....############+", +"+##########..........####.#####+", +"+#####..##.................####+", +"+#####.........@@@.........####+", +"+####........@@@@@@@........###+", +"+####.......@@@@@@@@@.......###+", +"+###.......@@@@@@@@@@@.....####+", +"+#####.....@@@@@@@@@@@....#####+", +"+######...@@@@@@@@@@@@@...#####+", +"+######...@@@@@@@@@@@@@...#####+", +"+######....@@@@@@@@@@@....#####+", +"+######....@@@@@@@@@@@.....####+", +"+#######...@@@@@@@@@@@.......##+", +"+#####......@@@@@@@@@.......###+", +"+####.........@@@@@.........###+", +"+#####.....................####+", +"+######...............###..####+", +"+#######..##.........##########+", +"+##############.....###########+", +"+##############.....###########+", +"+##############.....###########+", +"+##############################+", +"#+#############################+", +" ++##########################++ ", +" #+++++++++++++++++++++++++++ "};