On Thu, Jan 28, 2010 at 9:20 AM, Ron Jensen <w...@jentronics.com> wrote:

> On Thu, 2010-01-28 at 09:24 +0000, James Turner wrote:
> > On 28 Jan 2010, at 03:45, Ron Jensen wrote:
> >
> > > Here is a nasal function to determine if a frequency is a localizer.
>  It
> > > accepts a frequency in megahertz and returns "1" if the frequency is an
> > > ILS frequency.
> > >
> > >
> > > var isILS=func(freq) {
> > >  if(freq < 108.10) return 0;
> > >  if(freq > 111.95) return 0;
> > >  var bar=int((freq+0.001)*10)-int(freq)*10;
> > >  return(bits.test(bar,0));
> > > }
> >
> > A general observation - it'd be much better to request C++
> > properties / native-nasal functions that implement such logic, rather
> > than coding it up in Nasal (in each aircraft / instrument).
>
> Actually, I disagree with this statement, and it represents a
> fundamental shift in attitude from the way I've seen flightgear's
> development progressing over the past year or two.
>
> - Hard-coding every instrument in C++ instead of nasal means only
> developers following/building the latest cvs head code get to use
> whatever until the next release cycle.
>
> - Hard coding every instrument/flight control in C++ means my WW-II
> storch (et.al.) is stuck with an autobrake functionality it doesn't have
> nor need.
>
> - The pool of people with commit rights to C++ code is very, very small.
>

I think it boils down to the fact that we have two approaches that can
accomplish the same thing.  The C/C++ approach offers high performance but
there is a dependence on when the C/C++ code was added to FlightGear.  The
Nasal approach offers fast prototyping, flexibility, and more (but not
complete) independence from the C/C++ code.

This means that for any particular case, there may be plenty to discuss and
debate, and there may not be one single general purpose approach that works
for everyone.

Regards,

Curt.
-- 
Curtis Olson: http://baron.flightgear.org/~curt/
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to