Reject invalid frequencies from apt.dat in the loader, and fix
25Khz encoding to be the exact value (i.e round frequencies ending
in 20 and 70 to 25 and 75)
Fix ATCdialog to show 3 digits of comm radio frequency at all times,
and remove its rounding-conversion.
Finally, expand the tests to capture the new behaviour. Test for
EPLL is disabled for now because it contains an invalid frequency.
Remove use of BUILDING_TESTSUITE from headers. Where possible, move
test APIs to their own file in the test_suite dir (testApis.cxx). For
some others, add them to a special list of ‘sources which depend on
the build mode’. This will hopefully go away with some further
refactoring.
Fix a bug where we would copy-assign a PropertyObject, when we
actually wanted to copy the value.
Thanks to Sascha Reißner for tracking the problem down.
It was supposed to be in ft/min, but everything except AIAircraft was
using it as ft/sec. Change the name to AIBase::vs_fps and ensure the
same unit is used everywhere.
Disable GPS::finalLegCourseTest, and one of the View index tests,
so that tests pass successfully.
Also add some default properties so the skeleton traffic tests start
up without crashing.
When in LEG mode, and within the intercept cone, but further away from
the leg waypoint than the leg origin, we were computing a bogus
abeam point and hence a bogus desired track.
Detect this situation, and invert the computed along-track-distance,
so the computed abeam point is actually near where we are, and not ahead
of us.
- exclude POIs and some other types from the ident match, to avoid
confusing results
- improve how the search vicinity is computed when inserting a leg,
which is the common case for a route with a destination set. Use
the midpoint of the leg ending at the insert position, as the optimal
search vicinity
- move the waypointFromString code into route.cxx, since it is mostly
independent of a FlightPlan instance
- extend the tests to cover the bug which flagged these issues
Ticket-Id: https://sourceforge.net/p/flightgear/codetickets/2372/
Overview:
Previously Flightgear always used a single osgViewer::Viewer(), which
inherits from both osgViewer::ViewerBase and osgViewer::View, giving a
single view window.
If CompositeViewer is enabled, we instead use a osgViewer::CompositeViewer
which contains a list of osgViewer::View's. Each of these View's can have
its own eye position, so we can have multiple different views of the same
scene.
Enable at runtime with: --composite-viewer=1
Changes to allow use of osgViewer::CompositeViewer:
Previously FGRenderer had this method:
osgViewer::Viewer* getViewer();
This has been replaced by these two new methods:
osgViewer::ViewerBase* getViewerBase();
osgViewer::View* getView();
If CompositeViewer is not enabled (the default), the actual runtime state
is unchanged, and getViewerBase() and getView() both return a pointer to
the singleton osgViewer::Viewer() object.
If CompositeViewer is enabled, getViewerBase() returns a pointer to a
singleton osgViewer::CompositeViewer object, and getView() returns a
pointer to the first osgViewer::View in the osgViewer::CompositeViewer's
list.
The other significant change to FGRenderer() is the new method:
osg::FrameStamp* getFrameStamp()
If CompositeViewer is not enabled, this simply returns
getView()->getFrameStamp(). If CompositeViewer is enabled it returns
getViewerBase()->getFrameStamp(). It is important that code that previously
called getView()->getFrameStamp() is changed to use the new method, because
when CompositeViewer is enabled individual osgViewer::View's appear to
return an osg::FrameStamp with zero frame number).
All code that uses FGRenderer has been patched up to use the new methods so
that things work as before regardless of whether CompositeViewer is enabled
or not.
We make FGRenderer::update() call SviewUpdate() which updates any extra
views.
Extra view windows:
If CompositeViewer is enabled, one can create top-level extra view windows
by calling SviewCreate(). See src/Viewer/sview.hxx for details.
Each extra view window has its own simgear::compositor::Compositor
instance.
Currently SviewCreate() can create extra view windows that clone the
current view, or view from one point to another (e.g. from one multiplayer
aircraft to the user's aircradt) or keep two aircraft in view, one at a
fixed distance in the foreground.
SviewCreate() can be called from nasal via new nasal commands "view-clone",
"view-last-pair", "view-last-pair-double" and "view-push". Associated
changes to fgdata gives access to these via the View menu. The "view-push"
command tags the current view for later use by "view-last-pair" and
"view-last-pair-double".
Extra view windows created by SviewCreate() use a new view system called
Sview, which allows views to be constructed at runtime instead of being
hard-coded in *-set.xml files. This is work in progress and views aren't
all fully implemented. For example Pilot view gets things slightly wrong
with large roll values, Tower View AGL is not implemented, and we don't
implement damping. See top of src/Viewer/sview.cxx for an overview.
OpenSceneGraph-3.4 issues:
OSG-3.4's event handling seems to be incorrect with CompositeViewer -
events get sent for the wrong window which causes issues with resize and
closing. It doesn't seem to be possible to work around this, so closing
extra view windows can end up closing the main window for example.
OSG-3.6 seems to fix the problems.
We warn if CompositeViewer is enabled and OpenSceneGraph is 3.4.
When starting at an airport, but not at parking or a runway, create
an empty AIFlightPlan, and ensure the AIManager code doesn’t choke on
empty FPs.
Add a unit-test which simulates the C172 tutorial reposition logic,
which is a little gnarly.
Capture the current behaviour of Increment/DecrementWaypoint in
AI flightplans, prior to making some simplifications. Especially try
to test the behaviour of the ‘increment and erase’ logic.
Handle the standard windows-3rd-party setup (used by fgmeta) with no
extra options, and also handle the slightly odd setup we use on Jenkins.
Try to tolerate all permutations of setting MSVC_3RDPARTY_ROOT to
different places in the hierarchy.
We no longer try to guess Boost_INCLUDEDIR by looking at parent dirs of
MSVC_3RDPARTY_ROOT, since this seemed kind of bad to me. Let’s try
it and see.
This enables options such as '-u AeroElementTests,YASimAtmosphereTests'. It
should help tracking down bugs whereby a test failure or error is triggered
solely due to a previous test.
Both the route-path cade and the RNAV code were using some bad logic
to compute the intersection point. All fixed now, but requires a
new helper in Simgear.
Avoid encoding test-data as strings, since this exceeds MSVC limits
on string literals, and tests don’t need to be relocatable anyway,
so we can just hard-code the source location into config.h