Changeset 2235
- Timestamp:
- 07/19/11 12:52:35 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/asdm2ASAP/ASDMReader.cc
r2229 r2235 1240 1240 float &windaz ) 1241 1241 { 1242 casa::String funcName = "getWeatherInfo" ; 1243 1242 1244 temperature = 0.0 ; 1243 1245 pressure = 0.0 ; … … 1264 1266 unsigned int nrow = wrows->size() ; 1265 1267 //logsink_->postLocally( LogMessage("There are "+String::toString(nrow)+" rows for given context: stationId "+String::toString(weatherStationId_),LogOrigin(className_,funcName,WHERE)) ) ; 1266 ArrayTime startTime = tint.getStart() ;1268 ArrayTime startTime = getMidTime( tint ) ; 1267 1269 if ( startTime < (*wrows)[0]->getTimeInterval().getStart() ) { 1268 1270 temperature = (*wrows)[0]->getTemperature().get() ; 1269 pressure = (*wrows)[0]->getPressure().get() ; 1271 pressure = (*wrows)[0]->getPressure().get() ; 1270 1272 humidity = (*wrows)[0]->getRelHumidity().get() ; 1271 1273 windspeed = (*wrows)[0]->getWindSpeed().get() ; 1272 1274 windaz = (*wrows)[0]->getWindDirection().get() ; 1273 1275 } 1274 else if ( startTime > (*wrows)[nrow-1]->getTimeInterval().getStart() ) {1276 else if ( startTime > getEndTime( (*wrows)[nrow-1]->getTimeInterval() ) ) { 1275 1277 temperature = (*wrows)[nrow-1]->getTemperature().get() ; 1276 1278 pressure = (*wrows)[nrow-1]->getPressure().get() ; … … 1282 1284 for ( unsigned int irow = 1 ; irow < wrows->size() ; irow++ ) { 1283 1285 wrow = (*wrows)[irow-1] ; 1284 if ( startTime < (*wrows)[irow]->getTimeInterval().getStart() ) { 1286 ArrayTime tStart = wrow->getTimeInterval().getStart() ; 1287 ArrayTime tEnd = (*wrows)[irow]->getTimeInterval().getStart() ; 1288 if ( startTime >= tStart && startTime <= tEnd ) { 1285 1289 temperature = wrow->getTemperature().get() ; 1286 1290 pressure = wrow->getPressure().get() ; … … 1292 1296 } 1293 1297 } 1298 1299 // Pa -> hPa 1300 pressure /= 100.0 ; 1294 1301 1295 1302 return ;
Note:
See TracChangeset
for help on using the changeset viewer.