1
0
Fork 0
Commit graph

15725 commits

Author SHA1 Message Date
James Turner
12f18b325b Avoid crash on tests with no TZ set 2021-07-21 10:58:27 +01:00
James Turner
80816a205b Fixes to duplicate AI waypoint detection 2021-07-21 10:58:08 +01:00
James Turner
2915c5978f GroundNetwork: improve ATC performance
Use an unordered-map to avoid a linear scan of all segments when
blocking segments during update()
2021-07-14 15:05:27 +01:00
portree_kid
8c7ff0a486 GA Test 2021-07-13 10:52:30 +01:00
portree_kid
07cf4e93bf Logging & Pushbackspeed negative start speed 2021-07-13 10:52:30 +01:00
portree_kid
61ced0e86f Change filewriting to simgear 2021-07-13 10:52:30 +01:00
portree_kid
f4bc2913c1 Flightplan Test 2021-07-13 10:52:30 +01:00
James Turner
a3c9f3163e Traffic tests: use shared pointers and new APIs 2021-07-13 10:49:06 +01:00
James Turner
6ab1fdbe0f Fixes for Keith’s tests 2021-07-13 10:49:06 +01:00
portree_kid
45ac50d2b7 Time moving 2021-07-13 10:49:06 +01:00
portree_kid
3db8351928 Better Logging for bad groundnet 2021-07-13 10:49:06 +01:00
portree_kid
80e553f05c Departure gate test 2021-07-13 10:49:06 +01:00
portree_kid
bd96c767d5 Logging for createPushBack, FlightPlan
createPushBack Logging
2021-07-13 10:49:06 +01:00
portree_kid
986d061004 Move view moving to end of loop 2021-07-13 10:49:06 +01:00
portree_kid
8fdc03981c Better Turnprediction 2021-07-13 10:41:30 +01:00
portree_kid
54de08a3b6 Fix #2576 Added findWithHeading 2021-07-13 10:41:30 +01:00
portree_kid
3d3ff623cd Add dump() method to AIAircaft 2021-07-13 10:41:30 +01:00
portree_kid
cb3f8056ff Test AI shuttle flight 2021-07-13 10:41:30 +01:00
portree_kid
47ca5c251f Schedflight logging 2021-07-13 10:41:30 +01:00
portree_kid
3318e09441 Test for TrafficMgr 2021-07-13 10:29:04 +01:00
portree_kid
9121e8bcef Test Complete Flight 2021-07-13 10:29:04 +01:00
portree_kid
7c1bd07ed6 New KML Logging 2021-07-13 10:29:04 +01:00
portree_kid
40579bbc67 FIXME Comment 2021-07-13 10:29:03 +01:00
portree_kid
5489a3bfd7 Basic Airport tests 2021-07-13 10:29:03 +01:00
portree_kid
bef7af0bc0 testPushforwardSpeedy 2021-07-13 10:29:03 +01:00
PortreeKid
19b910775e Runway Tests 2021-07-13 10:29:03 +01:00
portree_kid
620dd9ee48 YSCB AI parking test 2021-07-12 16:21:19 +01:00
portree_kid
dccea87cea AI Test Windchange 2021-07-12 16:21:19 +01:00
portree_kid
fcb7cf86c6 Errormessage for Sched time parse error 2021-07-12 16:21:19 +01:00
portree_kid
8493e0bbd2 Testdata for loading of AI Aircraft 2021-07-12 16:21:19 +01:00
portree_kid
9b4cb56cc9 Set Simtime correctly 2021-07-12 16:21:19 +01:00
portree_kid
84258c79a0 Flightplan Test draft 2021-07-12 16:21:09 +01:00
portree_kid
03574442c0 AI Tests 2021-07-12 16:19:44 +01:00
portree_kid
9dd5c0e055 Moved AI FlightPlan Tests to seperate test class 2021-07-12 16:19:44 +01:00
portree_kid
d96602fc90 Tests for groundnet.cxx 2021-07-12 16:19:44 +01:00
portree_kid
fb5848896e ALERT and not SIGSEGV when no local scenery 2021-07-12 16:19:44 +01:00
James Turner
009d86e7a6 Sentry: only report METAR parse failures once per session. 2021-06-26 16:25:33 +01:00
James Turner
8e90e4657f Sentry: add ‘updateTag’ helper to modify tags
Use this to fix reported tags in a few erroneous places.
2021-06-26 16:25:14 +01:00
Julian Smith
c872af41bf Allow AI carrier to be always tied exactly to MP carrier.
Also fixed uneven MP carrier motion.

If /ai/models/carrier[]/ai-latch is true (e.g. by MPCarrier.nas), we
set /position/* and /orientation/* in C++ every frame instead of in
nasal. For external multiplayer carriers the values are copied from
/ai/models/multiplayer[]/*, so the AI carrier follows the corresponding MP
carrier exactly. For this to be useful, multiplayer motion needs be smooth,
e.g. with /sim/time/simple-time/enabled=true.

scripts/python/recordreplay.py
    Added --carrier test - checks that multiplayer carrier moves with even
    speed.

src/AIModel/AIBase.hxx
    Added speed_fps, to be kept up to date and tied to velocities/uBody-fps
    when we are a carrier. Previously this was set from Nasal which doesn't
    do what is required when all updates happen in C++.

src/AIModel/AICarrier.cxx
src/AIModel/AICarrier.hxx
    If is-user-craft is true, we directly update /position/* every frame.

    If ai-latch is true, we don't call TurnToLaunch(), TurnToRecover(),
    ReturnToBox(), TurnToBase() etc, because our position and orientation is
    determined only by multiplayer packets.

src/AIModel/AIMultiplayer.cxx
src/AIModel/AIMultiplayer.hxx
    If an mp craft is a carrier, MP packets define velocities/speed-kts but
    set ecLinearVel to all-zeros. So we now copy across to ensure that the
    extrapolation algorithm has a velocity to work with. Previously the zero
    velocity caused very uneven motion.

    If ai-latch is true we set AI craft's position+velocities directly from
    the equivalent (extrapolated or interpolated) MP position, every frame. We
    also set AI craft's orientation. And we copy MP's uBody-fps to AI's
    velocities/speed-kts which ensures that friction works between carrier deck
    and aircraft undercarriage.

    Added logging of raw speeds implied by multiplayer packets, activated by
    /sim/log-multiplayer-callsign; used by scripts/python/recordreplay.py's
    --carrier test.

src/AIModel/AIShip.cxx
    Tie velocities/uBody-fps to new speed_fps member and set speed_fps in
    update() along with members that are tied to properties.

    Replaced code that calculated new position using heading and speed:

        Previously the new position after dt was calculated using
        ft_per_deg_lat, ft_per_deg_lon, speed_north_deg_sec and
        speed_east_deg_sec. But this was moving slightly faster than the
        specified speed.

        This was leading to incremental errors when a different Flightgear
        instance extrapolated the multiplayer position from the information in
        multiplayer packets, because the specified velocity was too small, so
        we jumped forwards when extrapolation moved to a new packet.

        The fix is to use a Quaternion-based calculation to calculate movement
        in the direction specified by (heading, pitch, roll), as done by other
        code such as the view code.

src/Main/fg_init.cxx
    Moved FGAIManager to just before FGMultiplayMgr so we send latest info in
    mp packets.

src/MultiPlayer/multiplaymgr.cxx
    Fixed minimum transmit rate calculation - if transmit rate is less than 1,
    default to 1, not 10.

src/Network/props.cxx
    Use more precision when sending double-precision values e.g. to telnet
    client. Otherwise for example UTC times don't have sufficient resolution.

src/Viewer/viewmgr.cxx
    Generate internal logs of multiplayer position and speed (after
    interpolation/extrapolation) if /sim/log-multiplayer-callsign is set. Used
    by scripts/python/recordreplay.py's --carrier test.
2021-06-25 11:08:12 +01:00
Julian Smith
31c7fc8565 src/Scripting/NasalSys.cxx: show source line if we get error while parsing Nasal.
Helps track down errors in Nalsa embedded inside XML - line numbers are from
start of Nasal, not start of XML file.
2021-06-25 10:32:17 +01:00
Julian Smith
97a25b79ea src/Scripting/NasalSys.cxx: avoid noisy diagnosic if running test-suite. 2021-06-25 10:32:17 +01:00
legoboyvdlp R
0a0d0adc5f De-yodify a true condition too 2021-06-24 15:29:10 +01:00
legoboyvdlp R
3ab4de1436 De-Yodify false == conditions throughout the code-base 2021-06-24 15:29:10 +01:00
legoboyvdlp R
667dc8a02a audioindex.cxx: readability improvements: remove Yoda condition and use NOT operator rather than == false 2021-06-24 15:29:10 +01:00
James Turner
788d6ab666 Attempt to catch exceptions during subsystem creation.
Part of isolating location of ‘random fatal exception on startup’
issues.
2021-06-24 15:26:47 +01:00
James Turner
c404bb6b37 Reduce warning log spam in NaN position.
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.
2021-06-24 15:24:20 +01:00
James Turner
083d364f9c NavCache: don’t crash if rebuild is abandoned
Add a flag, so we can cleanly exit/join the rebuild thread, if we
are asked to delete the NavCache during a rebuild.
2021-06-18 12:38:50 +01:00
James Turner
20e605ca13 NavCache: tolerate BUSY in prepares
This is obscure, but with multiple copies of FG running, we can
get SQLITE_BUSY when doing prepares as well as during exec/steps.
2021-06-18 10:05:42 +01:00
James Turner
bee7b0164f Fix reset hang: shut down the Emesary recipient
Requires corresponding SimGear update
2021-06-17 15:57:03 +01:00
James Turner
c31d8c4e65 Make NavData cache exception silent 2021-06-17 15:57:03 +01:00