// calculation of magnetic variation is expensive. Cache the position
// and perform this calculation only if it has changed
if( _lon != lon || _lat != lat || _alt != alt ) {
- SG_LOG(SG_ALL, SG_DEBUG, "Recalculating magvar for lon=" << lon << ", lat=" << lat << ", alt=" << alt );
+ SG_LOG(SG_ENVIRONMENT, SG_DEBUG, "Recalculating magvar for lon=" << lon << ", lat=" << lat << ", alt=" << alt );
_lon = lon;
_lat = lat;
_alt = alt;
_magneticVariation(new MagneticVariation())
{
// Hack to avoid static initialization order problems on OSX
- if( coverage_string.size() == 0 ) {
+ if( coverage_string.empty() ) {
coverage_string.push_back(SGCloudLayer::SG_CLOUD_CLEAR_STRING);
coverage_string.push_back(SGCloudLayer::SG_CLOUD_FEW_STRING);
coverage_string.push_back(SGCloudLayer::SG_CLOUD_SCATTERED_STRING);
m = new FGMetar( _metar );
}
catch( sg_io_exception ) {
- SG_LOG( SG_GENERAL, SG_WARN, "Can't parse metar: " << _metar );
+ SG_LOG( SG_ENVIRONMENT, SG_WARN, "Can't parse metar: " << _metar );
_metarValidNode->setBoolValue(false);
return;
}
_decoded.clear();
const vector<string> weather = m->getWeather();
- for( vector<string>::const_iterator it = weather.begin(); it != weather.end(); it++ ) {
+ for( vector<string>::const_iterator it = weather.begin(); it != weather.end(); ++it ) {
if( false == _decoded.empty() ) _decoded.append(", ");
_decoded.append(*it);
}
}
}
- vector<SGMetarCloud> cv = m->getClouds();
- vector<SGMetarCloud>::const_iterator cloud, cloud_end = cv.end();
-
{
static const char * LAYER = "layer";
SGPropertyNode_ptr cloudsNode = _rootNode->getNode("clouds", true );