This adds the names of the available parking positions/catapults
to the property tree, so we can build a suitable in-sim list
of parking positions for users to select from.
Allow selecting carriers from scenarios, and starting at either a
parking position, or a distance offset from the FLOLS (effectively
a crude ‘on-final’)
Extend the —carrier startup option to accept a runway ident of FLOLS,
in conjunction with the existing —offset-distance argument.
Requires corresponding SimGear change. With this last round, we work
with FGData on non-Latin1 path on Windows. (Final fixes are for
Nasal io.readfile, which needed io.stat to work, and SGSky allowing
correct SGPath use)
This is a clean up commit prior to the subsystem API standardisation to simplify
the diffs. It includes all SGSubsystem and SGSubsystemGroup derived classes.
Due to e43fe82094 models in AI scenarios were
being searched down the AI/Aircraft and Aircraft paths, where in fact
they are by default a full path from FGDATA.
This fixes the problem by setting DATA_ONLY as the search order.
Other search orders can be set in the scenario file by setting
the search-order tag to "DATA_ONLY", "PREFER_AI", "PREFER_DATA"
Fix for https://sourceforge.net/p/flightgear/codetickets/2125/
Previously, selecting a non-pushback parking position from the l
auncher that did not have a ground network resulted in the
aircraft being placed in the center of the airport.
This resolves the problem by creating a default segment simply
moving forward 2m.
Assuming this should have been ‘vertical-mode’ all along, since the
corresponding other mode property is called ‘lateral-mode’. Make an
alias to the old name to keep existing scripts working.
Enhancements suggested by Nikolai Verner-Christensen - support loading
scenarios from {FG_HOME}/Scenarios, {aircraft-dir}/Scenarios and
{add-on}/Scenarios.
Additionally, allow passing the path to a scenario file to
—ai-scenario, eg —ai-scenario=/home/jmt/FGFS/my-test-scenario.xml
When a scenario defines a carrier, and —carrier is used to request a
carrier start, we now auto-load the corresponding scenario, to give
a nicer user experience.
The problem was using FLT_MAX, FLT_MAX to disable a model; this tricked OSG into thinking that FLT_MAX was a valid range and therefore didn't do the update traversal (found by Stuart).
The correct technique to disable a model is to set the min/max range to 0,0
Also generally improved the way that the ranges are managed.
If a model is marked as <usage>interior</usage> there were a number of problems.
1 - the LOD setting AI/MP interior used the distance from the aircraft; this obviously doesn't quite work for when using the model view.
2 - with the way that models are now loaded as two LOD levels only the interior from the first model loaded (usually the lowest detail) would be considered or processed because the model loader had marked itself as already run (which it had, but not for the model that was actually just loaded.
(2) above could also be the cause of other things not working because the nasal model loaded would not be called, nor would the sound path be setup. There could be other things that aren't working properly because the assumption is that there is just one model.
The fix for (1) is to use the standard OSG PagedLOD and let it handle the details, so I've changed the interior to use this and removed the distane from ownship checks.
The fix for (2) is to use a map to decide if the model that has just finished loading has already been processed, and if not then proceed as normal.
Change the single model case to always set the range on the only model rather than the constant modelHighDetail. This is a regressions caused by the change from 0 to modelHighDetail and the reordering the list. When there is only one model the setRange must always refer to model range index 0.
- This could have caused models to not display correctly.
Rework the LOD ranges.
1. The scenery ranges are now deltas (avoids overlapping values)
2. The AI/MP pixel mode now has a default radius that is 20 for Aircraft, 200 for ships, 350 for carriers. This is a simple constant in a virtual function.
3. Added the ability to set the AI/MP ranges equal which means use the low detail model.
4. Changed high detail only to be indicated by a -ve number in maxRangeDetail
5. Re-ordered the range list to go from lowest detail at [0] to highest detail at the end. This is because OSG always loads the models starting from zero on the assumption that the detail increases with the index.
This fixes the pixel mode, which previously would use the radius of the parent which would be confusingly large, and unrelated to the actual size of the model. With the simple defaults that we have the pixel values set in the ranges won't exactly match the rendered size of the model on screen, but it will be a lot closer and more importantly meaningful.