1
0
Fork 0
Commit graph

303 commits

Author SHA1 Message Date
James Turner
49e8967174 prop indirection on property-adjust, multiply
Make the min, max and factor arguments to propert-adjust
 and property-multiply optonally use a -prop version to
 read a value from the global property tree.
2023-08-12 12:46:52 +01:00
James Turner
c54fba1095 AP: fix erroneous warning with Monostable FlipFlip
Add a unit-test written by Huntely, and extend the AP configure code, so the
'time' config of monostables doesn't trigger an incorrect warning in the
console / logs.

Thanks to Huntley Palmer for pointing this out.

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2812/
2023-07-25 11:39:11 +01:00
James Turner
4fbea9871d Disablw GPS SWIFT8 test for now 2023-07-21 16:33:48 +01:00
James Turner
3ac7673236 Tests: fix compilation 2023-07-21 16:33:48 +01:00
James Turner
26530e27ea Fix DME unit-test: set correct power supply 2023-07-21 16:33:48 +01:00
portree_kid
78797e28aa AI Fixes
* Better runway exit
* Bug in approach
* Test east/west approach downwind
2023-01-28 20:48:11 +01:00
James Turner
f463a0405e Fix some dumb paths in the code
Replace hard-coded path to my desktop with calls to
SGPath::desktop() helper
2023-01-10 10:34:14 +00:00
James Turner
dc467ebdfa Cmake Improve Finder for CppUnit
Define an imported target for the system CppUnit, so we can
correctly pass includes locations to FgfsTestSuite
2023-01-08 19:36:44 +00:00
James Turner
0fbe3547fb Nasal: test for hash creation from kw args 2023-01-08 19:36:44 +00:00
portree_kid
3667e5de3c AI/ATC
* Added Messages for Takeoff
* Added Messages for Hold & Holdpatterns
* More enums instead of Magic Numbers
2022-12-29 22:21:23 +01:00
James Turner
78e6a209f1 Add some missing cases to Nasal FlightPlan binding
Expose 'between' restrictions as a 2-tuple.
2022-12-02 12:22:15 +00:00
James Turner
ff5752d1dd Mark time test as passing, with updated TZ data
Requires FGData commit  844c24a085b6f065a1d6c
2022-12-01 09:31:12 +00:00
James Turner
5800143b96 Add test case for SGTime::updateLocal crash
SF-ID: https://sourceforge.net/p/flightgear/codetickets/2780/
2022-11-30 14:13:35 +00:00
James Turner
0a85e23cde Extend FlightPlan to handle ‘between’ restrictons
As part of this, also improve units handling in speed/altitude
restrictions.
2022-11-28 15:34:00 +00:00
James Turner
82dbef0c12 Make Swift tests conditional on Swift support 2022-11-28 15:13:16 +00:00
Edward d'Auvergne
45243c96e8 TestSuite: System tests for subsystem creation via the global registrations.
This covers all instantiated SGSubsystem derived classes, i.e. those that are
not base classes, including subsystem groups.  Both non-instanced and instanced
subsystem creation is tested.  The tests for subsystems yet to be registered are
commented out.
2022-11-17 15:57:39 +00:00
Edward d'Auvergne
c1c7b043ac SGSubsystemMgr::get_subsystem(): Universal switch to the templated function.
The globals non-templated get_subsystem() helper function has been made private
to enforce the switch.
2022-11-17 15:57:39 +00:00
Edward d'Auvergne
c5aa3ca0f1 SGSubsystem classes: Switch to the new SGSubsystemMgr::add() functions.
Most subsystems are now created via the subsystem manager using the global
subsystem registrations.

The FGGlobals add_subsystem() and add_new_subsystem() methods have been removed
as the subsystem manager addition and creation function interface now exceeds
the functionality of these helper functions.
2022-11-17 15:57:39 +00:00
Florent Rougon
56f60c381f fgfs_test_suite: improve the --help output
- The program name is fgfs_test_suite, not run_test_suite.

- Add three examples for particularly useful tasks; be explicit about
  how to discover available test names.

- std::endl flushes the stream every time it is used; better use '\n'
  in most places (more efficient and takes less space on screen). :-)
2022-11-08 12:01:24 +01:00
Florent Rougon
8290d94ada Navradio: add unit tests pertaining to VOR signal quality 2022-11-08 12:01:24 +01:00
Florent Rougon
0a74d6f8f3 Fix warning about an unused variable 2022-11-08 12:01:17 +01:00
James Turner
1db1187b15 Use real magvar in a unit-test
Changes to the magnetic model exposed some weaknesses in this code.
2022-09-22 09:43:34 +03:00
portree_kid
e85e5d2e5b AI
* Parking on parking with right heading
* Leg 6 Descent improved (teardrop like entry)
* Inner/Outer tangents in VectorMath TODO Move to SG
2022-08-29 21:05:49 +02:00
portree_kid
d571bc6f76 AI Improvements
* 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
2022-05-31 21:23:34 +02:00
Lars Toenning
1a364684e9 Adjust unittest to new SGCallback 2022-05-31 10:18:50 +01:00
Jonathan Redpath
c3162c0233 Add failing test for SWIFT8 at YBCS 2022-05-16 14:58:53 +01:00
Jonathan Redpath
564884d27c Test suite: restore cross-platform compatibility by removing unix-specific headers and explicitly casting unsigned ints / unsigned longs 2022-05-16 14:02:11 +01:00
James Turner
06063ed82a Fixes for Wake turbulence changes
- add missing <string> include
- fix tests
2022-04-20 10:23:31 +01:00
Lars Toenning
2ccd9bfb30 [swift] Pass struct to updatePlanes() instead of multiple vectors 2022-04-06 07:53:51 +01:00
Lars Toenning
3b40f704fd Add swift unittests 2022-04-06 07:53:51 +01:00
Julian Smith
26695b448c test_suite/unit_tests/FDM/CMakeLists.txt: fixed incorrect header name. 2022-03-20 12:46:11 +00:00
Julian Smith
683501e3bd test_suite/unit_tests/FDM/: added test of new YASim torus gear system.
test_suite/unit_tests/FDM/CMakeLists.txt
test_suite/unit_tests/FDM/TestSuite.cxx
test_suite/unit_tests/FDM/yasim-gear.cxx
test_suite/unit_tests/FDM/yasim-gear.hxx
    E.g. run test suite with: -u YASimGearTests::test
2022-03-19 23:14:58 +00:00
portree_kid
49eeb6627c Fix compile issue 2022-02-12 19:49:21 +01:00
portree_kid
82863d3f3e AI Fixes
* Fix turns (left-turn-bug)
* Better parking apporach
* CSV Logging via property
* ft vs m bug in setLeadDistance
* Split Runway Entry/Exit calculation
* Prototype wait pattern
2022-02-06 21:11:58 +01:00
PortreeKid
cacd650f27 Remove Traffic Tests 2022-02-05 13:33:42 +01:00
portree_kid
cf0d90ef3d Cleanup Inheritance in ATC 2022-01-31 22:34:05 +01:00
James Turner
fe9aadd8bb RoutePath: fix pointAlongPath for fly-overs
FIx some bugs in computing turnExitPos for fly-over waypoints,
and computing leg course when preceeeding leg is a runway.
In both cass we had an incorrect turnExitPos, so points along
the leg were incorreclty positioned.

Extend the test cases to cover this further.
2022-01-20 20:33:37 +00:00
James Turner
08a70297ff GPS/RNAV: configurable max-flyBy-angle
Make the max-flyBy angle configuable, since for exmaple AIrbus uses 90
degrees. Expose this via a new gps/config property, and extend the tests
to verify that angles greater than the fly-by angle behav as fly-over
waypoints.

Extend the RoutePath code to share this configuration, so that route
visualisations match the configured angle.

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2694/
2022-01-18 16:07:54 +00:00
Scott Giese
f198ac8d8d AIBase: Refactor
getTypeString returns string_view
object_type to strongly-typed enum
ModelSearchOrder to strongly-typed enum
2022-01-15 22:54:30 -06:00
James Turner
a6a29f5482 Tests for airwsys in Nasal 2022-01-15 22:23:38 +00:00
James Turner
7ac03debf4 Add tests for isRoute FlightPlans 2022-01-15 22:23:38 +00:00
James Turner
395eb58d14 Adjust the ground-net test, for changed ground routing. 2022-01-15 22:23:38 +00:00
James Turner
ef3ba040ca Fix logic of duplicate-command-add test
parseAndReturn returns false, when runtime errors occur.
2022-01-15 22:23:38 +00:00
James Turner
d59db8ea54 FlightPlan: distuinguish routes from flight-plans
Add a bool flag isRoute to flight-plan, and use it to model
routes (which contain VIAs) from plans/legs, which do not.

Default isRoute to false, so most users only see expanded
Vias, and hence something that can be flown directly.
2022-01-15 22:23:38 +00:00
James Turner
9a08d9fcd6 AP input: add property-path support to Inputs
Allow making the AP source indirect (via a string property),
so that the actual source property can be configured or
adjusted from a -set.xml, or at runtime.
2022-01-15 22:23:37 +00:00
Julian Smith
cfe5ed0ef4 test_suite/unit_tests/AI/test_traffic.cxx: minor improvements to sprintf code.
Use snprintf() instead of sprintf() to avoid potential memory corruption.

Fixed sprintf time_t call - cast to long long.
2022-01-08 16:11:53 +00:00
James Turner
179b751bf5 Unit-tests for Nasal range() 2022-01-07 16:16:01 +00:00
James Turner
c1e5cc3074 Improve creating VIA segments
Improve argument parsing for createViaTo, createViaFromTo to
handle Airway ghosts as well as strings. As part of this, allow
specification of the airway level explicitly when looking
up an airway.

SF-ID: https://sourceforge.net/p/flightgear/codetickets/2686/
2022-01-05 15:44:50 +00:00
James Turner
a7ae3bf6cd Fix up linkage of Nasal tests inside CppUnit
Ensure correct test backend is used inside fgfs_test_suite
2022-01-05 15:41:33 +00:00
Julian Smith
1b7e8504ef test_suite/unit_tests/: cope with getStringValue() now returning std::string. 2021-12-27 10:19:34 +00:00