- loadFixes() becomes FixesLoader::loadFixes();
- the previous 'cache' variable (NavDataCache *) is now a private member
of FixesLoader, named '_cache'.
- Line numbering was incorrect, because "in >> lat >> lon >> ident;"
happily skipped over blank lines without increasing the line number.
- Safe stream input handling: first, std::getline() tries to read data,
then we check whether that was successful (via the input stream's
bool() method, implicitly called in the 'for' loop's exit check), and
only if this is the case, we process the data that was read. The main
problem with the previous code is that checking the stream's eofbit
can't possibly predict whether a _future_ read will be successful---it
may fail due to an I/O error, at least.
- Currently, the code uses atof() to parse the latitude and longitude
fields. This should be fast, though not good at detecting errors in
the input; however, this is not worse than the previous code which
didn't handle such cases at all.
- Correctly deal with input lines containing a number of fields
different from 3 (except for the header and the special '99' line):
log a warning, ignore the line and continue. This adresses the problem
described in
<https://sourceforge.net/p/flightgear/mailman/flightgear-devel/thread/87shydeen1.fsf%40frougon.crabdance.com/#msg35034274>.
In short, the previous code entered an endless loop trying to process
31.815914 -106.281897 EL PA
from recent earth_fix.dat
(obtained from <http://gateway.x-plane.com/navaids/LatestNavFix.zip>).
Remove uses of .str(), .c_str() and some other methods of SGPath.
Pass SGPath directly where possible, or explicitly convert to the
appropriate 8-bit encoding.
The old Mac launcher doesn’t work on Yosemite, add a tiny
Qt-based launcher inside the main process (no need to fork /
exec) which runs before the OSG window is created.
Will be merged for 3.4, hopefully with no impact on other
platforms.
- better point along path computation
- fix path distance for turns
- detect and skip duplicated waypoints
(and provision to skip based upon impossible turn
geometry soon)
Unfortunately we can’t drop loaded ones, since the in-memory structures don’t have ref-counting, and we don’t
know what AI plans may be referencing them.