1
0
Fork 0
Commit graph

15767 commits

Author SHA1 Message Date
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
James Turner
0243b996fe Base texture-cache-dir on actual download dir
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.
2021-06-14 13:54:32 +01:00
James Turner
bcc728f4e5 Launcher: don’t persistent cache GUIDs
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.
2021-06-14 11:50:57 +01:00
James Turner
e407ba75ef Launcher: add ‘restart on exit’ option 2021-06-14 10:49:29 +01:00
James Turner
bdcb30d785 Launcher: pass catalog paths via fg-aircraft
This should enable hangar aircraft to be found when searching for MP
models
2021-06-14 10:49:04 +01:00
James Turner
fa50fe60cd Update file extension for FGData 2021-06-13 19:41:16 +01:00
James Turner
c8d5296f7b Fix a missed rename in debug builds. 2021-06-11 15:40:25 +01:00
James Turner
6232fd7978 Fix for abandoned cache rebuild dialog
Sentry-Id: FLIGHTGEAR-75G
Sentry-Id: FLIGHTGEAR-860
Sentry-Id: FLIGHTGEAR-BR2
2021-06-11 12:56:23 +01:00
James Turner
e23bf8d7d2 TerraSync: match API change
Pass the scenery path suffixes here to terraSync explicitly, to
avoid it needing to read the properties from a hard-coded path,
which is inefficient.
2021-06-11 09:59:33 +01:00