]> git.mxchange.org Git - flightgear.git/log
flightgear.git
18 years agoRemove some old debugging output.
curt [Mon, 22 Aug 2005 23:47:17 +0000 (23:47 +0000)]
Remove some old debugging output.

18 years agoRemove an unneeded include.
curt [Mon, 22 Aug 2005 23:31:23 +0000 (23:31 +0000)]
Remove an unneeded include.

18 years agoHarald JOHNSEN:
ehofman [Mon, 22 Aug 2005 17:49:50 +0000 (17:49 +0000)]
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

18 years agoMSVC fix.
ehofman [Thu, 18 Aug 2005 09:17:39 +0000 (09:17 +0000)]
MSVC fix.

18 years agoVivian Meazza:
ehofman [Tue, 16 Aug 2005 09:37:23 +0000 (09:37 +0000)]
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.

18 years agoMathias Fröhlich:
ehofman [Sun, 14 Aug 2005 12:57:12 +0000 (12:57 +0000)]
Mathias Fröhlich:

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.

18 years agoSyd Adams:
curt [Wed, 3 Aug 2005 19:58:42 +0000 (19:58 +0000)]
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...

18 years agoRalf Gerlich:
ehofman [Sun, 31 Jul 2005 14:05:55 +0000 (14:05 +0000)]
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.

18 years agoHarald JOHNSEN:
ehofman [Sun, 31 Jul 2005 09:04:18 +0000 (09:04 +0000)]
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 ;

18 years agoFrederic: MSVC doesn't have stdint.h. I just copied the code found in net_gui.hxx...
ehofman [Sun, 31 Jul 2005 08:13:09 +0000 (08:13 +0000)]
Frederic: MSVC doesn't have stdint.h. I just copied the code found in net_gui.hxx to address this issue.

18 years agoMathias Fröhlich:
ehofman [Thu, 28 Jul 2005 08:40:03 +0000 (08:40 +0000)]
Mathias Fröhlich:

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.

18 years agoMathias:
ehofman [Wed, 27 Jul 2005 11:53:47 +0000 (11:53 +0000)]
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.

18 years agoMacOS-X fix.
ehofman [Wed, 27 Jul 2005 07:59:59 +0000 (07:59 +0000)]
MacOS-X fix.

18 years agoWhy this didn't ring any alarm bells during my previous test compile is beyond me...
ehofman [Tue, 26 Jul 2005 20:12:03 +0000 (20:12 +0000)]
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.

18 years agoMore updates.
ehofman [Tue, 26 Jul 2005 18:00:30 +0000 (18:00 +0000)]
More updates.

18 years agoRemove a stale reference.
ehofman [Tue, 26 Jul 2005 16:57:56 +0000 (16:57 +0000)]
Remove a stale reference.

18 years agoRemove unused code, especially concidering the non-commercial clause in the copyright...
ehofman [Tue, 26 Jul 2005 08:08:41 +0000 (08:08 +0000)]
Remove unused code, especially concidering the non-commercial clause in the copyright statement.

18 years agoHarald JOHNSEN:
ehofman [Sun, 24 Jul 2005 14:05:28 +0000 (14:05 +0000)]
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

18 years agoRemove a copyright that doesn't belong there. This file was written from scratch...
ehofman [Fri, 22 Jul 2005 12:32:46 +0000 (12:32 +0000)]
Remove a copyright that doesn't belong there. This file was written from scratch for FlightGear.

18 years agoHarald JOHSEN:
ehofman [Mon, 18 Jul 2005 16:58:22 +0000 (16:58 +0000)]
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.

18 years agoDon't assume that gps times are integer only (some units kick out data at 10hz
curt [Mon, 18 Jul 2005 15:03:45 +0000 (15:03 +0000)]
Don't assume that gps times are integer only (some units kick out data at 10hz
and specify time down to tenths of a second.)

18 years agoPerhaps it's better to compare the contents of the strings instead of comparing the...
ehofman [Mon, 18 Jul 2005 11:55:39 +0000 (11:55 +0000)]
Perhaps it's better to compare the contents of the strings instead of comparing the pointers.

18 years agoFix a segmentation fault when switching to a new style and selecting a new dialog...
ehofman [Mon, 18 Jul 2005 10:00:02 +0000 (10:00 +0000)]
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.

18 years agoIRIX fixes.
ehofman [Mon, 18 Jul 2005 09:18:24 +0000 (09:18 +0000)]
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.

18 years ago- don't abort if remote model isn't installed; output missing model's
mfranz [Fri, 15 Jul 2005 09:45:57 +0000 (09:45 +0000)]
- don't abort if remote model isn't installed; output missing model's
  path, so people know what to install

18 years agoMathias Fröhlich:
ehofman [Wed, 13 Jul 2005 12:25:16 +0000 (12:25 +0000)]
Mathias Fröhlich:

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.

18 years ago- suppress CygWin warnings (Vivian Meazza)
mfranz [Wed, 13 Jul 2005 11:43:00 +0000 (11:43 +0000)]
- suppress CygWin warnings (Vivian Meazza)

18 years agomake /sim/current-gui an integer
mfranz [Wed, 13 Jul 2005 10:57:27 +0000 (10:57 +0000)]
make /sim/current-gui an integer

18 years ago- make tabula rasa on re-init
mfranz [Wed, 13 Jul 2005 10:16:42 +0000 (10:16 +0000)]
- 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")

18 years agonasal dialogs are separate trees and have an empty name
mfranz [Wed, 13 Jul 2005 07:05:50 +0000 (07:05 +0000)]
nasal dialogs are separate trees and have an empty name

18 years ago- fix alpha handling (hopefully)
mfranz [Wed, 13 Jul 2005 06:37:39 +0000 (06:37 +0000)]
- fix alpha handling (hopefully)
- remove another leftover debugging line

18 years ago- don't clamp when setting, but on request (allows to set an invalid color)
mfranz [Tue, 12 Jul 2005 16:48:16 +0000 (16:48 +0000)]
- don't clamp when setting, but on request (allows to set an invalid color)
- adapt constness
- remove leftover debugging line

18 years ago- let FGColor setters/mergers report if they found something merge-worthy
mfranz [Mon, 11 Jul 2005 08:01:28 +0000 (08:01 +0000)]
- let FGColor setters/mergers report if they found something merge-worthy
- tune "use-<color>-node-for-pucol" masks

18 years agoadd missing paren
mfranz [Sat, 9 Jul 2005 14:01:52 +0000 (14:01 +0000)]
add missing paren

18 years ago- clear alpha like r/g/b
mfranz [Sat, 9 Jul 2005 13:53:25 +0000 (13:53 +0000)]
- clear alpha like r/g/b
- fix warning
- replace tabs by 4 spaces, according to the style of the file

19 years agotell the layouter about the default font (I wonder why
mfranz [Fri, 8 Jul 2005 20:12:06 +0000 (20:12 +0000)]
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. :-)

19 years agodisable automatic re-opening of dialogs on re-init; this does currently
mfranz [Fri, 8 Jul 2005 16:42:26 +0000 (16:42 +0000)]
disable automatic re-opening of dialogs on re-init; this does currently
not work correctly (forgets the bindings)

19 years agorename VERA_12B font to SANS_12B (as in sans-serif). This is a "Grotesk"
mfranz [Fri, 8 Jul 2005 13:28:40 +0000 (13:28 +0000)]
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.

19 years agoHarald JOHNSEN:
mfranz [Fri, 8 Jul 2005 11:15:17 +0000 (11:15 +0000)]
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."

19 years agoshut up
mfranz [Fri, 8 Jul 2005 08:18:34 +0000 (08:18 +0000)]
shut up

19 years agoprogram that generates C code from a built-in font list; used for the
mfranz [Fri, 8 Jul 2005 08:17:43 +0000 (08:17 +0000)]
program that generates C code from a built-in font list; used for the
font definition in src/GUI/fonts.cxx

19 years agoadd missing copyright statements
mfranz [Fri, 8 Jul 2005 07:37:56 +0000 (07:37 +0000)]
add missing copyright statements

19 years agoremove commented out and non-functional code for now
mfranz [Fri, 8 Jul 2005 06:45:00 +0000 (06:45 +0000)]
remove commented out and non-functional code for now

19 years agoread the splash font color from the gui style file. This is a bit of a
mfranz [Thu, 7 Jul 2005 21:43:22 +0000 (21:43 +0000)]
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.

19 years agomake property picker consider the new_gui colors; unfortunately, plib
mfranz [Thu, 7 Jul 2005 21:32:33 +0000 (21:32 +0000)]
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 ;-)

19 years ago- use color map information from new_gui.cxx and set puObject colors
mfranz [Thu, 7 Jul 2005 21:30:34 +0000 (21:30 +0000)]
- 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)

19 years ago- add gui color support: maintain color map with default colors and all
mfranz [Thu, 7 Jul 2005 21:28:15 +0000 (21:28 +0000)]
- 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

19 years agoadd fonts.cxx file
mfranz [Thu, 7 Jul 2005 21:24:28 +0000 (21:24 +0000)]
add fonts.cxx file

19 years agocontains two fntBitmap fonts with iso8859-1 character set; this was
mfranz [Thu, 7 Jul 2005 21:23:42 +0000 (21:23 +0000)]
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.

19 years agoSolaris fix.
ehofman [Thu, 7 Jul 2005 19:09:52 +0000 (19:09 +0000)]
Solaris fix.

19 years agoTune pitch gain, fix a couple annoyance bugs.
curt [Thu, 7 Jul 2005 15:40:44 +0000 (15:40 +0000)]
Tune pitch gain, fix a couple annoyance bugs.

19 years agoPatrick Quirk: fix typo (Norman: "looks like this is probably a bug")
mfranz [Thu, 7 Jul 2005 12:57:00 +0000 (12:57 +0000)]
Patrick Quirk: fix typo  (Norman: "looks like this is probably a bug")

19 years agoFix another dependency.
ehofman [Thu, 7 Jul 2005 09:06:02 +0000 (09:06 +0000)]
Fix another dependency.

19 years agoIRIX fixes.
ehofman [Wed, 6 Jul 2005 11:51:32 +0000 (11:51 +0000)]
IRIX fixes.

19 years agoAttempt to add -lwinmm for windows builds (untested.)
curt [Tue, 5 Jul 2005 13:56:03 +0000 (13:56 +0000)]
Attempt to add -lwinmm for windows builds (untested.)

19 years ago- abstract out reading colors from the property tree into a routine.
mfranz [Mon, 4 Jul 2005 07:27:17 +0000 (07:27 +0000)]
- 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.

19 years agoWhoops. I had missed that we have that already. Reverting. Thanks Erik.
mfranz [Sun, 3 Jul 2005 15:43:32 +0000 (15:43 +0000)]
Whoops. I had missed that we have that already. Reverting. Thanks Erik.

    <binding>
     <command>reinit</command>
     <subsystem>gui</subsystem>
    </binding>

19 years agoRename "menu-reload" to "gui-reload", which is what is actually done
mfranz [Sun, 3 Jul 2005 15:20:05 +0000 (15:20 +0000)]
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 ...

19 years ago- add fgcommand to reload menubar; that's necessary to make changes visible
mfranz [Sun, 3 Jul 2005 15:06:29 +0000 (15:06 +0000)]
- 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>

19 years ago- make menubar reloadable ... again. This was lost because FGBindings does
mfranz [Sun, 3 Jul 2005 14:43:47 +0000 (14:43 +0000)]
- 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).

19 years agobetter error message to help users and support staff
mfranz [Sun, 3 Jul 2005 10:27:35 +0000 (10:27 +0000)]
better error message to help users and support staff

19 years agoMathias Fröhlich:
ehofman [Sun, 3 Jul 2005 09:39:14 +0000 (09:39 +0000)]
Mathias Fröhlich:

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.

19 years agoAdd GPSsmooth directory.
curt [Sat, 2 Jul 2005 20:54:19 +0000 (20:54 +0000)]
Add GPSsmooth directory.

19 years agoAdd a small utility that can read a saved GPS track, interpolate data points
curt [Sat, 2 Jul 2005 20:53:42 +0000 (20:53 +0000)]
Add a small utility that can read a saved GPS track, interpolate data points
at some higher frequency, approximate roll/pitch angles, and blast the result
over to FlightGear using FGNetFDM udp packets.

19 years ago- fix <hrule>
mfranz [Sat, 2 Jul 2005 20:49:38 +0000 (20:49 +0000)]
- 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.

19 years agoRework the MP calculation to make super/turbocharger output dependent
andy [Sat, 2 Jul 2005 17:09:42 +0000 (17:09 +0000)]
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.

19 years agorevert last patch
mfranz [Thu, 30 Jun 2005 20:08:02 +0000 (20:08 +0000)]
revert last patch

19 years agoremove my beloved removeChildren() ... sniff
mfranz [Thu, 30 Jun 2005 19:26:29 +0000 (19:26 +0000)]
remove my beloved removeChildren() ... sniff

19 years ago- replace one SGPropertyNode* by SGPropertyNode_ptr to avoid crash with
mfranz [Thu, 30 Jun 2005 18:34:20 +0000 (18:34 +0000)]
- 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

19 years agoremove "keep" argument; the new removeChild() doesn't support that any more
mfranz [Tue, 28 Jun 2005 11:23:53 +0000 (11:23 +0000)]
remove "keep" argument; the new removeChild() doesn't support that any more

19 years ago- fix type warnings
mfranz [Mon, 27 Jun 2005 13:59:48 +0000 (13:59 +0000)]
- 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* ...

19 years agoFrederic Bouvier:
mfranz [Mon, 27 Jun 2005 07:13:02 +0000 (07:13 +0000)]
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.

19 years agoHarald JOHNSEN:
ehofman [Sun, 26 Jun 2005 17:21:18 +0000 (17:21 +0000)]
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

19 years agoRemove the 'old' 3D clouds code.
ehofman [Sat, 25 Jun 2005 11:21:18 +0000 (11:21 +0000)]
Remove the 'old' 3D clouds code.

19 years agoFrederic Bouvier: work around MSVC bug
mfranz [Sat, 25 Jun 2005 10:25:38 +0000 (10:25 +0000)]
Frederic Bouvier: work around MSVC bug
mf: avoid warning about initialization order

19 years agoTJ:
ehofman [Sat, 25 Jun 2005 08:46:58 +0000 (08:46 +0000)]
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.

19 years ago(Frederic Bouvier) avoid gcc'ism
mfranz [Sat, 25 Jun 2005 07:57:42 +0000 (07:57 +0000)]
(Frederic Bouvier) avoid gcc'ism

19 years agokeep panel and gui bindings nicely separated; useful for debugging,
mfranz [Fri, 24 Jun 2005 14:07:15 +0000 (14:07 +0000)]
keep panel and gui bindings nicely separated; useful for debugging,
especially now that the property path is shown in nasal error messages

19 years agoFGBindings doesn't create its own, detached copy of the bindings property
mfranz [Fri, 24 Jun 2005 13:44:22 +0000 (13:44 +0000)]
FGBindings doesn't create its own, detached copy of the bindings property
subtree. Keeping bindings available is in the responsibility of the caller.

19 years agoLaurie Bradshaw:
curt [Thu, 23 Jun 2005 19:21:17 +0000 (19:21 +0000)]
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).

19 years ago- layout frames like groups (I forgot to commit that yesterday :-)
mfranz [Tue, 21 Jun 2005 12:13:07 +0000 (12:13 +0000)]
- layout frames like groups (I forgot to commit that yesterday :-)

19 years ago- fix "frame" (the old code was broken and ... strange)
mfranz [Mon, 20 Jun 2005 20:54:47 +0000 (20:54 +0000)]
- fix "frame" (the old code was broken and ... strange)
- add "hrule" (horizontal rule; accepts color and "pref-height" for thickness)

19 years ago- output property path in error messages
mfranz [Mon, 20 Jun 2005 18:53:00 +0000 (18:53 +0000)]
- output property path in error messages

19 years ago- delete bindings in the *destructor* (must have been an editing accident)
mfranz [Mon, 20 Jun 2005 18:52:54 +0000 (18:52 +0000)]
- 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?)

19 years ago- don't store link to a disconnected *copy* of a subtree, but a link to
mfranz [Mon, 20 Jun 2005 18:52:45 +0000 (18:52 +0000)]
- 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

19 years ago- fix bug that let <mod-up> bindings be executed before the nasal init
mfranz [Sun, 19 Jun 2005 17:23:41 +0000 (17:23 +0000)]
- 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.)

19 years ago- rename initModule() to createModule() (as suggested by Andy)
mfranz [Sun, 19 Jun 2005 17:09:03 +0000 (17:09 +0000)]
- 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)

19 years agoJosh Babcock: fix typo
mfranz [Fri, 17 Jun 2005 19:42:25 +0000 (19:42 +0000)]
Josh Babcock: fix typo

19 years agoAdjust logging output.
curt [Tue, 14 Jun 2005 20:55:46 +0000 (20:55 +0000)]
Adjust logging output.

19 years agoMake readScriptFile() public, and rename it to loadModule(), so that external
andy [Tue, 14 Jun 2005 19:57:24 +0000 (19:57 +0000)]
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.

19 years agoUpdated electrical system.
curt [Tue, 14 Jun 2005 17:57:48 +0000 (17:57 +0000)]
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.

19 years agoTurn the electrical system into a non-hardcoded system like all the other
curt [Tue, 14 Jun 2005 17:54:19 +0000 (17:54 +0000)]
Turn the electrical system into a non-hardcoded system like all the other
systems.

19 years agoFix a misuse of a return value that lead to an error message being displayed
curt [Tue, 14 Jun 2005 17:53:40 +0000 (17:53 +0000)]
Fix a misuse of a return value that lead to an error message being displayed
when one shouldn't have been.

19 years agoUpdated notes on the FG electrical system model.
curt [Tue, 14 Jun 2005 17:52:16 +0000 (17:52 +0000)]
Updated notes on the FG electrical system model.

19 years agostrip trailing spaces & garbage
mfranz [Mon, 13 Jun 2005 19:27:40 +0000 (19:27 +0000)]
strip trailing spaces & garbage

19 years agorevert last patch, and do it differently: set /input/joysticks/which (int)
mfranz [Mon, 13 Jun 2005 06:14:45 +0000 (06:14 +0000)]
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 ...  :-)

19 years agoleave temporary hint for the nasal init block, so that it can access
mfranz [Sun, 12 Jun 2005 19:27:20 +0000 (19:27 +0000)]
leave temporary hint for the nasal init block, so that it can access
its own data, and can distinguish itself from other instances of the
same js driver. This property is removed after script execution.
Example:

  self = props.globals.getNode(getprop("/input/joysticks/this"));

19 years agosg_throwable's "origin" argument is optional and defaults to an empty
mfranz [Sun, 12 Jun 2005 16:01:49 +0000 (16:01 +0000)]
sg_throwable's "origin" argument is optional and defaults to an empty
string. "(received from )" doesn't really look good.

19 years agoeven clearer error message :-/
mfranz [Sun, 12 Jun 2005 13:54:27 +0000 (13:54 +0000)]
even clearer error message :-/

19 years agoclearer error message
mfranz [Sun, 12 Jun 2005 13:51:55 +0000 (13:51 +0000)]
clearer error message