_lat = lat;
_alt = alt;
- lon *= SGD_DEGREES_TO_RADIANS;
- lat *= SGD_DEGREES_TO_RADIANS;
- alt *= SG_FEET_TO_METER;
- _time.update( lon, lat, 0, 0 );
+ SGGeod location(SGGeod::fromDegFt(lon, lat, alt));
+ _time.update( location, 0, 0 );
update( lon, lat, alt, _time.getJD() );
}
}
_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);
_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);
}