FACT++  1.0
void FactGui::handleMagicWeather ( const DimData d)
inlineprivate

Definition at line 2422 of file FactGui.h.

References i, and DimData::ptr().

Referenced by infoHandler().

2423  {
2424  if (!CheckSize(d, 7*sizeof(float)+sizeof(uint16_t)))
2425  return;
2426 
2427  const float *ptr = d.ptr<float>(2);
2428 
2429  fMagicTemp->setValue(ptr[0]);
2430  fMagicDew->setValue(ptr[1]);
2431  fMagicHum->setValue(ptr[2]);
2432  fMagicPressure->setValue(ptr[3]);
2433  fMagicWind->setValue(ptr[4]);
2434  fMagicGusts->setValue(ptr[5]);
2435 
2436  static const char *dir[] =
2437  {
2438  "N", "NNE", "NE", "ENE",
2439  "E", "ESE", "SE", "SSE",
2440  "S", "SSW", "SW", "WSW",
2441  "W", "WNW", "NW", "NNW"
2442  };
2443 
2444  const uint16_t i = uint16_t(floor(fmod(ptr[6]+11.25, 360)/22.5));
2445  fMagicWindDir->setText(dir[i%16]);
2446  }
int i
Definition: db_dim_client.c:21
bool CheckSize(const DimData &d, size_t sz, bool print=true) const
Definition: FactGui.h:639
const T * ptr(uint32_t offset=0) const
Definition: DimData.h:32

+ Here is the call graph for this function:

+ Here is the caller graph for this function: