> On 14 Sep 2009, at 16:54, Torsten Dreyer wrote: > > But I can provide a fix for a potential division by zero bug: Some > > stations > > don't have a range configured and bomb here: > > double range_exceed_norm = loc_dist/effective_range_m; > > Thanks Torsten, I fixed this slightly differently, but a good catch. I > wonder if I should also warn about such navids at startup, so we can > get the nav.dat entries fixed?
You should include 0.0 to avoid div by zero: if (nominalRange <= 0.0) { nominalRange = FG_NAV_DEFAULT_RANGE; } I dont't think it's worth a warning, nothing bad happens if we substitute zero with the default range. A range of zero might be defined as "unknown" or "undefined". How do you think about enabling/disabling certain features of the navradio by property-settings, like "enable-sidelobes"? Torsten ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel