Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add the possibility to read and display Altitude data

( at 300,500,700,850 hPa)
If there is no 'altitude' data in the current file, nothing visible is changed
If the current file contains altitude data, a choice box is display
near left side of the parameter WIND .
The box give acces at the data available. (10m for the normal
data, 300 or 500 or 700 or 850 ).
If one of the altitude available is chosen, the wind data shown
 in the dialog and the wind overlay are related to this choice. In addition,
a line of extra data is displayed at the bottom sohwing Altitude,
Temperature, and relative humudity
All the 'altitude data are marked by a yellow background
Off course for those wanting to use another units than
hPa,meters and Celsius, it is possible.
  • Loading branch information...
commit 18e7cd59ed34222713b3240654a074a714a057bc 1 parent 96a7c07
@Ptizef Ptizef authored
View
1,246 plugins/grib_pi/GRIB.fbp
1,047 additions, 199 deletions not shown
View
14 plugins/grib_pi/src/GribOverlayFactory.cpp
@@ -163,13 +163,13 @@ bool GRIBOverlayFactory::RenderGribOverlay( wxDC &dc, PlugIn_ViewPort *vp )
return DoRenderGribOverlay( vp );
}
-void SettingsIdToGribId(int i, int &idx, int &idy, bool &polar)
+void GRIBOverlayFactory::SettingsIdToGribId(int i, int &idx, int &idy, bool &polar)
{
idx = idy = -1;
polar = false;
switch(i) {
case GribOverlaySettings::WIND:
- idx = Idx_WIND_VX, idy = Idx_WIND_VY; break;
+ idx = Idx_WIND_VX + m_Altitude, idy = Idx_WIND_VY + m_Altitude; break;
case GribOverlaySettings::WIND_GUST:
idx = Idx_WIND_GUST; break;
case GribOverlaySettings::PRESSURE:
@@ -183,7 +183,7 @@ void SettingsIdToGribId(int i, int &idx, int &idy, bool &polar)
case GribOverlaySettings::CLOUD:
idx = Idx_CLOUD_TOT; break;
case GribOverlaySettings::AIR_TEMPERATURE:
- idx = Idx_AIR_TEMP_2M; break;
+ idx = Idx_AIR_TEMP; break;
case GribOverlaySettings::SEA_TEMPERATURE:
idx = Idx_SEA_TEMP; break;
case GribOverlaySettings::CAPE:
@@ -197,6 +197,7 @@ bool GRIBOverlayFactory::DoRenderGribOverlay( PlugIn_ViewPort *vp )
DrawMessageWindow( ( m_Message ), vp->pix_width, vp->pix_height, m_dFont_war );
return false;
}
+
m_Message_Hiden.Empty();
// If the scale has changed, clear out the cached bitmaps in DC mode
@@ -253,6 +254,13 @@ bool GRIBOverlayFactory::DoRenderGribOverlay( PlugIn_ViewPort *vp )
RenderGribNumbers( i, pGR, vp );
}
}
+ if( m_Altitude ) {
+ if( !m_Message_Hiden.IsEmpty() ) m_Message_Hiden.Append(_T(" "));
+ m_Message_Hiden.Append(_("WIND data at")).Append(_T(" "))
+ .Append(m_Settings.GetAltitudeFromIndex(m_Altitude, m_Settings.Settings[GribOverlaySettings::PRESSURE].m_Units)).Append(_T(" "))
+ .Append(m_Settings.GetUnitSymbol(GribOverlaySettings::PRESSURE))
+ .Append(_T(" !"));
+ }
if( !m_Message_Hiden.IsEmpty() )
DrawMessageWindow( m_Message_Hiden , vp->pix_width, vp->pix_height, m_dFont_map );
return true;
View
3  plugins/grib_pi/src/GribOverlayFactory.h
@@ -82,6 +82,7 @@ class GRIBOverlayFactory {
void SetMessage( wxString message ) { m_Message = message; }
void SetTimeZone( int TimeZone ) { m_TimeZone = TimeZone; }
void SetParentSize( int w, int h ) { m_ParentSize.SetWidth(w) ; m_ParentSize.SetHeight(h) ;}
+ void SetAltitude(int altitude) { m_Altitude = altitude; }
void SetGribTimelineRecordSet( GribTimelineRecordSet *pGribTimelineRecordSet1 );
bool RenderGribOverlay( wxDC &dc, PlugIn_ViewPort *vp );
@@ -99,8 +100,10 @@ class GRIBOverlayFactory {
wxColour GetGraphicColor(int config, double val);
wxSize m_ParentSize;
+ int m_Altitude;
private:
+ void SettingsIdToGribId(int i, int &idx, int &idy, bool &polar);
bool DoRenderGribOverlay( PlugIn_ViewPort *vp );
void RenderGribBarbedArrows( int config, GribRecord **pGR, PlugIn_ViewPort *vp );
void RenderGribIsobar( int config, GribRecord **pGR, wxArrayPtrVoid **pIsobarArray, PlugIn_ViewPort *vp );
View
36 plugins/grib_pi/src/GribReader.cpp
@@ -199,12 +199,16 @@ void GribReader::readAllGribRecords()
&& rec->getLevelType()==LV_ABOV_GND
&& rec->getLevelValue()==10)
- )
+ || (( rec->getDataType()==GRB_WIND_VX || rec->getDataType()==GRB_WIND_VY)//wind at x hpa
+ && rec->getLevelType()==LV_ISOBARIC
+ && ( rec->getLevelValue()==850
+ || rec->getLevelValue()==700
+ || rec->getLevelValue()==500
+ || rec->getLevelValue()==300 ) )
+ )//----------------------------------------
- {
- storeRecordInMap(rec);
+ storeRecordInMap(rec);
- }
else if( (rec->getDataType()==GRB_WIND_GUST
&& rec->getLevelType()==LV_GND_SURF && rec->getLevelValue()==0) )
storeRecordInMap(rec);
@@ -217,6 +221,14 @@ void GribReader::readAllGribRecords()
&& rec->getLevelType()==LV_ABOV_GND && rec->getLevelValue()==2 )
storeRecordInMap(rec);
+ else if( rec->getDataType()==GRB_TEMP //Air temperature at x hpa
+ && rec->getLevelType()==LV_ISOBARIC
+ && ( rec->getLevelValue()==850
+ || rec->getLevelValue()==700
+ || rec->getLevelValue()==500
+ || rec->getLevelValue()==300 ) )
+ storeRecordInMap(rec);
+
else if(rec->getDataType()==GRB_PRECIP_TOT //total rainfall
&& rec->getLevelType()==LV_GND_SURF && rec->getLevelValue()==0 )
storeRecordInMap(rec);
@@ -246,6 +258,22 @@ void GribReader::readAllGribRecords()
else if(rec->getDataType() == GRB_CAPE && rec->getLevelType()==LV_GND_SURF && rec->getLevelValue()==0) //Potential energy
storeRecordInMap(rec);
+ else if( (rec->getDataType()==GRB_GEOPOT_HGT //geopotentiel geight at x hpa
+ && rec->getLevelType()==LV_ISOBARIC)
+ && (rec->getLevelValue()==850
+ || rec->getLevelValue()==700
+ || rec->getLevelValue()==500
+ || rec->getLevelValue()==300) )
+ storeRecordInMap(rec);
+
+ else if( (rec->getDataType()==GRB_HUMID_REL //relative humidity at x hpa
+ && rec->getLevelType()==LV_ISOBARIC)
+ && (rec->getLevelValue()==850
+ || rec->getLevelValue()==700
+ || rec->getLevelValue()==500
+ || rec->getLevelValue()==300) )
+ storeRecordInMap(rec);
+
else
{
/*
View
15 plugins/grib_pi/src/GribRecordSet.h
@@ -29,12 +29,15 @@
WX_DECLARE_OBJARRAY( GribRecord *, ArrayOfGribRecordPtrs );
// These are indexes into the array
-enum { Idx_WIND_VX, Idx_WIND_VY, Idx_WIND_GUST, Idx_PRESSURE, Idx_HTSIGW, Idx_WVDIR, Idx_WVPER,
- Idx_WINDSCAT_VY, Idx_WINDSCAT_VX,
- Idx_SEACURRENT_VX, Idx_SEACURRENT_VY,
- Idx_PRECIP_TOT, Idx_CLOUD_TOT,
- Idx_AIR_TEMP_2M, Idx_SEA_TEMP,
- Idx_CAPE, Idx_COUNT };
+enum { Idx_WIND_VX, Idx_WIND_VX850, Idx_WIND_VX700, Idx_WIND_VX500, Idx_WIND_VX300,
+ Idx_WIND_VY, Idx_WIND_VY850, Idx_WIND_VY700, Idx_WIND_VY500, Idx_WIND_VY300,
+ Idx_WIND_GUST, Idx_PRESSURE, Idx_HTSIGW, Idx_WVDIR, Idx_WVPER,
+ Idx_SEACURRENT_VX, Idx_SEACURRENT_VY, Idx_PRECIP_TOT, Idx_CLOUD_TOT,
+ Idx_AIR_TEMP, Idx_AIR_TEMP850, Idx_AIR_TEMP700, Idx_AIR_TEMP500, Idx_AIR_TEMP300,
+ Idx_SEA_TEMP, Idx_CAPE,
+ Idx_HUMID_RE, Idx_HUMID_RE850, Idx_HUMID_RE700, Idx_HUMID_RE500, Idx_HUMID_RE300,
+ Idx_GEOP_HGT,Idx_GEOP_HGT850, Idx_GEOP_HGT700, Idx_GEOP_HGT500, Idx_GEOP_HGT300,
+ Idx_COUNT };
class GribRecordSet {
public:
View
35 plugins/grib_pi/src/GribSettingsDialog.cpp
@@ -40,16 +40,29 @@ static const wxString *unit_names[] = {units0_names, units1_names, units2_names,
static const wxString name_from_index[] = {_T("Wind"), _T("WindGust"), _T("Pressure"),
_T("Waves"), _T("Current"),
_T("Rainfall"), _T("CloudCover"),
- _T("AirTemperature"), _T("SeaTemperature"), _T("CAPE")};
+ _T("AirTemperature"), _T("SeaTemperature"), _T("CAPE"),
+ _("Altitude"), _("RelativeHumidity") };
static const wxString tname_from_index[] = {_("Wind"), _("Wind Gust"), _("Pressure"),
_("Waves"), _("Current"),
_("Rainfall"), _("Cloud Cover"),
- _("Air Temperature(2m)"), _("Sea Temperature(surf.)"), _("CAPE")};
+ _("Air Temperature(2m)"), _("Sea Temperature(surf.)"), _("CAPE"),
+ _("Altitude"), _("Relative Humidity") };
-static const int unittype[GribOverlaySettings::SETTINGS_COUNT] = {0, 0, 1, 2, 0, 4, 5, 3, 3, 6};
+static const int unittype[GribOverlaySettings::SETTINGS_COUNT] = {0, 0, 1, 2, 0, 4, 5, 3, 3, 6, 2, 5};
+
+static const int minuttes_from_index [GribOverlaySettings::SETTINGS_COUNT] = {2, 5, 10, 20, 30, 60, 90, 180, 360, 720};
+
+static const wxString altitude_from_index[3][5] = { _T("10m"), _T("850"), _T("700"), _T("500"), _T("300"),
+ _T("10m"), _T("637"), _T("525"), _T("375"), _T("225"),
+ _T("10m"), _T("25.2"), _T("20.7"), _T("14.8"), _T("8.9") };
enum SettingsDisplay {B_ARROWS, ISO_LINE_VISI, ISO_LINE_SHORT, D_ARROWS, OVERLAY, NUMBERS};
+wxString GribOverlaySettings::GetAltitudeFromIndex( int settings, int index )
+{
+ return wxGetTranslation(altitude_from_index[index][settings]);
+}
+
int GribOverlaySettings::GetMinFromIndex( int index )
{
switch(index){
@@ -485,6 +498,9 @@ void GribSettingsDialog::ShowFittingSettings( int settings )
m_cbOverlayMap->Show(false);
m_tOverlayColors->Show(false);
m_cOverlayColors->Show(false);
+ m_cbNumbers->Show(false);
+ m_ctNumbers->Show(false);
+ m_sNumbersSpacing->Show(false);
this->Fit();
//Show only fitting parameters
switch(settings){
@@ -493,36 +509,42 @@ void GribSettingsDialog::ShowFittingSettings( int settings )
m_cbIsoBars->SetLabel(_("Display Isotachs"));
ShowSettings( B_ARROWS );
ShowSettings( OVERLAY );
+ ShowSettings( NUMBERS );
break;
case 1:
ShowSettings( ISO_LINE_SHORT );
m_cbIsoBars->SetLabel(_("Display Isotachs"));
ShowSettings( OVERLAY );
+ ShowSettings( NUMBERS );
break;
case 2:
ShowSettings( ISO_LINE_VISI );
m_cbIsoBars->SetLabel(_("Display Isobars"));
+ ShowSettings( NUMBERS );
break;
case 3:
case 4:
ShowSettings( D_ARROWS );
ShowSettings( OVERLAY );
+ ShowSettings( NUMBERS );
break;
case 5:
case 6:
ShowSettings( OVERLAY );
+ ShowSettings( NUMBERS );
break;
case 7:
case 8:
ShowSettings( ISO_LINE_SHORT );
m_cbIsoBars->SetLabel(_("Display Isotherms"));
ShowSettings( OVERLAY );
+ ShowSettings( NUMBERS );
break;
case 9:
ShowSettings( ISO_LINE_SHORT );
m_cbIsoBars->SetLabel(_("Display Iso CAPE"));
ShowSettings( OVERLAY );
-
+ ShowSettings( NUMBERS );
}
}
@@ -561,6 +583,11 @@ void GribSettingsDialog::ShowSettings( int params )
m_cbOverlayMap->Show();
m_tOverlayColors->Show();
m_cOverlayColors->Show();
+ break;
+ case NUMBERS:
+ m_cbNumbers->Show();
+ m_ctNumbers->Show();
+ m_sNumbersSpacing->Show();
}
}
View
5 plugins/grib_pi/src/GribSettingsDialog.h
@@ -45,7 +45,8 @@ struct GribOverlaySettings
double CalibrationFactor(int settings, double input, bool reverse = false);
double CalibrateValue(int settings, double input)
{ return (input+CalibrationOffset(settings))*CalibrationFactor(settings, input); }
- int GetMinFromIndex( int index);
+ int GetMinFromIndex( int index );
+ wxString GetAltitudeFromIndex( int settings, int index );
double GetmstobfFactor(double input);
double GetbftomsFactor(double input);
wxString GetUnitSymbol(int settings);
@@ -60,7 +61,7 @@ struct GribOverlaySettings
int m_iOverlayTransparency;
enum SettingsType {WIND, WIND_GUST, PRESSURE, WAVE, CURRENT, PRECIPITATION, CLOUD,
- AIR_TEMPERATURE, SEA_TEMPERATURE, CAPE, SETTINGS_COUNT};
+ AIR_TEMPERATURE, SEA_TEMPERATURE, CAPE, GEO_ALTITUDE, REL_HUMIDITY, SETTINGS_COUNT};
enum Units0 {KNOTS, M_S, MPH, KPH, BFS};
enum Units1 {MILLIBARS, MMHG, INHG};
enum Units2 {METERS, FEET};
View
6 plugins/grib_pi/src/GribTable.cpp
@@ -163,7 +163,7 @@ void GRIBTable::InitGribTable( int zone, ArrayOfGribRecordSets *rsa )
nrows++;
}
//create and polulate the Air Temperature data row
- if(m_pGDialog->m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_AIR_TEMP_2M) != wxNOT_FOUND) {
+ if(m_pGDialog->m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_AIR_TEMP) != wxNOT_FOUND) {
AddDataRow( nrows, i, _("Air\nTemperature"), singledatarow );
m_pGribTable->SetCellValue(nrows, i, GetAirTemp(RecordArray));
m_pGribTable->SetCellBackgroundColour(nrows, i, m_pDataCellsColour);
@@ -427,8 +427,8 @@ wxString GRIBTable::GetCloudCover(GribRecord **recordarray)
wxString GRIBTable::GetAirTemp(GribRecord **recordarray)
{
wxString skn(wxEmptyString);
- if( recordarray[Idx_AIR_TEMP_2M] ) {
- double temp = recordarray[Idx_AIR_TEMP_2M]->
+ if( recordarray[Idx_AIR_TEMP] ) {
+ double temp = recordarray[Idx_AIR_TEMP]->
getInterpolatedValue(m_pGDialog->m_cursor_lon, m_pGDialog->m_cursor_lat, true );
if( temp != GRIB_NOTDEF ) {
View
202 plugins/grib_pi/src/GribUIDialog.cpp
@@ -154,8 +154,7 @@ void GRIBUIDialog::OpenFile(bool newestFile)
SetCanvasContextMenuItemViz( pPlugIn->m_MenuItem, false);
m_cRecordForecast->Clear();
- /* this should be un-commented to avoid a memory leak,
- but for some reason it crbashes windows */
+ pPlugIn->GetGRIBOverlayFactory()->SetAltitude( 0 );
delete m_bGRIBActiveFile;
m_pTimelineSet = NULL;
m_InterpolateMode = false;
@@ -177,8 +176,6 @@ void GRIBUIDialog::OpenFile(bool newestFile)
GribRecordSet &first=rsa->Item(0), &second = rsa->Item(1), &last = rsa->Item(rsa->GetCount()-1);
//get file interval index
- // wxTimeSpan sp = wxDateTime(second.m_Reference_Time) - wxDateTime(first.m_Reference_Time);
- //int intermin = sp.GetMinutes();
int halphintermin(wxTimeSpan(wxDateTime(second.m_Reference_Time) - wxDateTime(first.m_Reference_Time)).GetMinutes() / 2);
for( m_FileIntervalIndex=0;;m_FileIntervalIndex++){
if(m_OverlaySettings.GetMinFromIndex(m_FileIntervalIndex) > halphintermin) break;
@@ -222,7 +219,6 @@ void GRIBUIDialog::OpenFile(bool newestFile)
else
pPlugIn->GetGRIBOverlayFactory()->SetMessage( m_bGRIBActiveFile->GetLastMessage() );
}
-
this->SetTitle(title);
SetFactoryOptions();
if( pPlugIn->GetStartOptions() )
@@ -244,7 +240,7 @@ bool GRIBUIDialog::GetGribZoneLimits(GribTimelineRecordSet *timelineSet, double
//calculate the largest overlay size
GribRecord **pGR = timelineSet->m_GribRecordPtrArray;
double ltmi = -GRIB_NOTDEF, ltma = GRIB_NOTDEF, lnmi = -GRIB_NOTDEF, lnma = GRIB_NOTDEF;
- for( int i = 0; i<13; i++){
+ for( int i = 0; i<36; i++){
GribRecord *pGRA = pGR[i];
if(!pGRA) continue;
if(pGRA->getLatMin() < ltmi) ltmi = pGRA->getLatMin();
@@ -366,6 +362,9 @@ GRIBUIDialog::GRIBUIDialog(wxWindow *parent, grib_pi *ppi)
DimeWindow( this );
m_pTimelineSet = NULL;
+ m_fgTrackingDisplay->Show(2,false); //Hide extra altitude data parameters
+ //is there a bug in wxWigget? m_fgTrackingControls->Clear() delete m_fcAltitude so it's necessary to detach it before
+ m_fgTrackingControls->Detach(m_fcAltitude);
m_fgTrackingControls->Clear();
Fit();
@@ -448,11 +447,18 @@ void GRIBUIDialog::SetViewPort( PlugIn_ViewPort *vp )
if(pReq_Dialog->IsShown()) pReq_Dialog->OnVpChange(vp);
}
-void GRIBUIDialog::AddTrackingControl( wxControl *ctrl1, wxControl *ctrl2, wxControl *ctrl3, bool show )
+void GRIBUIDialog::AddTrackingControl( wxControl *ctrl1, wxControl *ctrl2, wxControl *ctrl3, bool show, bool altitude )
{
if(show) {
+ if( altitude ){
+ m_fcAltitude->Add(ctrl1, 0, wxALL, 1);
+ ctrl1->Show();
+ m_cbAltitude->Show();
+ m_fgTrackingControls->Add( m_fcAltitude, 1, wxRIGHT|wxBOTTOM, 3 );
+ } else {
m_fgTrackingControls->Add(ctrl1, 0, wxALL, 1);
ctrl1->Show();
+ }
if(ctrl2) {
m_fgTrackingControls->Add(ctrl2, 0, wxALL, 1);
ctrl2->Show();
@@ -475,6 +481,11 @@ void GRIBUIDialog::AddTrackingControl( wxControl *ctrl1, wxControl *ctrl2, wxC
void GRIBUIDialog::PopulateTrackingControls( void )
{
+ wxColour bgd1,bgd2;
+ GetGlobalColor( _T("DILG0"),&bgd1);
+ GetGlobalColor( _T("YELO1"),&bgd2);
+ m_tcWindSpeed->SetBackgroundColour(bgd1);
+
//fix crash with curious files with no record
if(m_pTimelineSet) {
m_bpSettings->Enable();
@@ -500,13 +511,25 @@ void GRIBUIDialog::PopulateTrackingControls( void )
m_bpNow->Disable();
}
+ //is there a bug in wxWigget? flexsizer->Clear() delete child if it's a flexsizer so it's necessary to detach it before
+ if(m_fgTrackingControls->GetItem(m_fcAltitude) != NULL) m_fgTrackingControls->Detach(m_fcAltitude);
m_fgTrackingControls->Clear();
m_fgTrackingControls->SetCols(9);
+ if(m_fcAltitude->GetItem(m_cbWind) != NULL) m_fcAltitude->Detach(m_cbWind);
+ m_cbAltitude->Hide();
this->Fit();
+ //populate and set altitude choice
+ m_cbAltitude->Clear();
+ for( int i = 0; i<5; i++) {
+ if( (( m_pTimelineSet && m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_WIND_VX + i) != wxNOT_FOUND
+ && m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_WIND_VY + i) != wxNOT_FOUND )) || i == 0 )
+ m_cbAltitude->Append(m_OverlaySettings.GetAltitudeFromIndex( i , m_OverlaySettings.Settings[GribOverlaySettings::PRESSURE].m_Units));
+ }
+
AddTrackingControl(m_cbWind, m_tcWindSpeed, m_tcWindDirection,
m_pTimelineSet && m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_WIND_VX) != wxNOT_FOUND
- && m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_WIND_VY) != wxNOT_FOUND);
+ && m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_WIND_VY) != wxNOT_FOUND, m_cbAltitude->GetCount() > 1 );
AddTrackingControl(m_cbWindGust, m_tcWindGust, 0, m_pTimelineSet
&& m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_WIND_GUST) != wxNOT_FOUND);
AddTrackingControl(m_cbPressure, m_tcPressure, 0, m_pTimelineSet
@@ -535,18 +558,44 @@ void GRIBUIDialog::PopulateTrackingControls( void )
AddTrackingControl(m_cbCloud, m_tcCloud, 0,
m_pTimelineSet && m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_CLOUD_TOT) != wxNOT_FOUND);
AddTrackingControl(m_cbAirTemperature, m_tcAirTemperature, 0,
- m_pTimelineSet && m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_AIR_TEMP_2M) != wxNOT_FOUND);
+ m_pTimelineSet && m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_AIR_TEMP) != wxNOT_FOUND);
AddTrackingControl(m_cbSeaTemperature, m_tcSeaTemperature, 0,
m_pTimelineSet && m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_SEA_TEMP) != wxNOT_FOUND);
AddTrackingControl(m_cbCAPE, m_tcCAPE, 0,
m_pTimelineSet && m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_CAPE) != wxNOT_FOUND);
- //Risize speed ctrl for single or double unit display
+ m_cbAltitude->SetSelection( pPlugIn->GetGRIBOverlayFactory()->m_Altitude );
+ //
+ //init and show extra parameters for altitude tracking if necessary
+ if( pPlugIn->GetGRIBOverlayFactory()->m_Altitude ) {
+ if( (m_pTimelineSet && m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_AIR_TEMP
+ + pPlugIn->GetGRIBOverlayFactory()->m_Altitude) != wxNOT_FOUND)
+ || (m_pTimelineSet && m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_HUMID_RE
+ + pPlugIn->GetGRIBOverlayFactory()->m_Altitude) != wxNOT_FOUND)
+ || (m_pTimelineSet && m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_GEOP_HGT
+ + pPlugIn->GetGRIBOverlayFactory()->m_Altitude) != wxNOT_FOUND) ) {
+ m_fgTrackingDisplay->Show(2, true);
+ m_tcAltitude->SetValue( _("N/A") );
+ m_tcTemp->SetValue( _("N/A") );
+ m_tcRelHumid->SetValue( _("N/A") );
+ m_tcWindSpeed->SetBackgroundColour(bgd2);
+ m_tcAltitude->SetBackgroundColour(bgd2);
+ m_tcTemp->SetBackgroundColour(bgd2);
+ m_tcRelHumid->SetBackgroundColour(bgd2);
+ }
+
+ m_stAltitudeText->SetLabel((m_OverlaySettings.GetAltitudeFromIndex(
+ pPlugIn->GetGRIBOverlayFactory()->m_Altitude, m_OverlaySettings.Settings[GribOverlaySettings::PRESSURE].m_Units))
+ .append(_T(" ")).Append( m_OverlaySettings.GetUnitSymbol(GribOverlaySettings::PRESSURE) ) );
+ } else
+ m_fgTrackingDisplay->Show(2,false);
+ //
+ //Resize speed ctrl for single or double unit display
if(m_OverlaySettings.Settings[GribOverlaySettings::WIND].m_Units == GribOverlaySettings::BFS)
m_tcWindSpeed->SetMinSize(wxSize(70, -1));
else
m_tcWindSpeed->SetMinSize(wxSize(110, -1) );
- //Risize wave height ctrl for single or double display
+ //Resize wave height ctrl for single or double display
if(m_pTimelineSet && m_bGRIBActiveFile->m_GribIdxArray.Index(Idx_WVPER) == wxNOT_FOUND)
m_tcWaveHeight->SetMinSize(wxSize(70, -1));
else
@@ -563,10 +612,11 @@ void GRIBUIDialog::UpdateTrackingControls( void )
GribRecord **RecordArray = m_pTimelineSet->m_GribRecordPtrArray;
// Update the wind control
- if( RecordArray[Idx_WIND_VX] && RecordArray[Idx_WIND_VY] ) {
- double vx = RecordArray[Idx_WIND_VX]->
+ int altitude = pPlugIn->GetGRIBOverlayFactory()->m_Altitude;
+ if( RecordArray[Idx_WIND_VX + altitude] && RecordArray[Idx_WIND_VY + altitude] ) {
+ double vx = RecordArray[Idx_WIND_VX + altitude]->
getInterpolatedValue(m_cursor_lon, m_cursor_lat, true );
- double vy = RecordArray[Idx_WIND_VY]->
+ double vy = RecordArray[Idx_WIND_VY + altitude]->
getInterpolatedValue(m_cursor_lon, m_cursor_lat, true );
if( ( vx != GRIB_NOTDEF ) && ( vy != GRIB_NOTDEF ) ) {
@@ -699,8 +749,8 @@ void GRIBUIDialog::UpdateTrackingControls( void )
}
// Update the Air Temperature
- if( RecordArray[Idx_AIR_TEMP_2M] ) {
- double temp = RecordArray[Idx_AIR_TEMP_2M]->
+ if( RecordArray[Idx_AIR_TEMP] ) {
+ double temp = RecordArray[Idx_AIR_TEMP]->
getInterpolatedValue( m_cursor_lon, m_cursor_lat, true );
if( temp != GRIB_NOTDEF ) {
@@ -733,7 +783,41 @@ void GRIBUIDialog::UpdateTrackingControls( void )
} else
m_tcCAPE->SetValue( _("N/A") );
}
+ // Update extra data for altitude
+ // geopotential altitude
+ if( RecordArray[Idx_GEOP_HGT + altitude] ) {
+ double geop = RecordArray[Idx_GEOP_HGT + altitude]->
+ getInterpolatedValue( m_cursor_lon, m_cursor_lat, true );
+
+ if( geop != GRIB_NOTDEF ) {
+ geop = m_OverlaySettings.CalibrateValue(GribOverlaySettings::GEO_ALTITUDE, geop);
+ m_tcAltitude->SetValue( wxString::Format( _T("%5.0f "), geop ) + m_OverlaySettings.GetUnitSymbol(GribOverlaySettings::GEO_ALTITUDE) );
+ } else
+ m_tcAltitude->SetValue( _("N/A") );
+ }
+
+ // temperature
+ if( RecordArray[Idx_AIR_TEMP + altitude] ) {
+ double temp = RecordArray[Idx_AIR_TEMP + altitude]->
+ getInterpolatedValue( m_cursor_lon, m_cursor_lat, true );
+
+ if( temp != GRIB_NOTDEF ) {
+ temp = m_OverlaySettings.CalibrateValue(GribOverlaySettings::AIR_TEMPERATURE, temp);
+ m_tcTemp->SetValue( wxString::Format( _T("%5.1f "), temp ) + m_OverlaySettings.GetUnitSymbol(GribOverlaySettings::AIR_TEMPERATURE) );
+ } else
+ m_tcTemp->SetValue( _("N/A") );
+ }
+ // relative humidity
+ if( RecordArray[Idx_HUMID_RE + altitude] ) {
+ double humi = RecordArray[Idx_HUMID_RE + altitude]->
+ getInterpolatedValue( m_cursor_lon, m_cursor_lat, true );
+ if( humi != GRIB_NOTDEF ) {
+ humi = m_OverlaySettings.CalibrateValue(GribOverlaySettings::REL_HUMIDITY, humi);
+ m_tcRelHumid->SetValue( wxString::Format( _T("%5.0f "), humi ) + m_OverlaySettings.GetUnitSymbol(GribOverlaySettings::REL_HUMIDITY) );
+ } else
+ m_tcRelHumid->SetValue( _("N/A") );
+ }
Fit();
}
@@ -977,6 +1061,29 @@ void GRIBUIDialog::OnTimeline( wxScrollEvent& event )
TimelineChanged();
}
+void GRIBUIDialog::OnAltitudeChange( wxCommandEvent& event )
+{
+ double alt;
+ m_cbAltitude->GetLabel().ToDouble(&alt);
+ switch((int) alt) {
+ case 8:
+ case 225:
+ case 300: pPlugIn->GetGRIBOverlayFactory()->SetAltitude(4);break;
+ case 14:
+ case 375:
+ case 500: pPlugIn->GetGRIBOverlayFactory()->SetAltitude(3);break;
+ case 20:
+ case 525:
+ case 700: pPlugIn->GetGRIBOverlayFactory()->SetAltitude(2);break;
+ case 25:
+ case 637:
+ case 850: pPlugIn->GetGRIBOverlayFactory()->SetAltitude(1);break;
+ default: pPlugIn->GetGRIBOverlayFactory()->SetAltitude(0);break;
+ }
+ PopulateTrackingControls();
+ SetFactoryOptions(); // Reload the visibility options
+}
+
void GRIBUIDialog::OnCBAny( wxCommandEvent& event )
{
//Ovoid to have more than one overlay at a time
@@ -1138,6 +1245,11 @@ void GRIBUIDialog::ComputeBestForecastForNow()
return;
}
+ if ( !m_TimeLineHours ){ //fix a crash for one date files
+ TimelineChanged();
+ return;
+ }
+
wxDateTime now = GetNow();
if( m_OverlaySettings.m_bInterpolate && !m_pMovingGrib )
@@ -1271,8 +1383,28 @@ GRIBFile::GRIBFile( const wxString file_name, bool CumRec, bool WaveRec )
if( m_GribRecordSetArray.Item( j ).m_Reference_Time == thistime ) {
int idx = -1;
switch(pRec->getDataType()) {
- case GRB_WIND_VX: idx = Idx_WIND_VX; break;
- case GRB_WIND_VY: idx = Idx_WIND_VY; break;
+ case GRB_WIND_VX:
+ if(pRec->getLevelType() == LV_ISOBARIC){
+ switch(pRec->getLevelValue()){
+ case 300: idx = Idx_WIND_VX300;break;
+ case 500: idx = Idx_WIND_VX500;break;
+ case 700: idx = Idx_WIND_VX700;break;
+ case 850: idx = Idx_WIND_VX850;break;
+ }
+ } else
+ idx = Idx_WIND_VX;
+ break;
+ case GRB_WIND_VY:
+ if(pRec->getLevelType() == LV_ISOBARIC){
+ switch(pRec->getLevelValue()){
+ case 300: idx = Idx_WIND_VY300;break;
+ case 500: idx = Idx_WIND_VY500;break;
+ case 700: idx = Idx_WIND_VY700;break;
+ case 850: idx = Idx_WIND_VY850;break;
+ }
+ } else
+ idx = Idx_WIND_VY;
+ break;
case GRB_WIND_GUST: idx = Idx_WIND_GUST; break;
case GRB_PRESSURE: idx = Idx_PRESSURE; break;
case GRB_HTSGW: idx = Idx_HTSIGW; break;
@@ -1282,10 +1414,40 @@ GRIBFile::GRIBFile( const wxString file_name, bool CumRec, bool WaveRec )
case GRB_VOGRD: idx = Idx_SEACURRENT_VY; break;
case GRB_PRECIP_TOT: idx = Idx_PRECIP_TOT; break;
case GRB_CLOUD_TOT: idx = Idx_CLOUD_TOT; break;
- case GRB_TEMP: idx = Idx_AIR_TEMP_2M; break;
+ case GRB_TEMP:
+ if(pRec->getLevelType() == LV_ISOBARIC){
+ switch(pRec->getLevelValue()){
+ case 300: idx = idx = Idx_AIR_TEMP300;break;
+ case 500: idx = idx = Idx_AIR_TEMP500;break;
+ case 700: idx = idx = Idx_AIR_TEMP700;break;
+ case 850: idx = idx = Idx_AIR_TEMP850;break;
+ }
+ } else
+ idx = Idx_AIR_TEMP;
+ break;
case GRB_WTMP: idx = Idx_SEA_TEMP; break;
case GRB_CAPE: idx = Idx_CAPE;break;
- }
+ case GRB_HUMID_REL:
+ if(pRec->getLevelType() == LV_ISOBARIC){
+ switch(pRec->getLevelValue()){
+ case 300: idx = idx = Idx_HUMID_RE300;break;
+ case 500: idx = idx = Idx_HUMID_RE500;break;
+ case 700: idx = idx = Idx_HUMID_RE700;break;
+ case 850: idx = idx = Idx_HUMID_RE850;break;
+ }
+ }
+ break;
+ case GRB_GEOPOT_HGT:
+ if(pRec->getLevelType() == LV_ISOBARIC){
+ switch(pRec->getLevelValue()){
+ case 300: idx = idx = Idx_GEOP_HGT300;break;
+ case 500: idx = idx = Idx_GEOP_HGT500;break;
+ case 700: idx = idx = Idx_GEOP_HGT700;break;
+ case 850: idx = idx = Idx_GEOP_HGT850;break;
+ }
+ }
+ break;
+ }
if(idx != -1) {
m_GribRecordSetArray.Item( j ).m_GribRecordPtrArray[idx]= pRec;
View
3  plugins/grib_pi/src/GribUIDialog.h
@@ -111,7 +111,7 @@ class GRIBUIDialog: public GRIBUIDialogBase {
void OnPlayStop( wxCommandEvent& event );
void OnPlayStopTimer( wxTimerEvent & );
- void AddTrackingControl( wxControl *ctrl1, wxControl *ctrl2, wxControl *ctrl3, bool show );
+ void AddTrackingControl( wxControl *ctrl1, wxControl *ctrl2, wxControl *ctrl3, bool show, bool altitude = false );
void UpdateTrackingControls( void );
void OnZoomToCenterClick( wxCommandEvent& event );
@@ -124,6 +124,7 @@ class GRIBUIDialog: public GRIBUIDialogBase {
void OnTimeline( wxScrollEvent& event );
void OnCBAny( wxCommandEvent& event );
+ void OnAltitudeChange( wxCommandEvent& event );
wxDateTime MinTime();
wxString GetNewestFileInDirectory();
View
106 plugins/grib_pi/src/GribUIDialogBase.cpp
@@ -14,11 +14,10 @@ GRIBUIDialogBase::GRIBUIDialogBase( wxWindow* parent, wxWindowID id, const wxStr
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
this->SetFont( wxFont( 9, 70, 90, 90, false, wxEmptyString ) );
- wxFlexGridSizer* fgSizer1;
- fgSizer1 = new wxFlexGridSizer( 0, 1, 0, 0 );
- fgSizer1->AddGrowableRow( 1 );
- fgSizer1->SetFlexibleDirection( wxVERTICAL );
- fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
+ m_fgTrackingDisplay = new wxFlexGridSizer( 0, 1, 0, 0 );
+ m_fgTrackingDisplay->AddGrowableRow( 1 );
+ m_fgTrackingDisplay->SetFlexibleDirection( wxVERTICAL );
+ m_fgTrackingDisplay->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
wxFlexGridSizer* fgSizer51;
fgSizer51 = new wxFlexGridSizer( 1, 10, 0, 0 );
@@ -73,7 +72,7 @@ GRIBUIDialogBase::GRIBUIDialogBase( wxWindow* parent, wxWindowID id, const wxStr
fgSizer51->Add( m_bpRequest, 0, wxALL, 1 );
- fgSizer1->Add( fgSizer51, 1, wxEXPAND, 1 );
+ m_fgTrackingDisplay->Add( fgSizer51, 1, wxEXPAND, 1 );
wxStaticBoxSizer* sbSizer2;
sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("GRIB Data at Cursor") ), wxVERTICAL );
@@ -82,9 +81,22 @@ GRIBUIDialogBase::GRIBUIDialogBase( wxWindow* parent, wxWindowID id, const wxStr
m_fgTrackingControls->SetFlexibleDirection( wxBOTH );
m_fgTrackingControls->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ m_fcAltitude = new wxFlexGridSizer( 0, 2, 0, 0 );
+ m_fcAltitude->SetFlexibleDirection( wxBOTH );
+ m_fcAltitude->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ wxArrayString m_cbAltitudeChoices;
+ m_cbAltitude = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxSize( 45,-1 ), m_cbAltitudeChoices, 0 );
+ m_cbAltitude->SetSelection( 0 );
+ m_cbAltitude->SetFont( wxFont( 7, 70, 90, 90, false, wxEmptyString ) );
+
+ m_fcAltitude->Add( m_cbAltitude, 0, wxLEFT, 3 );
+
m_cbWind = new wxCheckBox( this, ID_CB_WIND, _("Wind"), wxDefaultPosition, wxDefaultSize, 0 );
- m_cbWind->SetValue(true);
- m_fgTrackingControls->Add( m_cbWind, 0, wxALL, 5 );
+ m_fcAltitude->Add( m_cbWind, 0, wxLEFT|wxTOP, 2 );
+
+
+ m_fgTrackingControls->Add( m_fcAltitude, 1, wxEXPAND, 5 );
m_tcWindSpeed = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 70,-1 ), wxTE_READONLY );
m_fgTrackingControls->Add( m_tcWindSpeed, 0, wxALL, 1 );
@@ -174,12 +186,75 @@ GRIBUIDialogBase::GRIBUIDialogBase( wxWindow* parent, wxWindowID id, const wxStr
sbSizer2->Add( m_fgTrackingControls, 1, wxEXPAND, 1 );
- fgSizer1->Add( sbSizer2, 1, wxFIXED_MINSIZE, 1 );
+ m_fgTrackingDisplay->Add( sbSizer2, 1, wxFIXED_MINSIZE, 1 );
+
+ wxFlexGridSizer* fgSizer30;
+ fgSizer30 = new wxFlexGridSizer( 0, 1, 0, 0 );
+ fgSizer30->SetFlexibleDirection( wxBOTH );
+ fgSizer30->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ wxFlexGridSizer* fgSizer31;
+ fgSizer31 = new wxFlexGridSizer( 0, 3, 0, 0 );
+ fgSizer31->SetFlexibleDirection( wxBOTH );
+ fgSizer31->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ wxStaticText* m_staticText38;
+ m_staticText38 = new wxStaticText( this, wxID_ANY, _("Grib Data at"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText38->Wrap( -1 );
+ fgSizer31->Add( m_staticText38, 0, wxLEFT|wxRIGHT, 5 );
+
+ m_stAltitudeText = new wxStaticText( this, wxID_ANY, _("0"), wxDefaultPosition, wxSize( -1,-1 ), 0 );
+ m_stAltitudeText->Wrap( -1 );
+ fgSizer31->Add( m_stAltitudeText, 0, wxLEFT|wxRIGHT, 5 );
+
+
+ fgSizer30->Add( fgSizer31, 1, wxEXPAND, 5 );
+
+ wxFlexGridSizer* fgSizer27;
+ fgSizer27 = new wxFlexGridSizer( 0, 8, 0, 0 );
+ fgSizer27->SetFlexibleDirection( wxBOTH );
+ fgSizer27->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+ wxStaticText* m_staticText35;
+ m_staticText35 = new wxStaticText( this, wxID_ANY, _("Altitude"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText35->Wrap( -1 );
+ fgSizer27->Add( m_staticText35, 0, wxALL, 5 );
+
+ m_tcAltitude = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxTE_READONLY );
+ m_tcAltitude->SetMinSize( wxSize( 70,-1 ) );
+
+ fgSizer27->Add( m_tcAltitude, 0, wxALL, 5 );
+
+ wxStaticText* m_staticText36;
+ m_staticText36 = new wxStaticText( this, wxID_ANY, _("Temperature"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText36->Wrap( -1 );
+ fgSizer27->Add( m_staticText36, 0, wxALL, 5 );
+
+ m_tcTemp = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
+ m_tcTemp->SetMinSize( wxSize( 70,-1 ) );
+
+ fgSizer27->Add( m_tcTemp, 0, wxALL, 5 );
+
+ wxStaticText* m_staticText37;
+ m_staticText37 = new wxStaticText( this, wxID_ANY, _("Rel. Humid."), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText37->Wrap( -1 );
+ fgSizer27->Add( m_staticText37, 0, wxALL, 5 );
+
+ m_tcRelHumid = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
+ m_tcRelHumid->SetMinSize( wxSize( 70,-1 ) );
+
+ fgSizer27->Add( m_tcRelHumid, 0, wxALL, 5 );
+
+
+ fgSizer30->Add( fgSizer27, 1, wxEXPAND, 5 );
+
+
+ m_fgTrackingDisplay->Add( fgSizer30, 1, wxEXPAND, 5 );
- this->SetSizer( fgSizer1 );
+ this->SetSizer( m_fgTrackingDisplay );
this->Layout();
- fgSizer1->Fit( this );
+ m_fgTrackingDisplay->Fit( this );
this->Centre( wxBOTH );
@@ -204,6 +279,7 @@ GRIBUIDialogBase::GRIBUIDialogBase( wxWindow* parent, wxWindowID id, const wxStr
m_bpOpenFile->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnOpenFile ), NULL, this );
m_bpSettings->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnSettings ), NULL, this );
m_bpRequest->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnRequest ), NULL, this );
+ m_cbAltitude->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( GRIBUIDialogBase::OnAltitudeChange ), NULL, this );
m_cbWind->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
m_cbWave->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
m_cbCurrent->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
@@ -239,6 +315,7 @@ GRIBUIDialogBase::~GRIBUIDialogBase()
m_bpOpenFile->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnOpenFile ), NULL, this );
m_bpSettings->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnSettings ), NULL, this );
m_bpRequest->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnRequest ), NULL, this );
+ m_cbAltitude->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( GRIBUIDialogBase::OnAltitudeChange ), NULL, this );
m_cbWind->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
m_cbWave->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
m_cbCurrent->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( GRIBUIDialogBase::OnCBAny ), NULL, this );
@@ -407,10 +484,9 @@ GribSettingsDialogBase::GribSettingsDialogBase( wxWindow* parent, wxWindowID id,
m_cbNumbers = new wxCheckBox( this, wxID_ANY, _("Numbers"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer15->Add( m_cbNumbers, 0, wxALL, 5 );
- wxStaticText* m_staticText8;
- m_staticText8 = new wxStaticText( this, wxID_ANY, _("Spacing"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticText8->Wrap( -1 );
- fgSizer15->Add( m_staticText8, 0, wxALL|wxEXPAND, 5 );
+ m_ctNumbers = new wxStaticText( this, wxID_ANY, _("Spacing"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_ctNumbers->Wrap( -1 );
+ fgSizer15->Add( m_ctNumbers, 0, wxALL|wxEXPAND, 5 );
m_sNumbersSpacing = new wxSpinCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), wxSP_ARROW_KEYS, 0, 100, 50 );
fgSizer15->Add( m_sNumbersSpacing, 0, wxALL|wxEXPAND, 5 );
View
13 plugins/grib_pi/src/GribUIDialogBase.h
@@ -24,12 +24,12 @@
#include <wx/combobox.h>
#include <wx/slider.h>
#include <wx/sizer.h>
+#include <wx/choice.h>
#include <wx/checkbox.h>
#include <wx/textctrl.h>
#include <wx/statbox.h>
-#include <wx/dialog.h>
#include <wx/stattext.h>
-#include <wx/choice.h>
+#include <wx/dialog.h>
#include <wx/spinctrl.h>
#include <wx/statline.h>
#include <wx/radiobox.h>
@@ -57,6 +57,7 @@ class GRIBUIDialogBase : public wxDialog
private:
protected:
+ wxFlexGridSizer* m_fgTrackingDisplay;
wxBitmapButton* m_bpPrev;
wxComboBox* m_cRecordForecast;
wxBitmapButton* m_bpNext;
@@ -67,6 +68,8 @@ class GRIBUIDialogBase : public wxDialog
wxBitmapButton* m_bpSettings;
wxBitmapButton* m_bpRequest;
wxFlexGridSizer* m_fgTrackingControls;
+ wxFlexGridSizer* m_fcAltitude;
+ wxChoice* m_cbAltitude;
wxTextCtrl* m_tcWindSpeed;
wxTextCtrl* m_tcWindDirection;
wxTextCtrl* m_tcWaveHeight;
@@ -80,6 +83,10 @@ class GRIBUIDialogBase : public wxDialog
wxTextCtrl* m_tcAirTemperature;
wxTextCtrl* m_tcSeaTemperature;
wxTextCtrl* m_tcCAPE;
+ wxStaticText* m_stAltitudeText;
+ wxTextCtrl* m_tcAltitude;
+ wxTextCtrl* m_tcTemp;
+ wxTextCtrl* m_tcRelHumid;
// Virtual event handlers, overide them in your derived class
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
@@ -94,6 +101,7 @@ class GRIBUIDialogBase : public wxDialog
virtual void OnOpenFile( wxCommandEvent& event ) { event.Skip(); }
virtual void OnSettings( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRequest( wxCommandEvent& event ) { event.Skip(); }
+ virtual void OnAltitudeChange( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCBAny( wxCommandEvent& event ) { event.Skip(); }
@@ -144,6 +152,7 @@ class GribSettingsDialogBase : public wxDialog
wxStaticText* m_tOverlayColors;
wxChoice* m_cOverlayColors;
wxCheckBox* m_cbNumbers;
+ wxStaticText* m_ctNumbers;
wxSpinCtrl* m_sNumbersSpacing;
wxStaticLine* m_staticline1;
wxStaticLine* m_staticline2;
Please sign in to comment.
Something went wrong with that request. Please try again.