AI models have rudimentary collision detection with submodels that performs two tests.
1. The height difference must be less than a defined amount
2. The centre point range must be less than a defined amount.
(2) above by itself would result in a spherical comparison; however (1) effectively modifies this to slice off the top and bottom of the sphere so that the sphere heigh is half of the value in (1).
Previously these heights and lengths were hardcoded - this change allows these to be defined in the xml instead using the <collision-length> and <collision-height> tags
e.g.
<entry>
<type>ship</type>
<collision-length type="double">50</collision-length>
<collision-height type="double">50</collision-height>
</entry>
Default values:
+---------------+-------------+------------+
| Type | Height(m) | Length(m) |
+---------------+-------------+------------+
| Null | 0 | 0 |
| Aircraft | 50 | 100 |
| Ship | 100 | 200 |
| Carrier | 250 | 750 |
| Ballistic | 0 | 0 |
| Rocket | 100 | 50 |
| Storm | 0 | 0 |
| Thermal | 0 | 0 |
| Static | 50 | 200 |
| Wingman | 50 | 100 |
| GroundVehicle | 20 | 40 |
| Escort | 100 | 200 |
| Multiplayer | 50 | 100 |
+---------------+-------------+------------+
* Parking with point beyond parking so aircraft don't stop early
* Better approach routes (wait pattern)
* Extracting vector math from AIFlightplan
* More use of SGPositioned in ATC
Ensure that lag/lag-mod-averaged is created and set to a valid value (0) prior to calling the base class init method as otherwise the MPList will have a nil reference.
This needs to be done prior to the base class ::init() because that method sets the model-added property which will trigger the lisetener.
Create lag/foo properties used by the Pilot-list UI in bind(). This avoids
a race condition where motion info was not yet updated, but Nasal tries
to retrieve the lag properties and errors out.
virtual dtor
initialize members before the ctor
config.h is not used
YawTo() is unused
assertSpeed() is unused
initializeFlightPlan() is unused
getTimeString() is unused
get/set is old school
default dtor
YawTo() seems to be unused
ensure all members are initialized
_path and _elevation_m were hiding parent members
config.h is not used
TODO: string compare not via strcmp()
TODO: remove magic number
This is by Lars Toenning <dev@ltoenning.de>, Roman Ludwicki <romek21@op.pl> and
SDeAstis <salvatore.deastis@gmail.com>, in 2021 Hackathon.
Also cope with removal of SGPropertyNode::getName() - use getNameString()
instead.
src/AIModel/AICarrier.cxx
Avoid warning about unused angle_tdp variable.
src/AIModel/AIFlightPlanCreate.cxx
Increased a buffer size that was giving warning with snprintf(). Also
always use sizeof(buffer) instead of duplicating the explicit size.
src/AIModel/AIFlightPlan.cxx:
Clarify expression with extra round brackets.
src/AIModel/AIFlightPlanCreate.cxx:
Increased buffer size to match longest possible string.
src/FDM/JSBSim/input_output/FGOutputFG.cpp:
Use cast to avoid comparison of int with enum.
* Relax runway exit route requirement to 80°
* Ensure parking is only reset if airport for AI aircraft has changed
* Heading Error signed and arrival lead distance