ATISEncoder: remove always true condition
This commit is contained in:
parent
17fde93fb2
commit
3e096fed41
1 changed files with 29 additions and 25 deletions
|
@ -416,7 +416,7 @@ string ATISEncoder::getTakeoffRunway( SGPropertyNode_ptr p )
|
||||||
return getLandingRunway( p );
|
return getLandingRunway( p );
|
||||||
}
|
}
|
||||||
|
|
||||||
string ATISEncoder::getTransitionLevel( SGPropertyNode_ptr )
|
string ATISEncoder::getTransitionLevel(SGPropertyNode_ptr)
|
||||||
{
|
{
|
||||||
double hPa = _atis->getQnh();
|
double hPa = _atis->getQnh();
|
||||||
|
|
||||||
|
@ -431,9 +431,9 @@ string ATISEncoder::getTransitionLevel( SGPropertyNode_ptr )
|
||||||
int tl;
|
int tl;
|
||||||
if (hPa <= 978) {
|
if (hPa <= 978) {
|
||||||
tl = 80;
|
tl = 80;
|
||||||
} else if( hPa > 978 && hPa <= 1013 ) {
|
} else if (hPa <= 1013) {
|
||||||
tl = 70;
|
tl = 70;
|
||||||
} else if( hPa > 1013 && hPa <= 1046 ) {
|
} else if (hPa <= 1046) {
|
||||||
tl = 60;
|
tl = 60;
|
||||||
} else {
|
} else {
|
||||||
tl = 50;
|
tl = 50;
|
||||||
|
@ -444,7 +444,7 @@ string ATISEncoder::getTransitionLevel( SGPropertyNode_ptr )
|
||||||
int e = int(airport->getElevation() / 1000.0);
|
int e = int(airport->getElevation() / 1000.0);
|
||||||
if (e >= 3) {
|
if (e >= 3) {
|
||||||
// TL steps in 10(00)ft
|
// TL steps in 10(00)ft
|
||||||
tl += (e-2)*10;
|
tl += (e - 2) * 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
return getSpokenNumber(tl);
|
return getSpokenNumber(tl);
|
||||||
|
@ -525,10 +525,12 @@ string ATISEncoder::getClouds( SGPropertyNode_ptr )
|
||||||
|
|
||||||
ATISInformationProvider::CloudEntries cloudEntries = _atis->getClouds();
|
ATISInformationProvider::CloudEntries cloudEntries = _atis->getClouds();
|
||||||
|
|
||||||
for( ATISInformationProvider::CloudEntries::iterator it = cloudEntries.begin(); it != cloudEntries.end(); it++ ) {
|
for (ATISInformationProvider::CloudEntries::iterator it = cloudEntries.begin(); it != cloudEntries.end(); ++it) {
|
||||||
if( !reply.empty() ) reply.SPACE;
|
if (!reply.empty())
|
||||||
|
reply.SPACE;
|
||||||
reply.append( it->second ).SPACE.append( getSpokenAltitude(it->first).SPACE.append( FEET ) );
|
reply.append( it->second ).SPACE.append( getSpokenAltitude(it->first).SPACE.append( FEET ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return reply;
|
return reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -538,10 +540,12 @@ string ATISEncoder::getCloudsBrief( SGPropertyNode_ptr )
|
||||||
|
|
||||||
ATISInformationProvider::CloudEntries cloudEntries = _atis->getClouds();
|
ATISInformationProvider::CloudEntries cloudEntries = _atis->getClouds();
|
||||||
|
|
||||||
for( ATISInformationProvider::CloudEntries::iterator it = cloudEntries.begin(); it != cloudEntries.end(); it++ ) {
|
for (ATISInformationProvider::CloudEntries::iterator it = cloudEntries.begin(); it != cloudEntries.end(); ++it) {
|
||||||
if( !reply.empty() ) reply.append(",").SPACE;
|
if (!reply.empty())
|
||||||
|
reply.append(",").SPACE;
|
||||||
reply.append( it->second ).SPACE.append( getSpokenAltitude(it->first) );
|
reply.append( it->second ).SPACE.append( getSpokenAltitude(it->first) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return reply;
|
return reply;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue