them under /sim/presets/ but they aren't save there, and as fgInitPosition
and its subroutines overwrite them, we lose the information about what the
user really wanted. This is a temporary solution -- it really belongs into
options.cxx.
the next airport or airport with METAR station, but about any type of
airport
- as a side effect this change makes it also 30 to 50% faster :-)
In the long run this linear search shall be replaced with a spatial
algorithm (like octree), which will be a much bigger performance gain.
- preserve information from apt.dat about whether an airport is a "normal"
airport, a seaport, or a heliport. Do it without wasting another byte
in the FGAirport structure (saves 50kB of memory). Yes, I know bitfields. :-)
Turn OPENSCENEGRAPH_MAJOR_VERSION, OPENSCENEGRAPH_MINOR_VERSION and
OPENSCENEGRAPH_PATCH_VERSION into a single number for comparisons in the
preprocessor.
the runway length/width/surface material, so that fgfs doesn't drop one on
the ridiculous grass stripe parallel to the grown up concrete runway
(LOWL, LOXZ, ...). The weighting factors are for now made configurable,
so that they are easier to adjust. This can later be made static.
(will soon get forward ported to fg/osg)
Usage: airportinfo("KSFO");
airportinfo(37, 122); # airport closest to lat/lon
airportinfo(); # airport closest to current position
Returns nil on error, or a data hash otherwise. Example:
# length of runway 28R
var len = airportinfo("KSFO").runways["10L"].length;
Note that only one side of a runway is returned.
This fixes a bug that caused both the x and y values of the mouse to
be reset when the cursor was recentered due to hitting the screen
edge.
Based on a suggested patch from Stuart Buchanan
Anders said:
With Stuart's help I've looked closer at this and I think I've tracked
down the cause of the problem:
At least on my computer the sort() call on line 234 in
Environment/environment_ctrl.cxx sorts the vector entries by memory
address instead of altitude, i.e. the custom comparison predicate is not
used. This causes the tables of environment conditions to be reordered
into a wrong order at some weather updates, depending, basically,
on where the memory allocator places the objects. (Btw. why are they are
freshly allocated for each update?)