1
0
Fork 0
Commit graph

16099 commits

Author SHA1 Message Date
James Turner
b32c33fc72 Heading-Indicator DG normalisation fix
From Benedikt Hallinger
2024-01-29 13:52:44 +00:00
James Turner
d35a28647a Cocoa: append ellipsis to menu items for dialogs
When we detect a menu item shows a dialog, append the ellipsis to it
automatically, so we look a bit more correct for the macOS HIG.
2024-01-29 13:49:06 +00:00
James Turner
0e44538668 Cocoa Menu bar additions
- support submenus
- support checked items
- remove stray items from the launcher
2024-01-29 13:28:07 +00:00
Fernando García Liñán
b46f804924 Fix crash on VR startup
Check whether OSG threading is currently running before restarting it.
The fix has also been applied to Compositor reload.
2024-01-29 12:55:15 +01:00
scttgs0
eb67697d81 maintenance: prevent division by 0 2024-01-28 17:17:08 -06:00
James Turner
c111c12ff1 Fix crash with Nasal Menubar
SF-ID: https://sourceforge.net/p/flightgear/codetickets/2863/
2024-01-28 14:53:43 +00:00
James Turner
816ac9e8e5 Author: hbeni <beni@hallinger.org>
Date:   Fri Dec 22 08:18:12 2023 +0100

    Gyro: Added commend describing the need for an actual correct physical model

    Attitude indicator fix spin when caged

    When caged, the instruments gyro should still spin.
    Caging also serves as fast-erect.

    - Ported gyro spinup/down configurability:
      attitude_indicator, attitude_indicator_electric, turn_indicator

    - Remove tied spin property and have it written by setValue:
      attitude_indicator

    - Made vaccum based instruments configurable regarding minimumVaccum,
      based on KMC manufacturer infos: attitude_indicator, turn_indicator

    - Refactored heading_indicator_dg props init code to behave like
      the others, namely overwritability by aircraft.xml/save-state

    heading_indicator_dg: made instrument gyro spin up/down time configuravle and changeable during runtime

    The defaults are as with the previous hard coded gyro (4s up / 180s down).
    Can be overridden in instrumentation.xml: <gyro-spin-up-sec> and/or <gyro-spin-down-sec>.
    Also exposes same-named runtime changeable properties in the registered instrument subnode.

    Made simple gyro spin up/down time configurable

    heading_indicator_dg: Added caging and tumbling

    Exceeding G Limits will make the gyro tumble. This is bad for the gimbal bearings because
    the gyro works out of spec.
    This can be prevented by caging the gyro before such maneuvers.
    A tumbling gyro will either stabilize after some time or when forced into axis by caging.

    G-Limit is configuable via new "limits/g-limit-tumble-factor" property.

    heading_indicator_dg: Implement transport wander

    When travelling the gyro will be offset depending on the speed travelled.
    This is because the meridian lines converge.

    Example: flying west at 100 kts at +45° north gives: (100 x Tan 45)/60 = ~1.66 degrees per hour.

    heading_indicator_dg: correct drift depending on latitude; latitude nut for correction

    At the northern hemisphere the gyro drifts, letting the DG show a under-read.
    This is depending on latitude: about 15°/hour (360°/day) at the north pole (+90°Lat) down to zero at the equator.
    On the southern hemisphere it is the other way around and the gyro drifts and show over-read values.

    To counter the drift, there is a "Latitude Nut" ("./latitude-nut-setting"-property) which needs to be set to the
    latitude the gyro should be calibrated to. This cancels all drift at that latitude, but other latitudes
    will have an error. (This is a setting usually done at the factory. The implementation expects the
    aircraft to set this, and probably restrict it to only be changeable on ground).

    heading_indicator_dg: make gyro spin writable from prop tree
    heading_indicator_dg: made limits configurable and changeable at runtime
    heading_indicator_dg: Added optional instrument config option <minimum-vacuum>

    This gives the minimal suction in inHG that lets the gyro spin fully up.
    Should be between 4.0-5.0 for most planes.

    heading_indicator_dg.cxx: Factor corrected

    Here the factor was 100.
    The factor of the other implementations is "factor" wich is "100*POW6(spin)".
    The change corrects this to be consistent with the other implementations.

    heading_indicator_dg.cxx: gyro can switch between electrically and vaccum now

    For this just add to instrumentation.xml a <suction> tag pointing to the suction source.
    The default is electrically driven with default power-supply locations
    (when neither <power-supply> or <suction> was given).

    Vaccum driven:
      <heading-indicator-dg>
        <name>heading-indicator</name>
        <number>0</number>
        <suction>/systems/vacuum/suction-inhg</suction>
      </heading-indicator-dg>

    Electrically driven:
      <heading-indicator-dg>
        <name>heading-indicator</name>
        <number>0</number>
        <power-supply>/systems/electrical/outputs/heading-indicator</power-supply>
        <minimum-supply-volts>12.0</minimum-supply-volts>
      </heading-indicator-dg>
2024-01-26 15:58:58 +00:00
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
Julian Smith
c456d18643 src/FDM/YASim/Gear.*: fix /position/gear-agl-ft when not on ground.
In gearCompression() when not on the ground, we now return with o_contact set
to the position of fully-extended gear, instead of (0, 0, 0) (the aircraft
origin).

This fixes later calculation of /position/gear-agl-ft, in particular it now
does not change discontinuously when leaving or touching the ground.
2024-01-25 18:00:53 +00:00
Florent Rougon
fbbc14e20b NavDataCache: fix bug caused by reentrancy in findAllByString()
Make sure NavDataCachePrivate::findAllByString() calls loadById() after
the prepared SQL statement has been reset(), otherwise reentrant calls
to findAllByString() coming from loadById() are likely to fail as they
may reuse cached SQL statements. Such a reentrancy bug was introduced in
commit 351ca111ad because of the added call to FGAirport::findByIdent()
in XMLLoader::findAirportData().

Fixes issue: https://sourceforge.net/p/flightgear/codetickets/2858/
2024-01-25 14:50:57 +01:00
Fernando García Liñán
af30923ff0 Stop threading when adding/removing Canvas cameras
Since now we use slave cameras for Canvas cameras, it is a good
idea to stop threading in the viewer when manipulating slaves.
2024-01-23 18:50:58 +01:00
Fernando García Liñán
6e74ddef57 Canvas: Fix placements not working for glTF models
Canvas was using the default state set provided by an Effect.
This does not work if the Effect doesn't have a fixed-function
pipeline technique (like in the case of HDR and model-pbr).

In the future we should remove placements by texture name entirely
and use the node name together with a texture type (base color,
metallic, roughness) to identify the correct texture unit.
2024-01-22 20:50:35 +01:00
Stuart Buchanan
7ca4f84880 WS30 : Fix basic translation for scenery version
Manual merge of

c476479a1c

from Roman LUDWICKI
2024-01-19 10:05:52 +00:00
James Turner
cdc815cda8 Comm radio noise fix from Benedikt H
When squelch is disabled, noise should be heard even when no
station is tuned.

https://sourceforge.net/p/flightgear/codetickets/2846/
2024-01-11 10:53:09 +00:00
Stuart Buchanan
1757b1d5b6 Change unknown apt.dat row code to SG_DEV_ALERT
Was previously SG_ALERT, but this isn't something
that an end-use can do anything about, so changing
to SG_DEV_ALERT
2023-12-29 14:13:58 +00:00
Stuart Buchanan
dc106b44ce WS30 Add launcher option for WS3.0
Set both /scenery/use-vpb and also vpb scenery suffix
2023-12-29 14:09:48 +00:00
Stuart Buchanan
73efc205a4 Don't throw exception on unknown apt.dat row code
Previously we threw an exception if we encountered
and unknown row code in the apt.dat file.

However, the apt.dat files from X-Plane now include
codes that aren't yet in the 1200 specification (e.g.
105 for skid marks).  So we will now print a warning and
ignore them.
2023-12-27 13:51:30 +00:00
Stuart Buchanan
aac68d759e Multiple OSG DatabasePager thread support
Squashed commit of the following:

commit 9446789f881d676280819c20a42eb2454106cfba
Author: Stuart Buchanan <stuart_d_buchanan@yahoo.co.uk>
Date:   Tue Dec 19 16:51:37 2023 +0000

    Add $FG_OVERRIDE_PAGER_THREADS to set load threads

    Previously /sim/rendering/database-pager/threads was used to set
    the number of OSG DatabasePager threads one reset (only!).

    This change removes this function and replaces it with an
    environmental variable FG_OVERRIDE_PAGER_THREADS which will
    set the number of threads at startup and on reset.

    This ensures that only developers who are interested in
    multi-threading will enable it.

    It is expected that one multi-threaded DatabasePagers stabilizes
    we will change to use /sim/rendering/database-pager/threads
    instead (for both init an reset).

commit 711b5bc6b8feff77d18309025a1c309a47398ff0
Author: Stuart Buchanan <stuart_d_buchanan@yahoo.co.uk>
Date:   Sun Dec 17 13:56:21 2023 +0000

    Configure DatabasePager threads correctly

    Previously we didn't set the number of DatabasePager
    threads on initialization, and so irrespective of
    the /sim/rendering/database-pager/threads property
    we always had 1 General thread and 1 HTTP thread.

    (On reset, we did have some code that set up the correct
    number of threads).

    This wasn't completely obvious, as the threads are configured
    at startup using an OSG DisplaySettings hint.

    This change sets up these threads correctly on initialization
    and ties the properties properly.  Though it's worth noting
    that changing the property in-sim will have no effect until a
    Reset.
2023-12-19 17:04:45 +00:00
Stuart Buchanan
417f80a0a2 WS30: Remove unused variable 2023-12-17 13:41:47 +00:00
Stuart Buchanan
fc62588fef WS30: Unit tests for VPBRasterRenderer 2023-11-30 13:36:57 +00:00
Erik Hofman
f611379ce2 Move the code to update fog density when the visibility changes to /Nasal/hdr.nas 2023-11-20 10:32:49 +01:00
Erik Hofman
6ff3f3f459 Calculate an approximate visibily based on chance of mist and fog derived from humidity and the difference between the temperature and dewpoint. Calculate fog-density. 2023-11-18 10:50:35 +01:00
Alexander Wilms
e7466ddbc6 Update metainfo file
The file now passes
flatpak run org.freedesktop.appstream.cli validate --strict --explain package/org.flightgear.FlightGear.metainfo.xml.in
except for the placeholders in the <release/> tag
2023-11-11 14:12:58 +00:00
Roman Ludwicki
2f0705bd49 Keep the same aircraft on sim reset
When user has installed more aircrafts with the same short ID, preserve
the selected dir, so we use the exact same aircraft.
2023-11-11 14:09:16 +00:00
Roman Ludwicki
857b163ee7 Add option to hide the aircraft on the map
As a student, I would like to be able to use the map for reading the flight plan, frequencies for VOR, NDB, ILS, but without giving away the position of my aircraft, so that I can train in IFR navigation using the instruments only in the cockpit.
2023-11-11 13:49:11 +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
Stuart Buchanan
9eccf6b55b WS30 - Ground mesh material lookup
Squashed commit of the following:

commit a4dd860660db64053fb75d251d58194b1aa99d51
Author: Stuart Buchanan <stuart_d_buchanan@yahoo.co.uk>
Date:   Thu Oct 26 20:33:48 2023 +0100

    WS30 - Ground mesh material lookup
2023-10-30 18:34:30 +00:00
Stuart Buchanan
96d7762c78 Revert "WS30: BVH integration for ground materials"
This reverts commit 716f1fffab.
2023-10-26 20:22:57 +01:00
Stuart Buchanan
716f1fffab WS30: BVH integration for ground materials
See simgear 588536c67b731f7453220b164f4210ced9866e60
2023-10-24 21:59:47 +01:00
Stuart Buchanan
020fb88a80 Help message for fgelev 2023-10-24 18:21:29 +01:00
James Turner
4cd9f9094d Even more HAVE_PUI checks 2023-10-12 13:55:14 +01:00
James Turner
1e122913cb Fix a missing HAVE_PUI check 2023-10-12 13:50:35 +01:00
TheFGFSEagle
e7334856a2 Fix typo (seperator vs. separator) 2023-10-11 20:59:52 +01:00
TheFGFSEagle
4707ec469a Add field containing the (translated) label for menu and menu item ghosts 2023-10-11 20:59:52 +01:00
Fernando García Liñán
f4d9700eb3 Add a trivial passthrough shader to PUI
When vertex attribute aliasing is enabled we need shaders to display the
PUI texture on the screen. This change does not affect non-HDR.
2023-10-06 11:13:11 +02:00
James Turner
3986508911 GUI: more HAVE_PUI defines
Mostly done by Fernando to enable Core-profile testing
2023-10-05 15:55:02 +01:00
James Turner
ee3bab3437 CI: add helper file for Windows 2023-10-02 10:34:01 +01:00
James Turner
dd1293ff0a Add CI build file 2023-09-29 13:48:50 +01:00
Fernando García Liñán
f679764da2 Add a compile time flag to disable the default HUD
The default HUD still relies on legacy OpenGL features, which makes it
incompatible with the GL core profile. A replacement involving Canvas
has been discussed before, but for now a toggle switch is enough to test
the core profile.
2023-09-28 23:26:27 +02:00
Roman Ludwicki
d86425c8a2 Update completion scripts 2023-09-25 11:28:04 +01:00
Fernando García Liñán
8036e12236 Fix projection matrix clamping
See SimGear commit b16e0b08.
2023-09-24 02:31:16 +02:00
Fernando García Liñán
94340711d7 Use our own projection matrix utility functions 2023-09-24 00:33:16 +02:00
Roman Ludwicki
459242b9db Fix calculate temerature for ISA METAR scenario 2023-09-19 11:57:28 +01:00
Roman Ludwicki
4be74c8df5 Fix run Launcher with --restart-launcher option when user did not specify --launcher option 2023-09-19 11:56:36 +01:00
Roman Ludwicki
ac0bb71a84 Add support for <optional-arg> in help output 2023-09-13 20:43:58 +01:00
Roman Ludwicki
3711e23a0d Disable fullscreen mode for QT Launcher window by using --disable-fullscreen option 2023-09-13 20:42:23 +01:00
James Turner
fcd88ac845 Add Nasal callback to build menubar 2023-09-13 20:41:59 +01:00
Roman Ludwicki
50f487b589 Fix types name conflict on Windows platform 2023-09-13 15:03:39 +01:00
Roman Ludwicki
9efbdba004 Add unit tests for boolean options and space as value separator 2023-09-13 11:45:32 +01:00
Roman Ludwicki
768d24fa17 Fix BOOL and BOOLEAN conflict name on Windows platform 2023-09-13 11:45:18 +01:00