On Sat, 2009-11-14 at 12:36 -0600, Curtis Olson wrote: > On Sat, Nov 14, 2009 at 11:53 AM, Ron Jensen wrote: > It would be a trivial patch to genapts to always generate > leading zeros, > > however it appears that all US General Aviation airports don't > use the > leading zero, US Military bases are mixed, and Europe uses > leading > zeros. Looking thru apt.dat it appears all runway numbers > have the > leading zero so we can't use that data to algorithmically > determine the > format to use... So here's the patch to always generate > leading zeros, > but should it be applied everywhere? > > diff --git a/src/Airports/GenAirports/rwy_common.cxx > b/src/Airports/GenAirports/rwy_common.cxx > index c5aef04..17a2ff5 100644 > --- a/src/Airports/GenAirports/rwy_common.cxx > +++ b/src/Airports/GenAirports/rwy_common.cxx > @@ -52,7 +52,8 @@ void gen_number_block( const TGRunway& > rwy_info, > if ( num == 11 ) { > sprintf( tex1, "11" ); > } else if ( num < 10 ) { > - sprintf( tex1, "%dc", num ); > + sprintf( tex1, "%dl", 0 ); > + sprintf( tex2, "%dr", num ); > } else { > sprintf( tex1, "%dl", num / 10 ); > sprintf( tex2, "%dr", num - (num / 10 * 10)); > > > > > I suppose we could use some heuristic such as: > > 4 character airport code that do not start with "K" or "P" use a > leading zero, and all other airports omit the leading zero? We could > setup the code logic to be extensible if we find other countries that > also tend to omit the leading zero. That doesn't give us individual > control over individual runways, but it might make things generally > better than they are now? > > > Curt.
I commented on the other European-ization thread (about precision marking differences) that perhaps genapts should take a flag for European or US style rendering? Ron ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel