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 );
|
||||
}
|
||||
|
||||
string ATISEncoder::getTransitionLevel( SGPropertyNode_ptr )
|
||||
string ATISEncoder::getTransitionLevel(SGPropertyNode_ptr)
|
||||
{
|
||||
double hPa = _atis->getQnh();
|
||||
|
||||
|
@ -431,9 +431,9 @@ string ATISEncoder::getTransitionLevel( SGPropertyNode_ptr )
|
|||
int tl;
|
||||
if (hPa <= 978) {
|
||||
tl = 80;
|
||||
} else if( hPa > 978 && hPa <= 1013 ) {
|
||||
} else if (hPa <= 1013) {
|
||||
tl = 70;
|
||||
} else if( hPa > 1013 && hPa <= 1046 ) {
|
||||
} else if (hPa <= 1046) {
|
||||
tl = 60;
|
||||
} else {
|
||||
tl = 50;
|
||||
|
@ -444,7 +444,7 @@ string ATISEncoder::getTransitionLevel( SGPropertyNode_ptr )
|
|||
int e = int(airport->getElevation() / 1000.0);
|
||||
if (e >= 3) {
|
||||
// TL steps in 10(00)ft
|
||||
tl += (e-2)*10;
|
||||
tl += (e - 2) * 10;
|
||||
}
|
||||
|
||||
return getSpokenNumber(tl);
|
||||
|
@ -525,10 +525,12 @@ string ATISEncoder::getClouds( SGPropertyNode_ptr )
|
|||
|
||||
ATISInformationProvider::CloudEntries cloudEntries = _atis->getClouds();
|
||||
|
||||
for( ATISInformationProvider::CloudEntries::iterator it = cloudEntries.begin(); it != cloudEntries.end(); it++ ) {
|
||||
if( !reply.empty() ) reply.SPACE;
|
||||
for (ATISInformationProvider::CloudEntries::iterator it = cloudEntries.begin(); it != cloudEntries.end(); ++it) {
|
||||
if (!reply.empty())
|
||||
reply.SPACE;
|
||||
reply.append( it->second ).SPACE.append( getSpokenAltitude(it->first).SPACE.append( FEET ) );
|
||||
}
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
|
@ -538,10 +540,12 @@ string ATISEncoder::getCloudsBrief( SGPropertyNode_ptr )
|
|||
|
||||
ATISInformationProvider::CloudEntries cloudEntries = _atis->getClouds();
|
||||
|
||||
for( ATISInformationProvider::CloudEntries::iterator it = cloudEntries.begin(); it != cloudEntries.end(); it++ ) {
|
||||
if( !reply.empty() ) reply.append(",").SPACE;
|
||||
for (ATISInformationProvider::CloudEntries::iterator it = cloudEntries.begin(); it != cloudEntries.end(); ++it) {
|
||||
if (!reply.empty())
|
||||
reply.append(",").SPACE;
|
||||
reply.append( it->second ).SPACE.append( getSpokenAltitude(it->first) );
|
||||
}
|
||||
|
||||
return reply;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue