All the YASim fixes I've recently made will now only apply to "YASIM_VERSION_32" and later. "YASIM_VERSION_32" will be the state of YASim in the pending FlightGear 3.2 release. The older version of YASim preceding all these fixes is "YASIM_VERSION_ORIGINAL". The most recent version of YASim will always be "YASIM_VERSION_CURRENT".
If a YASim aircraft does not specify a version, its version is assumed to be "YASIM_VERSION_ORIGINAL", so it will be unaffected by the fixes and any subsequent YASim changes. This will prevent fixes and changes to YASim from breaking old aircraft that lack a maintainer, and it could also be used with any aircraft for which the changes don't work for some reason.
To specify a YASim aircraft's version, you add the version attribute to its <airplane> section. For example:
<airplane mass="1344" version="YASIM_VERSION_CURRENT">
for an aircraft which will always track all changes to YASim.
If a YASim aircraft does not specify the most recent YASim version, an alert-level log message will be printed during startup.
Here is Torsten's commit, which describes the change as follows:
- Code: Select all
YASim: implement a versioning system
user attribute "version" of the airplane element of the YASim config file to define the version this config uses.
Example:
<airplane mass="1344" version="YASIM_VERSION_CURRENT">
Initially, the following can be used:
YASIM_VERSION_ORIGINAL - The original version of YASim as implemented up to FlightGear 3.0.0
YASIM_VERSION_32 - The version of YASim implemented in FlightGear 3.2.x (and the development version 3.1.x)
YASIM_VERSION_CURRENT - The current and latest version of YASim.