Changeset 13869
- Timestamp:
- 05/24/12 14:46:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/tngweather.cc
r13866 r13869 32 32 { 33 33 DimWeather() { memset(this, 0, sizeof(DimWeather)); } 34 35 uint16_t fStatus;36 34 37 35 float fTemp10M; … … 174 172 w.fWindDirection = stof(obj); 175 173 if (id=="windSpeed") 176 w.fWindSpeed = stof(obj) ;174 w.fWindSpeed = stof(obj)*3.6; 177 175 if (id=="hum") 178 176 w.fHumidity = stof(obj); … … 355 353 { 356 354 private: 357 358 355 DimDescribedService fDimWeather; 356 DimDescribedService fDimAtmosphere; 357 358 double dust; 359 359 360 360 virtual void UpdateWeather(const Time &t, const DimWeather &data) … … 362 362 fDimWeather.setData(&data, sizeof(DimWeather)); 363 363 fDimWeather.Update(t); 364 365 if (dust==data.fDustTotal) 366 return; 367 368 fDimAtmosphere.setData(&data.fDustTotal, sizeof(float)); 369 fDimAtmosphere.Update(t); 370 371 dust = data.fDustTotal; 364 372 } 365 373 … … 367 375 ConnectionDimWeather(ba::io_service& ioservice, MessageImp &imp) : 368 376 ConnectionWeather(ioservice, imp), 369 fDimWeather("TNG_WEATHER/DATA", "S:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1", 370 "|stat:Status" 377 fDimWeather("TNG_WEATHER/DATA", "F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1;F:1", 371 378 "|T_10M[deg C]:Temperature 10m above ground" 372 379 "|T_5M[deg C]:Temperature 5m above ground" … … 376 383 "|H[%]:Humidity" 377 384 "|P[mbar]:Air pressure" 378 "|v[ m/s]:Wind speed"385 "|v[km/h]:Wind speed" 379 386 "|d[deg]:Wind direction (N-E)" 380 387 "|DeltaM1" 381 388 "|Dust[ug/m^3]:Dust (total)" 382 "|Seeing[W/m^2]:Seeing") 389 "|Seeing[W/m^2]:Seeing"), 390 fDimAtmosphere("TNG_WEATHER/DUST", "F:1", 391 "|Dust[ug/m^3]:Dust (total)"), 392 dust(-1) 383 393 { 384 394 } … … 532 542 ("url,u", var<string>("/weather/rss/"), "File name and path to load") 533 543 ("quiet,q", po_bool(true), "Disable printing contents of all received messages (except dynamic data) in clear text.") 534 ("interval,i", var<uint16_t>( 120), "Interval between two updates on the server in seconds")544 ("interval,i", var<uint16_t>(300), "Interval between two updates on the server in seconds") 535 545 ("debug-tx", po_bool(), "Enable debugging of ethernet transmission.") 536 546 ;
Note:
See TracChangeset
for help on using the changeset viewer.