1
0
Fork 0
Commit graph

4251 commits

Author SHA1 Message Date
mfranz
267e558bd2 the const-ness wasn't such a good idea :-) 2006-01-28 22:41:20 +00:00
mfranz
dc7cc2015b restore the uglyness: call the resize callback every frame again, even
though the window wasn't resized. I'm just not adventurous enough for
a cleaner solution in the light of the upcoming release. At least the
xsize/ysize properties aren't set each frame any more, so listeners
work now properly.
2006-01-28 16:06:03 +00:00
mfranz
8f9d8cab03 now that the renderer doesn't resize the window for every frame, we need
to do it manually here
2006-01-28 13:38:28 +00:00
mfranz
bae5d4e92b write to /sim/startup/xsize only if the size really changed; likewise for
ysize. This is useful for listeners, e.g. the one that will re-position the
FPS dialog.
2006-01-28 10:40:47 +00:00
mfranz
a4bbb31927 Resizing is done when fg_os{,_sdl}.cxx says so, not in every single frame.
(This defeats the purpose of the resize callback and makes "listening" to
the xsize useless.)
2006-01-28 00:10:39 +00:00
mfranz
6de1f56f2c make it const 2006-01-27 22:26:47 +00:00
mfranz
ffc8c4d3d0 export scenery click geo coords 2006-01-27 21:14:40 +00:00
mfranz
0b136fa66b getChild(): add optional "create" flag (like in the c++ version) 2006-01-27 20:43:40 +00:00
mfranz
0d48631e3a cosmetics: subc isn't really a sub-context here (it was where I copied it
from)  -->  s/subc/c/
2006-01-27 19:59:25 +00:00
mfranz
32968d81f3 we need a way to specify other contexts than _context; idea & OK by Andy 2006-01-27 19:51:25 +00:00
ehofman
0f448cb4ca Melchior FRANZ:
gui colors and material animation use "red", "green", "blue".
Would be nice if these light colors would use the same standard.
2006-01-27 13:54:35 +00:00
mfranz
cabf53537a allow top level <font> definition that applies to text in the whole dialog
and makes the layouter use this font's metrics
2006-01-27 12:57:13 +00:00
ehofman
6c331a55a8 Tie the scene ambient,diffuse end specular red,green and blue components to a property under /rendering/scene 2006-01-27 12:35:15 +00:00
mfranz
54ee68291b fonts are now delivered by FGFontCache (except for the splash screen,
because this comes way before the gui subsystem is ready)
2006-01-27 08:01:31 +00:00
mfranz
f729ec6013 cosmetics 2006-01-26 22:22:37 +00:00
mfranz
e2016f9568 fix FGFontCache and make use of it (this allows to assign bitmap fonts
in dialogs)
2006-01-26 21:40:37 +00:00
ehofman
5441622a28 Add support for point sprites. 2006-01-26 09:37:32 +00:00
mfranz
f0996fa47d create a new context for listener functions to avoid context corruption
(caused a crash when a timer triggered a listener) ... Idea and OK by Andy
2006-01-26 00:18:27 +00:00
curt
1729d15cdd White space updates. 2006-01-24 17:13:48 +00:00
curt
fdd47f4b56 Newest data file format includes range for each transmitter. Load that data
and use it instead of our own hard coded defaults.
2006-01-24 17:13:28 +00:00
ehofman
0895721e68 Mathias Frhlich:
Incorporating the shared ptr code:
- All scenegraph references from SimGear
- SGMaterial which already had a reference counter uses now that common
  infrastructure.
- SGMatModel is now counted.
- SGSoundSample from SimGear
- And the corresponding change for the sound samples in flightgear which fixes
  a latent crash if FGBeacon would evern be deleted.
2006-01-24 14:45:13 +00:00
ehofman
907b99a669 Use smooth (aliased) lines and points when available in hardware. 2006-01-21 12:07:40 +00:00
ehofman
ea177f6744 Olaf Flebbe: MSVC fix. 2006-01-21 10:11:08 +00:00
ehofman
919ccdb96a Remove a leftover from a previous patch. 2006-01-21 10:03:36 +00:00
ehofman
31e3caa4f6 Sync. w. JSBSim 2006-01-20 17:50:45 +00:00
ehofman
619226e9d0 Integrate a large part of John Wojnaroski's 747 cockpit project.
Erik Hofman:
This patch contains an update to net_ctrls.hxx that adds an extra 100 bytes
(or an equivalent of 25 (u)int32_t types) of reserved space. This could be
used to make the protocol forward and backward compatibel within a certain
scope. Be sure to read the instructions at the begining of the header file
when addinf new variables.
2006-01-20 17:19:01 +00:00
daveluff
3d5afec340 Fix the crashes on mini-panel and panel-reload with the KLN89, by removing the multiple inheritance and using an empty shell instrument to forward draw commands from the panel to the complex gps subsystem. 2006-01-13 22:07:50 +00:00
fredb
28b5a6d8bd Remove the filtersjb left over 2006-01-13 14:33:07 +00:00
fredb
17d20cf606 Remove the filtersjb left over 2006-01-13 14:00:13 +00:00
ehofman
f73f2f7254 Hide some user generated files. 2006-01-13 09:50:58 +00:00
ehofman
587fd0937e Remove a bunch of unneede files. 2006-01-13 09:49:09 +00:00
fredb
d0618685a2 Typo 2006-01-12 21:35:59 +00:00
fredb
bcc8339c4f Variable 'thrust' used before being initialized 2006-01-12 21:35:32 +00:00
fredb
4303c2b9a6 Redundant loop variable declaration 2006-01-12 21:35:08 +00:00
fredb
5d5a58de80 Don't declare functions that are not implemented 2006-01-12 21:34:36 +00:00
ehofman
932b38a87e sync. with JSBSim v. 2.0 2006-01-12 15:04:22 +00:00
ehofman
fcfe5d2010 Don't display the menubar in e highres screenshot. 2006-01-11 10:53:04 +00:00
curt
c3cf810562 Another attempt at fixing a cygwin compiler error. 2006-01-10 15:23:10 +00:00
curt
ac5e874523 Fix a compiler warning (member initialization order in constructor.) 2006-01-10 15:06:17 +00:00
curt
311b85a11d Small change to avoid dangling audio resources. 2006-01-10 14:51:12 +00:00
curt
5329ed10a7 Cygwin fix. 2006-01-10 02:49:52 +00:00
curt
691f096c68 Add an srand() function to nasal (hooked into sg_srandom_time()).
This helps avoid the problem of always getting the same random number
sequence every time you run a script.
2006-01-09 15:29:24 +00:00
curt
71d0001f3d Add a directory listing command to nasal. Given a directory name, return
the file list as an array.
2006-01-09 03:48:14 +00:00
curt
ee065ee6ef Write 'fg_root' in the property tree at /sim/fg-root 2006-01-09 03:47:33 +00:00
curt
e475a50ead Expose the "play-audio-command" through the props/telnet interface. 2006-01-09 02:23:50 +00:00
curt
3ed73e16b6 Add a do_play_audio_message() function which is tied to the
"play-audio-function" command.  This function can be called from internal
code, from nasal scripts, or from external scripts to play a single one-off
wav file.  File/audio data is loaded and unloaded on the fly automatically.
2006-01-09 02:23:02 +00:00
curt
4132b41470 Additional functionality added to the FlightGear sound fx manager.
Create a queue of one-off wav files.  Calling layer can request the system
to play any wav file.  The request is thrown at the end of a play queue.
The queue is serviced sequentially so that queued wav files will no longer
overlap.  When a sample is finished playing. It is removed from the queue
and deleted from memory.  The next remaining request in the queue is then
played.
2006-01-09 02:21:04 +00:00
ehofman
0e16419f0d Stuart Buchanan:
- Provide a Nasal interface to display simple text messages on the screen
  like the ATC display. In fact, I copied the code from the ATCDisplay.cxx
  and simply shifted it further down the screen.


Erik:

TODO: Integrate the two pieces of code.
2006-01-06 09:50:58 +00:00
ehofman
0b3164c312 Try to prevent a potential buffer overflow for WIN33. 2006-01-04 13:25:56 +00:00
ehofman
2080773f37 Cygwin fixes. 2006-01-04 12:49:07 +00:00
curt
9bc3a56cd2 Minor oops, committed this file before saving the final version in my
editor.
2006-01-02 23:08:45 +00:00
curt
a24ebc6958 - Add an "is-valid" property node so other modules can do a quick check if
anything in the nav tree is valid or not.
- Fix an order problem between caching data values and searching for a new
  station that could cause odd and unexpected and hard to reproduce results.
2006-01-02 23:01:45 +00:00
ehofman
713ddd05dd Olaf Flebbe: Make sure the model gets deleted when it's not referenced anymore. 2005-12-30 09:34:29 +00:00
curt
d4f56af242 Remove some left over debugging output. 2005-12-29 16:50:03 +00:00
curt
880a43bdbf John Ellson:
Changes require to compile with a Fedora-Core Development system running
on an X86_64 platform with gcc-4.1.0.
2005-12-29 16:22:38 +00:00
ehofman
4be621fbe9 Durk Talsma, Olaf Flebbe & Mathias Frhlich:
Split up simple.cxx
2005-12-29 13:58:21 +00:00
curt
c3f1331e52 Better estimate of cross track heading error. Also, make sure it is
computed correctly when flying outbound from a vor.
2005-12-29 04:07:49 +00:00
curt
1ae9849062 More reorg and refactoring of the code.
Added a convenience function to estimate the time to intercept the selected
radial give the current heading and speed.  This can be useful to a flight
directory to compute the point to switch from armed to coupled mode at just
the right time so the pilot can roll out onto the desired heading on the
desired radial.

Add a first whack at estimating a ground track heading error (difference
between aircraft heading and ground track directon.)  This needs more work
and testing.
2005-12-28 21:45:43 +00:00
curt
ce08000a96 Cache some property values locally to reduce unnecessary property system
calls.
2005-12-28 19:11:30 +00:00
curt
ccddc99e73 More naming cleanups. 2005-12-28 18:05:03 +00:00
curt
3bacacfb5c Clean up some of the member data naming. 2005-12-28 17:26:57 +00:00
curt
c694fe43ee Step #1 of some code refactoring and cleanups. The nav radio code was
written very early in the project and has grown and evolved and been added
onto many times.  It is long overdue for a code cleanup/reorg pass.
2005-12-28 16:53:19 +00:00
ehofman
d11df8fcc8 Remove a debugging cout. 2005-12-27 14:30:56 +00:00
ehofman
7b1f1d73e6 Detect the hostname as early as possible to prevent a segmentation fault (and an unknown exception in the main loop situation. 2005-12-27 14:02:38 +00:00
mfranz
a67cb7d6fb no more "Aborting ...\nPossible cause: Success" 2005-12-22 23:32:23 +00:00
ehofman
faf91ae9e9 Revert to the previous version, this is just a glimps of the future. 2005-12-22 15:13:50 +00:00
ehofman
62c6063fa1 Only test for --fg-root and --aircraft in ~/.fgfsrc et all if it wasn't specified at the command line. 2005-12-22 14:14:08 +00:00
ehofman
b788a204c4 Add an option to enable or disable the save-on-exit option. Add a season commandline option. 2005-12-22 13:51:11 +00:00
ehofman
ffa92dfe4b Put the user configuration file sequence into it's own function. This will slightly tidy up the code but more importantly will make it consistant across the program. 2005-12-22 10:25:07 +00:00
fredb
653f063bcf Fix a typo and an unitialized variable 2005-12-22 06:42:00 +00:00
ehofman
49ba607726 Get the environment variables HOME and HOSTNAME only once. 2005-12-21 13:36:04 +00:00
ehofman
e0db27eb6f Vassilii Khachaturov:
clean up some build warnings caught with gcc-4.0.
2005-12-19 13:15:09 +00:00
ehofman
9090fb5bf4 Olaf Flebbe:
The prototype of update_metar_properties does not match overridden func.
trafficmgr: iterators below begin() and after end().
tower.cxx : iterator incrementing beyond end().
2005-12-19 13:03:19 +00:00
ehofman
2d4ffc0dce Vassilii Khachaturov:
clean up some build warnings caught with gcc-4.0.
2005-12-19 12:53:21 +00:00
ehofman
3986347f37 MSVC fix. 2005-12-18 09:35:01 +00:00
ehofman
f6174d2bf0 Stefan Seifert: implement persistent dialog options, so changes in rendering, static LOD and sound settings dialogs are made permanent. 2005-12-17 15:34:37 +00:00
mfranz
96c0a7bbc1 add _setlistener() function, so that slow property polling loops can be
replaced with efficient listener callbacks. One use is the new FPS display.
This is reviewed and OK'ed by Andy, relatively trivial and separated from
the rest of Nasal, so problems are quite unlikely and confined to users of
this function.

The callback is executed whenever the property is written to -- even if
the value didn't change. The triggering Node is available via cmdarg().

Examples:  _setlistener("/sim/crashed", func {print("haha!")});
           _setlistener("/foo/bar", func { print(cmdarg().getPath() ~ " changed")})
2005-12-16 19:11:03 +00:00
curt
249a1264ff Remove the old hardcode fps display. This is now replaced with a nasal/gui
display that can be dragged around the screen to an unobtrusive location.
2005-12-15 22:18:06 +00:00
mfranz
f6225f5cb7 remove a few unused vars
menubar: cosmetics of the day
2005-12-15 20:07:14 +00:00
mfranz
98081d9243 don't check for subsequent indices (n), but for child positions; This way
it's also possible to enable/disable menu/item entries with higher numbers.
This can be useful for adding entries from other config files (aircraft
specific or local). I'd say aircraft files can use indices starting with
[100] and local files starting with [1000]. Such high number will never
collide with an entry in menubar.xml, even if entries are added/removed
there.
2005-12-14 07:45:47 +00:00
curt
7c0cf9dff9 Mathias Fröhlich's code, Curt Olson's comments:
Display the ground intersection point on mouse click (if click not consumed
by the gui or the panel.)  This should eventually get stuffed into the
property tree.
2005-12-12 22:22:28 +00:00
curt
bbb8b066eb Mathias Fröhlich:
Computes the pick direction and starting point.  This is code that translates
a screen coordinate into a vector in the FlightGear world (between the eye and
the on-screen coordinate.)  Armed with this vector in FG world coordinates,
you could call a scenery intersection routine and lookup the lon/lat/elev of
the point in the world that was clicked on.
2005-12-12 21:15:20 +00:00
ehofman
90a149ffa3 Vassilii Khachaturov:
* in some cases more specific sg exception types were used in place
  of the more generic one, e.g., sg_io_exception instead of sg_exception
  when the context of the error was an IO error
* in some cases, the error message was made more specific
* minor style fix for exception rethrowing --- using throw; whenever
  a re-throw is made; sometimes optimizing away the exception symbol name
  in the catch handler at all
* more specific catch handlers added in some places -- e.g.,
  an sg_io_exception caught ahead of sg_exception
2005-12-11 13:37:06 +00:00
ehofman
04f7175fd0 The most important part is that it fixes possible
memory corruption with that iterator decrement past the erase call.
2005-12-11 13:17:20 +00:00
ehofman
6773bf9571 Additional checks to io arguments. This prevents fg from crashing on invalid
arguments.
2005-12-11 13:12:26 +00:00
ehofman
4c395bf7a6 MSVC8 fixes. 2005-12-11 12:53:54 +00:00
mfranz
688bcb579f final cosmetics (s/_entries/_objects/ and comments) 2005-12-09 10:43:09 +00:00
mfranz
1caefda2a0 - fix typos
- fix indentation (there were 2, 3, 4, 7(!) space indents as well as tab
  indents, all mixed together)
- no code changes, except one "if (foo) {}" changed to "if (!foo) return; ..."
2005-12-08 15:03:08 +00:00
curt
ec7f73a5bb Make UFO honor elevator trim so it will respond to autopilot. This allows
you to do altitude hold mode and fly automated ILS approaches.
2005-12-07 23:26:38 +00:00
mfranz
1990db9ca5 yet more cleanup; clearer warning messages 2005-12-06 21:03:15 +00:00
mfranz
c10f583c11 removal of yet more stuff, left over from development; further simplification;
requires to remove some constness, though (we are adding listeners!);
If I continue like that, nothing will be left.  :-)
2005-12-06 19:51:31 +00:00
ehofman
e35911e45a Vivian: downgrade log levels from ALERT to INFO, tidy up the code. 2005-12-06 18:48:56 +00:00
mfranz
eb68e9ad36 remove two checks that were only useful during development; fix typo 2005-12-06 18:46:39 +00:00
ehofman
5956ade90c Mathias: silence some valgrind warnings so that you can concentrate better on the real problems. 2005-12-06 18:32:07 +00:00
mfranz
ac2c1fcd43 allow disabling/enabling of menu entries via "enabled" property;
Unfortunately, we don't have an easy way to access the puObjects
only by knowing the respective XML property node, because the
menu structure was built by plib from string lists. That's why
we walk the puMenuBar tree and store {property node}->{puObject*}
pairs in a map. With this infrastructure in place we can now
easily enable/disable entries, but we can also make other changes
to menu buttons as we see need. The structure of puMenuBar is
described in the pui documentation, so it's less of a hack than
it looks.  :-)
2005-12-06 17:56:17 +00:00
mfranz
435d874e35 Mathias FROEHLICH:
remove a hack and do it properly: if the requested elevation is for some
reason below the surface and the intersection test fails (as it appears
to be the case in EGLL), try again from 10000m ASL

mf: typos
2005-12-04 10:43:49 +00:00
mfranz
72f46a4a6f globals.cxx -- FGGlobals::set_fg_scenery():
Insert empty string as marker between FG_SCENERY path elements.
    FG_SCENERY=A:B expands to [A/Terrain, A/Objects, "", B/Terrain, B/Objects, ""]
    (assuming that both A/ and B/ have Terrain/ and Objects/ subdirs).

tileentry.cxx -- FGTileEntry::load():
    Check all tile dirs in FG_SCENERY from left to right: add all objects
    to the scenery until a terrain tile was found: In this case read the
    rest of that group (i.e. the Objects/ twin dir) and then stop scanning.

    Better structuring of log messages & fix warnings.
2005-12-03 10:20:35 +00:00
daveluff
24e9bb6ce8 Alex Romosan: Pass strings by reference not value 2005-12-02 22:52:09 +00:00
daveluff
1de61c8afd Alex Romosan: Make GpsPage::GetId() pure virtual, and pass strings by reference not value 2005-12-02 22:50:10 +00:00
mfranz
00e0546cab FGTileEntry::load(): store objects in a vector, then generate terrain or
sea tile, and finally process the objects. This guarantees that all objects
are placed relative to a valid tile center, rather than to the origin (0/0/0).
This is important for objects in sea tiles, and allows to display objects
of *.stg files that came sooner in FG_SCENERY.
2005-12-02 21:46:33 +00:00
mfranz
ca96f2b3a4 Mathias FROEHLICH: fix strange gcc 4.0.* strict aliasing problem 2005-12-02 16:43:50 +00:00
mfranz
b716c6d15b returning addresses of auto vars is *dangerous* (ask Vasilii! :-)
This was the reason why some people (especially SuSE10.0/gcc 4.0.2
users) couldn't see others in MP. I don't even know why I'm committing
that. It's less important than taxi lights ...
2005-12-02 00:10:25 +00:00
andy
d71a541837 Swap signs of the twist and incidence values to match the
documentation and author expectations.  Positive just wants to mean
"up", no matter what the axis conventions have to say.
2005-12-01 21:06:25 +00:00
daveluff
c92bcb4126 Ignore generated files 2005-11-30 21:31:50 +00:00
daveluff
a3890d1253 Add support for a special-instrument xml attribute, which triggers loading of a know c++ hard-coded instrument. This has some ugliness that will need removing at some point. In particular, panel reload is broken for panels that include a special-instrument, since this triggers subsystem reload which is a fatal error. Note that this *only* affects panels that use a special-instrument - all other panels are unaffected 2005-11-30 01:21:45 +00:00
daveluff
4be8a31d4b Build the KLN89 stuff... 2005-11-30 00:50:07 +00:00
daveluff
c94072c417 Track added files 2005-11-30 00:48:01 +00:00
daveluff
0dbe9a4c38 Code to extend FGs current GPS functionality to allow the simulation of a specific approach capable GPS. Eventually this file should be broken up and the code removed to other files, such as FGs current gps files 2005-11-30 00:47:41 +00:00
daveluff
3a6cadf628 2D polygon drawing routines for a GPS instrument 2005-11-30 00:46:11 +00:00
daveluff
2af78ec168 kln89 GPS unit simulation 2005-11-30 00:21:25 +00:00
daveluff
d176715284 kln89 user interface logical pages 2005-11-30 00:18:42 +00:00
daveluff
f44ed9716a kln89 symbol table 2005-11-30 00:16:45 +00:00
daveluff
999613dc36 Allow the nav radios to be slaved to a gps unit 2005-11-29 22:46:07 +00:00
daveluff
a7e6a0e294 Add a method to return a const pointer to the raw airport data, plus a couple of whitespace cleanups 2005-11-29 20:24:32 +00:00
daveluff
49b6bef6bb General tidy up - add an extra ctor method, remove surplus defined constants, remove cout and iostream 2005-11-29 19:58:37 +00:00
mfranz
9c28ed0257 Vivian MEAZZA:
"Remove redundant code, tidy up and improve output properties"
make elevator work
2005-11-29 16:38:49 +00:00
david
fbd53e772e Correct conditional so that FlightGear will compile without
special-purpose FDMs.
2005-11-29 03:12:24 +00:00
daveluff
81797885ce Add a lower-bound type navaid lookup, and the ability to specify navaid type in the find nearest lookup, for the GPS code 2005-11-28 22:42:23 +00:00
mfranz
03bf631765 ban not so informative message 2005-11-28 10:18:39 +00:00
daveluff
21c48ba67c Remove nav.hxx, which has been superceded by navrecord.hxx and is no longer used except by some old non-working test code 2005-11-27 23:48:04 +00:00
daveluff
808ac4784e Add a lower-bound search function for fixes for GPS units with next-match database search capabilities 2005-11-27 20:19:00 +00:00
mfranz
5d522e4784 Vivian MEAZZA: use coords of tuned in carrier, not of the first one 2005-11-27 17:25:39 +00:00
ehofman
e80e60ab7e Use the prefered GLUT game_mode_string format and add the posibility to match the screen refresh rate and the framerate. 2005-11-27 10:27:55 +00:00
ehofman
388ddb244f Mathias Frhlich:
While digging in flightgears lost memory, I found that endless loop.
2005-11-27 09:50:26 +00:00
daveluff
0db0e1992e Fix property typo 2005-11-26 23:56:28 +00:00
mfranz
f323c2e7ea cosmetics -- NO CODE CHANGE!
remove trailing spaces
fix very liberal indentation (logical block not indented at all, 5 spaces, ...)
removed commented out code
2005-11-25 19:07:24 +00:00
mfranz
85b93d8347 Vivian MEAZZA:
bugfix: don't always refer to carrier #0
2005-11-25 18:55:29 +00:00
andy
6a614dba49 Josh wanted a compression-m value exported for gear, so he can animate
them more accurately.
2005-11-24 17:35:42 +00:00
mfranz
a56e35ef74 of course I should have known that it would only work in tests *before*
committing, and would instantly break afterwards. Causes endless loops.
Re-uglify. Sorry for the noise.  :-/
2005-11-23 12:48:09 +00:00
mfranz
f93bb8eedc remove a few if's to make the ugly fix a little less ugly; they only save
a few CPU cycles but are really redundant
2005-11-23 12:28:27 +00:00
andy
e97c053cdd AJ found a typo 2005-11-22 23:25:25 +00:00
curt
e807c7f95c A long, long time ago, a bug was inadvertently introduced into the threaded
metar fetcher.  Effectively this caused the metar thread and the main
thread to both attempt to fetch weather data.  This could lead to long pauses
when the main thread decided to fetch the weather, and introduced a race
condition that could cause a segfault/crash.

Investigating this issue, I discovered that even longer ago, someone confused
#defines and #ifdef symbols with C/C++ variables.  If I #define XYZ 0 it is
defined so #ifdef XYZ is true, not false like a variable.  Our thread
detection made this mistake and there were follow up patches to work around
it.

So I fixed the configure script (ahhh, reading the autoconf manual is highly
recommended excercise for people editing the configure.ac file.)  I also
discovered that we were hardwiring with_threads=yes with no way via configure
options to disable threads from the build so I fixed that.

Then I patched up the #ifdef's scattered through the code to match the
configure script changes, oh and by the way, I stumbled upon a past typo
that led to the race condition in the metar fetching thread and fixed that.
2005-11-22 17:02:31 +00:00
curt
eca17c0dd8 Final updates for v0.9.9 2005-11-17 22:54:46 +00:00
curt
ae5cf05827 Clock also able to report local time. 2005-11-17 22:07:27 +00:00
curt
40bd985d36 Expose local timezone offset in the property tree. 2005-11-17 15:47:01 +00:00
ehofman
9df7af3924 David Culp:
Here's a fix for a bug I introduced when I updated the AIStorm with
turbulence.  The change I made to the FGAIEntity struct was overriding the
thermal <strength-fps> data.
2005-11-16 15:23:18 +00:00
curt
ff0d55fd4a Update 'magic' for more consistant cross platform padding. 2005-11-15 19:15:13 +00:00
mfranz
624ca31263 number one reason for lots of stale METAR reports is wrongly set system time 2005-11-14 21:59:13 +00:00
mfranz
6a3be655d2 Prevent download of thousands of METAR reports if all are for some reason
too old (wrong system time or broken proxy): stops after 10 stale reports
were fetched in a row. This should simply stop further fetching, but due
to a bug in the threading system(?) it does currently lead to abortion,
just like any other exception in the fetcher.
2005-11-14 17:18:27 +00:00
ehofman
496dd14e21 This section was accidentally committed togetehr with another patch, it turned out it needed a fix since env was already declared. 2005-11-13 10:20:15 +00:00
ehofman
a76bbbd23f Use the new clouds3d-enable property instead. 2005-11-13 10:07:23 +00:00
ehofman
5d07f52389 Use the new clouds3d-enable property instead. 2005-11-13 10:05:58 +00:00
ehofman
65d24ffbb8 Start the HTML documentation in the default browser on Mac OS X 2005-11-12 14:46:00 +00:00
ehofman
da5d0ffc28 Cygwin fix. 2005-11-12 14:40:17 +00:00
ehofman
9a7bbf3db5 Sync with SimGear. 2005-11-12 12:31:11 +00:00
mfranz
8d681fd6de "nine" (via IRC):
don't crash if gui subsystem isn't available yet
2005-11-12 11:40:57 +00:00
mfranz
0eef853caa This is an ugly fix for an ugly problem. And no, the two uglies don't cancel
each other out. The problem is this: if we press, for example, "Ctrl-a", but
release the "Ctrl" modifier button *before* the "a" button (which nobody does
intentionally, but which happens all the time), then we don't get the RELEASE
signal on "Ctrl-a" (keycode 1), but on the "a" (79). But "a" hasn't been
pressed, so the signal is dropped. And who releases "Ctrl-a"? Nobody!
So the next PRESSED signal for "Ctrl-a" is ignored, too. It is still
"pressed" after all, isn't it? That's the reason for the occasional
non-functioning of keys.

Due to the nearing 0.9.9 release, I only commit a crude last-minute fix.
It's not as intrusive as it looks, and shouldn't be "dangerous" at all.
It only makes sure that when we get an unexpected RELEASE for one letter
key ("a") that the two twins "A" and "Ctrl-A" are released if they are
still in "pressed" state.

The proper fix will be to let fg_os{,_sdl}.cxx always report presses on the
same key ("a", "Shift-a", "Ctrl-a", "Alt-a", and other combinations of
modifiers) as the *same* key (97), only with modifiers appropriately set.
2005-11-12 10:51:58 +00:00
ehofman
e5d3c3134b Make use of the new sound_sample function arrangement. 2005-11-12 10:27:05 +00:00
curt
60aaadad3f Downgrade some debugging output to the SG_DEBUG log level. 2005-11-12 02:51:18 +00:00
andy
dddbc2e74c Oops again -- forgot that the solver needs fuel too. :) 2005-11-11 18:02:16 +00:00
mfranz
432fbd7f23 sunpos.hxx is no more 2005-11-11 15:08:18 +00:00
ehofman
e1d92f81e9 Deprecate some non GPL compatible code in favor of our own routines. 2005-11-11 14:46:15 +00:00
ehofman
414951b528 Use the default included aircraft. 2005-11-11 13:45:35 +00:00
mfranz
7612767e3a Fred: let the bool function actually return something 2005-11-11 07:17:26 +00:00
curt
35c1b36c2d v0.9.9-pre3 updates. 2005-11-11 01:24:23 +00:00
andy
0a4db53800 Oops, typo. 2005-11-10 22:13:35 +00:00
andy
ef93a1a98b Predicate "engine running" on the out-of-fuel properties. 2005-11-10 22:12:31 +00:00
andy
783db961f8 No-op checkin: Add some Surface test code (#if'd out) so I don't need
to write it again if the subject comes up.
2005-11-10 20:28:13 +00:00
andy
1e3f0f0050 Fix stall widths for the "auxilliary" (reverse flow) stalls so they
are sharp, as intended.  These were are never seen in practice; I
found the problem while looking at 360 degree lift curve graphs
looking for discontinuities.
2005-11-10 20:26:37 +00:00
ehofman
c1602bd1aa Expose the strut compression. 2005-11-10 10:04:33 +00:00
ehofman
0e48d96118 Small bug fix, get the weighted average of the same side. 2005-11-10 10:02:00 +00:00
andy
14c3bc5932 Architectural fix allowing the "tip" popups (FOV, view name, etc...)
to pop themselves down while the simulator is paused.

The problem was with the "real time" queue in the event manager,
causing the third argument of Nasal's settimer() (a flag for "sim
time") to be ignored.  Inverts the default sense of the argument, as
there are lots of uses of settimer() in the current code, almost none
of which want to use real time.

Note this fix introduces a header file incompatibility in SimGear --
be sure to update.
2005-11-09 20:34:46 +00:00
curt
0787d72948 v0.9.9-pre2 updates. 2005-11-09 19:18:48 +00:00
mfranz
5299ab0304 distinguish editable and non editable textboxes; the former will usually
be colored like input fields, while the others will be colored like normal
text
2005-11-09 18:23:55 +00:00
mfranz
feb555b087 prepare for pending plib change: set combobox/selectbox input field colors
to other color than "Yeukky Pink"; #undef'ed for older plib versions; plib
patch will be made available in case fgfs 0.9.9 is released before plib 0.8.5
2005-11-09 17:59:53 +00:00
mfranz
cff9e51840 reinit(): destroy, reload and re-open dialogs (menu: Debug -> GUI Reload)
redraw(): redraw gui without distroying dialogs (fgcommand "gui-redaw"/Shift-F10)

This change makes sure that Nasal-generated and dynamic dialogs can be
re-opened correctly when cycling through themes.
2005-11-09 17:16:59 +00:00
curt
b06049219e Mathias Fröhlich:
Take any arbitrary vector (not necessarily vertical) and intersect it with
the current set of loaded terrain tiles.  Returns lon, lat, elev.  This
could have a multitude of useful applications such as testing line of sight
between two objects, faking a terrain following lookahead radar system,
virtual georeferencing, etc.
2005-11-09 17:08:04 +00:00
mfranz
571939e58d replace hard-coded HUD config dialog with NewGUI dialog 2005-11-09 10:47:40 +00:00
mfranz
c6a1ba7f97 don't destroy iterated map entries; delete _menubar; restore closed
non-nasal dialogs
2005-11-08 18:18:55 +00:00
mfranz
4cc3beff42 Don't use the [] notation here to test for the existence of a map member,
because this creates an empty entry if it didn't exist. This made the
activation of the dialog mandatory before the next gui subsystem update()
happened. Otherwise fgfs segfaulted.
2005-11-08 11:05:50 +00:00
ehofman
ad969bc4cd *** empty log message *** 2005-11-08 10:02:17 +00:00
ehofman
3a655986e1 Harald JOHNSEN: really disable fog 2005-11-08 10:00:24 +00:00
mfranz
e4929c1dc1 interpret negative dialog <x> and <y> coordinates as distance from the
right/upper screen edge (analogous to the --geometry spec), assuming
that we never want to draw outside the screen area; for this to work
we need to write the original x/y coords back to overwrite the absolute,
positive values that the layouter stored there
2005-11-06 23:53:30 +00:00
andy
55ab973df1 Force fuel flow to zero when the engine isn't running. 2005-11-06 17:11:50 +00:00
mfranz
63f5947afc backing out all changes to non-depreciated symbols/functions: plib's cvs
isn't tagged, so we can't easily say what was added after the last stable
release
2005-11-06 14:27:17 +00:00
mfranz
47f90a7976 backing out all changes to non-depreciated symbols/functions: plib's cvs
isn't tagged, so we can't easily say what was added after the last stable
release
2005-11-06 14:22:02 +00:00
mfranz
2aceb0e63f PUCLASS_LIST is already defined in <plib/puAux.h>. 2005-11-06 13:38:21 +00:00
curt
bf7cf64eb2 Updates in preparation for the v0.9.9 coming sometime [hopefully] soon. 2005-11-06 02:40:08 +00:00
curt
276f3faf5a White space fix. 2005-11-05 20:03:36 +00:00
mfranz
30f5e63f81 implement <key> property for key names: <keynum>27</keynum> == <key>Esc</key> 2005-11-05 18:41:43 +00:00
mfranz
e7d2718e15 switch from depreciated pui functions to the "new", supported ones
(OK'ed by Curt)
2005-11-05 09:51:01 +00:00
mfranz
533201c7a0 replace depreciated plib symbols with their new forms 2005-11-04 22:20:35 +00:00
ehofman
171a93869b Mathias Frhlich:
I have now fixed the problem that flying below bridges was broken by some
groundcache work.
2005-11-04 14:49:15 +00:00
mfranz
7f3cd89be5 return correct input object 2005-11-03 20:15:05 +00:00
andy
d61bcae165 Vivian reported that the caster angle of the Hunter was experiencing
"jitter" when the aircraft was stopped.  This is a fundamental
characteristic of the gear model, and can't be fixed without major
surgery (and not a small amount of blinding insight).  But we can at
least clamp it so the value can't change unless the wheel is moving
with a nontrivial velocity (5cm/sec in this case).
2005-11-02 18:34:06 +00:00
mfranz
add06e613d cleanup 2005-11-02 13:52:01 +00:00
mfranz
d5116e496f make transmission buttons accessible via accelerator keys "1", "2", etc. 2005-11-02 13:16:58 +00:00
mfranz
fd5ed5a8fa allow to trigger widgets via accelerator key, which is defined via "keynum"
property (e.g. <keynum>49</keynum>). The numbers are the same as in
keyboard.xml. (Could later be replaced/enhanced with <key>Ctrl-a</key>
notation.) This does, of course, only work for widgets with assigned
bindings.
2005-11-02 13:11:19 +00:00
ehofman
029dda3297 In the process of changing, adding and removing files the last few years
there was the situation where four directories contained jst two files,
of which three directories were aircraft related, and one directory contained
test code from Curt that might be better of in SimGear anyhow.

This is just a patch to move a bunch of files to new locations. In case of
local changes to any of them you can do the following:

move replay.[ch]xx from src/Replay to src/Aircraft
move control.[ch]xx from src/Control to src/Aircraft
move ssgEntityArray.[ch]xx from src/Objects to simgear/screen

In addition it has been decided only to use .[ch]xx files in all directories
unless it's contained within an FDM specific directory, in which case the
author is free to do whatever (s)he wants.

In this repspect the following files have been renamed in src/Multiplayer:

tiny_xdr.[ch]pp has become tiny_xdr.[ch]xx
multiplaymgr.[ch]pp has become multiplaymgr.[ch]xx
2005-11-01 13:41:49 +00:00
ehofman
eed55b48b7 Oliver Schroeder:
This is mainly an intermediate patch. I've restructured the network code.
2005-10-30 18:01:51 +00:00
mfranz
34b8ca3c33 cosmetics 2005-10-30 16:06:08 +00:00
ehofman
f5a91ffdc7 Remove old and unauthorized cruft. 2005-10-30 14:39:05 +00:00
mfranz
853d19e09b Harald JOHNSEN:
"the model is deref'd and deleted when the refcount is null *but* it is
still referenced in the ai model list, so next time you ask for it you will
have a reference on something deleted"
2005-10-30 10:50:36 +00:00
mfranz
69fd4d1ce5 search recursively for named node (i.e. one with matching <name> child);
should probably move to fg_props.cxx
2005-10-27 17:15:47 +00:00
ehofman
71dbe7dc29 Jim Wilson: Adjusting the near clip plane to 0.10 units (approx 3 inches) is less ambitious, a bit more forgiving for the 3D modelers, and perfectly adequate. 2005-10-27 08:40:12 +00:00
ehofman
d31a1f708c Fred: replace the C++ sthe 'and' by the C style '&&' for compatibility. 2005-10-27 08:23:28 +00:00
mfranz
2fd0269662 Replace hard-coded dialogs with NewGUI/XML dialogs, where some widgets
and text strings are filled in before displaying. For testing: the new
dialogs are available under menu -> ATC -> Frequencies, and when
communicating with ATC (' key). This isn't completely finished yet, and
will probably profit from some feedback from the ATC folks.
tower.cxx: remove redundant "if (foo) delete foo".
2005-10-26 18:20:27 +00:00
ehofman
b24dbb3f8b Alex Romosan:
I tried to make sure accessor functions which return by reference act
on const objects. also replaced some iterators with const_iterator
and a few return/pass by reference that were missed the first time
around.
2005-10-26 09:03:49 +00:00
ehofman
2b471a165f I guess there was something in Alex' patch that wasn't all that fortunate. 2005-10-25 16:28:46 +00:00
ehofman
62a359cc4a Alex Romosan:
* Use "const string&" rather than "string" in function calls when appropriate.
* Use "const Point3D&" instead of "Pint3D" in function calls when appropriate.
* Improved course calculation in calc_gc_course_dist()
* Safer thread handling code.

Vassilii Khachaturov:

Dont use "const Point3D&" for return types unless you're absolutely sure.

Erik Hofman:

* Use SGD_(2)PI(_[24]) as defined in simgear/constants.h rather than
  calculating it by hand every time.
2005-10-25 13:49:55 +00:00
ehofman
6985804e95 Vassilii Khachaturov:
this patch eliminates some cut-and-paste,
as well as makes some frequently used strings const static at the same
time. A couple of interfaces are decorated with 'const' on the parameters
that are such, in line with other such interfaces where const is used.

"NINE" changed to "NINER", to match ICAO practice and the current FGFS
voice data.

A fixed buffer, sprintf and a warning comment replaced w/ostringstream.


Alex Romosan:

+string ConvertRwyNumToSpokenString(const string s) {

this should be string ConvertRwyNumToSpokenString(const string& s)
so we don't make unnecessary copies.
2005-10-25 08:57:33 +00:00
ehofman
8e72aac9f5 Remove DOS line endings. 2005-10-24 08:48:19 +00:00
mfranz
89a8e9ccf6 reduce noise 2005-10-23 18:21:12 +00:00
mfranz
75877ebf43 ... and don't keep. This causes nasty, mysterious bugs and has no advantages. 2005-10-23 16:13:53 +00:00
mfranz
cad193a1c4 add support for removeChildren(): takes one name as optional argument
and removes all children with this name; if no name is given, removes
all children  (OK'ed by Andy)
2005-10-23 16:10:32 +00:00
ehofman
e6e618332f Add support for seasonal textures: --prop:/sim/startup/season=winter for now. 2005-10-23 13:48:36 +00:00
mfranz
694426c103 make use of the new removeChildren() 2005-10-23 12:32:15 +00:00
mfranz
31fa633d74 'keep' defaults to true (which is a bad choice -- we never really want
children saved away when removing a node). This caused gui bindings to
fail in some rare cases --> don't keep.
2005-10-23 10:19:05 +00:00
mfranz
abf558620b this may be informative on first sight, but not when output in a loop 2005-10-22 19:33:32 +00:00
mfranz
ec2ff6ae50 We never want to know if a dialog is there or not. If we ask for one and
it isn't there, this is a bug. Thus centralize the error message so that it
doesn't have to be repeated everywhere. Of course, the calling code should
still consider that a returned property node may be 0.
2005-10-22 16:51:27 +00:00
ehofman
3188b395c8 Vassilii Khachaturov:
I found that all the current users of the companion
function, findByFreq() actually did assume radians despite the misleading
comment in the .hxx and .cxx saying it's degrees. I've fixed the
comment now, and no longer change the Navaids code. The new Navaids user
in NewWaypoint() is now passing radians to the findByIdent().

Note that along with fixing the comments in the navlist.hxx, I removed
an obsolete method findByLoc() declaration (there is no definition
anywhere).
2005-10-22 13:37:13 +00:00
ehofman
f938af2592 Vassilii Khachaturov thought that these messages are actually debug messages and I tend to agree. 2005-10-22 11:26:58 +00:00
ehofman
12fc19080b Ima Sudonim:
CygWin/gcc-3.4.4 updates.

I replaced my cygwin compiler with 3.4.4, did a make clean of plib, simgear,
and flightgear, then did a make install of all three. With the included changes,
everything builds fine, and runs fine.
2005-10-22 11:22:05 +00:00
mfranz
08744c015f - spelling
- write file name in quotes
2005-10-21 19:34:51 +00:00
andy
55e1bb2f10 Expose the "spool-time" of a Jet engine as a configuration parameter.
This apparently got forgotten -- the tunable was there, but nothing
exposed it in the parser.
2005-10-21 19:30:58 +00:00
mfranz
7ece674857 spelling fix & remove a couple of trailing spaces 2005-10-21 19:24:16 +00:00
mfranz
affa6b8a38 Fix <text> alignment. Because our <text> widget is an empty puObject's
label, we need to compensate for the gap in-between: PUSTR_RGAP (pu.h).
Without that, all text appears shifted right.
2005-10-21 18:50:58 +00:00
mfranz
58179758af add support for a <hide> property, which hides whole XML groups (widgets
or data blocks) from layouter and dialog creator. This is required for
dynamically generated/modified dialogs. Parts in the XML file can be
hidden and turned on by the C++ code. Other hidden parts can be used
as templates that are multiply used. Hidden datablocks can contain
strings that are used in dialog context, that are easier to translate
or modify in the XML file.
2005-10-21 17:47:48 +00:00
ehofman
c53b7bbec3 Depreciate HUGE in favor of HUGE_VAL. 2005-10-20 13:56:16 +00:00
mfranz
8e1ae97d3d Replace hard-coded message boxes by ones managed by the gui subsystem.
Remove obsolete functions.
2005-10-20 13:05:02 +00:00
mfranz
685076e9ce Add method to get the property root node of named dialogs. This is
necessary to edit dialog contents from C++, and will allow us to
finally let all the hardcoded dialogs be handled by the "gui"
subsystem.
2005-10-20 11:15:00 +00:00
ehofman
ebc9ba19aa Cygwin fix. 2005-10-20 08:48:32 +00:00
andy
ecd0f2306e Feature addition from Vassilii allows the user to set the tower
location with an airport ID by watching the property with a listener.
Moderately rewritten from the original patch for style.
2005-10-19 19:21:45 +00:00
andy
76f4bc1cef Piston engine oil temperature model from David Luff:
Attached is a patch to add oil temperature to the YASim piston engine
model.  This brings to life one of the pa28-161's otherwise 'dead'
guages.  It's a pretty simple 'model' based on temperatures and warmup
times I've observed in the labs on auto engines and run through my
dodgy-memory filter.  It does the job of populating the guage with
something plausible though.
2005-10-19 18:52:57 +00:00
andy
37b9a23122 Must include config.h before plib headers to prevent them from default
to glut (which breaks SDL builds).
2005-10-19 18:40:19 +00:00
ehofman
54594e5219 Durk Talsma:
Auf Niederlandisch:
Bij deze de patch voor de taxiway code. Deze code is nog gebaseerd
op de bestaaande architectuur, gebaseerd op de FGAirport class in simple.[ch]xx
Ik heb me voornamelijk gericht op nieuwe functionaliteit; de volgende
submissie zal waarschijnlijk bestaan uit opschoning, opsplitsing en een
implementatie van de nieuwe airport architectuur, zoals voorgesteld door
David Luff.

En Anglais:
Here is the patch for the taxiway code. This code is still based on the
exsisting architecture, which is based on the FGAirport class in simple.[ch]xx
I've aimed mostly at new functionality; The next batch will probably contain
code cleanups, splitups and the implementation fo the new airport architecture,
as proposed by David Luff.
2005-10-18 18:44:37 +00:00
mfranz
13945c6cd4 Mathias Froehlich: fix refcounting problem that caused submodel crashes 2005-10-18 18:01:43 +00:00
ehofman
0a59a4d4bc Harald JOHNSEN:
I have corrected a few bugs with the owner draw gauge, weather radar code and heat-haze effect.

- od_gauge.cxx :
  corrected a rendering bug where the generated texture was only visible
  from a certain angle or distance ;
  corrected the search of textures inside the aircraft scene graph ;

- wxRadar.cxx :
  the echo of clouds was lost when the pilot was not looking in the
  plane direction ;
2005-10-16 17:31:06 +00:00
curt
ae928dde80 Why not just use the provided constructor, then we know for sure what the
values will be initialized to.
2005-10-16 11:11:06 +00:00
ehofman
2631cf9cc5 Ladislav Michnovic:
Using new gcc 4.0 I have some serios warnings about uninitialized
variables, that are used. I created a patch, but I have no idea if it
is possible to do it my way. Can you check this out please?


Erik: I've modified the patch slightly based on the contents of an older
      version of hitlist.cxx. I think this is correct now.
2005-10-16 09:05:40 +00:00
curt
330024e0b7 Allow a single vacuum system to be driven by multiple pumps. This allows
modeling of a simple single vacuum system with a pump source on each engine
in a multiengine aircraft.  The highest rpm engine takes priority for driving
the vacuum system.
2005-10-15 20:03:17 +00:00
ehofman
5c0dbf7b65 Don't use the this pointer for referencing the AIModels anymore, this
turns out to get problematic on 64-bit systems. Instead use a regular
int based approach.
2005-10-15 14:55:51 +00:00
ehofman
54a33c3899 Mathias Frhlich:
I had a quick view over the ssgBase::ref() calls in flightgear.
I made them all symmetric and used ssgDeRefDelete to dereference them.
This has the basic advantage that ssgDeRefDelete additionaly deletes the
memory instead of just decrementing the reference cound without deletion ...

This includes an incorrect deref instead of a ssgDeRefDelete in the placement
transform registration I introduced earlier. I believe that this causes the
problems with long flights (unverified, but with a big propability).
2005-10-15 14:51:52 +00:00
andy
2b57eb167a Vivian caught some missing length conversions in the gear offset
properties (What are these for?  I have no memory of these
properties...)
2005-10-14 21:27:33 +00:00
andy
bd917a47d8 Support gear compression along axes other than vertical (Vivian needs
it for the B-29).  The gear model itself has supported this always,
but there was no interface from the XML file.  Should be backwards
compatible.  I don't think I broke anything...
2005-10-14 21:20:51 +00:00
ehofman
dafa6ced1b Mathias Frhlich:
I have done a valgrind run in flightgear. Just start it up and close it at the
fist change I had about half an hour later.

source-leak.diff:
   Also two minor ones, but leaks ...
2005-10-14 16:25:14 +00:00
ehofman
e769f42f3b Mathias Frhlich:
I stumbled across two memory errors with two wrong const references to
std::string.

As I fixed that, I also moved aircraft_dir which is only used from UIUC into
UIUC. With that uiuc_aircraftdir.h is empty and can be removed.
2005-10-12 08:55:58 +00:00
ehofman
411d133a54 Mathias Frhlich:
I believe I have found the agl hud problems as well as the 'hole' in the
carrier's deck. I spent half the day to reproduce that problem, it did not
occure when you start on the carrier not does it occure with JSBSim and my
really often used testaircraft. So I really need to improove my helicopter
flying qualities.

I was under the impression that *all* FDM's call

FGInterface::updateGeo*Position(..)

so set the new position in the FDM interface. Therefore I had added at the
some code that updates the scenery elevation below the aircraft to *those*
functions.
Ok, not all FDM's do so :/

The attached patch factors out a function computing the scenery altitude at
the current FDM's position. This function is also used in those FDM's which
need to update this value themselves.
Also this patch restores the nearplane setting and uses the current views
altitude instead of the current aircrafts. I think that this should further
be changed to the eypoint's agl in the future.
The agl is again ok in YASim's hud.
2005-10-08 12:33:06 +00:00
ehofman
68f248879c Harald JOHNSEN:
Changes
=======

- acmodel.cxx :
  we now have an optional new property (/sim/model/texture-path) that is used
  as the first path in wich aircraft textures are searched. If textures are not
  found there then the usual texture path or model path is used ;
  This allows to replace only needed textures for liveries ;

- options.cxx :
  added a new --livery=xxx option for the user pleasure ;
  this will just set the /sim/model/texture-path property with /livery/xxxx

- od_gauge.cxx, og_gauge.hxx, cockpit.cxx, cockpit.hxx,
  generic-instrumentation.xml :
  added an helper class that contain a rendering context for glass instrument
  or any other opengl drawn instrument ;

- wxradar.cxx, instrument_mgr.cxx, wxradar.hxx :
  first experimentation of a weather radar ;
2005-10-08 11:55:18 +00:00
ehofman
f057fd0d48 Martin Spott: Use standardized Sun directive. 2005-10-06 11:08:26 +00:00
ehofman
29f47dee24 Not all compilers understand the C++ 'and' command,
use the C style && instead.
2005-10-06 09:28:36 +00:00
mfranz
bb55e4122f Al MacLeod: fix typo 2005-10-04 20:36:38 +00:00
mfranz
ac2f7d1e4b prevent view through big hole in carrier deck 2005-10-04 18:01:45 +00:00
mfranz
af653250b5 only skip one comment line at the top of TACAN_freq.dat.gz 2005-10-02 17:57:16 +00:00
ehofman
4d0bf2e69b Add missing files. 2005-10-01 11:08:06 +00:00
ehofman
1c3e2d4942 Vivian Meazza:
This adds a TACAN instrument to the inventory. Range and bearing are calculated
to the TACAN or VORTAC beacon selected by means of the Channel Selector in the E
quipment/Radio pull-down menu.

A TACAN beacon has also been added to the aircraft carrier Nimitz (channel #029Y
).
2005-10-01 09:56:53 +00:00
ehofman
5555809250 Remove unused defines 2005-09-28 14:19:16 +00:00
ehofman
e9e5489bda Cygwin doesn't handle endianness properly at the moment, try a different approach. 2005-09-28 14:03:43 +00:00
andy
6fa0721363 Vivian pointed out that the gear keep rotating after the wheel leaves
the ground.  Fix this by zeroing the values, although a fancier
implementation (that spins down slowly and honors the brake input)
would be possible...
2005-09-27 16:53:12 +00:00
ehofman
111eff7ae0 Roy Vegard Ovesen:
I've prepared a patch as suggested by Hans-Georg Wunder and Jeff McBride.

In addition I've removed the ability to completely leave out the integral
action by setting Ti to zero. The velocity form of the PID algorithm _needs_
the integral action.
2005-09-25 07:49:18 +00:00
ehofman
22423d0bab Use our own stdint.hxx implementation. 2005-09-22 11:47:58 +00:00
ehofman
278b7d7544 Better cross platform compatibility. 2005-09-21 09:43:32 +00:00
ehofman
7d0daddfcc Update for 32-bit systems. 2005-09-21 09:17:32 +00:00
andy
0f704b0a6e Changes to support the new naCall API in SimGear. NOTE: these changes
are *not* backwards compatible, and require current SimGear to
compile.
2005-09-20 21:09:52 +00:00
curt
0bb1494452 David Luff:
Attached is a patch to the airport data storage that I would like committed
after review if acceptable.  Currently the storage of airports mapped by ID
is by locally created objects - about 12 Meg or so created on the stack if
I am not mistaken.  I've changed this to creating the airports on the heap,
and storing pointers to them - see FGAirportList.add(...) in
src/Airports/simple.cxx.  I believe that this is probably better practice,
and it's certainly cured some strange problems I was seeing when accessing
the airport data with some gps unit code.  Changes resulting from this have
cascaded through a few files which access the data - 11 files are modified
in all.  Melchior and Durk - you might want to test this and shout if there
are problems since the metar and traffic code are probably the biggest
users of the airport data.  I've also added a fuzzy search function that
returns the next matching airport code in ASCII sequence in order to
support gps units that have autocompletion of partially entered codes.

More generally, the simple airport class seems to have grown a lot with the
fairly recent addition of the parking, runway preference and schedule time
code.  It is no longer just an encapsulation of the global airport data
file, and has grown to 552 bytes in size when unpopulated (about 1/2 a K!).
 My personal opinion is that we should look to just store the basic data in
apt.dat for all global airports in a simple airport class, plus globally
needed data (metar available?), and then have the traffic, AI and ATC
subsystems create more advanced airports for themselves as needed in the
area of interest.  Once a significant number of airports worldwide have
ground networks and parking defined, it will be impractical and unnecessary
to store them all in memory.  That's just a thought for the future though.
2005-09-20 20:26:57 +00:00
ehofman
ab7489e20d Add a byte swap test utility. 2005-09-20 09:35:20 +00:00
ehofman
7311d05c87 Oliver Schroeder:
I have prepared a new patch for multiplayer, which fixes endianess issues with
multiplayer code. It's basically identical to the patch I sent before my
vacation, but contains minor fixes.

Multiplayer should now be working under all unix-like environments and windows
native. The basic trick is to let configure check for endianess of the host
system.

It will not work on system not using configure in the build process (excluding
windows), ie. possibly MACOS. For those system we should provide #ifdefs in
tiny_xdr.hpp.


Erik:
I've updated the patch to use the Plib utils package for endian swapping an
used a preprocessor directive to detect endianess.
2005-09-18 12:37:18 +00:00
ehofman
dcbc6369ac Harald JOHNSEN:
this is the correction for the visibility bug/yasim crash. I've also made a little change that could help in the metar init.
2005-09-18 09:49:26 +00:00
curt
e60223a952 Lee Elliot:
>> Hello List,
>>
>> I think there's a small bug in the moving-average filter in
>> xmlauto.cxx
>>
>> I noticed that the output from it was always out a bit and
>> checking with a calculator showed that it seemed to be dividing
>> by the number of samples + 1 instead of just the number of
>> samples.
>>
>> subtracting 1 from 'samples' in line 702 seems to fix the problem
>> and as 'samples' doesn't seem to be used elsewhere I think it's
>> safe.  Possibly implies that the number of samples may be one
>> less than specified but I'm not familiar enough with c++ to spot
>> it.


Roy Ovesen:

You are right. I would suggest resizing input[] to (samples + 1) instead.
Change lines 654 and 661 to:

input.resize(samples + 1, 0.0);

That way we average over the number of samples as configured.
2005-09-16 20:21:15 +00:00
ehofman
62bb2277bc MingW32 fixes. 2005-09-11 09:53:55 +00:00
daveluff
55e25f9871 Add a convienient ctor 2005-09-09 12:33:23 +00:00
ehofman
fad67bda10 Mathias Frhlihlich:
There was a patch from Manuel Masing a few months ago which cleaned up
SGLocation's way depending on input values. That means that with that patch
SGLocation does no longer have calls with unneeded input arguments.
I took his patch and integrated that into flightgear and made maximum use of
that changes.


Erik Hofman:
Remove some duplicate code that was moved to simgear/compiler.h
2005-09-05 13:25:09 +00:00
curt
2584ecaaf9 Fix a small oops. We need to convert values from network byte order before
trying to use them.
2005-08-23 21:38:49 +00:00
curt
cf0d6af66e Slightly more user friendly output. 2005-08-23 21:36:05 +00:00
curt
d8cad2103a Minor clean up. 2005-08-23 21:02:44 +00:00
curt
e7ef4f4772 Scale gyro input power for the new[er] electrical system. 2005-08-23 02:26:16 +00:00
curt
817afc61d2 Remove some old debugging output. 2005-08-22 23:47:17 +00:00
curt
00d5d7c1b3 Remove an unneeded include. 2005-08-22 23:31:23 +00:00
ehofman
a760dcdf13 Harald JOHNSEN:
- replay.cxx :
  corrected a bug, now reinitialize the recording data when replay is
  deactivated

- fgclouds.cxx :
  cloud layers and weather condition are saved when choosing a weather scenario,
  added a new scenario 'none' so we can switch back to standard flightgear
  weather

- navradio.cxx :
  force a search() on init to initialize some variables, preventing a nearly
  infinite loop  when delta-time == 0 on the first update()

- electrical.cxx :
  uninitialized variable in apply_load() for FG_EXTERNAL supplier

- panel.cxx, panelnode.cxx :
  added a property "depth-test" for 2.5D panels so that they update the depth
  buffer and are no more visible from the outside of the aircraft when the
  aircraft uses textures without an alpha channel

- panel.cxx :
  moved the computation of the instruments diffuse color outside the
  texturelayer code since this is constant during a frame, this is a big speedup
  for 2D panels
2005-08-22 17:49:50 +00:00
ehofman
99276dd060 MSVC fix. 2005-08-18 09:17:39 +00:00
ehofman
b92f034550 Vivian Meazza:
Some quite extensive changes to the AIModel code:

1. Mathias has made major changes to the AICarrier code to provide better
alignment of an aircraft on deck with the carrier - this feature is a major
improvement on the existing, but has a bug which might cause it to fail when
the computer carries out other tasks - changing window size is a known
example. This bug is outwith this code.

2.  I have made significant changes to the AIShip code to enable a ship the
turn and roll smoothly.

3. I have added some simple AI which enables the carrier to remain within,
or return to, an operating box.

4. An automated turn into wind for flying operations.

5. A simplistic implementation of TACAN within AICarrier. I am in the course
of implementing this as a generic instrument, but this is some time off
completion.
2005-08-16 09:37:23 +00:00
ehofman
7b824755ee Mathias Frhlich:
I have prepared a patch that:
- Introduces a FGTileMgr::scenery_available method which asks the tilemanager
  if scenery for a given range around a lat/lon pair is already loaded and make
  use of that method at some -9999 meter checks.
- Introduces a FGScenery::get_elevation_m method which queries the altitude at
  a given position. In constrast to the groundcache functions this is the best
  choice if you ask for one *single* altitude value. Make use of that thing in
  AI/ATC classes and for the current views ground level. At the current views
  part the groundcache is reused if possible.
- The computation of the 'current groundlevel' is no longer done on the
  tilemanagers update since the required functions are now better seperated.

Alltogether it eliminates somehow redundant terrain level computations which
are now superseeded by that more finegrained functions and the existence of
the groundcache. Additionally it introduces an api to commonly required
functions which was very complex to do prevously.
2005-08-14 12:57:12 +00:00
curt
397a15c829 Syd Adams:
I made some changes to clock.cxx to output minute, hour and a shortened text
string (hh:mm) for the digital clock in the Citation Bravo...
2005-08-03 19:58:42 +00:00
ehofman
5430d87f01 Ralf Gerlich:
- automatic detection of axis directionality, so that axis inputs are appropriately inverted only when necessary
- fixed trim axis names for better understandability
- fixed signs for flaps up/down property increments
- button 0 was previously used for skipping axes and buttons in both loops. Now button 0 can be assigned a binding (e.g., brakes). Instead, moving any axis during the button-assignment-loop indicates skipping.
- The user is now told how to skip a control.
2005-07-31 14:05:55 +00:00
ehofman
83b414482f Harald JOHNSEN:
I did some profiling of the code and found a few interessant things. Some corrections are obvious like the one in the multiplayer code, the fps is no more divided by 2 or 3 when another plane is on screen.

Other things like collision detection and computation of agl can not really be optimized. I changed a few things in hitlist.cxx but this only give a very low increase of fps. The groundcache eats a lot of cpu but I think that the real way to do it is to use a real collision system like OPCODE or something like that.



And I added an option to disable the recording of replay data. It takes more cpu than we can think.


Changes
=======

- panel.cxx :
  moved the computation of the instruments diffuse color outside the texturelayer code
  since this is constant during a frame, this is a big speedup for 2D panels ;

- hitlist.cxx :
  changed the computation of the intersection between ray and triangle, optimized
  the sphere culling by using a normalized direction vector. This can give a
  35% speedup on the computation of elevation in some situations ;

- renderer.cxx, acmodel.cxx :
  call ssgDrawAndCull with plane scene graph in external or internal view,
  calling ssgDrawAndCull with the root scene graph was drawing other players plane
  a second time in multiplayer mode ;

- mplayer.cxx :
  removed the calls to ssgFlatten and ssgStripify because it was degenerating models,
  causing a massive drop in frame rate ;

- replay.cxx :
  added an option to disable the recording of the flight

- fgclouds.cxx :
  changed the path of cloudlayer properties to match preferences.xml ;
  set the altitude of clouds from scenarios to a more correct value if metar is not enabled ;
2005-07-31 09:04:18 +00:00
ehofman
17ff8ec4a6 Frederic: MSVC doesn't have stdint.h. I just copied the code found in net_gui.hxx to address this issue. 2005-07-31 08:13:09 +00:00
ehofman
ee73d9fbff Mathias Frhlich:
I have now included a patch to the multiplyer protocoll which does:

1. place the 3d model into the scenery using a placement transform which can
dynamically change its scenry center.
2. Transmits unique position and orientation data for the 3d model.
3. Thus breaks protocol compatibility.

Oliver Schroeder:
With help from Norman I fixed the alignment in the used headers.

But this patch again fixes only symtoms, not the problems. I suggest to
put it into cvs anyway, as it will enable the majority to get experience
with the multiplayer mode.
2005-07-28 08:40:03 +00:00
ehofman
4bd2314430 Mathias:
Turns out to be a bad interaction between jsbsims crash detection and my
past initialization changes.
The attached patch fixes this by moving crash detection out of the
initialization phase of jsbsim.
2005-07-27 11:53:47 +00:00
ehofman
6d5e37f674 MacOS-X fix. 2005-07-27 07:59:59 +00:00
ehofman
ef099d3cad Why this didn't ring any alarm bells during my previous test compile is beyond me, but this should get FlightGear in a compilable state again. 2005-07-26 20:12:03 +00:00
ehofman
d4a3872f78 Remove a stale reference. 2005-07-26 16:57:56 +00:00
ehofman
73f06ccef3 Remove unused code, especially concidering the non-commercial clause in the copyright statement. 2005-07-26 08:08:41 +00:00
ehofman
15f3ef3cfb Harald JOHNSEN:
- AIManager.cxx :
  - we can now have multiple <scenario> entries in the sim/ai entry in preferences.xml
- AIBase.cxx :
  - added an exception handler around the loading of the 3D model to not exit FG
    if the model is not found
- AIScenario.cxx :
  - removed a duplicated read of the xml file, this was also exiting FG is the xml file
    does not exist
2005-07-24 14:05:28 +00:00
ehofman
7e024c549f Remove a copyright that doesn't belong there. This file was written from scratch for FlightGear. 2005-07-22 12:32:46 +00:00
ehofman
05f626e9fb Harald JOHSEN:
Changes
=======

- shadowvolume.cxx, renderer.cxx :
  - reduced the polygon offset a bit to eliminate some artifact ;
  - changed again the cleanup code for objects inside a tile because it could crash on rare occasion ;
  - the culling of shadow casters has been rewritten to traverse the scene graph, it should be
    a bit faster when there is a lot of objects ;
  - the range selector was not correctly handled, sometimes the wrong LOD was casting shadows.
  - added the option to display aircraft's transparent objects after the shadows, this will
    reduce the problem of shadows being hidden by the transparent object (propeller disk,
    rotor, etc). A side effect is that aircraft's transparent objects won't receive shadows
    anymore. This is usually a good thing except when the aircraft use a 'transparent'
    texture where it should not. A transparent texture in the plib context is a texture
    with an alpha channel or a material with alpha <= 0.99.

- model.cxx, animation.cxx, shadowvolume.cxx :
  - added an optional <condition> under the <noshadow> animation

- tower.cxx
  - correct a rare bug where all occurences of the aircraft are not deleted from the
  departure list causing a crash in FGTower::CheckDepartureList function.
2005-07-18 16:58:22 +00:00
ehofman
e4390aac42 Perhaps it's better to compare the contents of the strings instead of comparing the pointers. 2005-07-18 11:55:39 +00:00
ehofman
0666590909 Fix a segmentation fault when switching to a new style and selecting a new dialog. I still need to find out why getColor doesn't work properly. 2005-07-18 10:00:02 +00:00
ehofman
0ec8fa64a4 IRIX fixes.
Somehow the MIPSpro compiler doesn't like an STL map entry being called
using a variable when the reference is an object and not a pointer to an
object.

Preliminary support for a fontcache is added which prevents fonts from
being loaded more than once and takes care of freeing them up again.
The fontcache isn't used yet since there seems to be a problem somewhere.
2005-07-18 09:18:24 +00:00
mfranz
6776103190 - don't abort if remote model isn't installed; output missing model's
path, so people know what to install
2005-07-15 09:45:57 +00:00
ehofman
1869b30b58 Mathias Frhlich:
I have traced that reset on carrier problem down to several problems. One of
them is the fact that on reset the carrier is updated while the aircraft is
not. That made the aircraft drop down an elevator sometimes. Depending on the
passed realtime while loading some parts of the scenery.
2005-07-13 12:25:16 +00:00
mfranz
3e38a4d415 - suppress CygWin warnings (Vivian Meazza) 2005-07-13 11:43:00 +00:00
mfranz
036fbdb18e make /sim/current-gui an integer 2005-07-13 10:57:27 +00:00
mfranz
591001a24e - make tabula rasa on re-init
- check /sim/current-gui for where to get gui colors (default "/sim/gui[0]")
- call getFont() with gui font address (default "/sim/gui[0]/font")
2005-07-13 10:16:42 +00:00
mfranz
4ac0776e97 nasal dialogs are separate trees and have an empty name 2005-07-13 07:05:50 +00:00
mfranz
eefd7dee8c - fix alpha handling (hopefully)
- remove another leftover debugging line
2005-07-13 06:37:39 +00:00
mfranz
275a9a5cc0 - don't clamp when setting, but on request (allows to set an invalid color)
- adapt constness
- remove leftover debugging line
2005-07-12 16:48:16 +00:00
mfranz
387888862c - let FGColor setters/mergers report if they found something merge-worthy
- tune "use-<color>-node-for-pucol" masks
2005-07-11 08:01:28 +00:00
mfranz
01bca490b1 add missing paren 2005-07-09 14:01:52 +00:00
mfranz
f3e88fc05d - clear alpha like r/g/b
- fix warning
- replace tabs by 4 spaces, according to the style of the file
2005-07-09 13:53:25 +00:00
mfranz
f65eb6e3d5 tell the layouter about the default font (I wonder why
LayoutWidget::setDefaultFont() wants puFont* /and/ pointsize as extra
parameters, when puFont knows its pointsize anyway. Didn't want to change
that yet, though.) Now the HELVETICA_10 font makes actually sense. :-)
2005-07-08 20:12:06 +00:00
mfranz
18a874f1b2 disable automatic re-opening of dialogs on re-init; this does currently
not work correctly (forgets the bindings)
2005-07-08 16:42:26 +00:00
mfranz
8d2f921618 rename VERA_12B font to SANS_12B (as in sans-serif). This is a "Grotesk"
font similar to Helvetica/Swiss. The license doesn't allow to redistribute
modified fonts under the original name. While it's only a converted font,
and not manually modified, it can no longer be seen as original. Changes
so far are (a) conversion from vector to bitmap, (b) different empty space
width, (c) different & constant gap value, without other kerning information.
Further changes may be necessary in the future.
2005-07-08 13:28:40 +00:00
mfranz
f0b6030d31 Harald JOHNSEN:
[new_gui is] "using copies of puFont objects that are not yet initialized, I
think that dependant of link order (and so tor execution order) it can
work or not. Changing puFont font by puFont *font should work in all cases."
2005-07-08 11:15:17 +00:00
mfranz
ffb1515aa4 add missing copyright statements 2005-07-08 07:37:56 +00:00
mfranz
e675f80a66 remove commented out and non-functional code for now 2005-07-08 06:45:00 +00:00
mfranz
ae96deb2c1 read the splash font color from the gui style file. This is a bit of a
gimmick, but it may be nice to adjust the font color to match the splash
image, e.g. to make it darker for dark images, etc.
2005-07-07 21:43:22 +00:00
mfranz
81aaf4c7bd make property picker consider the new_gui colors; unfortunately, plib
hardcodes the text color as black, which makes them a bit hard to read
on dark backgrounds; fix sent to the plib list; (the added code isn't
pretty and hence fits the existing style quite well ;-)
2005-07-07 21:32:33 +00:00
mfranz
f2bf0a7cb3 - use color map information from new_gui.cxx and set puObject colors
accordingly;
- cleanup (call all puObjects "obj" for easier editing/copying)
- commented out code: (not-yet functional props preprocessor)
2005-07-07 21:30:34 +00:00
mfranz
e1a5398e4f - add gui color support: maintain color map with default colors and all
colors from /sim/gui/colors/ into map;
- set default color scheme
- handle fonts
- implement color class
- close all dialogs on reinit, set up style again, and then reopen all
  (non-nasal generated) dialogs again
2005-07-07 21:28:15 +00:00
mfranz
9b47b1b15b add fonts.cxx file 2005-07-07 21:24:28 +00:00
mfranz
9946347fa7 contains two fntBitmap fonts with iso8859-1 character set; this was
generated by freeglut's genfont utility. That application also generates
a copyright message that I did not copy into this file, because it is
wrong: the author of genfont claims copyright for data that *I* generated
using his program; this doesn't fly. Of course, the copyright will remain
in the (heavily edited) version of *his* code. I'll commit that, too.
2005-07-07 21:23:42 +00:00
mfranz
fb9453fc2d Patrick Quirk: fix typo (Norman: "looks like this is probably a bug") 2005-07-07 12:57:00 +00:00
mfranz
cac0a9b326 - abstract out reading colors from the property tree into a routine.
This could also be used to read the default foreground/background color
  from a definition in preferences.xml or gui/color.xml.
2005-07-04 07:27:17 +00:00
mfranz
0730ecc8e2 Whoops. I had missed that we have that already. Reverting. Thanks Erik.
<binding>
     <command>reinit</command>
     <subsystem>gui</subsystem>
    </binding>
2005-07-03 15:43:32 +00:00
mfranz
133cc2b0c7 Rename "menu-reload" to "gui-reload", which is what is actually done
behind the scenes: It reloads all gui files from $FG_ROOT/gui/. That's
useful for gui development. Maybe we'll have a "menu-reload" later ...
2005-07-03 15:20:05 +00:00
mfranz
7f9b0fbb73 - add fgcommand to reload menubar; that's necessary to make changes visible
at runtime. Example:

  <key n="99">
      <name>c</name>
      <desc>Update completely useless menu entry.</desc>
      <binding>
          <command>nasal</command>
          <script>
              time = getprop("/sim/time/elapsed-sec");
              setprop("/sim/menubar/default/menu[9]/label", time);
          </script>
      </binding>
      <binding>
          <command>menu-reload</command>
      </binding>
  </key>
2005-07-03 15:06:29 +00:00
mfranz
11138e3739 - make menubar reloadable ... again. This was lost because FGBindings does
no longer save inaccessible bindings copies, but only pointer to the
  bindings in the property tree (which was desirable to get accurate
  error messages for Nasal bindings).
2005-07-03 14:43:47 +00:00
mfranz
2f2d14a41f better error message to help users and support staff 2005-07-03 10:27:35 +00:00
ehofman
4df7a3e9f8 Mathias Frhlich:
I have introduced the posibility to start directly on the carrier.

With that patch you will have a --carrrier=id argument where id can either be
the pennant number configured in the nimitz scenario or the carriers name
also configured in the carriers scenario.
Additionaly you can use --parkpos=id to select different positions on the
carrier. They are also configured in the scenario file.

That includes the switch of the whole FGInterface class to make use of the
groundcache.
That means that an aircraft no longer uses the current elevation value from
the scenery class. It rather has its own local cache of the aircrafts
environment which is setup in the common_init method of FGInterface and
updated either manually by calling
 FGInterface::get_groundlevel_m(lat, lon, alt_m);
or implicitly by calling the above method in the
 FGInterface::_updateGeo*Position(lat, lon, alt);
methods.
A call get_groundlevel_m rebuilds the groundcache if the request is outside
the range of the cache.

Note that for the real usage of the groundcache including the correct
information about the movement of objects and the velocity information, you
still need to set up the groundcache in the usual way like YASim and JSBSim
currently does.
If you use the native interface, you will get only static objects correctly.
But for FDM's only using one single ground level for a whole step this is IMO
sufficient.

The AIManager gets a way to return the location of a object which is placed
wrt an AI Object. At the moment it only honours AICarriers for that.
That method is a static one, which loads the scenario file for that reason and
throws it away afterwards. This looked like the aprioriate way, because the
AIManager is initialized much later in flightgears bootstrap, and I did not
find an easy way to reorder that for my needs. Since this additional load is
very small and does only happen if such a relative location is required, I
think that this is ok.

Note that moving on the carrier will only work correctly for JSBSim and YASim,
but you should now be able to start and move on every not itself moving
object with any FDM.
2005-07-03 09:39:14 +00:00
mfranz
e73dffb99f - fix <hrule>
- add <vrule>
- allow elements to default to foreground color (black)
- remove redundant  if (foo) delete foo;

The rules do currently need a dummy child for the layouter to work correctly,
(<hrule><foo/></hrule>). The goal is to make a simple <hrule/> work.
2005-07-02 20:49:38 +00:00
andy
154917477f Rework the MP calculation to make super/turbocharger output dependent
on RPM via a model developed by Vivian Meazza.  Add a "boost" output
to the property tree.  Fix a bug where MP would be reported "before"
the wastegate clamping.
2005-07-02 17:09:42 +00:00
mfranz
ee42a35cbc revert last patch 2005-06-30 20:08:02 +00:00
mfranz
af78f45550 remove my beloved removeChildren() ... sniff 2005-06-30 19:26:29 +00:00
mfranz
9f0397a720 - replace one SGPropertyNode* by SGPropertyNode_ptr to avoid crash with
temporary removeChild(); should be done even after reverting; the node
  is accessed after removal
- cleanup:  if (foo) delete foo  -->  delete foo
2005-06-30 18:34:20 +00:00
mfranz
93dbac482f remove "keep" argument; the new removeChild() doesn't support that any more 2005-06-28 11:23:53 +00:00
mfranz
a62388a19c - fix type warnings
- use new removeChildren() to remove the named js nodes that we don't
  need any more (they are now *really* removed, not just detached), and
- move it into postinit(). (getChildren() returns a SGPropertyNode_ptr,
  so all nodes are refcounted and, thus, after the last sg/props change
  no longer removable in that scope ;-)  Maybe we'll need an alternative
  getChildren() that returns SGPropertyNode* ...
2005-06-27 13:59:48 +00:00
mfranz
9889d37bdb Frederic Bouvier:
- This doesn't do what the author though it would do:
  if (modifiers&KEYMOD_RELEASED == 0) ...   (see below)
- MSVC and type fixes

mf:
fixing this uncovered an old bug: the "key pressed" branch was
actually never executed -- always only "released". And that is why
the <repeatable> property didn't work. And *that* was the reason
why the Spitfire's starter didn't work with freeglut, and Vivian
had to write a nasty workaround for it.
2005-06-27 07:13:02 +00:00
ehofman
f2cf76171f Harald JOHNSEN:
Changes
=======

New volumetric shadows for FlightGear.

There is now two new checkboxes in the rendering dialog to enable/disable shadows
for the user aircraft and for static scenery objects (ie those defined in the .stg files).
AI and random objects are not handled for the moment.


known bugs
==========
- ghost objects
2005-06-26 17:21:18 +00:00
ehofman
8e5eed90d5 Remove the 'old' 3D clouds code. 2005-06-25 11:21:18 +00:00
mfranz
9319d165d1 Frederic Bouvier: work around MSVC bug
mf: avoid warning about initialization order
2005-06-25 10:25:38 +00:00
ehofman
486b59a431 TJ:
Annexed an IVSI (instantaneous ertical speed indicator), which bypasses a
limitation with Concorde :

- the cruise at Mach 2 must be with a slow climb rate of 50/60 ft/min
  (2h from 50000 ft).
- with /velocities/vertical-speed-fpm, the real climb rate (altimeter) varies :
  One must constantly (every 5-10 minutes) change the vertical speed hold of
  the autopilot between 10 ft/min and 200 ft/min.
  This is very annoying because not a constant offset : that could be a lack of
  sensitivity of /velocities/vertical-speed-fpm (FDM ?).

This new IVSI :
- Is an emulation with works with environment pressure : a real IVSI works with
  static pressure (with lag) + accelerometers.
  It is not forbidden to later upgrade to the real model.
- Doesn't require a tuning of the autopilot made with
  /velocities/vertical-speed-fpm (also tested with 737, 747) :
    Concorde's autoland works without update.
2005-06-25 08:46:58 +00:00
mfranz
4732b96861 (Frederic Bouvier) avoid gcc'ism 2005-06-25 07:57:42 +00:00
mfranz
550352c0b6 keep panel and gui bindings nicely separated; useful for debugging,
especially now that the property path is shown in nasal error messages
2005-06-24 14:07:15 +00:00
mfranz
19b09cef28 FGBindings doesn't create its own, detached copy of the bindings property
subtree. Keeping bindings available is in the responsibility of the caller.
2005-06-24 13:44:22 +00:00
curt
baac4a98c9 Laurie Bradshaw:
Modified fgjs.cxx so it can produce xml or property list output.
There are also a couple of other additions (like a --deadband <float>
option).
2005-06-23 19:21:17 +00:00
mfranz
c70e5f20de - layout frames like groups (I forgot to commit that yesterday :-) 2005-06-21 12:13:07 +00:00
mfranz
0636ebfc86 - fix "frame" (the old code was broken and ... strange)
- add "hrule" (horizontal rule; accepts color and "pref-height" for thickness)
2005-06-20 20:54:47 +00:00
mfranz
d977c07908 - output property path in error messages 2005-06-20 18:53:00 +00:00
mfranz
ee7b882dd9 - delete bindings in the *destructor* (must have been an editing accident)
- create copies of bindings in /sim/bindings/, because FGBindings doesn't
  do that any more  (is there a better way to find the first free child?)
2005-06-20 18:52:54 +00:00
mfranz
1bcaf4bfdd - don't store link to a disconnected *copy* of a subtree, but a link to
that subtree in the property tree itself
- remove a binding from the property tree
2005-06-20 18:52:45 +00:00
mfranz
8027023862 - fix bug that let <mod-up> bindings be executed before the nasal init
block (this required to move most of init() into postinit())
- undo the "which" pseudo-namespace workaround, and do it proper:
- let all nasal code in a joystick config file be executed in its own
  namespace. This allows to define functions in the init block that
  can be used throughout the driver file, and to write state variables
  in one binding, while reading them in other bindings, all without
  having to make sure that the values aren't lost in between, or collide
  with another joystick driver's code.
      For this the input subsystem creates a namespace for each joystick:
  "__js0" for joystick 0, etc. The two leading underscores are there to
  avoid collisions with user defined modules (similar to internal compiler
  variables). The namespace shouldn't be used explicitly, at least not in
  releases, and not from outside code, except for testing purposes, for
  which it can be useful. (If using the Cyborg joystick as js[0], you
  can read the modifier level as "__js0.modifier" from any nasal context.)
2005-06-19 17:23:41 +00:00
mfranz
ece07db538 - rename initModule() to createModule() (as suggested by Andy)
- make it public
- enable handleCommand() to execute a binding (or other nasal code defined
  in a property system subtree) in a particular namespace (-> "module" child)
2005-06-19 17:09:03 +00:00
mfranz
5c31daf808 Josh Babcock: fix typo 2005-06-17 19:42:25 +00:00
curt
3a109c568a Adjust logging output. 2005-06-14 20:55:46 +00:00
andy
568d53875e Make readScriptFile() public, and rename it to loadModule(), so that external
code can have access to the facility for loading modules from files.

Also includes a cast-int-to-pointer fix that causes a warning on 64 bit
systems.
2005-06-14 19:57:24 +00:00
curt
6dd82d0502 Updated electrical system.
These changes represent some attempts to bandaid and patch a hopelessly
flawed system to impliment basic battery charging/discharging as well as
provide the ability to model ammeter gauges and draw current from multiple
sources (like load balancing multiple alternators in a multi-engine aircraft.)
The system design forces all these things to be horrible hacks or depend
on extremely subtle system side effects and call ordering so they may or9
may not work to one degree or another.

As mentioned in the mailing list, my recommendation is to move away from
using this system and instead build a procedural electrical system using
nasal.  Sometime in the future we hopefully can impliment a better conceived
data driven electrical system model.
2005-06-14 17:57:48 +00:00
curt
5fb87df1fb Turn the electrical system into a non-hardcoded system like all the other
systems.
2005-06-14 17:54:19 +00:00
curt
d0c8edd02d Fix a misuse of a return value that lead to an error message being displayed
when one shouldn't have been.
2005-06-14 17:53:40 +00:00
mfranz
72eecef8fa strip trailing spaces & garbage 2005-06-13 19:27:40 +00:00
mfranz
639ed2161f revert last patch, and do it differently: set /input/joysticks/which (int)
to the joystick index (x in /input/joysticks/js[x]) both when initializing
nasal init blocks & whenever updating the joystick. That's the only way to
make these nasal contexts aware of the joytick for which they were called.
And that's useful if a js maintains common variables, such as modifiers or
state variables, that should be shared between the namespace-less bindings
and initialization code. And, yes, it's over-engineered ...  :-)
2005-06-13 06:14:45 +00:00