1
0
Fork 0
Commit graph

312 commits

Author SHA1 Message Date
James Turner
6d70f48f73 Extend the waypoint / POI nav-data types
- add new VRP type
- add the concept of temporary waypoints / POIs which are not stored
  in the persisten cache
- add Nasal APIs to create/delete/move waypoints, in addition to the
  existing create-waypoint and delete-waypoint commands
- allow POIs/waypoints to have names as well as idents
- Ensure ident/name and spatial queries work correctly for temporary
  and dynamic waypoints
- add test coverage for all this
2024-01-26 11:11:17 +00:00
Stuart Buchanan
fc62588fef WS30: Unit tests for VPBRasterRenderer 2023-11-30 13:36:57 +00:00
James Turner
5e1be2d893 Add findCommByFrequencyMHz to Nasal
SF-ID: https://sourceforge.net/p/flightgear/codetickets/2836/
2023-11-11 13:47:48 +00:00
Roman Ludwicki
9efbdba004 Add unit tests for boolean options and space as value separator 2023-09-13 11:45:32 +01:00
James Turner
17c76b66bb Nasal: add nil tests for ?? 2023-09-12 22:39:34 +01:00
James Turner
168373af8a tests: add empty-condition test-case 2023-09-11 11:50:59 +01:00
James Turner
6c949c30d3 Test case for re-alias-ing
* Ensure alias()ing an already alisaed node fails, but also ensure it
  doesn't deadlock.
2023-09-06 21:42:52 +01:00
James Turner
d569d72ea8 Nasal: tests for new operators
- test for nil-member-access
- test for chained nil
2023-09-06 21:23:59 +01:00
James Turner
1e6a4f8a99 Fix compilation of tests 2023-09-05 10:22:31 +01:00
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