Fix for genapts --chunk

"Dale E. Edmons" <[email protected]> Thu, 30 Dec 2004 04:04:01 -0800
Newsgroups gmane.games.flightgear.terragear.devel
Message-ID <[email protected]>
Hi all,

While trying to add the --chunk option for genapt I found a but.  It 
doesn't look serious but it did keep me from implementing the option.  
The following is a cvs diff for the --chunk and the bug.  I'd appreciate 
it if someone could check it and, if it is correct, commit it.

I can send the entire file too, if that would be easier.


Dale

Index: src/Airports/GenAirports/main.cxx
===================================================================
RCS file: 
/var/cvs/TerraGear-0.0/TerraGear/src/Airports/GenAirports/main.cxx,v
retrieving revision 1.36
diff -r1.36 main.cxx
121a122
 >     bool airport_in_range = true;
294,296c295,297
<                     rwy = token[3];
<                     lat = atof( token[1].c_str() );
<                     lon = atof( token[2].c_str() );
---
 >                     rwy = rwy_token[3];
 >                     lat = atof( rwy_token[1].c_str() );
 >                     lon = atof( rwy_token[2].c_str() );
304c305,312
<                     if ( ready_to_go ) {
---
 >                   if(  (min_lat <= lat && lat <= max_lat)
 >                     && (min_lon <= lon && lon <= max_lon) ) {
 >                       airport_in_range = true;
 >                   } else {
 >                       airport_in_range = false;
 >                   }
 >
 >                     if ( ready_to_go && airport_in_range ) {
334c342
<                             exit(-1);
---
 >                             //exit(-1);
339c347,350
<                     }
---
 >                     } else {
 >                             SG_LOG( SG_GENERAL, SG_INFO,
 >                                     "range: skipping airport = " << id );
 >                   }
402c413,420
<         if ( ready_to_go ) {
---
 >       if(   (min_lat <= lat && lat <= max_lat)
 >          && (min_lon <= lon && lon <= max_lon) ) {
 >               airport_in_range = true;
 >       } else {
 >               airport_in_range = false;
 >       }
 >
 >         if ( ready_to_go && airport_in_range ) {
(END)

_______________________________________________
Terragear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/terragear-devel
2f585eeea02e2c79d7b1d8c4963bae2d