don't start the traffic manager before the FDM is initialized
The FDM needs the scenery loaded and will wait for all PagedLOD Nodes
to appear if they are close (less than 1000m) to our initial position.
That's required for scenery models but not for AI traffic.
Unfortunately we can’t drop loaded ones, since the in-memory structures don’t have ref-counting, and we don’t
know what AI plans may be referencing them.
This patch enables AIModels to use the size on the screen for LOD instead
of distance from eye point.
With /sim/rendering/static-lod/ai-range-mode-pixel set to true
/sim/rendering/static-lod/ai-detailed now contains the minimum size of the
model on the screen to be displayed. Values of 10-50 seem to make some sense.
To avoid trouble when running multiple instances on one machine, disable
e.g. joystick input for second instance by
--prop:bool:/sim/input/no-joystick-input=true
Also allowed:
--prop:bool:/sim/input/no-event-input=true
--prop:bool:/sim/input/no-mouse-input=true
--prop:bool:/sim/input/no-keyboard-input=true
required SimGear commit 75271c44a82ae0fb1ff9c91e93a12fa8b10099fd
Since the consensus seems to be that the precipitation clipping issue is with the panel code, attached is my proposed update for the precipitation system in SG and FG
* without corresponding control structures in FGData it falls back to default, except I have fixed an inconsistency in freezing behavior - previously rain changed suddenly to snow when the temperature dropped below zero, but the reverse transition was dragged out and gave odd visible motion with the wind as snow gradually changed back to rain with the particle speed not well defined. Now both transitions are sudden. And I see no more particles flow against the wind
* with
<!-- definitions for the detailed precipitation manager -->
<precipitation-control>
<rain-droplet-size type="float" userarchive="n">0.015</rain-droplet-size>
<snow-flake-size type="float" userarchive="n">0.03</snow-flake-size>
<detailed-precipitation type="bool" userarchive="n">false</detailed-precipitation>
<illumination type="float" userarchive="n">1.0</illumination>
<clip-distance type="float" userarchive="n">5.0</clip-distance>
</precipitation-control>
added to Environment/environment.xml, the new system allows to switch more detailed management on. This provides
* explicit setting of rain droplet size and snow flake size by the weather system
* automatic sqrt(r) scaling of the vertical speed of raindrops
* automatic transition to snow when freezing for small droplets but hail for large droplet sizes (looks like snow, but has different particle dynamics)
* an illumination scaling factor to dim the precipitating based on the light we have in the scene (I still need to devise a property rule to set this automatically)
The clip distance is also exposed now and considered at startup of the system - might be useful for e.g. airships when the gas bag provides rain cover (?) or to be simply off for open airplanes
- Introduce a new LOD: ai-interior
- Load a <model> with <usage>interior</usage> on-demand
- Avoid to load the cockpit of players in MP
- Default LOD is 0.0 - 50.0 meters
Adds new option --load-tape=foobar to load a flight recorder
tape from the command line. Loads foobar.fgtape from the
directory specified in /sim/replay/tape-directory and starts
replay.
the static system has an optional "tau" parameter to
define the rate at which the output value changes.
Setting this value to zero now disables the filter.
This prevents wrong airspeed indications on rapid
altitude changes. No functional changes if tau has
other-than-zero values (e.g. the default systems).
write the vertical flight path to /orientation/path-deg
zero means level flight, positive angles climb
Also use SGD_DEGREES_TO_RADIANS (and vice versa) for double computations
instead of the float constants
Also allow events on desktop group if no window is receiving
events. Currently it is not possible to prevent events handled
by the desktop group to further propagate (eg. to normal
control input).
- /sim/aircraft can be set to package ID, including qualified
package ID. If not matching package is found, falls back to
traditional search of fg-aircraft for -set.xml files
- jQuery/HTML5 like .data() method on Canvas and Elements to store
custom data in the property tree.
- CustomEvent takes additional parameter hash with 'detail' data
stored in event.
- Add a screenshot uri handler
- Enable persistent http connections
- Simple CORS implementatation for the
JSON property uri handler
many changes for the httpd
Change the drag coefficient for fuselages along the Y and Z axes
(i.e. perpendicular to the fuselage's main axis) to use a fixed
value of 0.5. (The value can still be adjusted using the fuselage's
"cy" and "cz" XML attributes.)
For the Y-axis and Z-axis drag on fuselages, YASim originally used
a drag coefficient equal to:
(solver drag factor) * (fuselage length/width ratio)
This value turns out to be way too small for well-streamlined
aircraft, even those with long, narrow fuselages, and especially
so for those with short, stubby fuselages. Such fuselages are
streamlined in the X direction, but not along Y or Z.
0.5 is only a ballpark estimate, but it's reasonably close for the
common case of a fairly long fuselage with a round cross section. For
flat-sided fuselages, a larger value should be used, up to a maximum
of 2 for a slab-sided block. For short fuselages, the value should be
reduced to account for end effects. The fuselage's "cy" and "cz" XML
attributes can be modified to make such adjustments.
This fix won't affect straight flight much, but it should have a strong
impact on some maneuvers. For example, it will make slips more
effective and may make knife-edge flight easier on aerobatic aircraft
which should be capable of it.
Only aircraft which specify version="YASIM_VERSION_32" or newer are
affected.
This commit is in prepartion for the following commit, which is a bug fix for
Issue 1463 (YASim underestimates off-axis forces on fuselages).
Previously the solver would adjust the drag factor for all of an Airplane's
non-Wing Surfaces in one pass, with no attempt to distinguish Fuselage Surfaces
from the Surfaces for Gear and Weights. This makes it difficult to modify how
fuselage drag is calculated while leaving unaffected the drag for landing gear
and external weights.
Now the solver adjusts the drag for an Airplane's fuselages, landing gear, and
external weights in three separate passes. To do this, each Fuselage now has a
list of its Surfaces. The fuselage pass simply iterates through the list of
Fuselages, running through each Fuselage's list of Surfaces.
The Airplane's list of non-Wing Surfaces, "_surfs", is no longer used here, but
there may still be uses of it elsewhere.
This patch enables spoken words without the need for external
festival using the existing FGVoiceMgr subsystem and the
properties under /sim/sound/voices
To hear the generated voices, set /sim/sound/voices/enabled=true
at startup
- use FLITEVoiceSynthesizer if a voice has <festival>false</festival>
- use FLITEVoiceSynthesizer if the festival server is unreachable
- decouple FGFLITEVoice from FGVoiceThread
Correct handling of fuselage's "midpoint" XML attribute so that the midpoint's
location matches the point assumed by all aircraft developers and YASim docs.
This means the fuselage won't be generated "back-to-front".
Also correct the variation of diameter for tapered fuselages so that both ends
of the fuselage narrow from the midpoint to the endpoints.
Before this, one end was narrowing from the endpoint to the midpoint, the
opposite of what was expected.
These changes affect both weight distribution and the distribution of lateral
aerodynamic forces.
- Add a very simple line-of-sight propagation model for the radio
range computation.
- Remove some no longer used debug log messages
- Some code cleanup
- add-noise is now on by default
adding property cuttoff-signal-quality to the comm radio
If signal-quality goes below this value, atis sound is muted.
Also: initialize property power-btn if not defined by the
aircraft or instrument designer
By default, if the system version exists and can be used,
then it will be used. Otherwise, the local version will be used
Original patch by Saikrishna Arcot via
https://gitorious.org/fg/flightgear/merge_requests/1582
slightly modified
/sim/sound/voice-synthesizer/volume to set the volume of the generated wav (in dB)
/sim/sound/voice-synthesizer/keep-scratch-file do not remove the scratch file if true
user attribute "version" of the airplane element of the YASim config file
to define the version this config uses.
Example:
<airplane mass="1344" version="YASIM_VERSION_CURRENT">
Initially, the following can be used:
YASIM_VERSION_ORIGINAL - The original version of YASim as implemented up to
FlightGear 3.0.0
YASIM_VERSION_32 - The version of YASim implemented in FlightGear 3.2.x
(and the development version 3.1.x)
YASIM_VERSION_CURRENT - The current and latest version of YASim.
naBindFunction doesn't save the function code to the global
hash, so pass an explicit context to various 'call' overloads so
the function can't be GC-ed in between parsing and calling.
(Patch by Nicholas Scheel)
https://code.google.com/p/flightgear-bugs/issues/detail?id=1397
Fixes confusing startup behaviour with malformed args, when
an argument accidentally contains a space (e.g. a park-pos or
protocol desc). In this case we treat the parts after the space as an XML config file name. When we can't find this file, we
completely abandon options setup, which causes many downstream
errors.
Change the behaviour so we warn in this case, but carry on with normal startup.
add special attribute 'ts' to a JSON property reflecting
/sim/time/elapsed-sec
always add timestamp for listener properties
add timestamp for json requests if req param t=y is set
- fix corrupted ident on Mac (libc++ issue)
- don't clear scratch when activating DTO mode
- use the real navaid/airport for the waypt where possible
- expose active waypt name
* mongoose updated to 5.3
* first stab at implementing websockets, here a property change listener
websocket. This websocket is at ws://yourhost:yourport/PropertyListener
see FGDATA/Docs/gui/radio.html for an example
to run a fg-command with args, POST run.cgi?value=my-command
and post the args node as JSON content like this:
{
name: '',
children: [
{
name: 'property',
index: 0,
value: 'first-value is here'
},
{
name: 'property',
index: 1,
value: 'first-value is here'
}
]
}
or whatever arguments the requested command takes
This is too destructive for many established things, so revert it.
Instead, make the FDM shell save /fdm state on postinit(), and
restore it on re-init (which reposition invokes).
- Not compiled by default, nor hooked up to anything yet.
- Both libraries licensed under modified BSD license.
- Added top-level CMake file for both, to create a plain static
library for each.
add request parameter 'i' and 'd'
if i=y, indent the output to make it human readable
if i is missing or anything else, send the output unformatted to save bandwith
'd' defines recursion depth with a default of 1 to show the requested node
and the immediate childs (if it has any)
call /json/?i=y&d=999 for a complete property tree backup (use with caution!)
Also set the encoding to UTF-8 as required per RFC 4627
Adds $FG_ROOT/Aircraft/Generic/JSBSim/{Engines,Systems} to the JSBSim
engines and system search paths. Internally JSBSim already searches
$aircraft_dir/Engines and $aircraft_dir/Systems.
A file in $aircraft_dir/{Engines,Systems} have higher priority than one
in the shared directories.
Introduces delay-sec and release-delay-sec properties. The former is how
long to wait to run the binding(s) after pressing the button, the latter
is how long to wait after releasing the button. interval-sec now
specifies the delay before a repeat event occurs.
- Calculate line of sight distance instead of distance over
ground
- Do a nav cache update if carrier_nav.dat.gz timestamp has
changed
- Allow comments in carrier_nav.dat.gz
- "Fix" range calculations (still does not take terrain/weather
and other influences into account)
Added the fallback for realweather fetch disabled, creating
ATIS from present weather
Fixed some formatting errors, mainly missing spaces
Some code cleanup
Calls to updateValues can cause nested calls invalidating
the char* passed as argument, if retrieved from a
SGPropertyNode.
Probably SGPropertyNode should also be modified to return
a std::string instead of a pointer to an internal buffer.
- use old-style reset as the basis for a lightweight 'reposition' command. This does not restore state, or reset
time management, but does reset the FDM and re-finalize position.
- Current 3D clouds rendering does not use the alpha buffer,
so don't request one at launch, since it consumes valuable GPU memory.
- Remove any references to alpha testing or alpha func in the renderer setup.
- restores functionality of 'draw-otw' property
- adds new /sim/rendering/draw-mask branch to allow control
over rendering each branch inside FGScenery
* make --enable-fpe work on Linux and MSVC
* standardise the code paths for different platforms
* add an argument finding helper to Options
(This is a basic cleanup, contributions from people with
more experience in this area are welcome)
As suggested by a long-standing enhancement idea,
extend getprop/setprop to accept multiple args,
including integer arguments. This removes the need
for string concatenation (and hence, allocation)
on the Nasal side.
Patch by Nicholas 'Philosopher' Scheel
- check for invalid tiles / buckets, which occurs at the poles
- use .sibling() method to offset
- no longer need to store view lat/lon in the manager.
- Support interface properties as with JSBSim for easy reuse
and parametrization of autopilot components.
- Add property-root property to allow changing property root
for all relative paths. This allows easy use of multiple
instances of the same autopilot component at the same time
by specifiying different property root nodes.
multi-headed Gnome based linux systems, this provides an extra hint that we
really wish to open up our full screen window spanning all physical displays.
This works around a kink in the gnome window manager where it tries to "lie"
to applications about the full screen size assuming most applications don't
wish their windows to span multiple physical displays.
- no dependency on libJpeg or Simgear
- no duplicate rendering of the scene (uses a draw callback)
- supports other image types, eg PNG
- threaded so doesn't block the main loop ever
Fix error "no known conversion for argument 1 from ‘sqlite3_int64
{aka long long int}’ to ‘PositionedID& {aka long int&}’"
(Both those types are int64, but that evidently isn't enough)
This makes the behaviour when FGRun (or other GUI launchers)
send bad options much more explicable. Non Windows/Mac systems
get an SG_ALERT on the console as before.
Firstly search model in $fg-root/AI/ path,
if not found, search model in --fg-aircraft paths,
if not found, search model in $fg-root/Aircraft path
This commit should solve the complaint "I have an aircraft in a separate Aircraft/ folder
but during MP session other user are shown with the aircraft from the $fg-root/Aircraft path
instead of this behaviour I want to see the aircraft from my separate Aircraft/ folder"
By Gijs with additions by James. Menubar is disabled at present
since it's not usable and potentially inferior to other solutions,
but committing the code so it doesn't rot.
Adapt to corresponding SG change to make SGMaterialLib be ref-counted,
and have the 'reload-materials' command notify the tile-manager of this,
so it can update the options struct it passes to new tiles.
Restarting the GUI could cause Cocoa menus to misbehave, due to
destruction behaviour of SGBinding. Use new clear() helper in the
short term to work around this.
Warn (but do not require, since people would probably complain) when
added paths do not contain an Aircraft subdir. When people specify
a path which ends in /Aircraft, use the parent directory.
In threaded OSG drawing, MapWidget::draw runs in the render
thread context, but touches lots of main thread state. Move most of the
work to an update() helper run on the main thread instead, so draw()
mostly makes pure GL calls.
(This is a fix for 3.0, the real solution is to migrate to a
Canvas-based map and GUI)
On Mac, the OS is mapping shift+wheel to horizontal scrolling for
those of us without a mighty-mouse or trackpad. Detect this case
and map back to vertical scrolling inside FlightGear for the moment.
https://code.google.com/p/flightgear-bugs/issues/detail?id=1286
When tiles are being loaded, re-evaluate the materials cache once
per update cycle. (This is probably too often, but no worse than the
previous approach).
- borrow some code from the new reset codepath to cleanly stop the
OSG pager thread during normal shutdown. Avoids a race-condition
destroying various structures the pager thread might be modifying.
This was previously done only if Terrasync was on, but this made
it impossible to use the GUI dialog to turn it on for the first
time in a fresh install
Don't override global clear color in the Lighting stage. Should fix ugly 'circle' appearing due to sky sphere being clipped when above 32000 ft.
Fix suggested by Emilian H.
Remove unused instance of FGControls from FGNativeCtrls, as it was
binding to the property tree in place of the globals->get_controls
that JSBSim reads input from, blocking all input