Try to catch NaN SGGeod position before we pass them to the intersect
visitor, so we don’t fill the console/logs with error messages: we
catch NaNs in other places.
Previously we always used the default download dir, and ignored any
user override of this. Use the active download dir as the base for
the cache dir.
Also write the cache dir to the property tree, and wipe it on a
clean uninstall.
GUIDs aren’t stable across different builds of the cache, which causes
odd behaviour when switching between stable and next. Use idents and
lat-lon instead, since these should be stable.
Avoid a per-update() lookup of the AI controls properties. As part
of this, bypass updatePrimaryTargetValues for the user aircraft,
where it doesn’t make sense.
We previously ignored mp packets if their .time was very different from local
time, but this stops time-compensation (e.g. with simple-time) from working and
is unnecessary because we clean up old packets anyway.
Also removed unnecessary erase of mp packets after interpolation.
When we fail to find the request aircraft, ensure we log the paths
to Sentry. If the user didn’t supply any aircraft paths at all, or
was using a hangar aircraft, adjust the error dialog text, to make
it a bit clearer what is going wrong.
Otherwise a SGSharedPtr is implicitly created on ai_list.push_back(model). It's not clear to the caller that FGAIManager takes care of the passed raw pointer.
Also fixes a bug for swift using the passed dangling pointer after the created SGSharedPtr of FGAIManager got out of scope and deleted the resource.
As this commit mainly addresses the swift crash (also for backport to LTS) it doesn't fix other calls to ::attach(..) which might also use the raw pointer afterwards.
Use a transient index for the poly-lines. This avoids NavCache disk
contention when multiple copies of FG race after the rebuild completes.
Should reduce locking errors early in startup.
Some propellers could start windmilling very easily under mild wind conditions (11 kts). And in stronger wind the propeller could even generate some power and torque strong enough to turn the aircraft upside down.
This was due to the combination of:
- Propellers generating power (wind turbine) for advance ratio higher than 1.0 (is it plausible !?!)
- Powers and torques computed with ludicrously small RPMs.
So this commit basically filters out extremely small RPMs in order to avoid huge numbers resulting from division by small values.
Some spacecraft send out-of-range engine numbers from the JSBsim side.
Should probably be fixed in JSBsim itself but let’s check here to
keep compat with existing FDMs.