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.
Takes special values "FLOLS" and "abeam" to set up
aligned for final approach or at the 180 for the carrier flight
deck. Or alternatively a catapult or parking position.
This fixes an error where the ‘serviceable’ property is tie()-ed twice.
The actual AP components don’t use bind (and aren’t created until init(),
so this only affects the serviceable property.
Only consider actual taxi nodes, not parking positions, as potential
hold-short locations, when doing an MP runway-start relocation. This
avoids some odd behaviours for groundnets which only define
parking positions and nothing else.
Support for --carrier-abeam option, which places the aircraft
at the end of a downwind opposite the FLOLS.
Add launcher support for above.
Add carrier display for launcher showing position relative to
carrier.
Previously YASim set /controls/gear/gear-down during startup
depending on whether the aircraft was on the ground or in the air.
As YASim initialization takes place after the overlay is applied,
this over-rode any setting from the overlay.
This change adds a property which can be used by an overlay to
ensure that its /controls/gear/gear-down configuration is not
over-ridden.
Reinstate lod/rough and lod/bare and therefore fix the use of range animations that implement hardwired LOD.
Initially I was reluctant to do this - but after a lot more research I'm no longer convinced that range animations cause a huge performance hit and so we can keep this fix until either the scenery is fixed or the situation becomes clear.
Ideally this fix should be reviewed prior to the next LTS release; or maybe after the next LTS release - but in future reviewed it must be
making the build between Simgear and Flightgear consistent.
- Fix an issue with lib/lib64 path between CentOS/RedHat distributions
and Debian derived distributions.
- Fix a compilation issue with HLA in the Flightgear code.
The base (non-FlightGear) implementation of YASim ground getBody
would always call itself. Fortunately we always replace it with the
FG-specific subclass (FGGround).
Aircraft rah-66 has a bug where it sets root node to type BOOL, which breaks
ViewPropertyEvaluator::getDoubleValue's handling of default values - the string
value of the node is no longer an empty string so we ended up returning 0.0 or
1.0 instead of default_.
The fix is to special-case BOOL. Have also special-cased handling of the root
node, as this is a fairly important part of how ViewPropertyEvaluator works.
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.
Previous implementation wasn’t correct, use a better one now. In the
case of a non-clean exit we will leave a stale .pid file in FG_HOME,
but we clear stale files on the next launch.
We only look at config/eye-lon-deg-path etc if eye-fixed is true. This tag
should be set to true for all views where the eye position is fixed - e.g. all
Tower views plus Fly-By view in fgdata:defaults.xml.
This allows b26 turret views to work without requiring modifications to the
aircraft (which would break usage with older releases of fgfs).
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)
Replace the default io.stat with one which uses our validator, and
uses SGPath to call _wstat on Windows. This does mean we return less
information in the stat() result, but it seems nothing actually uses
the result apart from checking if the file exists.
Mark images loaded from splash with origin of splash to prevent use of DDS texture cache and therefore fix distortion by preventing rescale to power of two
Still not complete, but now we set the command line args to be UTF-8 on
Windows, we can strip out more of the ‘local 8-bit’ places (which
screw up, generally).
When loading -set.xml, we load into temporary 'set' node,
then copy across only set/sim/view[]/config/* values into
/ai/models/multiplayer[]/set/sim/view[]/config/.
This ensures that we have just the information required for multiplayer views,
and avoids problems where some properties in /ai/models/multiplayer[]/ were
being archived to autosave_*.xml and loaded in later flightgear sessions.
Calling fgSetXY/fgGetXY takes to long (especially when calling the often needed properties a few times per second in main loop).
Switching to pointers for these nodes, initialized within service-class constructor.
- Fix Leg ownership to avoid segfaults when deleting them via Nasal
- Modify FP save/load code so restrictions and holds are correctly
saved and restored
Extend the tests to cover these cases.
Some AMD drivers do not like triangles for point sprites, which
breaks directional lights. This works around this by allowing
users to set /rendering/triangle-directional-lights=false which
falls back to the non-directional implementation of a point.
This is only for a MSVC build - sets the runtime path for the exe run in
the following 'add_custom_target( ... run fgrcc ...)' ...
modified: src/EmbeddedResources/CMakeLists.txt
Refactor to break circular references.
New custom target generates the resource files.
FGFS and Test_Suite targets declare a dependency to the generated files.
Nodes might be uninitialized when a channel is initailly disabled. To work around that issue, the initialization of the output nodes is forced at creation.
- Electric engines RPM is now exported in UDP sockets.
- The sign of the XZ inertia has been fixed in the property inertia/ixz-slug_ft2 (was just an output error, the correct XZ inertia was used internally). Thanks to Nikolai Verner Christensen for reporting the bug.
- The parameter <ignitionn2> was wrongly affected to N1. Bug reported by Nikolai Verner Christensen and fixed by Jonathan Redpath. Thanks to them.
This prevents the changing of the logstream priority as set by the test suite
permanently to "alert" during the execution of tests. Setting a default value
of SG_ALERT is not required as this is the simgear logstream default anyway.
We set /environment/metar/description to human-readable description of metar,
for use by fgdata's weather dialogue, using simgear FGMetar's new description()
method.
Use a new SGPropertyNode flag, LISTENER_SAFE, to white-list properties
where we do correctly fire listeners, and test this flag when listening
from Nasal, to avoid the warning.
One test so far, attempting to reproduce a bug I see with the 737.
Note these tests are skipped unless you have procedures available
and set a magic env var to find them.
Ensure changes from Nasal are picked up by delegates (such as GPS) when
they are made. Add a route-manager test which sets and exits a hold
using Nasal.
As part of this, update the test API to make it easy to run Nasal from
a test.
The GPS/RNAV system can now fly holds, both left and right-handed.
The correct entry is selected, and hold count can be selected.
Also there's lots of lovely test cases.
Avoid screwing up the derived / trend data when we are repositioned;
detect instantaneous position changes and don’t update the trend
data in this case.
GPS now lets the delegate handle the sequencing behaviour, by
setting a new config property. The default GPS delegate (in Nasal)
now sets this property.
This requires a corresponding FGData update.
- set wp[1] properties immediately (don’t require an update cycle)
- direct-to course-error is correct when init-ing the Direct-To; it
was previously wrong when beginning the DTO, due to invalid course
between identical SGGeods.
FlowRegime to wing definitions). (Daniel)
//amended according to James hints: change initializer to float constants, fix indention issues, add Math::polynomial and use it in Surface. (Henning)
The existence of the property that is used for <table> independent vars is now checked during execution rather than when the XML definition is parsed. This relaxes the order in which filters, table and more generally flight controls need to be declared in the XML definition files.
E.g. fgaddon/Aircraft/Icaro_MRX13/Icaro_Laminar_13_MRX-set.xml sets
/sim/current-view/view-number to 9.
It seems that recent View changes broke this, but this fix is in unchanged
code.
Prior to the recent multiplayer view changes, /sim/current-view/?-offset-m
contained the current view's offsets from /sim/view[]/config/?-offset-m. The
multiplayer view changes modified things to set /sim/current-view/?-offset-m
to zeros, and instead use /sim/view[]/config/?-offset-m. This was so
that multiplayer views could be implemented simply by prefixing with
/ai/models/multiplayer[]/set/ to get the right offsets.
We still added in /sim/current-view/?-offset-m, but these were usually zero.
However some aircraft write to /sim/current-view/?-offset-m, and assume that
values must include the /sim/view[]/config/?-offset-m. E.g. the spaceshuttle
does this in order to simulate SRB shaking. This results in the offset being
included twice, which breaks things.
So this commit restores the original handling of /sim/current-view/?-offset-m
by doing an additional subtraction of /sim/view[]/config/?-offset-m. It also
avoids resetting /sim/current-view/?-offset-m to zeros when the view changes.
This results in views working for user aircraft, user aircraft that do custom
view handling, and multiplayer aircraft.
- [Backward compatibility breakage] Gyros are now measuring rotation rates instead of rotational accelerations. Gyros that measure rotational accelerations do not exist in the real world.
- Output properties of flight control elements are no longer tied. This saves a lot of spurious warning messages and allows direct references of the same properties among several flight controls.
- Water vapor in the atmosphere is now managed through its mass fraction rather than its partial pressure. The former being the physical quantity that is conserved when pressure and temperature vary.
- Check that there are at least 3 contacts before trying to trim on ground.
- ECEF to ECI frame conversion has been moved from FGLocation to FGPropagate and FGInitialConditions since not all FGLocation need to manage that.
- Gravity computations have been moved to FGInertial because it is where all the constants to compute gravity are stored. This reduces the amount of data transmitted between FGInertial and FGAccelerations.
- Added optional transmission of the simulation time for FG UDP interface
- Code cleanup and use more C++11 idioms (override, constexpr, range-based for loop, etc.)
We now keep the aircraft in view when zooming, sacrificing the view of the
ground. I.e. we move the bottom of the view upwards, while keeping the top of
the view unchanged.
Recent changes to ViewPropertyEvaluator mean that
ViewPropertyEvaluator::getDoubleValue() doesn't handle default values very
well, so we were ending up with chase-distance of zero, not the default -25,
leading to over-zooming.
Un-caching of scenery appears to happen fairly often, and means that we fail
to find height of ground under aircraft, so we now go back to the last found
value instead of using zero.
This allows Tower View etc to use nearest tower when vewing remote multiplayer
aircraft.
Also force an update of nearest airport whenever multiplayer view changes, to
reduce delay before Tower View works.
SGVec3d's default constructor leaves the fields uninitialised, which seems to
sometimes break fg with lots of NaN-related diagnostics.
The fix is to use SGVec3d::zeros() instead.
Also call resetOffsetsAndFOV() from the View::View() constructor, to ensure
that things are set up consistently.
View 8 used to be new Tower View AGL view, but this interfered with hard-coded
aircraft view numbers. So fgdata now has removed Model View, meaning Tower
View AGL uses Model View's old number (7), which keeps sequential view numbers
unchanged.
src/MultiPlayer/multiplaymgr.cxx
src/MultiPlayer/multiplaymgr.hxx
removed starts_with() and ends_with() - already provided in simgear::.
removed output() fn for SGPropertyNode, as unused.
added makeStringPropertyNameSafe().
FGMultiplayMgr::addMultiplayer(): use std::find_if() to find model file.
added FGMultiplayMgr::subsystemName().
src/Viewer/view.cxx
src/Viewer/view.hxx
removed getDoubleValue() as not required.
moved agl code into new View::handleAGL() fn.
renamed View::Damping::setGet() => View::Damping::updateTarget().
Currently this works for all the default views except for Tower Look From (for
which it doesn't really make sense) and Fly-by View.
We now search for and load a -set.xml that matches the model .xml,
when new multiplayer aircraft is set up. This allows us to find view
offsets etc, e.g. allowing cockpit and helicopter views to work with
multiplayer aircraft. Properties from the -set.xml are placed into
/ai/models/multiplayer[]/set, so for example viewing offsets are in
/ai/models/multiplayer[]/set/sim/view[]/config/target-{x,y,z}-offset-m. We also
copy the aircraft's chase-distance into the view config params, similar to how
fgdata:defaults.xml does for the user's aircraft. And we also fill in views'
missing offsets from the Helicopter View config; e.g. this enables the new
Tower View AGL to show aircraft correctly centred, despite aircraft currently
not having this view defined in their -set.xml. [We don't currently attempt to
cache or reuse -set.xml data.]
Have ensured that view position responds to mouse movement in the same way for
viewing the user's aircraft as for multiplayer aircraft (previously, Model View
reversed the affect of vertical mouse movements).
Added new Tower AGL view. Behaves similarly to Tower view, but automatically
scales and pans vertically in order to always show the vertical range
extending from just above the aircraft down to the ground immediately below
the aircraft. We use aircrafts chase-distance as an indication of size. We
damp the ground level value to reduce the viewing jumping around too much
e.g. if the aircraft flies over buildings. The amount of damping is set by
fgdata:defaults.xml's lookat-agl-damping value.
Fixed problem where Tower View eye position moves slightly as target
aircraft heading changes. This was caused by us unnecessarily applying the
aircraft-centre correction to the eye position.
src/FDM/flight.cxx: also make /orientation/true-heading-deg. This allows
local orientation to be used like multiplayer orientation, which only
has /ai/models/multiplayer[]/orientation/true-heading-deg. [A better fix
might be to replace all occurrencies of /orientation/true-heading-deg with
/orientation/heading-deg, but this would be a rather large commit.]
Details:
src/Viewer/view.*: removed View::updateData() as is no longer required.
src/MultiPlayer/multiplaymgr.cxx: use helicopter view target offsets as
defaults. E.g. in tower view agl, aircraft won't currently be defining these
offsets. More generally, this allows aircraft to define target offsets only in
helicoter view.
src/FDM/flight.cxx
FGMultiplayMgr::FillMsgHdr(): Added tie of /orientation/true-heading-deg to
get_Psi_deg, so it duplictes the existing /orientation/heading-deg.
src/MultiPlayer/multiplaymgr.cxx
src/MultiPlayer/multiplaymgr.hxx
FGMultiplayMgr::addMultiplayer(): look for and load -set.xml that matches
the model. Patch various view-related things up in similar way to what we
do for the user's aircraft, so that multiplayer views work.
Made FGMultiplayMgr::getMultiplayer() public, so it can be used by
src/Viewer/view.cxx.
src/Viewer/view.cxx
src/Viewer/view.hxx
View::View(): Added lookat_agl, lookat_agl_damping params for new Tower
View AGL. Preserve user's field-of-view in separate variable so that Tower
View AGL can modify the actual field of view independently.
Added view_index param so that we can find multiplayer view[]/config/
properties.
getViewOffsets(): new fn that finds view offsets for user aircraft or
multiplayer aircraft.
View::recalcLookFrom() View::recalcLookAt: Lots of changes to allow things
to work with multiplayer aircraft. View::recalcLookAt() can now do Tower
View AGL.
View::Damping: support for damping, used by Tower View AGL. Might be good
to use this for other damping.
View::updateData(): removed, as calculations are now all done inside
View::recalc*().
put properties {x,y,z}-offset-m into new View::_adjust_offset_m member
instead of _offset_m. This avoids confusion between a view's offsets and
the offsets added in by the user via the 'Adjust View Position' dialogue.
src/Viewer/viewmgr.cxx
FGViewMgr::init(): pass view number to
flightgear::View::createFromProperties().
The _name, get_name(), and set_name() variables and functions have been removed.
The Component::get_name() function is now handled by Subsystem::subsystemId(),
and Component::set_name() replaced by SGSubsystem::set_name(). The
Component::_name variable is replaced by SGSubsystem::_subsystemId.
This is a clean up commit prior to the subsystem API standardisation to simplify
the diffs. It includes all SGSubsystem and SGSubsystemGroup derived classes.
Revert this change - I will re-add the unit-tests again, but we need
a different approach for 8.3 stations, than what I did here.
This reverts commit 91cc83abb5.
In 8.3 mode, ensure that 25 and 75Khz channels can be tuned using the
abbreviated syntax (eg 118.02 for 118.025).
As part of this, add test coverage of the CommRadio for basic and 8.3-
mode operation.
Deal with some cases in STAR -> approach routing better:
- when the IAF is the initial wpt of the approach primary sequence,
just accept this instead of warning. This is common in some XML
files from Navigraph, for example EDDF
- don’t duplicate the IAF into the wpts returned by Approach::route
- when add-noise is false, mute noise completely
- if the CommRadio is not powered by the generic electrical system,
work by default (as was previously the case)
Using Emesary Global Transmitter the following events are notified
* Frame Begin
* Frame End
* Mainloop started
* Mainloop stopped
This integrates with the background threaded Nasal Garbage collection (simgear:nasal/cppbind/NasalEmesaryInterface.hxx) and is also controlled by the properties as follows
* /sim/nasal-gc-threaded (true) - use background threaded GC
* /sim/nasal-gc-threaded-wait (false) - at the start of the frame wait for the previous GC thread to complete.
I initially thought that the wait at the start of the frame would be necessary; however in 100 or so hours of flight without the await for completion at the start of frame no threading problems (or any other problems) were shown; so nasal-gc-threaded-wait is defaulted to false which gives a slight boost in performance.
So what this does is to it removes the GC pause of 10-20ms every 4 seconds (test using the F-15). This change doesn't really give much extra performance per frame because normally GC is only performed when needed.
Neither Torsten nor I can recall why we continued to hard-code this,
so make it dynamic for now. When we remember why we hard-code it,
we can add a BigComment from future-James to future-future-James about
why not to do this again :)
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"
Based on the dew point temperature supplied by FG, JSBSim updates the atmosphere density and computes all the usual parameters (RH, vapor pressure, saturated vapor pressure, etc.)
The mass fraction of water per unit of air mass is capped according to the record high from ISA 1976 standard atmosphere. As a consequence, at very high altitudes, air is always extremely dry (approx. 30 ppm i.e. 30 parts per million) whatever the conditions at sea level.
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.
Since PLIBjs uses joyGetDevCaps()[1] on Windows and this function
accepts joystick ids from 0 to 15 (-1 being special), setting
MAX_JOYSTICKS to 16 ensures that FGJoystickInput::init() can scan all
joysticks that joyGetDevCaps() is able to report about.
[1] https://docs.microsoft.com/en-us/previous-versions/dd757105(v%3Dvs.85)
JSBSim was not checking the tag names inside <test> and <condition> statements and this has led to abusive use of tags unsupported by JSBSim such as <and> and <or>. The problem is that JSBSim was not interpreting the <or> statement as the user meant it: JSBSim interpreted it as <test logic="AND"> while the user obviously meant <test logic="OR">. As a result JSBSim silently swallowed the tag and gave results which were not was the user expected without any obvious indication about what was going wrong.
As a result, this commit implements stricter syntax checking and rejects illegal tags within <test> and <condition> statements.
This commit also introduces stricter checking on XML elements which allow either a real value or a property name to be used. JSBSim now rejects the statements where the property name is specified inside a <property> statement. For example, the follwoing statement is rejected:
<clipto>
<min> <property> /fdm/jsbsim/some/property </property> </min>
...
The correct syntax being
<clipto>
<min> /fdm/jsbsim/some/property </min>
Base class handles some common instrument features, such as the
serviceable node and electrical supply. The electrical supply node
and minimum voltage to operate can now be set in the configuration
via <power-supply>/path/to/output/volts</> and <minimum-supply-volts>
On this code path, AppKit uses exit, rather than letting main run as
normal. We handle most things via C++ destructors, which do run, but
Qt is happier if we clean it up explicitly.
- Fixed the scripts end time computation
- Fixed nested tests in switches
- Simplifications to the computation of the aerodynamics angles alpha & beta
- Account for the contact transition in the gear compression speed
- Fixed docs in FGTank
- simgear::strutils::readNonNegativeInt<unsigned int>() is better than
std::stoul() at detecting and reporting erroneous input (for one, it
checks that the given string *represents* an integer that fits in the
specified type, as opposed to just "starts with digits").
- The format version is now an unsigned int (just because it's largely
enough and simgear::strutils::readNonNegativeInt<unsigned long, 10>()
isn't instantiated for now).
- The format version is now printed to the log (it was already for
apt.dat files, but not for nav.dat files).
Instead of doing an illegal memory access (to fields[0]), properly
report the problem when the line that is supposed to contain the format
version of a nav.dat file is empty.
- PTT will now use whatever channel is selected; non zero simply means PTT active.
- The volume as set in the comm[]/radio will now be used as a factor on the FGComm volume
PTT now uses an int channel number (0 means not pressed, 1 = comm radio 1 (index [0]),etc...)
/comm-radio-selected is the default comm channel to use. This should usually be the same as will be set by PTT into /controls/radios/comm-ptt
However PTT will switch the FG comm inbound and outbound frequency to whichever radio was PTT'd.
New properties also set in multi-player to indicate the transmission frequency and normalised power (currently just set to 1.0)
13001(int) : sim/multiplay/comm-transmit-frequency-hz
13002(short-norm) : sim/multiplay/comm-transmit-power-norm
- New system component linear_actuator from Adriano Bassignana.
- Bug fix of Euler angles computations in FGMatrix33 (a pure westward heading of 270 deg was erroneously converted to a pure eastward heading of 90 deg). This could make the aircraft trimming fail when spawning with a heading of 270 deg.
Problem seen with Nasal setChildren/setValues where names were not
being passed down the stack. Identified as over-zealous IF_DEF
to remove unused variable compiler which meant snprintf was not being called
for non debug builds (see c177aeb623)
Fix is to change assert() calls to an naRuntime error, which ensures
that the len variable is always used and is
more appropriate as buffer overrun could occur in any release build if
someone tried to set a name of >1024 characters.
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.
This will use the inherently unsafe versions of the load methods which can result in deleting an object (from the cache) that has just been loaded in the database thread.
Symptom OSG WARN deleting still referenced object.
branches next, origin/next
Format fgfs-YYYYMMDDHHMMSS[-#] where the # is for the rare case when there are multiple screenshots per second.
The change makes the filenames sortable based on date and slightly improves run time performance when there are a lot of screenshots in a particular directory
Adjust the special NavCache function used for airport search, to
allow filtering by type (which is exposed in an upcoming patch to the
dialog code).
Patch by Daniel Wickstrom