1
0
Fork 0
Commit graph

8690 commits

Author SHA1 Message Date
James Turner
431a3eaa1b Tune osgDB::MaxPagedLODs parameter 2014-05-17 09:05:34 +01:00
James Turner
f19da413bb Initial mode to disable caching of tiles. 2014-05-16 14:52:24 +01:00
Torsten Dreyer
ffe6c39a1d More AtisSpeaker variations
Also hide the voice installation path from the user of
the VoiceSynthesizer
2014-05-13 11:20:11 +02:00
Colin Douglas Howell
54f954fd02 Fix for issue 1463 (YASim underestimates off-axis aerodynamic forces on fuselages)
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.
2014-05-12 19:07:10 -07:00
Colin Douglas Howell
907209746f Separate fuselage drag adjustment from that for landing gear and external weights.
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.
2014-05-12 14:29:48 -07:00
Torsten Dreyer
98c053792e Try to fix build error for msvc 2014-05-10 15:49:50 +02:00
Thomas Geymayer
0fc2d57211 Scripting: expose flight history as aircraft.history()
var hist = aircraft.history();
 debug.dump(hist.pathForHistory(50));
2014-05-10 10:56:09 +02:00
Thomas Geymayer
bd29974683 Canvas: move Window class to simgear. 2014-05-09 16:42:54 +02:00
Torsten Dreyer
b80b010ef1 Use FLITE voices in FGVoiceMgr
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
2014-05-07 22:12:23 +02:00
Torsten Dreyer
d8c5e394cf Render voice to memory, no more temp files.
Thanks you James
2014-05-07 20:09:15 +02:00
Torsten Dreyer
1c8c74fc76 Compile without ENABLE_FLITE 2014-05-07 19:07:29 +02:00
Torsten Dreyer
4cdb5ed1f3 AtisSpeaker: prepare for individual voices 2014-05-07 17:08:02 +02:00
Torsten Dreyer
36fc9790ed atis voice: add some variation in pitch and speed 2014-05-07 10:34:04 +02:00
Thomas Geymayer
c6371c4152 Canvas: update for SimGear changes. 2014-05-06 18:15:29 +02:00
Colin Douglas Howell
4d1aebad79 Fix for issue 1394 (YASim's geometry for non-cylindrical fuselages is wrong)
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.
2014-05-06 10:38:48 +02:00
Torsten Dreyer
19aedd4523 Add GPL header 2014-05-06 10:33:50 +02:00
Torsten Dreyer
dd127de32b Changes to voice + atis
- 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
2014-05-06 10:23:04 +02:00
Torsten Dreyer
59db0534ff Fix a warning, no functional change 2014-05-05 22:24:47 +02:00
Torsten Dreyer
99dd8c08b5 commradio: typo: cuttoff --> cutoff 2014-05-05 13:22:39 +02:00
Torsten Dreyer
7dc2ee46a2 commradio: add squelch
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
2014-05-05 13:20:03 +02:00
Torsten Dreyer
86b3469fbf JSBSim: fix zero agl above scenery discontinuity
see http://osdir.com/ml/flightgear-sim/2014-04/msg00145.html
2014-04-30 16:41:27 +02:00
Torsten Dreyer
46584bfc92 commradio: no spoken atis if sound disabled 2014-04-30 10:50:57 +02:00
Torsten Dreyer
88e5dc873f Cleanup part2. Forgotton file. 2014-04-30 10:45:52 +02:00
Torsten Dreyer
d2c000699f Cleanup of ATCDCL
- move FGATCAlignedProjection class as AlignedProjection
  to dclgps, the only place where it's currently used
- remove now obsolete files in ATCDCL
2014-04-30 10:22:51 +02:00
Torsten Dreyer
14c918a7ef commradio: improvements for atis speech
- use individual SampleGroup refnames for each radio
- enable volume control for atis speech
- (optionally) add noise based on signal quality
2014-04-28 23:50:45 +02:00
Torsten Dreyer
d5d88f2850 commradio: refactor MetarSpeaker to AtisSpeaker 2014-04-28 22:02:48 +02:00
Torsten Dreyer
6ee2fcdd9e Allow using the system version of flite and the HTS engine
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
2014-04-28 21:33:48 +02:00
Torsten Dreyer
4d4e1a2371 VoiceSynthesizer: add some test/debug properties
/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
2014-04-27 22:53:59 +02:00
Torsten Dreyer
38e2b8b11c Temporary fix for crash in FGVoiceMgr on reset 2014-04-27 21:38:24 +02:00
Torsten Dreyer
cadb77b18d use flite+hts for metar 2014-04-24 20:59:08 +02:00
Torsten Dreyer
f6b6cfc645 voice system: all doors in FLITE
Prepare for festival lite generated voices
2014-04-23 17:09:00 +02:00
Torsten Dreyer
19dd46c5b0 ATISEncoder: minor tweak
no trailing blank at runway designator
2014-04-23 17:07:00 +02:00
Torsten Dreyer
15525aab58 add atmosphere layer 8 for space exploration
as provided by Ron Jensen
2014-04-22 09:20:25 +02:00
Torsten Dreyer
4e89d05fb4 YASim: implement a versioning system
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.
2014-04-20 20:58:12 +02:00
James Turner
b3c7cb7c15 Fix crash with Nasal bindings.
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
2014-04-15 14:13:46 +01:00
Colin Douglas Howell
ef2898f25c Corrected fix for issue 1423 (YASim miscomputes incidence rotation of force vector)
I got the sign wrong in my previous fix, causing the vector to be rotated the
wrong way. See my latest comments in issue 1423. Sorry about that.
2014-04-05 11:58:16 +02:00
James Turner
5002814554 FreeBSD fixes
From Ganael Laplanche.
2014-04-04 15:33:27 +01:00
James Turner
01dca5e541 Fix link order of HTS / flite for GCC ld
- Clang, gold etc don't care but GCC ld still does.
2014-04-04 11:25:12 +01:00
Torsten Dreyer
ec2baa1a41 Merge commit 'refs/merge-requests/1579' of git://gitorious.org/fg/flightgear into yasimfixes 2014-04-04 08:57:16 +02:00
Torsten Dreyer
efc5c32633 Merge commit 'refs/merge-requests/1578' of git://gitorious.org/fg/flightgear into yasimfixes 2014-04-04 08:57:12 +02:00
Torsten Dreyer
5ba36b282f Merge commit 'refs/merge-requests/1577' of git://gitorious.org/fg/flightgear into yasimfixes 2014-04-04 08:57:05 +02:00
Thomas Geymayer
7f43a09fc5 Canvas: update for new bounding box getters. 2014-03-31 13:29:14 +02:00
Torsten Dreyer
44ba076720 allow binding of httpd to an address, not just a port
support --httpd=127.0.0.1:8080
2014-03-29 22:07:12 +01:00
Torsten Dreyer
390f6dd32d fix wrong computation of delta-t in jpg-httpd
this lead to a screenshot taken on each frame instead of
the defined interval
2014-03-29 11:22:34 +01:00
Torsten Dreyer
4be1aba62e Autopilot: enable debug output for logic elements 2014-03-28 17:48:35 +01:00
Colin Douglas Howell
8cca0adc58 Fix for issue 1427 (YASim fuselage's "cx" affects drag on all axes)
Correct Airplane::compileFuselage() so that a Fuselage's "cx"
only affects drag on the X axis.
2014-03-27 02:12:11 -07:00
James Turner
ca3cc03fac Ignore not-found 'config file' arguments.
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.
2014-03-27 08:05:02 +00:00
James Turner
19528fab8c Fix duplicated FGIO channels on reset.
Thanks to Nicholas Scheel for spotting this.
2014-03-26 19:24:00 +00:00
Torsten Dreyer
75f9d7e66e add nChildren to json properties 2014-03-26 15:06:24 +01:00
Torsten Dreyer
0dcc8aa34d Add a timestamp to JSON properties
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
2014-03-26 08:51:15 +01:00
Torsten Dreyer
f68ae55068 Don't return invalid JSON if node not found 2014-03-25 21:43:08 +01:00
Colin Douglas Howell
aa27b38666 Fix for issue 1423 (YASim miscomputes force vector on Surfaces with nonzero incidence)
Surface::calcForce() now does reverse incidence rotation of force vector properly.
2014-03-25 01:50:21 -07:00
Torsten Dreyer
e7dec994b8 httpd: provide more airport information in geojson
- provide runways as polygon geometry
- provide longest runway lenght, heading and surface type
- some code cleanup
2014-03-23 21:19:04 +01:00
Torsten Dreyer
2c3d779459 Add virtual destructor 2014-03-23 21:17:54 +01:00
James Turner
9847bf3d13 Fix for bug 1419, nav.dat runway binding
Clean runway names to standard structure (0-prefix) before looking up
in the cache, when binding ILS navs to runways.

https://code.google.com/p/flightgear-bugs/issues/detail?id=1419
2014-03-23 09:53:00 +00:00
Colin Douglas Howell
8a9ce0ccf7 Fix for issue 1400 (YASim slats always give full stall enhancement)
Surface::stallFunc() now scales _slatAlpha by _slatPos when adjusting stallAlpha.
2014-03-22 12:11:39 -07:00
Torsten Dreyer
527eb9d444 httpd navdb: report ils/loc as geojson multilinestring 2014-03-21 13:00:59 +01:00
Thomas Geymayer
58c01b112e Canvas: update for 'file'->'src' rename 2014-03-20 11:43:12 +01:00
Torsten Dreyer
d59c57717e Don't allow call with no Filter set. Leads to crash. 2014-03-19 17:24:52 +01:00
Torsten Dreyer
3d33aff7bc Add a http handler to access the nav database
see the browsermap for an example
2014-03-19 17:23:53 +01:00
Thomas Geymayer
f0ef2b9576 Expose HTTP client to Canvas. 2014-03-18 18:35:35 +01:00
Torsten Dreyer
efcc89480d httpd: don't spam the console with debug messages 2014-03-17 16:38:53 +01:00
Torsten Dreyer
1867ccb4a8 httpd: better handling of first-time notifications
ensure new listeners get notified on first update loop
also cleanup the PropertyChangeObserver on reset
2014-03-17 16:22:42 +01:00
James Turner
070dba29f9 Close dialogs on GUI shutdown
- avoids orphaned dialogs on reset
- requires some guards in NasalSys since Nasal is shutdown first, but
  dialogs can have Nasal modules.
2014-03-16 22:52:55 +00:00
James Turner
849c6ccc6e GPS fixes
- 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
2014-03-16 16:20:03 +00:00
Thomas Geymayer
764fbd519c CanvasWidget (PUI): make button index consistent with Canvas windows 2014-03-15 15:01:09 +01:00
Torsten Dreyer
a830708252 PropertyChangeWebsocket: fire change after subscribe 2014-03-14 21:36:29 +01:00
Torsten Dreyer
95d4c5898d httpd: handle url-rewrites 2014-03-14 16:39:16 +01:00
Torsten Dreyer
75933d3e1e add min/max freq to the frequencyformatter 2014-03-14 15:19:23 +01:00
James Turner
7041ed9078 Fix compilation with SYSTEM_SQLITE 2014-03-13 18:19:13 +00:00
James Turner
487546c848 Fix some leaks on reset
- tilecache 'clear_cache' is poorly named, ensure the destructor
  really deletes all outstanding entries.
2014-03-13 18:19:13 +00:00
Torsten Dreyer
aaa7fca621 NasalSys: arg is never null 2014-03-12 22:42:51 +01:00
Torsten Dreyer
7132947d16 httpd: update mongoose and websockets
* 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
2014-03-12 22:39:37 +01:00
Torsten Dreyer
275d2dc7fa Partial fix #1408 2014-03-12 21:21:56 +01:00
James Turner
c7f2992904 Add 'set-scenery-paths' command. 2014-03-12 18:56:19 +00:00
James Turner
56ca1fe93b Don't rebuild navcache for scenery changes
- Cache can drop all ground-nets.
2014-03-12 18:56:18 +00:00
James Turner
c00ab21fad ICAO.ils.xml data works read-only. 2014-03-12 18:56:18 +00:00
James Turner
ffa7854ed9 ICAO.threshold.xml works read-only. 2014-03-12 18:56:18 +00:00
James Turner
5f9c17bd69 ICAO.twr.xml works in read-only mode. 2014-03-12 09:50:39 +00:00
James Turner
afe02b9b36 Reset: tweak property PRESERVE
- ensure options are re-processed before restoring PRESERVEd
properties, so that sessions changes survive a reset.
2014-03-11 22:43:25 +00:00
James Turner
f2a3090384 Fix some Clang warnings. 2014-03-11 16:46:00 +00:00
James Turner
1edffd1d10 Reset: fix OSG stats handling 2014-03-11 16:45:47 +00:00
James Turner
f04d5f8758 Reset: work with threaded OSG modes 2014-03-11 16:45:31 +00:00
Torsten Dreyer
64c393d022 http property browser: don't crash on invalid nodes
Don't expect users to always pass valid node names
or paths
2014-03-10 23:40:42 +01:00
Torsten Dreyer
7c2ce9acf7 allow binding of arguments for fg-commands thru run.cgi
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
2014-03-10 22:58:52 +01:00
James Turner
f07771f3d5 Fix a crash after reset. 2014-03-10 17:43:15 +00:00
James Turner
cc607ae7e4 Save/restore initial state removed. 2014-03-10 17:29:28 +00:00
James Turner
9489009570 Fix fg-aircraft, fg-scenery props after reset.
- restore fg-aircraft properties, and PRESERVE fg-scenery ones,
across reset.
2014-03-10 17:24:42 +00:00
James Turner
03aa642155 Old reset code-path is removed. 2014-03-10 17:24:37 +00:00
James Turner
5e6c2b8e82 Reset the Autopilot on reposition.
- previously we restored AP state to initial; let's
actually re-init it after re-position.
2014-03-10 12:02:10 +00:00
James Turner
a8fe586e48 Revert wiping of /fdm on reposition.
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).
2014-03-10 12:00:51 +00:00
James Turner
7b2d710cd0 Add hts_engine 1.08 and flite_hts 1.05 code.
- 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.
2014-03-10 09:32:43 +00:00
Torsten Dreyer
dac3b45892 Some fixes for the httpd
- Set encoding of the property browser to utf-8
- add the properties index to the json
2014-03-08 14:47:13 +01:00
Torsten Dreyer
ed8ec8f092 JSON: make the response configurable, set encoding
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
2014-03-07 21:58:33 +01:00
Thomas Geymayer
ef3f0a2738 Canvas.MouseEvent: fix specific modifier states (ctrl, alt,...) 2014-03-07 16:19:40 +01:00
James Turner
86ba2a1628 Throw the reset switch.
- fix up CanvasMgr so canvas works after new reset.
2014-03-07 12:40:14 +00:00
James Turner
5ce2a067ca Fix JSBsim trimming on reposition.
- remove the entire /fdm tree on reposition
- force the initial NED wind values to 0.0 in JSBsim,
pending advice from people who know better.
2014-03-06 22:33:42 +00:00
Torsten Dreyer
b84026ce84 httpd: fix ignored port on --httpd=nnnn
also fix unconditional startup of the daemon
2014-03-06 21:19:49 +01:00
Torsten Dreyer
7602089460 Use the short xml name for properties in JSON 2014-03-06 18:00:11 +01:00
Torsten Dreyer
63e9cbed40 Initial commit for mongoose httpd 2014-03-06 13:19:15 +01:00