]> git.mxchange.org Git - flightgear.git/log
flightgear.git
19 years agochange an emaul address.
ehofman [Sun, 17 Oct 2004 17:25:14 +0000 (17:25 +0000)]
change an emaul address.

19 years agoFrederic Bouvier:
ehofman [Sun, 17 Oct 2004 17:23:19 +0000 (17:23 +0000)]
Frederic Bouvier:

This is a patch to make display list usage optional. They are on by default.
Use --prop:/sim/rendering/use-display-list=false to use immediate mode.
There is also a change in exception handling in main.cxx and bootstrap.cxx

19 years agoRoy Vegard Ovesen:
ehofman [Sat, 16 Oct 2004 12:37:39 +0000 (12:37 +0000)]
Roy Vegard Ovesen:

Instrumentation and systems are now configureable from xml files. The two
generic configurations generic-systems.xml and generic-instrumentation.xml
configures the systems and instrumentation as it was hardcoded. You can
override the generic configurations in a similar way as you override the
autopilot configuration.

19 years agoprevent a segmentation error under certain circumstances.
ehofman [Sat, 16 Oct 2004 11:24:48 +0000 (11:24 +0000)]
prevent a segmentation error under certain circumstances.

19 years agoFix some bugs
ehofman [Fri, 15 Oct 2004 12:23:36 +0000 (12:23 +0000)]
Fix some bugs

19 years agoSet the format default to float instead of int.
ehofman [Fri, 15 Oct 2004 11:29:09 +0000 (11:29 +0000)]
Set the format default to float instead of int.

19 years agoAdd generic input support
ehofman [Fri, 15 Oct 2004 11:11:37 +0000 (11:11 +0000)]
Add generic input support

19 years agoRoy Vegard Ovesen:
ehofman [Thu, 14 Oct 2004 11:29:07 +0000 (11:29 +0000)]
Roy Vegard Ovesen:

I've put together a readme file that describes how to configure the digital
filters.

19 years agoIt's usually not a good idea to assign a const char* to a node of a temporary propert...
ehofman [Thu, 14 Oct 2004 09:49:46 +0000 (09:49 +0000)]
It's usually not a good idea to assign a const char* to a node of a temporary property tree, use string instead.

19 years agoRoy Vegard Ovesen:
ehofman [Thu, 14 Oct 2004 09:19:44 +0000 (09:19 +0000)]
Roy Vegard Ovesen:

I've added some digital filters to the autopilot. They are all low-pass
filters that filter away high frequency signals/noise. There are 4 different
filters:

1. Exponential - The algorithm is essentially the same as the one used in the
   fgGetLowPass() function.

2. Double exponential - Two exponential filters in series. This filter has a
   "steeper" frequency response curve. It filters "better" than the single
   exponential.

3. Moving average - Averages a number of inputs.

4. Noise spike - limits the amount that the output value can change from one
   sample to the next.

Filters 1 and 2 are characterised by it's filter-time in seconds. For filter 3
you have to set the number of input samples to average over. For filter 4 you
set the maximum allowed rate of change as [1/s]. Since the sampling interval
(dt) isn't constant we have to calculate the maximum allowed change for every
update.

Example of a double exponential filter with filter time 0.1 seconds, that is
1/0.1 = 10 Hz.

  <filter>
    <name>pressure-rate-filter</name>
    <debug>true</debug>
    <type>double-exponential</type>
    <input>/autopilot/internal/pressure-rate</input>
    <output>/autopilot/internal/filtered-pressure-rate</output>
    <filter-time>0.1</filter-time>
  </filter>

This would go in the autopilot configuration file.

I've also removed the filtering of the "pressure-rate" helper value, use the
new filters if you want to filter it!  ;-)

19 years agoChanges for v0.9.6
curt [Tue, 12 Oct 2004 16:18:05 +0000 (16:18 +0000)]
Changes for v0.9.6

19 years agoPLIB_VERSION is localted in plib/ul.h
ehofman [Sun, 10 Oct 2004 19:19:23 +0000 (19:19 +0000)]
PLIB_VERSION is localted in plib/ul.h

19 years agoCheck for the plib version when using display lists, just to be sure.
ehofman [Sun, 10 Oct 2004 19:06:32 +0000 (19:06 +0000)]
Check for the plib version when using display lists, just to be sure.

19 years agoFrederic: Add display list support without changing plib.
ehofman [Sun, 10 Oct 2004 17:41:11 +0000 (17:41 +0000)]
Frederic: Add display list support without changing plib.

19 years agoI forgot a linker dependency. It really si time to figure out why these are all needed.
ehofman [Fri, 8 Oct 2004 11:30:07 +0000 (11:30 +0000)]
I forgot a linker dependency. It really si time to figure out why these are all needed.

19 years agoMelchior FRANZ:
ehofman [Thu, 7 Oct 2004 20:34:56 +0000 (20:34 +0000)]
Melchior FRANZ:

As I had reported on 2004/8/4 00:02:56 ("yasim + bo105 + vrp + @#%$#@ == argh!")
there must be a bug somewhere in YASim, which is responsible for the Bo105
turning around the FDM origin (nose tip) rather than the CG. Some people assumed
that I was just another victim of the "view offset" illusion, but this wasn't
and isn't the case.

Maik Justus (the rotor man) has now supposedly found the bug in YASim[1].
Look at this code in FDM/YASim/Integrator.cpp:35--66:

19 years agoReverse the declaration order. jpgRenderFrame (form
ehofman [Wed, 6 Oct 2004 09:57:37 +0000 (09:57 +0000)]
Reverse the declaration order. jpgRenderFrame (form
erly known as trRenderFrame) is now declared as a NULL function pointer and ass
ignment of the proper function is now done in FlightGear (jpgRenderFrame=FGRend
erer::update).

19 years agoMelchior FRANZ:
ehofman [Wed, 6 Oct 2004 09:30:36 +0000 (09:30 +0000)]
Melchior FRANZ:

- don't set volume twice
- fix compiler warnings (type conversion, initialization order)
- add comment to save sndmgr()->stop from uneducated optimization
- fix inconsistent variable name

19 years agoHandle the new linker dependencies after rearranging the FlightGear header files...
ehofman [Wed, 6 Oct 2004 09:23:51 +0000 (09:23 +0000)]
Handle the new linker dependencies after rearranging the FlightGear header files a week or two ago.

19 years agoAdd Maik Justus
ehofman [Wed, 6 Oct 2004 08:30:40 +0000 (08:30 +0000)]
Add Maik Justus

19 years agoContinued work to clean up the hires screen shot code and move it back towards
curt [Wed, 6 Oct 2004 03:29:14 +0000 (03:29 +0000)]
Continued work to clean up the hires screen shot code and move it back towards
a working state.  I still see an anomoly when taking a screen shot from inside
a 3d cockpit, but external (chase/tower) views seem to work well.  I also
added a property to control how many screen-res tiles are generated in the
output.  Theoretically, you can now generate unlimited resolution screen shots,
or limited only by your disk space and patience.

Today I successfully generated a 20*1024 x 20*768 (20480x15360) resolution
screen shot.  If you rendered that at 100 dpi it would cover a poster of
about 17 feet by 12.8 feet.

Good luck trying to display something that big or convert it to anything
useful on a typical PC. :-)

19 years agoFrederic Bouvier:
ehofman [Sun, 3 Oct 2004 08:20:54 +0000 (08:20 +0000)]
Frederic Bouvier:

automatically generate config.h-msvc6 with the right version number.

This way Curt will pack the right file because it will be
generated every time he will do 'configure'.

19 years agoRestore trRenderFrame (which used to be in main.cxx before the
david [Sat, 2 Oct 2004 22:35:39 +0000 (22:35 +0000)]
Restore trRenderFrame (which used to be in main.cxx before the
split).  If SimGear is configured --with-jpeg-factory, then FlightGear
will fail to build unless this function is present.

FIXME: this is very messy architecturally -- find a better solution,
like passing this explicitly as a callback to the libJPEG class
(SimGear should not have a dependency on FlightGear).

19 years agoVivian Meazza:
ehofman [Sat, 2 Oct 2004 14:30:18 +0000 (14:30 +0000)]
Vivian Meazza:

I've made appropriate changes to Readme.submodels to reflect the
variation of Cd with Mach number.

Spitfire.submodel has been changed to use the variation of Cd with Mach
number

Submodel.cxx has been changed so that the default value of Cd is the
subsonic Cd of a non-boat tailed bullet.

19 years agoMove the calculations of Mach to the base class.
ehofman [Sat, 2 Oct 2004 13:34:06 +0000 (13:34 +0000)]
Move the calculations of Mach to the base class.

19 years agoAdd the Mach vaiable.
ehofman [Sat, 2 Oct 2004 12:05:59 +0000 (12:05 +0000)]
Add the Mach vaiable.

19 years agoVivian Meazza:
ehofman [Sat, 2 Oct 2004 12:02:04 +0000 (12:02 +0000)]
Vivian Meazza:

I've finished the variation of Cd with Mach number.
The calculations are only applicable to ballistic
objects, and then strictly one shape: non boat-tailed bullets/shells, so
I've put them in AIBallistic rather than AIBAase. For all inputs, Cd
should be the sub-sonic value, so bullets will need changing.

I've just posted a graphical analysis here:

http://myweb.tiscali.co.uk/vmeazza/FlightGear/cd_mach.pdf

19 years agoUse the Transmit-Render functions for tower output instead of directly calling ATCdis...
daveluff [Thu, 30 Sep 2004 15:43:32 +0000 (15:43 +0000)]
Use the Transmit-Render functions for tower output instead of directly calling ATCdisplay.  This is part of preparations for optionally handing the strings off to a TTS engine if required.

19 years agoBoris Koenig:
ehofman [Mon, 27 Sep 2004 14:40:31 +0000 (14:40 +0000)]
Boris Koenig:

I'm attaching a small change to Andy's dialog.cxx that I needed
to make so that it enables XML/Nasal-dialogs to also contain
puLargeInput boxes.

The text will be retrieved/buffered from/within a specified
property tree, like:

<textbox>
    <x>100</x>
    <y>100</y>

    <width>200</width>
    <height>100</height>

    <property>/gui/path-to-text-node/contents</property>

    <slider>15</slider>

    <editable>true</editable>
</textbox>

19 years agoAdjustments
ehofman [Mon, 27 Sep 2004 14:29:54 +0000 (14:29 +0000)]
Adjustments

19 years agoVivian Meazza:
ehofman [Mon, 27 Sep 2004 14:24:20 +0000 (14:24 +0000)]
Vivian Meazza:

The calculation of submodel mass from weight has been moved from AIBallistic
to Submodel so that it is calculated only once, rather than on every
iteration as a present. The parameter <contents> has been added, primarily
so that droptanks will have the proper mass. It is the path to an
appropriate property containing a weight in lbs.

Care has to be taken with the use of <contents> because after a reset there
appears to be a delay in submodel instantiation (dt not properly reset???)
and the weight property is not always picked up before it is set to zero in
the key bindings. Slightly hard to explain. It works fine if FGFS has not
been reset though. There is a partial solution which involves the rejigging
of the fuel and gui nasal scripts, but there is still the visible delay in
instantiation to be resolved. I've nearly done the nasal fixes, which will
form part of an update to the Hunter only. I'll probably complete those
later today.

19 years agoCache the renderer in a local pointer.
ehofman [Mon, 27 Sep 2004 09:13:12 +0000 (09:13 +0000)]
Cache the renderer in a local pointer.

19 years agoActivate the hi res screen capture functionality again, however it is no
curt [Mon, 27 Sep 2004 02:39:54 +0000 (02:39 +0000)]
Activate the hi res screen capture functionality again, however it is no
longer working 100% correctly. :-(

19 years agoAdd info about weight and Cd and modify eda
ehofman [Thu, 23 Sep 2004 19:57:23 +0000 (19:57 +0000)]
Add info about weight and Cd and modify eda

19 years agoMake the scenerio's work again (now for real) and a small number of updates.
ehofman [Thu, 23 Sep 2004 09:39:55 +0000 (09:39 +0000)]
Make the scenerio's work again (now for real) and a small number of updates.

19 years agoDon't forget to unbind() before deleting the class.
ehofman [Thu, 23 Sep 2004 08:57:46 +0000 (08:57 +0000)]
Don't forget to unbind() before deleting the class.

19 years agoMSVC fixes.
ehofman [Thu, 23 Sep 2004 07:48:25 +0000 (07:48 +0000)]
MSVC fixes.

19 years agoVivian Meazza:
ehofman [Wed, 22 Sep 2004 19:11:36 +0000 (19:11 +0000)]
Vivian Meazza:

The value of rho (air density) varies with height. (Including the upper
stratosphere, ust in case someone wants to model ICBMs.) The standard
atmosphere is used (based on a sea-level temperature of 15 deg C.).

Erik Hofman:
I moved this code over the AIBase::update() so all AIModels can make
use of rho, temperature, pressure, etc.

19 years agoMake the scenarios work again.
ehofman [Wed, 22 Sep 2004 11:24:45 +0000 (11:24 +0000)]
Make the scenarios work again.

19 years agofix a segmentation fault situation that is exposed at least on IRIX (but not Linux).
ehofman [Wed, 22 Sep 2004 10:03:26 +0000 (10:03 +0000)]
fix a segmentation fault situation that is exposed at least on IRIX (but not Linux).

19 years agoVivian Meazza:
ehofman [Wed, 22 Sep 2004 08:47:05 +0000 (08:47 +0000)]
Vivian Meazza:

I have added <Cd> and <weight> to the input parameters in the submodels.xml
script. Raw data may be used, thus avoiding the need to guestimate <eda>.
Eda remains, but should now be used to enter the proper cross-sectional
area.

19 years agoFix a small number of potential problems.
ehofman [Mon, 20 Sep 2004 19:29:16 +0000 (19:29 +0000)]
Fix a small number of potential problems.

19 years agoFinish what was committed in a broken state yesterday.
ehofman [Mon, 20 Sep 2004 13:21:51 +0000 (13:21 +0000)]
Finish what was committed in a broken state yesterday.
Split up main.cxx into a program manegement part (which remains in
main.cxx) and a render part (the new renderer.?xx files). Also turn
the renderer into a small class of it's own. At this time not really
exctining because most of the stuff is still global, but it allows us
to slowly migrate some of the global definitions into the new class.

The FGRenderer class is now managed by globals, so to get the renderer
just call gloabals->get_renderer()

At some pijt it might be a good idea to also turn the remaining code in
main into a class of it's own. With a bit of luck we end up with a more
robust, and better maintainable code.

19 years agoMake it compile, link and run again (pfew\!)
ehofman [Sun, 19 Sep 2004 18:34:47 +0000 (18:34 +0000)]
Make it compile, link and run again (pfew\!)

19 years agoRevert to CVS as of 5000 seconds ago.
ehofman [Sun, 19 Sep 2004 17:59:40 +0000 (17:59 +0000)]
Revert to CVS as of 5000 seconds ago.

19 years agoFix the last remaining link problems.
ehofman [Sun, 19 Sep 2004 17:40:25 +0000 (17:40 +0000)]
Fix the last remaining link problems.

19 years agoFix some link errors.
ehofman [Sun, 19 Sep 2004 17:29:07 +0000 (17:29 +0000)]
Fix some link errors.

19 years agoFix some link errors.
ehofman [Sun, 19 Sep 2004 17:27:44 +0000 (17:27 +0000)]
Fix some link errors.

19 years agoFix some compile errors.
ehofman [Sun, 19 Sep 2004 17:18:11 +0000 (17:18 +0000)]
Fix some compile errors.

19 years agoShoot, this shouldn't have happened yet, but since it is, add the missing files also.
ehofman [Sun, 19 Sep 2004 17:02:16 +0000 (17:02 +0000)]
Shoot, this shouldn't have happened yet, but since it is, add the missing files also.

19 years agoRemove unnecessary inclusions of sg.h ans ssg.h
ehofman [Sun, 19 Sep 2004 16:47:00 +0000 (16:47 +0000)]
Remove unnecessary inclusions of sg.h ans ssg.h

19 years agoRemove unnecessary inclusions of sg.h ans ssg.h
ehofman [Sun, 19 Sep 2004 16:33:38 +0000 (16:33 +0000)]
Remove unnecessary inclusions of sg.h ans ssg.h

19 years agoMake use of cached pointers instead of the hash table.
ehofman [Sun, 19 Sep 2004 12:29:07 +0000 (12:29 +0000)]
Make use of cached pointers instead of the hash table.

19 years agoFix some mistakes.
ehofman [Sat, 18 Sep 2004 12:22:57 +0000 (12:22 +0000)]
Fix some mistakes.

19 years agoUpdate for recent versions of OpenAL.
ehofman [Fri, 17 Sep 2004 21:29:37 +0000 (21:29 +0000)]
Update for recent versions of OpenAL.

19 years agoVivian Meazza:
ehofman [Fri, 17 Sep 2004 16:32:58 +0000 (16:32 +0000)]
Vivian Meazza:

I had to reverse a number of signs to get it right. I took the opportunity
to add roll to the submodel so that droptanks will come off with the right
orientation. I have neither added the rotational speed to the submodel, nor
yaw, so if you release droptanks with  significant roll rate or yaw angle on
the aircraft the submodel will not be quite right. Straight and level, or
nearly so, is fine.

19 years agoMake a subtle change to tile loading/unloading policy in order to make the tile
curt [Wed, 15 Sep 2004 15:52:05 +0000 (15:52 +0000)]
Make a subtle change to tile loading/unloading policy in order to make the tile
paging system much more robust when position change is very rapid and sporadic.

Recall that we must load 3d models in the main render thread because model
loading can trigger opengl calls (i.e. with texture loading) and all opengl
calls *must* happen in the main render thread.

To accomplish this we load the base tile in the pager thread and build a work
queue of external models that need to be loaded.  We never allow a tile to be
paged out of the tile cache until all it's pending model loads are complete.

However, when changing position very rapidly, we can quickly create a huge
backlog of pending model loads because we are changing positions faster than we
can load the associated models for the existing tiles.  The end result is
that tiles that are long out of range can't be removed because there is still
a huge backlog of pending model load requests and memory blows up.

This change being committed allows the tile paging system to remove tiles
if they are out of range, even when there are pending models to load.  The
model loading code in the render thread can now check to see if the tile
exists and discard any model load request for tiles that no longer exist.

This situation should never occur in normal operation, but could occur in
"contrived" situations where an external script was rapidly changing
the simulator position to then be able to query FG terrain height, and doing
this for a large number of points that are distributed across a large area.

19 years agobzip2 the base package by default.
curt [Wed, 15 Sep 2004 15:41:33 +0000 (15:41 +0000)]
bzip2 the base package by default.

19 years agoSync w. JSBSim CVS
ehofman [Wed, 15 Sep 2004 12:19:46 +0000 (12:19 +0000)]
Sync w. JSBSim CVS

19 years agoVivan Meazza:
ehofman [Tue, 14 Sep 2004 08:27:55 +0000 (08:27 +0000)]
Vivan Meazza:

The maths, so far, is now correct. Roll and pitch are now both in the
correct sense. The aircraft velocity is added correctly to the
submodel velocity, and the submodel is now visible when instantiated.

However, the velocity is measured at the aircraft centre. To be totally
correct we ought to take into account the aircraft's rotational
velocity. We have pitch rate and roll rate available, but not yaw rate
(small anyway).

19 years agoA couple tweaks/optimizations to the script.
curt [Mon, 13 Sep 2004 21:47:32 +0000 (21:47 +0000)]
A couple tweaks/optimizations to the script.

19 years agoMake notion of -1 for count
ehofman [Sun, 12 Sep 2004 17:06:35 +0000 (17:06 +0000)]
Make notion of -1 for count

19 years agoSync. w. JSBSim CVS.
ehofman [Sat, 11 Sep 2004 12:41:05 +0000 (12:41 +0000)]
Sync. w. JSBSim CVS.

19 years agoBump the version number to the current one.
ehofman [Sat, 11 Sep 2004 11:00:02 +0000 (11:00 +0000)]
Bump the version number to the current one.

19 years agoFirst stab at a simple script that inputs a list of lon/lat coordinates via
curt [Fri, 10 Sep 2004 21:21:34 +0000 (21:21 +0000)]
First stab at a simple script that inputs a list of lon/lat coordinates via
stdin, and outputs the coordinates with FG ground elevation.  This requires
a running copy of FlightGear with --fdm=null and the telnet server enabled.
Of course you need to have scenery installed for all areas you are querying.
This is not fast and the scenery load wait time may need to be tuned for
individual systems.

19 years agoUpdates for 0.9.6-pre1.
curt [Fri, 10 Sep 2004 19:34:56 +0000 (19:34 +0000)]
Updates for 0.9.6-pre1.

19 years agoPreparations for the 0.9.6-pre1 release.
curt [Fri, 10 Sep 2004 18:34:00 +0000 (18:34 +0000)]
Preparations for the 0.9.6-pre1 release.

19 years agoRemove an unneeded #include.
curt [Fri, 10 Sep 2004 18:30:24 +0000 (18:30 +0000)]
Remove an unneeded #include.

19 years agoAdd support for "co-pilot" toe brakes.
curt [Fri, 10 Sep 2004 17:53:34 +0000 (17:53 +0000)]
Add support for "co-pilot" toe brakes.

19 years agoMore fixes to get the code working when threads are disabled.
ehofman [Fri, 10 Sep 2004 07:54:45 +0000 (07:54 +0000)]
More fixes to get the code working when threads are disabled.

19 years agoAdd an example submodels definition file.
ehofman [Thu, 9 Sep 2004 08:46:33 +0000 (08:46 +0000)]
Add an example submodels definition file.

19 years agoDavid Culp:
ehofman [Thu, 9 Sep 2004 08:40:08 +0000 (08:40 +0000)]
David Culp:

Here are some things I've added to the submodel code.

First, I added a first_time value that is true when the trigger is pressed and
false when the trigger is released.  The true value is also made false after
the first pass through release().  Release() then uses this to force the
first dt (per salvo) to be zero.  I was hoping this would make the submodel
appear closer to the airplane, but I don't notice a difference with the
tracers.  In a prior test I found that the first dt is about 2.5 times larger
than subsequent ones.  Maybe this will be effective with slower submodels,
like smoke, contrails, etc.

Secondly, I updated the IC.elevation and IC.azimuth calcs to correctly add in
the yaw and pitch offsets, corrected for bank angle.  Actually this is still
an estimation.  A proper calculation will sum the submodels vector with the
airplane's vector.  Until that's done only models which are fired forward
will have proper IC.

19 years agoFrederic Bouvier:
ehofman [Thu, 9 Sep 2004 08:32:11 +0000 (08:32 +0000)]
Frederic Bouvier:

Olivier discovered that environment_ctrl.cxx doesn't compile
when ENABLE_THREADS is not defined. The simple patch to correct
that is attached.

19 years agoMove depreciated files to the bitbucket.
ehofman [Thu, 9 Sep 2004 08:29:51 +0000 (08:29 +0000)]
Move depreciated files to the bitbucket.

19 years agoMake sure the pointer is not being used after deletion, and tie the elapsed time...
ehofman [Wed, 8 Sep 2004 14:02:25 +0000 (14:02 +0000)]
Make sure the pointer is not being used after deletion, and tie the elapsed time to the particular class instance.

19 years agoRearrange ID related code. The (this) pointer is now the unique ID of the AIModel...
ehofman [Wed, 8 Sep 2004 13:21:40 +0000 (13:21 +0000)]
Rearrange ID related code. The (this) pointer is now the unique ID of the AIModel which fixes a number of problems along the way.

19 years agoAdd documentation about directional sound.
ehofman [Wed, 8 Sep 2004 11:47:37 +0000 (11:47 +0000)]
Add documentation about directional sound.

19 years agoInternally keep track of the number of models per type. This really speeds up searchi...
ehofman [Tue, 7 Sep 2004 19:56:22 +0000 (19:56 +0000)]
Internally keep track of the number of models per type. This really speeds up searching for the number of submodels of one type.

19 years agoVivian Meazza:
ehofman [Tue, 7 Sep 2004 19:10:10 +0000 (19:10 +0000)]
Vivian Meazza:

Testing revealed that the code was not reading y-offset - a
typo in the original code, and roll was in the wrong sense. All readily
fixable, and it now works.

19 years agoMake use of a pointer to a structure to pass multiple parameters around.
ehofman [Tue, 7 Sep 2004 09:53:23 +0000 (09:53 +0000)]
Make use of a pointer to a structure to pass multiple parameters around.

19 years agoVivian Meazza:
ehofman [Sun, 5 Sep 2004 09:45:34 +0000 (09:45 +0000)]
Vivian Meazza:

I've added another parameter to the submodel - wind.

It's activated by the entry <wind>true</wind> in the ../submodel.xml file.
If true, the submodel is affected by the local wind, otherwise not. The
parameter defaults to false. This is useful for exhausts and smoke, and
possibly all objects.

19 years agoAdd the missing buoyancy patch.
ehofman [Wed, 1 Sep 2004 21:05:04 +0000 (21:05 +0000)]
Add the missing buoyancy patch.

19 years agoVivian Meazza:
ehofman [Wed, 1 Sep 2004 08:32:54 +0000 (08:32 +0000)]
Vivian Meazza:

Attached are the modified files to add buoyancy as a parameter for a
ballistic object. It may be set by adding

<buoyancy>x</buoyancy> to the submodel .xml file, where x is the appropriate
value (ft per sec2):

32   neutral buoyancy - contrails
>32  positive buoyancy - exhaust plumes
(0   non-op - default value)

If <buoyancy>x</buoyancy> is not used, then there is no effect on the
current ballistic model

19 years agoTie the count into the property tree instead of using snprintf every frame. Add the...
ehofman [Mon, 30 Aug 2004 11:13:29 +0000 (11:13 +0000)]
Tie the count into the property tree instead of using snprintf every frame. Add the life-timer to the property tree under sim/time/elapsed-sec for AI object animation (blending and/or scaling).

19 years agoDavid Culp: This is n idea from Vivian, it allows setting the count to a negative...
ehofman [Mon, 30 Aug 2004 09:15:04 +0000 (09:15 +0000)]
David Culp: This is n idea from Vivian, it allows setting the count to a negative number which will give unlimited submodels (as long as the trigger is true). This is useful for contrails.

19 years agoDavid Culp: Here are small changes that allow one to set a life-span for submodels.
ehofman [Mon, 30 Aug 2004 09:11:59 +0000 (09:11 +0000)]
David Culp: Here are small changes that allow one to set a life-span for submodels.

19 years agoDavid Culp:
ehofman [Thu, 26 Aug 2004 16:25:54 +0000 (16:25 +0000)]
David Culp:

Silly me.  I was starting the timer at zero, so the first tracer didn't fly
until 0.25 seconds after pulling the trigger.  Now the timer starts at the
same value as "delay", so the first round comes out immediately.

Also, I've added an optional configuration attribute that allows you to change
the ballistics of the submodel.  This allows parachutes, or anything else
that has ballistics different from a bullet.  The attribute is called "eda",
which is the equivalent drag area.  Default value is 0.007, which gives the
same ballistics as the current tracers.  Increasing this value gives more
drag.  A value of 2.0 looks good for a parachute.

math stuff
########################################################################
The deceleration of the ballictic object is now given by:

[ (rho) (Cd) ] / [ (1/2) (m) ] * A * (V * V)

where rho is sea-level air density, and Cd and m are fixed, bullet-like
values. So the calculation is:

0.0116918 * A * (V * V)

The value "A" is what I'm calling the "eda" (equivalent drag area).
########################################################################

A parachute model will have to be built so that the parachutist's feet
are in the forward x-direction.
Here is the submodel.xml config I use for "parachutes":

  <submodel>
    <name>flares</name>
    <model>Models/Geometry/flare.ac</model>
    <trigger>systems/submodels/submodel[0]/trigger</trigger>
    <speed>0.0</speed>
    <repeat>true</repeat>
    <delay>0.85</delay>
    <count>4</count>
    <x-offset>0.0</x-offset>
    <y-offset>0.0</y-offset>
    <z-offset>-4.0</z-offset>
    <yaw-offset>0.0</yaw-offset>
    <pitch-offset>0.0</pitch-offset>
    <eda>2.0</eda>
  </submodel>

19 years agoDavid Culp, Vivian Meazza:
ehofman [Thu, 26 Aug 2004 12:27:39 +0000 (12:27 +0000)]
David Culp, Vivian Meazza:

Last night I sent these new files to Vivian to fix a problem he found.  Since
we can have more than one submodel we need more than one "count" property.
The new code creates a property systems/submodels/submodel[n]/count for each
submodel.  Vivian is using this count property for his sound.

19 years agoDavid Culp:
ehofman [Thu, 26 Aug 2004 08:38:43 +0000 (08:38 +0000)]
David Culp:

Here is an update for the submodel system.  This will allow submodels to be
defined for any aircraft, and there are no default submodels.  To use this
submodel system you need to set up a binding (slight change in property name
from last one, but you can use any property name you like, as long as it
matches the name in the submodels.xml file, see below):

 <button n="0">
  <desc>Trigger</desc>
  <binding>
   <command>property-assign</command>
   <property>/systems/submodels/trigger</property>
   <value type="bool">true</value>
  </binding>
  <mod-up>
   <binding>
    <command>property-assign</command>
    <property>/systems/submodels/trigger</property>
    <value type="bool">false</value>
   </binding>
  </mod-up>
 </button>

Then in your *-set.xml file you need to define a path to the configuration
file (similar to the way the electrical system is now done):

<sim>
 ...
  <systems>
   <electrical>
    <path>Aircraft/Generic/generic-electrical.xml</path>
   </electrical>
   <submodels>
    <serviceable type="bool">true</serviceable>
    <path>Aircraft/FW190/submodels.xml</path>
   </submodels>
  </systems>
 ...
</sim>

Then you put the submodel configuration file in your aircraft's directory.
I've attached a file, submodels.xml, that can be used to define a gun that
works just like the former one did.

There are two things remaining to be done.  One is to change the function
SubmodelSystem::transform() to properly position the submodel.  This will
require some complicated matrix code that I might borrow from Yasim.

19 years agoInclude multipass clouds by default, enable it by specifying --prop:/sim/rendering...
ehofman [Tue, 24 Aug 2004 09:34:42 +0000 (09:34 +0000)]
Include multipass clouds by default, enable it by specifying --prop:/sim/rendering/multi-pass-clouds=true

19 years agoMove the atexit() handler over to bootstrap.cxx (which makes libMain.a behave like...
ehofman [Tue, 24 Aug 2004 08:40:41 +0000 (08:40 +0000)]
Move the atexit() handler over to bootstrap.cxx (which makes libMain.a behave like a real library) and fix a segmentation fault when running 'fgfs -h'. The exit handler tried to change the (still uninitialized) mouse cursor causing a core dump.

19 years agoFix another one of those mistakes. I really shouldn't mess with code from others...
ehofman [Mon, 23 Aug 2004 17:40:46 +0000 (17:40 +0000)]
Fix another one of those mistakes. I really shouldn't mess with code from others (without looking at it closely) :-(

19 years agoFix a mistake and make it possible to activate the submodel subsystem again.
ehofman [Mon, 23 Aug 2004 17:33:36 +0000 (17:33 +0000)]
Fix a mistake and make it possible to activate the submodel subsystem again.

19 years agoVivian Meazza:
ehofman [Mon, 23 Aug 2004 17:22:55 +0000 (17:22 +0000)]
Vivian Meazza:

Well here's some tracer stuff. If fiddled around with submodel.cxx. It now
does what it says - you need to put this:

<!-- trial gun system -->
    <systems>
      <submodel>
        <serviceable type="bool">true</serviceable>
        <amount type="int">120</amount>
      </submodel>
    </systems>

In the *-set.xml file NOT within <sim></sim>. Trouble is it still defaults
to serviceable=true, but it also defaults to amount=0. Unless this bit of
code is included it wont run, so other models can't fire inappropriate
tracer. Revised submodel.cxx file attached.

I've changed to a non-billboard solution. I tried to make the viewing angle
of the tracer less than 180 degs, but failed. Close enough I think. It's
still a bit big, but a reasonable compromise. .AC file attached.

I remain concerned about the tracer colour. In practice, red is better (and
it's what I am used to) but David seems set on white, and I don't want to
upset him. I'm going to adjust the texture a bit more tomorrow.

19 years agoI forgot a small patch.
ehofman [Sun, 22 Aug 2004 17:04:37 +0000 (17:04 +0000)]
I forgot a small patch.

19 years agoDavid Culp:
ehofman [Sun, 22 Aug 2004 16:22:18 +0000 (16:22 +0000)]
David Culp:

Right now the code is not very configurable, and there is only one submodel per airplane possible. It is implemented as an SGSubSystem, just like the electrics, vacuum, etc. systems.  To make it work you need to make a release binding like this (for my joystick trigger):

 <button n="0">
  <desc>Trigger</desc>
  <binding>
   <command>property-assign</command>
   <property>/systems/submodel/trigger</property>
   <value type="bool">true</value>
  </binding>
  <mod-up>
   <binding>
    <command>property-assign</command>
    <property>/systems/submodel/trigger</property>
    <value type="bool">false</value>
   </binding>
  </mod-up>
 </button>

Then, each airplane that uses the system should have something like this added to its *-set.xml file (note that this does *not* go within the <sim></sim> tags):

 <systems>
   <submodel>
    <serviceable type="bool">true</serviceable>
    <amount type="int">70</amount>
   </submodel>
 </systems>

Future improvements will include:
1)  more configurability, so the user can create multiple submodels, and can assign them different locations, and pitch and yaw adjustments, and nitial velocity.

2) sound?

3) a more accurate calculation of the submodels location at any pitch/roll/yaw.

4) a way to pre-load the model, so the AI code doesn't have to parse the model every time it creates an instance.

I think that's all of it.

19 years agoDavid Culp:
ehofman [Sat, 21 Aug 2004 12:24:54 +0000 (12:24 +0000)]
David Culp:

The AIBase code was updated to fix an uninitialized pointer, and the
AIBallistic code has an improved FDM.

19 years agoAdd the real-weather-fetch options.
ehofman [Sat, 21 Aug 2004 12:00:12 +0000 (12:00 +0000)]
Add the real-weather-fetch options.

19 years agoDisable weather fetching if there are 3 errors within a 3 second period. This also...
ehofman [Sat, 21 Aug 2004 11:43:48 +0000 (11:43 +0000)]
Disable weather fetching if there are 3 errors within a 3 second period. This also solves the problem where FlightGear 'hangs' when real-weather fetching is enabled, but no network connection is present.

19 years agoIRIX users want pretty colors too.
ehofman [Thu, 19 Aug 2004 12:22:52 +0000 (12:22 +0000)]
IRIX users want pretty colors too.