1
0
Fork 0
Commit graph

5051 commits

Author SHA1 Message Date
mfranz
306b818490 generic/output:
- support optional <preamble> and <postamble> which are written right
  after opening and before closing respectively. This can be used for a header
  line or an XML header.
- unescape <preamble>, <postamble>, <format>, <line_separator>, <var_separator>
  so that \t, \n, \r, \f, \v, \xnn, \nnn can be used directly (\a and \b are
  ignored; use \\ for the backslash) The long names ("carriagereturn") are still
  supported for <var_separator>, but one can just use \r, or \r\n too.
- don't abort when a chunk doesn't have a <node>. This is useful for adding
  constant chunks which consist only of a <format>, such as XML tags.
2007-07-29 13:58:58 +00:00
mfranz
991c2ff06a add unescape function for conversion of \t, \n, \x1b etc. in <format> strings 2007-07-29 12:26:33 +00:00
frohlich
ed677676c0 Modified Files:
src/Scenery/scenery.cxx: Use geodetic down vector for
	ground intersection.
2007-07-29 10:51:41 +00:00
frohlich
17262df51c Modified Files:
src/FDM/flight.cxx src/FDM/flight.hxx
	src/FDM/LaRCsim/LaRCsim.cxx src/FDM/SP/ADA.cxx
	src/Scenery/scenery.cxx src/Scenery/scenery.hxx:
	Remove obviously unused variables from FGInterface, make use of
	SGMath functions. No longer use plib math functions in FGInterface.
2007-07-29 10:21:22 +00:00
mfranz
22de2508aa - set filter dt only once
- make throttle more responsive (again)
2007-07-28 08:08:22 +00:00
mfranz
26af6a3207 - add (damped) aileron/rudder trimming (may be needed for mibs)
- use an FPS-independent lowpass filter for all damped properties
- cleanup
2007-07-27 21:57:55 +00:00
frohlich
49779e64f0 Modified Files:
src/AIModel/AIFlightPlanCreateCruise.cxx
	src/Traffic/Schedule.cxx:
	SGGeoc::fromCart should now work correct.
2007-07-27 19:31:44 +00:00
mfranz
b0bb63bf79 Nick "Lethe" WARNE: prevent crash caused by improper use of --multiplay
mf: stripped down the log message a bit :-)
2007-07-25 15:17:06 +00:00
timoore
a91c194b98 avoid g++ warning about the members being initialized out of order
Author: Hans Ulrich Niedermann <hun@n-dimensional.de>
Committer: Tim Moore <timoore@redhat.com>
2007-07-24 05:36:27 +00:00
andy
0368accc6d Maik: add a downwashfactor tunable 2007-07-23 16:10:21 +00:00
durk
c51c0b1664 Slightly altered calling sequence ensures AI aircraft are removed from
memory when flying out of user range.
2007-07-21 12:29:09 +00:00
durk
721d849c79 - Added ultra-light traffic is now a separate traffic class that can have its
own preferential runway support. In future versions, we might want to
condider having a more generic mechanism for this.
- Keep a history of active runway for each class, so that runway assignments
are more consistent after whether updates or time-related schedule changes.
2007-07-21 11:05:20 +00:00
timoore
3a0b1286ff Support for linking against OSG debugging libraries. 2007-07-20 17:29:31 +00:00
mfranz
5c912ffad9 remove redundant if check in cases of if (foo) delete foo;
The C++ standard explicitly allows deleting a null pointer.
2007-07-20 14:46:45 +00:00
durk
da77779436 Martin Spott:
On most Unix platforms like FreeBSD, Solaris, IRIX (AIX is even worse)
- just not on Linux - the linker wants to know about _all_ required
libraries. So even if a shared library "libosgViewer" itself is linked
against "libosgGA" and "libosgText", you still have to name these in
order to build an "fgfs" binary.

Currently, other libraries like "-losgDB" and "-losgUtil" are
explicitly mentioned on the "fgfs" linker command, but "-losgGA" and
"-losgText" are not. This simple patch lets the linker honour
everything that's required
2007-07-17 18:00:06 +00:00
durk
b452234cb2 Fixes and code clean-up:
- Airports Directory
Thomas Foerster: Pulls out the FGTaxiNode implementation into gnnode.cxx.
Melchior / Durk: Copy Constructor and assignment operator for FGTaxiRoute

- AIModels Directory
Durk / Melchior / Czaba Halasz: Ensure that all derived classes use AIBase
member 'callsign'. Adapted, moved and deleted getter/setter functions where
necessary
Czaba Halasz: Fix AIBase model path vs. submodel path consistency.

- Traffic Directory and AIModels CreateFlightPlanCruise
DT: Temporary revert parts of the position estimation code.
2007-07-15 14:08:31 +00:00
mfranz
aacabde342 remove material name from the class 2007-07-14 07:35:12 +00:00
frohlich
e19b2289c9 Also untie waypoint-missed-count. 2007-07-14 04:27:47 +00:00
mfranz
cbcc7af5d0 move the other parts of _init_keyboard() to _postinit_keyboard(), too.
This is still before anything else than the splash screen is displayed,
and it's cleaner that way. (The Nasal processing parts *must* be there.)
2007-07-13 10:15:48 +00:00
mfranz
5246e69b5a - use ostringstream instead of sprintf() for the __js%d namespaces
- set namespace __kbd for all keyboard Nasal code (not meant for public use)
- read <nasal><script> blocks from the keyboard file
2007-07-12 22:57:14 +00:00
mfranz
f8691bb86e make properties created via --prop option default to type UNSPECIFIED.
For compatibility with the old behavior just ask for a string:
--prop:string:foo=0  or shorter  --prop:s:foo=0
2007-07-12 14:45:46 +00:00
mfranz
1e6fa7d2a5 a token can be empty (empty line), in which case there's no token[0] 2007-07-11 15:18:24 +00:00
mfranz
94326d14af don't use _tgt_rudder uninitialized 2007-07-11 10:56:33 +00:00
mfranz
158bfd1860 Hans FUGAL: mac compilation fix 2007-07-10 18:35:50 +00:00
durk
fdc1a2ba54 Bugfixes: 1) Fix the if (next) setLeadDistance bug
(reported by Csaba Halaszi /helijah)
          2) Decrease AI aircraft Heading error tolerance to 1% of its
             original value. This is necessary to mitigate spinning and
             makes for actual "on-runway" landings.
2007-07-10 07:01:54 +00:00
andy
fe5ac84f8c Maik: remove redundant (and innapropriate in the YASim core) property interface for the rotorgear. 2007-07-09 19:51:01 +00:00
mfranz
80467ed6d0 Harald JOHNSEN: initialize elapsedTime 2007-07-09 17:15:11 +00:00
durk
83c37cc860 Publish and update callsigns of Traffic Manager (TM) created AITraffic. 2007-07-09 05:07:56 +00:00
frohlich
c1e29d0998 Modified Files:
src/AIModel/AIFlightPlan.hxx
	src/AIModel/AIFlightPlanCreateCruise.cxx
	src/AIModel/AITanker.cxx src/Traffic/Schedule.cxx:
	Move member variables that should better be in function local
	scope into the functions. Make more use of SGMath functions.
2007-07-08 08:46:29 +00:00
durk
f83fbfdf9c Fix "Tankers fly at warp 2" bug. 2007-07-08 07:08:49 +00:00
durk
e01ae98824 Fixed an overly ambitious checkForCircularWaits() function. AI Aircraft
don't mysteriously disappear anymore when confronted with the user
controlled aircraft.
2007-07-07 12:52:49 +00:00
mfranz
98d23457ac Maik JUSTUS: swap stereo L/R, and fix Doppler 2007-07-06 20:53:48 +00:00
andy
389e23b867 Wrong subtraction order lead to the "extra" space available (instead
of the extra space *required*) in a rowspan object being redistributed
back into the span, leading to a near-doubling of the size for small
objects with large span ranges.
2007-07-05 21:25:01 +00:00
durk
4238a46faa Thomas Foerster: Made FGParking a subclass of FGTaxiNode
Fixed bug due to longstanding inconsistency in FGAirport
                 getter functions return types.
Durk Talsma:     Fixed traffic record initialization bug that occured
                 when taxiing traffic was waiting for traffic on runway
2007-07-05 19:00:59 +00:00
mfranz
6168ba7850 Vivian MEAZZA: remove no longer needed debug messages 2007-07-05 15:28:44 +00:00
durk
33486a0308 Thomas Foerster:
I refactored the XML loading code out of FGAirportDynamics and
FGRunwayPreference. I also added a new class XMLLoader, which serves as a
facade to the loader functions. Further I changed FGRunwayPreference to just
keep a FGAirport ref, which is more concise and closer to the right(tm)
solution than storing the airport data a second time ;-)
2007-07-04 17:42:20 +00:00
durk
7dfae1562b Thomas Foerster:
I refactored the XML loading code out of FGAirportDynamics and
FGRunwayPreference. I also added a new class XMLLoader, which serves as a
facade to the loader functions. Further I changed FGRunwayPreference to just
keep a FGAirport ref, which is more concise and closer to the right(tm)
solution than storing the airport data a second time ;-)
2007-07-04 17:39:03 +00:00
mfranz
bb634fcd2e make target RTT texture configurable as <radar-texture-path>
(ported from fg/plib, but doesn't yet work here)
2007-07-03 18:24:45 +00:00
mfranz
4ba64132b9 John DENKER: validate_format(): handle multiple flags correctly 2007-07-03 17:26:54 +00:00
mfranz
d1dfc42dce remove the "terrain-elevation" command again. This is no longer necessary,
as we have the geodinfo() Nasal function now.
2007-07-03 15:41:03 +00:00
mfranz
beef8cd1ed - limit max number of messages displayed at the same time to 5 (Ideally,
it should be just one, but we don't want to block everything and
  don't want to miss messages either.)
- prevent message duplicates
2007-07-03 15:35:55 +00:00
mfranz
d40678628f John DENKER: don't grow /sim/logging/classes indefinitely on read-out 2007-07-03 05:46:59 +00:00
mfranz
f40d2f3b00 - allow multiple message/error dialogs
- hand the generation of the message dialog over to
  $FG_ROOT/gui/dialogs/message.xml
2007-07-02 14:32:30 +00:00
mfranz
9d0c571c9a Tim MOORE:
"This patch fixes the use of the keypad with numlock in the osgViewer
version of FlightGear."

"This also restores the handling of resize events while trying to stay
out of the way of the multiple display code."
2007-07-01 16:39:52 +00:00
mfranz
2eb175e772 Csaba HALASZ: use the OSG member variables right away
mf: remove redundant ARC check
2007-07-01 14:26:06 +00:00
mfranz
50e19ee239 - fix carttogeod() function (don't convert the altitude from radian to degree ;-)
- better argument check in parsexml()
2007-07-01 11:07:53 +00:00
mfranz
1a108d2015 minor cleanup: don't need the args array in the class anymore 2007-06-30 09:44:33 +00:00
mfranz
4faf9d4a74 Vivian MEAZZA: allow to turn off heading marker (symbol for own aircaft)
mf: remove commented out
2007-06-30 08:53:06 +00:00
mfranz
663ff14364 sync with recent changes to fg/plib 2007-06-29 22:44:41 +00:00
mfranz
a907b29b6c add parsexml() function, which is a wrapper around the built-in easyxml
parser. Advantages over xml.nas:             (reviewed and OK'ed by Andy)

- faster (33% ... only. I had hoped for more.)
- more standards compliant
- should support UTF
- I don't have to support it.  ;-)

Usage: parsexml(<path> [, <start-tag> [, <end-tag> [, <data> [, <pi>]]]]);

<path> is an absolute file path, the rest are optional callback functions.

Example:
    parsexml("/tmp/foo.xml", nil, nil, func(d) { print("DATA FOUND: ", d) });
2007-06-29 15:34:38 +00:00
mfranz
3482c5bc40 comment out cout (XMLVisitor::endXML() works now) 2007-06-29 10:55:52 +00:00
mfranz
8c3f03ae03 make it nicer & shorter :-) 2007-06-28 19:23:57 +00:00
durk
f4529e5cfe AI traffic now honors separate runway assignments for different types of
traffic (i.e. commercial airliners will use a differnt part of the airport
than general avation, ultralight and/or military traffic.
2007-06-28 18:30:35 +00:00
mfranz
cb15006f53 allow to specify a node type: --prop:[type:]name=value
where type is one of string (default), double, float, long, int, bool
Using only the first letter works, too.

  --prop:foo=123         ... sets property foo to string 123 (old behavior)
  --prop:string:foo=123  ... verbose version of above
  --prop:s:foo=123       ... slightly less verbose version of above
  --prop:bool:foo=1      ... makes property a bool of value 'true'

I hope this isn't considered a silly gimmick. I need this often and maybe
other developers do, too. It's useful in cases where the difference really
matters. if (getprop("/foo")), for instance, is TRUE even when the property
contains string "false", as all strings are TRUE.
2007-06-28 11:26:40 +00:00
durk
54ef3b77d5 Thomas Foerster: Replaced AI network route tracing algorithm by a much more
efficiently performing "Dijkstra algorithm".

Durk Talsma: Added the detection of "circular" wait situations in the AI
ground network. A circular wait is a situation where aircraft a waits for
b; b waits for c; and c (in turn) waits for a. The checkCircularWaits
function detects these situations.

The current "solution" to a circular wait is rather crude: Remove the
aircraft from the scene. A proper solution needs a lot more work, however,
and at least this patch stops the AI system from clogging up. in case of a
circular wait.
2007-06-28 07:54:39 +00:00
durk
1613d7e63e Thomas Foerster: Prepare for the inclusion of aircraft specific performance
data for AI traffic. Default performance classes are still available as a
backup. This database will allow the calculation of aircraft-specific
take-off speed and estimate runway lenght requirements. Further added
rudimentary support for take-off and landing rotation of AIAircraft.
2007-06-28 07:47:20 +00:00
mfranz
0b84cddee7 set north/east/down speed to make radar map mode work 2007-06-27 15:28:23 +00:00
curt
50c7a31de8 Fix a long standing bug in a code path that is probably executed very rarely. 2007-06-26 21:29:59 +00:00
mfranz
bb413bf3e2 make update interval configurable, even though the default 1.0 is supposed
to be a realistic value
2007-06-24 22:13:25 +00:00
mfranz
143e3f34d4 what is this "plib" thing?! 2007-06-24 20:34:01 +00:00
mfranz
ae4b9b0ce3 Maik JUSTUS: avoid Doppler artifacts (listener changes position quickly, etc.) 2007-06-24 20:32:02 +00:00
mfranz
60ad87fc54 the former weather radar is now a generic radar (weather and aircraft),
so rename the instrument from <wxradar> to <radar>
2007-06-24 19:50:15 +00:00
mfranz
1b55d67ff7 - don't mix /instrumentation/radar and /instrumentation/wxradar wildly
together -- there's only *one* instrument node now
- don't take "random" tacan, but <tacan-source> from the instrumentation
  config (or /instrumentation/tacan[0] by default)
- don't take "random" display-controls from /instrumentation/tacan[0]
- default name is now "radar" (formerly "wxradar")
2007-06-24 17:15:48 +00:00
mfranz
5abe6dffdb degrade "Warning: catching up on tile delete queue" from SG_ALERT to SG_WARN.
* it says it's a warning (while in fact it's just saying what it's doing)
* the user can't do much here (yes, flying slower, but it doesn't say that :-)
* scrolling those countless messages in the terminal puts stress on the CPU
  in a time when it's apparently already struggling
2007-06-24 08:30:55 +00:00
mfranz
800dd73551 Vivian MEAZZA & Tim MOORE:
- re-enable od_gauge ("owner drawn" render-to-texture instruments)
- implement radar in c++ (unlimited number of clouds/ai/mp/... objects,
  better performance)
2007-06-24 07:57:45 +00:00
mfranz
848d850328 Tim MOORE: addCamera() method (needed by og_gauge) 2007-06-24 07:52:50 +00:00
mfranz
3461466c81 add geodinfo(<lat>, <lon>) function that returns an array [<elev>, <matdata>]
or nil if no terrain intersection could be made (tile not loaded yet).
<matdata> is a hash with information about the surface material, or nil
if no material is assigned (shouldn't really happen, but one never knows).

Example:

  var ac = geo.aircraft_position();
  var data = geoddata(ac.lat(), ac.lon());
  debug.dump(data);

  # which outputs
  [ 294.5862574369132, { light_coverage : 0, bumpiness : 0, load_resistance : 1e+30,
  solid : 1, names : [ "pc_taxiway", "dirt_rwytaxiway" ], friction_factor : 1,
  rolling_friction : 0.02 } ]

With this information it can be determined how far an object would sink in,
if the coordinate is on a runway, etc.

  foreach (var n; data[1].names)
      if (string.match(n, "p[ac]_*"))
          im_on_a_runway();
2007-06-23 15:25:41 +00:00
mfranz
ee23145936 Maik JUSTUS: "ease the rotor of the hornet if not rotating" 2007-06-23 06:41:17 +00:00
mfranz
a0789e1c35 increase range of searched and displayed frequencies 40 -> 50 nm 2007-06-22 18:12:31 +00:00
mfranz
6dd5f0f6d5 Maik JUSTUS: prevent occasional OpenAL crashes after resets 2007-06-22 16:51:12 +00:00
mfranz
aca95e99e0 Maik JUSTUS: fix/implement directional sound 2007-06-21 21:49:46 +00:00
mfranz
2c208deab8 ... but use the exception text, of course. :-) 2007-06-19 10:56:50 +00:00
mfranz
5123de61ee fix bug that prevented /sim/sceneryloaded from ever becoming "true" if
/sim/screneryloaded-override was "true". At least one subsystem (od_gauge)
waits for /sim/sceneryloaded to bypass CPU intensive code until the scenery
is up. This broke e.g. the RTT-radar when using /sim/screneryloaded-override

--prop:sim/sceneryloaded-override=true has the effect that fgfs
doesn't show the splash screen until the scenery is loaded, but shows
the OTW view (scenery/aircraft) at the earliest possible moment. This is
useful for developers who often need to run fgfs only to check some minor
detail, while not caring about stuttering caused by scenery loading.
2007-06-19 10:18:14 +00:00
mfranz
588ce7e470 loadxml, savexml: don't pop up a GUI error message on error, but use a
simple SG_LOG instead. The user didn't call the fgcommand, so why should
s/he be bothered with that? And the actually caller of the command gets a
return value and can pop up a dialog if it thinks it's necessary.
2007-06-19 10:10:00 +00:00
mfranz
49a89950a8 256 Bytes ought to be enough for anybody ... hmm, better 512.
Why /sim/fg-current at all? Because we have a file selector dialog
(still unfinished), and one might like to start it from the current
directory, to find saved flights/screenshots/whatever.
2007-06-17 08:14:02 +00:00
mfranz
0c6ecd1271 set /sim/fg-current to current working directory; getcwd() is defined in
unistd.h (which was already included), and should be available in direct.h
under name _getcwd on MS Windows.
2007-06-16 21:35:16 +00:00
mfranz
58e0deb56b Maik JUSTUS: add functions carttogeod() and geodtocart() to convert between
x/y/z and lat/lon/alt                                      (OK'ed by Andy)
2007-06-16 18:22:20 +00:00
mfranz
b502cef066 Don't catch a (potentially) meaningful exception only to replace it with
a meaningless one. bootstrap.cxx/main() will catch it, anyway.
2007-06-16 16:25:40 +00:00
fredb
97ed8554c6 Win32 fix 2007-06-16 16:16:15 +00:00
fredb
69f0a797b3 OSG file renamed 2007-06-16 16:15:49 +00:00
fredb
291462c25e Consistency fix 2007-06-16 15:57:42 +00:00
mfranz
b5917d62d2 Tim MOORE:
FGManipulator.*:
"This patch works around a bug in OSG's handling of modifier keys. The
symptom of the bug is that modifier keys don't appear to be released."

fg_os_osgviewer.cxx:
"This patch fixes the test for support of cursor changes in OSG 2.0."
2007-06-16 09:39:56 +00:00
mfranz
28da7c0a90 Maik JUSTUS: "small update to the tilt-rotor feature" 2007-06-16 07:22:47 +00:00
durk
6fc1a51e1d Removed a stray debug message. 2007-06-16 05:38:05 +00:00
durk
0643b21baa Fix for refueling and radar calculations. 2007-06-15 20:52:32 +00:00
durk
864fd40ee9 Alex Bory: TACAN has to search the new AI submode 'tanker'. 2007-06-14 05:26:57 +00:00
andy
d0550441bb Maik: Adding support for tilting of the rotor. Can be used for small
autogyros or even for the Osprey.
2007-06-13 21:10:23 +00:00
mfranz
c09224cb11 Make loadxml use an absolute path, like savexml (for consistency reasons, and
because this allows to load from FG_HOME. To reduce security risks, always
append an ".xml" extension if there was none. Makes it hard to read /etc/secret
and to overwrite ~/.bashrc.  :-)
2007-06-12 16:13:21 +00:00
mfranz
b4cdfed406 Vivian MEAZZA:
simulate rotational moment of inertia by using a filter
2007-06-11 20:47:20 +00:00
mfranz
37b4f921e1 - make next_view()/pref_view() trigger listeners, otherwise the "view_cycle"
fgcommand doesn't activate Dynamic View, Fly-By View, etc.
- consistent indentation (broke that with my last commit :-)
2007-06-11 19:02:01 +00:00
mfranz
d39432ea6c Vivian MEAZZA:
- let sumodels without subsubmodels die on impact
- remove "sub-id" tying

mf: move variable declarations to better places, variable renaming
2007-06-10 18:24:48 +00:00
curt
b163af3010 Fix indentation. 2007-06-10 16:01:09 +00:00
curt
ba6f4cb42f Syd Adams:
Export ground speed to property system under /velocities.
2007-06-10 15:58:50 +00:00
durk
514acc9f5f Changed formatting to K&R/4 by "popular demand". 2007-06-10 06:06:57 +00:00
durk
fd71817c3b Added back in a few defines that I had accidentally deleted before. 2007-06-09 13:25:21 +00:00
durk
ba8ed137cf Code cleanup of AIModels (mainly AIAircraft), by Thomas Foerster 2007-06-09 11:49:16 +00:00
mfranz
dbdfc9012b use getNode instead of hasValue (it's just a dir node and doesn't need a value) 2007-06-09 10:15:50 +00:00
frohlich
01f9b2d7b2 Modified Files:
fg_os_osgviewer.cxx: Enable mouse cursor change code on
	sufficiently recent osg versions.
2007-06-08 07:14:56 +00:00
frohlich
94bb4ac29b Modified Files:
src/Main/options.cxx:
	Olaf Flebbe: Make use of SGSceneFeatues for anisotropic filtering,
        clean up.
2007-06-08 06:50:38 +00:00
mfranz
2e1756156f another secret commit to sneak in stuff:
- cleanup
2007-06-07 22:48:37 +00:00
andy
99885791e9 Remove the GUI popup from the screen capture C++ code (a request via
IRC wanted this to be scritable) and add it back (as a tip popup) via
a little nasal in the keyboard handler.  Also put the synthesis of
property nodes back into fgcommand(), because I got cold feet.
2007-06-07 16:57:59 +00:00
mfranz
5a73a46cd0 Vivian MEAZZA:
- collision detection for AI objects
- subsubmodels

mf: various modifications; more general cleanup to do
2007-06-07 16:30:26 +00:00
andy
b693047703 Allow the second (property node) argument to fgcommand() to be nil or
missing, for sanity.  Note that this will pass the resulting NULL
pointer through into the underlying SGCommand handlers, some of which
may be unprepared for it.  So basically this is now yet another way
you can use Nasal to exercise bugs and hose your sim; no biggie.
2007-06-07 16:17:48 +00:00
mfranz
b3b87842b1 savexml: analog to loadxml, if no <sourcenode> is given, save file
contents from the argument tree's <data> node. That way one doesn't have
to plug a temporary branch into the main tree.
2007-06-06 21:18:25 +00:00
frohlich
532389a5bd Modified Files:
FGManipulator.cxx: Stuart Buchanan: add tab key translation.
2007-06-05 17:44:49 +00:00
andy
a90a24d9dd Maik: fix crash when using aircraft with hitches under the command
line solver.  (He promises to get all the MP interaction out of the
FDM in a future patch.)
2007-06-05 16:01:43 +00:00
mfranz
ff454131d5 loadxml: if argument "targetnode" isn't defined, return the file data in
the argument tree under "data". This is useful in cases where the file
data are only needed temporarily and shouldn't remain in the main tree.
2007-06-04 10:07:31 +00:00
mfranz
d11e18f9a7 Syd ADAMS:
"normalize the radar x and y-shift , 0 to 1.0 based on
/instruments/radar/range to make animation simpler"
2007-06-03 18:17:05 +00:00
mfranz
158dbdd96c Sync w. JSBSim CVS (merge from PRE_OSG_PLIB_20061029 branch) 2007-06-03 12:49:19 +00:00
mfranz
3cda82e0a9 Sync w. JSBSim CVS (merge from PRE_OSG_PLIB_20061029 branch) 2007-06-03 09:37:02 +00:00
durk
2c3dc5fca1 -Minor fix: Only read traffic from data/Traffic/fgtraffic.xml if that path really exists.
- Added a comment explaining why the first 1000 frames are skipped.
2007-05-31 19:53:53 +00:00
mfranz
bbb1d2d0c3 - add heading-deg, pitch-deg, roll-deg to impact/
- if no <impact-reports> node is defined for a particular submodel, then
  write the path to /ai/models/model-impact instead
- don't tie() properties that are only ever set a single time, if at all!
- better variable names
2007-05-31 18:08:12 +00:00
mfranz
e8f2255039 Maik JUSTUS: fix typo (ROTORRELTARGET) 2007-05-31 16:58:58 +00:00
frohlich
ba5544e652 Modified Files:
src/Cockpit/panel_io.cxx: use existing function to parse an
	interpolation table.
2007-05-31 12:12:06 +00:00
frohlich
b59e3fe6ec Modified Files:
src/GUI/dialog.cxx src/GUI/menubar.cxx
	src/Include/config.h-msvc8 src/Main/fg_os_osgviewer.cxx:
	Olaf Flebbe: build fixes for osgviewer on win32.
2007-05-30 13:15:14 +00:00
frohlich
8bce048752 Modified Files:
src/Main/options.cxx:
	Olaf Flebbe: Improoved texture filtering.
2007-05-28 05:21:45 +00:00
andy
1a5bbec83b Maik: add ROTORELTARGET and ROTORENGINEMAXRELTORQUE input axes 2007-05-27 20:19:15 +00:00
frohlich
46ccdeffd4 Modified Files:
src/Input/input.cxx src/Input/input.hxx
	src/Main/FGManipulator.cxx src/Main/fg_os.cxx
 	src/Main/fg_os.hxx src/Main/fg_os_osgviewer.cxx
	src/Main/fg_os_sdl.cxx src/Main/renderer.cxx
	src/Main/renderer.hxx: First cut of osg multi view configurations.
2007-05-26 13:53:46 +00:00
frohlich
4317dbf729 Modified Files:
src/Scenery/tileentry.cxx: Jonathan Wagner:
	Removes black dots by accounting for radius of nodes
	when calculating visible nodes for traversal without removing the
	optimization.  Confirmed fix with a few people on IRC.
2007-05-26 13:51:23 +00:00
frohlich
0b44409fca Modified Files:
src/GUI/gui.h src/GUI/gui_funcs.cxx src/Main/fg_commands.cxx
	src/Main/renderer.cxx src/Main/renderer.hxx: Tim Moore:
	These patches implement a command to dump the entire OSG scene graph as
        a .osg text file. While large, this allows debuggers to really see
        what's happening in the scene graph.
2007-05-26 11:39:13 +00:00
frohlich
c9c90f17fe Modified Files:
src/Main/renderer.cxx:
	Tim Moore:
	This patch fixes the (lack of) spin animation in the osgViewer version.
2007-05-26 11:33:11 +00:00
andy
7986caf75b Maik: place the contact points at the rotor blade tips (center+radius), not at center+diameter 2007-05-25 22:58:04 +00:00
andy
96f7bd90de Maik: add unbalance and testing of rotor ground contact 2007-05-25 21:15:59 +00:00
frohlich
e21d51c4bb Modified Files:
src/Main/FGManipulator.cxx: Tim Moore:
	This adds support for the keypad and the ever-important backspace and
	delete (!) to the osgViewer code.
2007-05-25 18:08:37 +00:00
durk
5b6e0f6cc1 Don't fix what ain't broke. 2007-05-25 07:20:41 +00:00
frohlich
ca69697ca6 Quit the application on window close. 2007-05-23 17:57:05 +00:00
andy
66cef84e55 Need to pull in config.h before plib/pu.h or else PUI thinks it's in
Glut mode and the build breaks under SDL
2007-05-21 19:24:57 +00:00
frohlich
7443b8b5e8 Modified Files:
configure.ac src/Main/Makefile.am src/Main/fg_os.cxx
	src/Main/fg_os.hxx src/Main/fg_os_sdl.cxx src/Main/main.cxx
	src/Main/renderer.cxx src/Main/renderer.hxx
	src/Network/jpg-httpd.cxx
Added Files:
	src/Main/FGManipulator.cxx src/Main/FGManipulator.hxx
	src/Main/fg_os_osgviewer.cxx:
	Tim Moore: Make use of osgViewer.
2007-05-21 17:50:02 +00:00
curt
95015dc61f Fix an array overrun error (Ok'd by Jon) 2007-05-17 20:25:16 +00:00
curt
738b40158d Ladislav Michnovič: fix a 64bit problem. 2007-05-17 18:43:36 +00:00
curt
a8a971b79d For now, OSG head should look for the same "data" tree version as the plib
branch.
2007-05-16 03:53:47 +00:00
mfranz
b0fd3deeb0 reverting a small part; shouldn't make a difference, though 2007-05-15 21:37:16 +00:00
mfranz
5bbd649b5a Maik JUSTUS: "further (final?) modifications for the jet ranger rotor" 2007-05-15 21:30:33 +00:00
mfranz
b727604591 drop /ai/models/ballistic[]/impact/signal node, and allow instead to define
a report node in the submodels config:

  <impact-reports>/sim/model/cow/impact</impact-reports>

When an impact happens, then the path of the submodel will be written to
this node. An attached listener function can evaluate the impact properties.
2007-05-15 19:45:41 +00:00
mfranz
4de2c7619a - add leading underscores to class member variables
- initialize ht_agl_ft with high value to avoid premature impact animation
- cosmetics
2007-05-15 17:22:49 +00:00
mfranz
7d5952b185 Vivian MEAZZA: add terrain collision for submodels on request
(set <impact>1</impact> in the submodel config)

mf: minor modifications & cleanup; more to come
2007-05-15 16:19:11 +00:00
mfranz
1bdea279cd - don't abort just because a sample wasn't found
- rename to play-audio-sample (not every sound is a message)
2007-05-15 14:39:56 +00:00
mfranz
8eeafbac8e Andy ROSS:
add systime() function for benchmarking purposes. It returns UNIX epoch
time in seconds.
2007-05-14 16:24:41 +00:00
mfranz
30295a7d37 let "terrain-elevation" also return material name ("material" -> "Grass")
and solid state ("solid")
2007-05-13 19:03:15 +00:00
mfranz
26d6fa87a2 s/resistence/resistance/ 2007-05-13 11:58:36 +00:00
mfranz
ab2209be8c s/resistence/resistance/ 2007-05-13 11:53:21 +00:00
mfranz
aa386b577d silence MSVC8 2007-05-13 08:43:40 +00:00
mfranz
76e76bb95d add error messages for invalid args to settimer() 2007-05-12 18:15:45 +00:00
mfranz
baac43778e Anders GIDENSTAM: fix slip skid ball (merge from JSBSim/cvs)
JSB: "Fixed a problem with turn coordinator bounding while at rest on the runway"
2007-05-12 15:10:39 +00:00
mfranz
0a9d71ee51 Vivian MEAZZA:
- extract common parts of load() and loadAI() into setData()
- fix trigger handling for aircraft that set a not yet existing property
2007-05-12 10:39:56 +00:00
mfranz
71cdd8c59a - degrade electrical XML SG_ALERT to SG_WARN. The reason why this is output
at all is that this method is meant to be deprecated. But if it doesn't
  say that, and there's no generic replacement at all, then it's rather
  pointless.
- simplify parameter initialization (The old code copied from Instrumentation/
  but has been simplified there in the same manner a few months ago
  The new method is less picky about additional nodes ane outputs less
  pointless alerts. If there shall really be a check for that, then
  this should be a separate function. But it's nowhere else done in fgfs.
2007-05-11 18:00:07 +00:00
mfranz
a4fde6c4d8 - don't abort just because of an unexpected "repeat period"! Complain and
recover instead
- it was apparently planned to run the updated loop only every 1000th
  frame, but the counter isn't reset, so it runs every frame
- use SG_LOG instead of cerr
- don't add redundant slashes in SGPath::append()
2007-05-10 14:28:17 +00:00
mfranz
794f5cc154 - One of the most frequent bug reports is about "terminate called after
throwing an instance of 'sg_io_exception'\nAbandon". And this is caused
  by compiling fgfs/sg without exception support (unlikely) or linking
  against a libSDL/libglut that was compiled/linked without execption
  support. While we can't fix that, we can tell the users who's to blame. :-)
- handle  const char *  exceptions
2007-05-10 12:50:50 +00:00
mfranz
adcd01d7dc Maik JUSTUS: remove temporary debugging message 2007-05-09 21:12:20 +00:00
mfranz
282156ecf8 degrade SG_ALERT message about phi/delta3 values to SG_WARN (should
probably be SG_DEBUG!?)
2007-05-09 21:01:19 +00:00
frohlich
16a2bb0118 Modified Files:
src/ATC/AIPlane.cxx src/ATC/ATC.cxx src/ATC/ATCDialog.cxx
	src/ATC/ATCmgr.cxx src/ATC/Makefile.am src/ATC/approach.cxx
	src/ATC/atis.cxx src/ATC/ground.cxx src/ATC/tower.cxx
	src/GUI/mouse.cxx src/Main/Makefile.am src/Main/fg_init.cxx
	src/Main/fg_props.cxx src/Main/globals.cxx
	src/Main/globals.hxx src/Main/main.cxx src/Main/renderer.cxx
	src/Model/acmodel.cxx src/Scenery/scenery.cxx
	src/Scenery/scenery.hxx src/Scenery/tilemgr.cxx
	src/Scenery/tilemgr.hxx
Removed Files:
	src/ATC/ATCdisplay.cxx src/ATC/ATCdisplay.hxx:
	Remove unused functions and the disabled ATC display.
2007-05-09 20:41:08 +00:00
mfranz
7b05646ed0 Maik JUSTUS:
"minor update for the rotor FDM. It results in a more realistic
calculation of the phase shift of rotor and therefor in a little bit
more realistic flight behavior.
(Additionally you can modify the initial position of the rotor and some
(not finished) modifications for the jet ranger rotor)."
2007-05-09 20:36:43 +00:00
frohlich
b51292d9db Modified Files:
src/FDM/groundcache.cxx src/Main/fg_commands.cxx
	src/Main/main.cxx src/Main/renderer.cxx
	src/Scenery/FGTileLoader.cxx src/Scenery/scenery.cxx
	src/Scenery/scenery.hxx src/Scenery/tileentry.cxx
	src/Scenery/tileentry.hxx src/Scenery/tilemgr.cxx
	src/Scenery/tilemgr.hxx: Simplify scenegraph structure.
2007-05-08 06:12:26 +00:00
mfranz
b1b08beef8 (untested) last-minute changes are evil! :-) 2007-05-07 14:37:38 +00:00
mfranz
e88ba9a037 property_list.cxx: in verbose mode (toggle with Ctrl-'.'-entry) also
show "secret" values, that is: values of nodes with children. These
  can be used like all normal (leaf) properties, but their values were
  until now only shown in writeProperties() dumps. Also show the
  number of attached listeners. Example:    foo = 'bar' (string, AU, L3).

dialog.cxx: add warning message for broken <format>s; cosmetics
2007-05-07 14:29:40 +00:00
mfranz
ef3fb93056 let foo.getAttribute("listeners") return the number of listeners attached
to props.Node foo  (shall be used in debug.nas and possibly props.nas)
2007-05-07 14:23:56 +00:00
mfranz
1ec6acce39 cosmetics: make the reason for the cast obvious. (Now that almost all of
fgfs has to be recompiled (because of a patch to simgear/props/props.hxx)
this is the right time to commit this completely unimportant patch. :-)
2007-05-07 14:06:05 +00:00
mfranz
52a4c527a6 initialize variables before using them 2007-05-06 14:02:44 +00:00
mfranz
939f83118f use STL_IOMANIP to load <iomanip> 2007-05-05 11:40:12 +00:00
mfranz
3d9ed0a10f revert last: keep --props option because of option architecture 2007-05-05 09:57:17 +00:00
mfranz
158e3ebdb4 Declare --props option obsolete and issue a warning message. Rationale:
- props is easy to mix up with the --prop option (for setting properties)
- the name is unspecific and inconsistent: other option names describe
  the protocol -- the way to get the properties. How is, for example,
  --httpd less about prop(ertie)s?
- two identical options easily confuse people, as can be seen in The
  FlightGear Manual, where --telnet and --props were described differently
2007-05-05 09:16:59 +00:00
frohlich
4fe615fff5 Modified Files:
src/AIModel/AIBase.cxx src/AIModel/AICarrier.cxx
	src/ATC/AIEntity.cxx src/Cockpit/hud_rwy.cxx
 	src/FDM/Makefile.am src/FDM/flight.hxx src/FDM/groundcache.cxx
	src/Instrumentation/HUD/HUD_runway.cxx src/Main/Makefile.am
	src/Main/fg_init.cxx src/Main/main.cxx src/Main/renderer.cxx
	src/Main/viewer.cxx src/Main/viewer.hxx src/Model/acmodel.cxx
	src/Model/modelmgr.cxx src/Scenery/scenery.cxx
	src/Scenery/scenery.hxx src/Scenery/tileentry.cxx
	src/Time/tmp.cxx: Remove the scenery center handling.
	Osg has double valued transforms at any relevant place.
2007-05-05 08:08:24 +00:00
mfranz
f80d5676b4 add missing property names 2007-05-04 19:34:19 +00:00
mfranz
5d8f383ded - remove dependence on /sim/number-views: the view manager just uses all
/sim/view[*] that it finds. It's not only unnecessary that view definitions
  have subsequent indices, but aircraft are now *requested* to use indices
  100++. /sim/view[0] .. /sim/view[99] are reserved for the system. (Not
  that we'd ever need that many, This is just a convention, it's nowhere
  hard-coded.)
- replace the string operations for property paths by method calls & other
  improvements
2007-05-04 14:58:52 +00:00
mfranz
dad550e0eb write a more useful list on shift-"."-click, not the whole subtree 2007-05-03 21:20:15 +00:00
mfranz
3eb6d4f708 new fgcommand: "terrain-elevation"
- input:  longitude-deg, latitude-deg
- output: elevation-m
2007-05-03 19:15:20 +00:00
mfranz
7e070759ad property browser: shift click on the "." entry dumps the contents of that
dir level to the terminal (remember: ctrl-click -> toggle additional info,
and ctrl-click on ".." move to root level)
2007-05-03 19:00:55 +00:00
frohlich
19e2e7a461 Modified Files:
src/Main/renderer.cxx src/Scenery/Makefile.am
Added Files:
	src/Scenery/redout.cxx src/Scenery/redout.hxx:
	Add simple redout effect.
2007-05-03 18:47:39 +00:00
frohlich
2f8beb56ea Modified Files:
src/GUI/new_gui.cxx src/GUI/new_gui.hxx src/Main/main.cxx
 	src/Main/renderer.cxx src/Main/renderer.hxx
	src/Main/splash.cxx src/Main/splash.hxx
	src/Scenery/scenery.hxx: Move splash screen into the scenegraph.
2007-05-03 18:12:29 +00:00
mfranz
9438288755 Free the splash texture memory when it's no longer needed. Nowadays splash
textures are mostly 512x512 pixels, so we wasted 786 kB (RGB) or 1MB (RGBA)
during the whole fgfs runtime for mere startup prettification.
2007-05-02 18:49:31 +00:00
mfranz
1f07903cd6 move the "interpolator" subsystem into the INIT group (same as "nasal"),
because nasal's f_interpolate() may be called in Nasal at times when the
GENERAL subsystem group is being deconstructed; access it by addressing
the group directly, as using globals->get_subsystem() does then not
work any more then; yeah, it's all for a rare border case ...  :-)
2007-05-01 18:06:48 +00:00
mfranz
ac0f49a929 remove util.cxx workaround for listener-call-at-exit-segfault, and make
NasalSys.cxx more robust instead. The reason for the crash was that during
fgfs shutdown destroyed subsystems (GENERAL group) still need Nasal access
(for AI Model destruction listeners), but at that point globals->get_subsystem()
can't even deliver the "nasal" subsystem (INIT group). One way to solve that
problem would have been to replace  globals->get_subsystem("nasal") by
globals->get_subsystem_mgr()->get_group(SGSubsystemMgr::INIT)->get_subsystem("nasal"),
but Andy decided to store a pointer to the active "nasal" subsysten in
NasalSys.cxx instead, as the "nasal" subsystem needs to be accessed in
every single Nasal extension function, and multiple "nasal" subsystems are
out of the question, anyway.
2007-05-01 17:03:50 +00:00
mfranz
83418376d7 since the submodel_mgr subsystem does now also hold references to AI models,
we need to explicitly destroy that here, too, so that it has guaranteed
access to the Nasal subsystem. Otherwise we get a segfault on exit. When
the next subsystem needs this special treatement (radar?), we should
introduce a new subsystem group (in addition to INIT and GENERAL)
2007-05-01 09:18:11 +00:00
mfranz
b0c7a401d6 set viewport in every progress step, so that the splash texture gets rescaled
on window resize in fg/osg (works in fg/plib without that, but can't hurt
there either)                                       (thanks to Tim MOORE)
2007-04-29 21:15:45 +00:00
mfranz
a516ad6bcd (hopefully) fix the problem that some people have:
"FATAL: PUI: No Live Interface! Forgot to call puInit ?"
We shouldn't use the splash progress message before guiInit().

Leave the "idle_state" step for now, to keep the similarity
with fg/plib as big as possible. This can be dropped later.
2007-04-29 09:58:37 +00:00
mfranz
4e1d4bf3e6 re-order gl commands for better rgba texture support 2007-04-28 20:34:21 +00:00
mfranz
8f17140003 allow rgba splash textures (I don't expect that they'll be used much, but
they don't cost much either, and allow contoured images with colored
backgrounds -- nice for squadron emblems etc.)
2007-04-28 12:37:20 +00:00
mfranz
922812a913 make listeners aware of their id, and output trigger message in
log levels "debug" and "bulk"
2007-04-27 14:30:05 +00:00
mfranz
3233ce8a44 Vivian MEAZZA:
"BUGFIX - fix initiation order - make sure that the AI Model list is
populated before we attempt to attach submodels."
2007-04-27 11:02:39 +00:00
mfranz
235b35ef9a set tower position at startup 2007-04-26 20:27:25 +00:00
mfranz
3b5fed01ca Vivian MEAZZA:
"Bugfix. Restore earlier bugfix to ensure tacan works when there is no
aircraft carrier in the environment"
2007-04-26 06:49:54 +00:00
curt
c8986567ae Syd Adams:
Patch to enable atc chatter (and any other arbitrary "message" audio file)
to be played at any specified volume.  (Previously these messages were always
played at a hardcoded volume of 1.0)
2007-04-20 18:32:42 +00:00
frohlich
f9e288fce2 Modified Files:
src/FDM/groundcache.cxx: Csaba Halász: use wires[i].ends[k] instead
	of yet uninitialized end[k].
2007-04-08 17:19:19 +00:00
frohlich
f690bfd113 Modified Files:
src/Main/renderer.cxx src/Model/panelnode.hxx: Make it compile with
	current osg svn.
2007-04-07 09:54:18 +00:00
mfranz
df4f1aa248 - save pairs of <file>/<path> for each *-set.xml file in autosave.xml
- loop up file name in the cache at startup. If it's found, check if the
  file exists and use it, otherwise scan $FG_ROOT/Aircraft/ as usual,
  and create a new cache while doing that. Rebuild cache on FG_ROOT change.
2007-04-05 19:59:44 +00:00
mfranz
d996d27121 - move fgInitTowerLocationListener() from fgInitPosition() to the init
part of fgIdleFunction() in main.cxx. fgInitPosition() is called again
  at every reset, which would every time attach another listener.
2007-04-04 19:05:59 +00:00
mfranz
b5f53c349f setAttribute("archive", 1) sets this attribute to "true", and
getAttribute("archive") returns 1 if the attribute is set, and 0 otherwise.

Allow to query and to set all properties by not specifying an attribute
string:  getAttribute() returns all attributes bit coded in an integer,
and setAttribute(attr) sets all attributes. No assumptions may be made
about the meaning of the bits -- they can be changed in future fgfs releases.
The only valid use is to compare or set attribute numbers obtained in the
same fgfs run. This is meant for allowing full copies of property branches.
Also add getAttribute query strings "children" for the number of children,
and "alias".
2007-04-04 14:42:38 +00:00
mfranz
2621ba7a47 Csaba "Jester" HALASZ: radar fix & extension
- fix breakage due to former commit (AIManager.cxx, r1.72)
- make AI properties available in AIBase
- add <valid> property for animations/nasal scripts
- support more MP and AI targets
- add target select and altitude display
2007-04-04 09:51:41 +00:00
fredb
b5ab955877 Win32 fix 2007-04-03 11:36:47 +00:00
mfranz
1eb5de245b fgFindAircraftPath(): put the MAX_DEPTH check at a place where it makes sense 2007-04-02 23:19:36 +00:00
mfranz
3cb5b0159d MS Windows can't handle the symbols ... sigh 2007-04-02 17:20:05 +00:00
mfranz
887a1a732e - move format checking to the GUIInfo class. It has all the info, and this
keeps copy_to_gui() cleaner
- add "float", "int" and "long"
2007-04-02 15:42:45 +00:00
mfranz
b361105202 Csaba HALASZ: don't treat every entry in a scenario file as model entry,
especially those called <description>. This was responsible for the aircraft
at --lon=0 --lat=0.
2007-04-02 12:47:26 +00:00
mfranz
d9cbdb53ff drop plib render callback, validate <format> in setupObject(), and apply
it in copy_to_pui()
2007-04-02 12:12:23 +00:00
mfranz
851e860b52 more recent MS Windows systems reportedly support more than two joysticks,
so we need to rely on plib to tell us
2007-04-01 22:22:05 +00:00
mfranz
8a6c95451b allow AI models to contain <nasal><load> and <nasal><unload> blocks in
their XML wrapper/animation file. They can access their /ai/models node
via cmdarg() function. Example:

  <nasal>
          <load>
                  print("Hi, I'm the Nimitz. My data are under ",
                                  cmdarg().getPath());
          </load>
          <unload>
                  ...
          </unload>
  </nasal>

Note, however, that the <unload> block is only called on exit at the moment,
not when the tile is unloaded.
2007-04-01 12:39:20 +00:00
mfranz
77c176424e Ron JENSEN: turn cout into SG_LOG/SG_WARN (merge from JSBSim/cvs) 2007-04-01 12:23:54 +00:00
mfranz
724ba5b4ad yet another round() ... 2007-03-31 17:45:23 +00:00
mfranz
570b19b2ff another case of round() 2007-03-31 15:27:21 +00:00
mfranz
b395c12fdb use round() from SG, as this isn't available everywhere 2007-03-31 15:17:55 +00:00
mfranz
ed4f3afcdf obsolete through changes to Instrumentation/{instrument_mgr,altimeter}.?xx
and Systems/static.?xx, and addition of Environment/atmosphere.?xx
2007-03-31 12:28:04 +00:00
mfranz
7e6bc192ba John DENKER:
"This altimetry method is valid to above 100,000 feet, and
correctly handles Kollsman settings"
2007-03-31 09:36:19 +00:00
mfranz
bec023b43c Vivian MEAZZA:
"""
"Flight plans" which can start at a given time (gmt)

WAITUNTIL tokens which pause the flight plans until a given time (gmt)

Submodels can now be attached to any AI objects (except submodels - it can
be done, but in my experimental code it's too expensive in frame rate atm)

"No-roll" attribute added to Ballistic objects - useful for wakes and the
like

"Random" attribute added to Ballistic objects (adds =- 5% to the Cd) -
useful for smoke, exhausts

If the <trigger> tag is not specified the Ballistic object/s will be
released at start-up (cannot be stopped)

Submodels are not released from AI Objects if the AI Object is more than 15
miles away.
"""


mf: minor code and formatting fixes; submodels.?xx were FUBAR and are thus
    astyle formatted;

    NOTE that <name> tags END, EOF, WAIT, WAITUNTIL are *depreciated*.
    Don't get too used to them. This will have to be moved from the "name"
    to regular engries.
2007-03-30 22:51:52 +00:00
mfranz
caa83238b8 fix spectacularly useless error messages 2007-03-29 21:26:33 +00:00
andy
c30ff46f83 Sync with Nasal CVS (soon to become Nasal 1.1). Notable new features:
Nasal now supports calls to "subcontexts" and errors can be thrown
across them, leading to complete stack traces when call() is used,
instead of the truncated ones we now see.

Vectors can now be concatenated using the ~ operator that used to work
only for strings.

Better runtime error messages in general due to a fancier
naRuntimeError() implementation

A big data size shrink on 64 bit systems; the size of a naRef dropped
by a factor of two.

"Braceless code blocks" have been added to the parser, so you can
write expressions like "if(a) b();" just like in C.  Note that there's
still a parser bug in there that fails when you nest a braced block
within a braceless one.

Character constants that appear in Nasal source code can now be
literal multibyte UTF8 characters (this was always supported for
string literals, but character constants were forced to be a single
byte).

New modules: "bits", "thread", "utf8" and (gulp...) "io".  The bits
library might be useful to FlightGear, the utf8 one probably not as
Plib does not support wide character text rendering.  The thread
library will work fine for spawning threads to do Nasal stuff, but
obviously contact with the rest of FlightGear must be
hand-synchronized as FlightGear isn't threadsafe.  The io library is
no doubt the most useful, as it exposes all the basic stdio.h
facilities; it's also frighteningly dangerous when combined with
networked code...
2007-03-29 18:50:28 +00:00
mfranz
37acfd4e25 add signal on GUI reinit; needed for reloading Nasal loaded XML dialogs 2007-03-28 20:33:18 +00:00
mfranz
f27d7b2340 layout-props.cxx: hrule/vrule shall be accepted as widgets even if they
have no children (in which case they default to 1px thickness & stretch).
    This allows to just write <hrule/> instead of <hrule><dummy/></hrule>.
    One can still use <hrule><pref-height>3</pref-height></hrule>, of course.
layout.cxx: drop silly do??Box calls for hrule/vrule (yes, I wrote that :-)
2007-03-26 15:17:38 +00:00
mfranz
60516c8a3f If text contains "{display|voice}" groups, skip the delimiters and
discard the display part. The curly braces wouldn't be spoken anyway,
and the | would be spoken as "vertical bar", which is completely
useless (which is why it had been disabled in the past already).
2007-03-23 15:53:58 +00:00
mfranz
2e9cf978b7 - turn \n, \t, \r into spaces. Otherwise Festival spells out ".^M" as
"period".
- fix rather embarrassing string concatenation bug  :-)
2007-03-23 10:45:11 +00:00
mfranz
e85b413f99 - FGPropertyManager.{cpp,h}: fix memory corruption bug
- JSBSim.?xx: use guarded SGPropertyNode pointers
2007-03-19 16:37:36 +00:00
mfranz
937ec42fda revert condition() patch. This can as easily be done in pure Nasal. 2007-03-18 10:52:11 +00:00
mfranz
8c7c217037 set module namespace in globals, otherwise two subsequent calls can't share
variables, which makes the whole module kind-of pointless
2007-03-17 20:51:06 +00:00
mfranz
cc30d4d80e New Nasal command _condition(p) where p is a property node containing
a condition as described in $FG_ROOT/Docs/README.condition. Returns 1 if
condition is true, 0 if false, and nil on error.
2007-03-17 15:58:15 +00:00
mfranz
002b880e7e Vivian MEAZZA:
"Implement 'flightplans' for AIShips. This patch also introduces the concept
of a 'WAIT' token for AIShips: when the flightplan reaches a 'WAIT', the
AIShip stops and pauses for the specified time (secs)."
2007-03-05 21:40:39 +00:00
frohlich
b230c0a1e8 Modified Files:
src/Main/renderer.cxx: Guard the OpenGL state around pui a bit more
2007-03-01 18:12:48 +00:00
mfranz
4232c116a3 Hans Ulrich NIEDERMANN:
"""
Fix Y2K bug triggering string overflow

sim_control_.date_string is a char[7], so it can contain "yymmdd" and
the terminating '\0'. However, nowtime->tm_year is 107 for the year 2007,
so you'll end up with a 7 digit number and the string written to
sim_control_.date_string is longer than sim_control_.date_string is.
Ouch!
"""

mf: ... and sim_control_.date_string isn't even used.
2007-03-01 17:53:24 +00:00
mfranz
b11196998e Csaba HALASZ: fix dme property name 2007-03-01 17:39:45 +00:00
andy
5ea9821329 Can't assume that the aircraft has a fuel tank. 2007-03-01 00:30:07 +00:00
mfranz
ce4360e157 Vivian MEAZZA: call AI models' ::reinit() methods on reinit 2007-02-26 11:47:04 +00:00
mfranz
1d880a944f don't descend into <nasal> groups to avoid padding space beind added around 2007-02-24 19:43:19 +00:00
mfranz
5d7b9ec1f1 Nick WARNE: fix property name 2007-02-23 21:34:41 +00:00
mfranz
b6f98f91b9 remove "show" command from help screen (command can be removed later) 2007-02-20 21:12:56 +00:00
mfranz
6c95d65afa fix set command: allow strings to contain spaces 2007-02-19 20:52:55 +00:00
frohlich
a533e0c39d Modified Files:
src/Scenery/newcache.cxx: Olaf Flebbe:
	make destructor work.
	Bug: Do not modify a map while iterating over  it.
2007-02-14 17:55:52 +00:00
frohlich
96872a73cb Modified Files:
src/Navaids/awynet.cxx src/Navaids/awynet.hxx: Olaf Flebbe:
	Implement ~FGAirwayNetwork, though it is not called now
	Guard snprint properly.
2007-02-14 17:51:23 +00:00
frohlich
b81a7c8180 Modified Files:
src/Main/Makefile.am: Remove junk
2007-02-14 17:45:57 +00:00
fredb
9ae7377c95 Fix the jpg http server 2007-02-10 16:32:21 +00:00
frohlich
9bb55e78be Modified Files:
navradio.cxx: Olaf Flebbe: Use bool for booleans.
2007-02-09 05:41:42 +00:00
frohlich
4101e6791b Modified Files:
Navaids/navdb.cxx: Olaf Flebbe: plug memory leak.
2007-02-09 05:35:10 +00:00
frohlich
654cc64659 Modified Files:
Airports/runways.cxx: Correct termination condition.
2007-02-09 05:34:34 +00:00
frohlich
d4ecbb8856 Modified Files:
src/Main/renderer.cxx: Avoid an additional camera.
	Guard the plain OpenGL drawables better.
	This change now requires the new osg tarball or osg cvs.
2007-02-06 05:32:24 +00:00
mfranz
d4f8622ff4 export mouse coords of "main" mouse 2007-02-05 20:29:26 +00:00
mfranz
862196a3ab - add two error messages to setlistener() (invalid property or func object)
- adapt last changes to Style Of The Tile
2007-02-03 16:46:39 +00:00
frohlich
32d3d33fea Modified Files:
src/FDM/YASim/Launchbar.cpp: Olaf Flebbe: Make sure expressions
	stay floats.
2007-01-31 20:50:17 +00:00
frohlich
fbb676cbbe Modified Files:
src/FDM/JSBSim/FGFDMExec.cpp: Olaf Flebbe: initialize uninitialized
	variable.
2007-01-31 20:46:19 +00:00
frohlich
0edd68cd36 Modified Files:
src/Main/bootstrap.cxx: Olaf Flebbe: Appears to be requierd for
	static linkage and pthreadswin32.
2007-01-31 20:44:44 +00:00
frohlich
a8a85fa80c Modified Files:
src/Main/util.cxx: Olaf Flebbe: flush the osgDB cache just before
	exit. This avoids a static destructor cleanup problem with static
	osg linkage.
2007-01-31 20:43:10 +00:00
frohlich
dc9750f16e Modified Files:
src/Main/renderer.cxx: Fix typo
2007-01-31 20:37:43 +00:00
frohlich
14c52fb33d Modified Files:
src/Main/renderer.cxx: Avoid the ClearNode
2007-01-30 20:34:07 +00:00
frohlich
d3fdf74e4f Modified Files:
light.cxx light.hxx sunsolver.cxx tmp.cxx: kick out sg.h
2007-01-30 20:14:25 +00:00
frohlich
64b9f93589 Modified Files:
groundcache.hxx groundcache.cxx: Make use of the collision
	library now available in simgear
2007-01-30 20:13:32 +00:00
mfranz
3dd9e4ca5e remove annunciator.[ch]xx; this is now done via Nasal:
<nasal>
      <annunciator>
          <file>Aircraft/Generic/annunciator.nas</file>
      </annunciator>
  </nasal>
2007-01-29 22:36:28 +00:00
fredb
17957439a1 simplify and fix 2007-01-29 07:53:42 +00:00
mfranz
b73bd53744 this should now really be correct; nothing for a beauty contest, though 2007-01-28 22:55:37 +00:00
mfranz
c5cc84baeb make sure entries are actually erased :-) 2007-01-28 20:59:47 +00:00
frohlich
227e96afa6 Modified Files:
src/Scripting/NasalSys.cxx: make sure iterators stay valid
2007-01-28 20:02:49 +00:00
frohlich
4ec7d1553c Modified Files:
src/Main/renderer.cxx: Make it work with current osg cvs.
2007-01-28 20:01:47 +00:00
mfranz
978b7145b1 don't truncate strings output by print() to 1024 bytes. This was apparently
done for performance reasons, but print() should be able to output any
valid string, and when SG_LOG uses strings and streams already, then we
can use that here, too. (Not discussed with Andy yet.)
2007-01-28 12:16:37 +00:00
mfranz
98aa76ad33 Maik JUSTUS: fix bug that caused aircraft zombies on an MP player's last
position after he reset his fgfs
2007-01-28 11:40:56 +00:00
mfranz
c32ffcd3c9 Maik JUSTUS: add a missing pair of parens and rounding 2007-01-24 23:39:48 +00:00