Updated for revised SGMetar API
This commit is contained in:
parent
c92d1c01a7
commit
c136b31791
3 changed files with 7 additions and 6 deletions
|
@ -151,11 +151,11 @@ FGMetar::FGMetar(const string& icao) :
|
|||
|
||||
_time = sgTimeGetGMT(_year - 1900, _month - 1, _day, _hour, _minute, 0);
|
||||
|
||||
SG_LOG(SG_ENVIRONMENT, SG_INFO, _data);
|
||||
SG_LOG(SG_ENVIRONMENT, SG_DEBUG, "FGMetar:" << getRawDataPtr());
|
||||
if (_x_proxy)
|
||||
SG_LOG(SG_ENVIRONMENT, SG_INFO, "METAR from proxy");
|
||||
SG_LOG(SG_ENVIRONMENT, SG_DEBUG, "METAR from proxy");
|
||||
else
|
||||
SG_LOG(SG_ENVIRONMENT, SG_INFO, "METAR from tgftp.nws.noaa.gov");
|
||||
SG_LOG(SG_ENVIRONMENT, SG_DEBUG, "METAR from tgftp.nws.noaa.gov");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ static const double thickness_value[] = { 0, 65, 600, 750, 1000 };
|
|||
const char* MetarProperties::get_metar() const
|
||||
{
|
||||
if (!_metar) return "";
|
||||
return _metar->getData();
|
||||
return _metar->getRawDataPtr();
|
||||
}
|
||||
|
||||
void MetarProperties::set_metar( const char * metarString )
|
||||
|
|
|
@ -128,8 +128,9 @@ void LiveMetarProperties::handleMetarData( const std::string & data )
|
|||
try {
|
||||
m = new FGMetar(data.c_str());
|
||||
}
|
||||
catch( sg_io_exception &) {
|
||||
SG_LOG( SG_ENVIRONMENT, SG_WARN, "Can't parse metar: " << data );
|
||||
catch( sg_io_exception &e) {
|
||||
SG_LOG( SG_ENVIRONMENT, SG_WARN, "Can't parse metar: " << data <<
|
||||
" (" << e.getFormattedMessage() << ")");
|
||||
|
||||
// ensure we only report one METAR parse failure per session
|
||||
if (!haveReportedMETARFailure) {
|
||||
|
|
Loading…
Add table
Reference in a new issue