1
0
Fork 0
Commit graph

3562 commits

Author SHA1 Message Date
curt
161fb0c770 Various property name changes relating to moving the kr-87 adf to
/instrumentation
2004-11-19 23:56:12 +00:00
curt
1c2c76709e Roy Ovesen: remove src files from Cockpit and move them over to Instrumentation. 2004-11-19 23:10:44 +00:00
curt
e9b70e3ab8 Changes by Roy Ovesen to begin migrating the avionics out of the Cockpit
directory and over to the Instrumentation directory and make them modular
in the sense of being able to pick and choose what you include with any
particular aircraft.
2004-11-19 23:01:34 +00:00
curt
d05121ef46 Fix my mailing address by replacing it with my web page. 2004-11-19 22:10:41 +00:00
curt
62df58d4f8 I have added Aaron Wilson's virtual 3d runway projection to the HUD.
Aaron says:

I just got the virtual runway hud projection working on all views and
2D & 3D HUDs.  It is working awesome(see below).  I have attached every
file that was modified (hud.hxx, hud.cxx, and the default.xml for the hud)
and every file that was added (hud_rwy.cxx and runwayinstr.xml).

Just a quick overview of how the instrument works.

The virtual runway is projected by getting the "cockpit view" of the
runway in 3D and projecting the points on to the 2D HUD.  Therefore, the
virtual runway will be displayed the same in every view.  For example,
you can land an aircraft from the "Tower View" by flying the HUD.  Also
if you're in "Cockpit View" and it is centered then the virtual runway
lines will perfectly outline the actual runway.  I am getting the active
runway via the wind like done in the ATC classes, which may need changed.
Also, I made the assumption the view 0, in view manager, is always the
cockpit view, which may need changed as well.

The runway configuration file will allow you to specify a center offset
(x,y) and a bounding box (width,height).  You can also configure the line
stipple pattern for the outside and the center line.  For instance, if
you wanted a 0xFAFA pattern, then specify 64250 as the value.  If you
want a solid line, you can specify -1 or 65535 (0xFFFF) and zero will
turn the line off.  It also draws a runway indication arrow when the
runway is not in the HUD or it can be drawn all the time if arrow_always
is true.  The arrow will point in the direction of the runway (2D) by
rotating around the center  at a radius of arrow_radius.  If you wish to
turn the arrow off, you must set the arrow_scale <=0.  The arrow really
should be 3D arrow that points to the runway (or points in the direction
of the aircraft-to-runway vector).
2004-11-19 18:31:02 +00:00
ehofman
ddb15394ee Mathias FröhlichMathias Fröhlich:
Add some controls required for carrier operations:

/controls/gear/launchbar

should be 1.0 if the launchbar is lowered, that means the aircraft should now
be arrested at the catapult.

/controls/gear/catapult-launch-cmd

Should be set to 1.0 when the aircraft should be launched from tha catapult.
2004-11-19 12:33:53 +00:00
ehofman
3c0ab43b43 Mathias Fröhlich:
The moving ai models will jump around realtive to the moving aircraft model.
I can see that with the carrier but others have noticed that too with ai
aircraft before.
The reason is that all SGSystems are called with a dt value which is not
necessarily a multiple of 1/hz.
In contrast, most FDM's use the _calc_multiloop function from FGInterface
which forces the time update to be a multiple of 1/hz for the FDM aircraft.
As a result, in the worst case, the FDM aircraft has moved nearly 1/hz seconds
further than the rest of flightgear (1/120sec*300kts that is about 1.3m).
That patch forces the time update to be a multiple of 1/hz.
2004-11-19 12:33:08 +00:00
curt
4214cd6c10 Migrate FlightGear code to use "#include SG_GL*" defined in
"#include <simgear/compiler.h>".
2004-11-18 19:53:00 +00:00
curt
225af83b32 This code is written on top of a driver interface only available with linux
(/proc file system) so it doesn't make sense to have other OS's trying to
open these files because they could never exist.
2004-11-18 17:40:03 +00:00
curt
a1265ddc1d - ATC-Inputs.cxx: Fix some portability problems for non-linux operating
systems.  Fix a couple bugs/oversights.

- atc610x.cxx: Much code has moved into the configurable input mapper
  (ATC-Inputs.cxx) and the remaining input massaging code has moved into
  the atcsim.nas module.
2004-11-18 05:04:35 +00:00
curt
7f9566111d Tweak the atcsim command line interface. 2004-11-18 05:01:19 +00:00
curt
11548e9e7e Minor white space fix. 2004-11-18 05:00:44 +00:00
curt
d66c4c1d82 Get rid of a stray character that must have introduced itself with my random
keyboard fumbling.
2004-11-16 19:48:42 +00:00
ehofman
3142457537 Remove some changes I had put in to make it compile. those are no longer needed. 2004-11-16 19:48:09 +00:00
curt
2eeddb8c9f Begin work on revamping the ATC hardware interface so it is infinitely more
configurable.
2004-11-16 19:47:11 +00:00
ehofman
9a8eaae03d commit some pending updates from Vivian 2004-11-16 09:33:21 +00:00
andy
d43d10046b Melchior caught a missing return value that is now an error on newer gcc versions 2004-11-15 18:15:33 +00:00
ehofman
2c72f13163 Roy Vegard Ovesen:
We have decided that hardcoded initialization of instruments and systems is
bad. So we remove them.

Hardcoded initialization is bad because it can't be overridden from config
files or from the command line. We prefer to do it through config files that
should be, eventually, aircraft specific (*-set.xml), not global
(preferences.xml).
2004-11-13 15:00:00 +00:00
ehofman
2df4a3b685 Vivian Meazza:
I attach the latest version  of Nimitz. The textures have been improved. A glide-path has been added, it is on by default, but can be switched off by means of the properties browser: /ai/models/ship/controls/glide-path. The origin has been adjusted to the turning pivot and approximate roll center.

Modified AiShip files are also attached. These allow the radius of the turning circle of a ship to be input. The turning circle is adjusted for speed and rudder angle. Roll has been corrected so that a ship leans out of a turn, not inwards like an aircraft. The roll angle is adjusted for speed and rudder angle (yes, application of more rudder reduces roll angle - rudders act as stabilizers).


TODO

Add a relative wind calculation so that a carrier can be turned to the appropriate launch and recovery courses.

Add a 'flight plan' so that the carrier can carry out a racetrack for flight ops.

Add a projector landing sight.

Add auto-land facilities.
2004-11-13 14:45:57 +00:00
david
42322949fa Reverted last changes, because they caused needle flips near 0. 2004-11-10 20:01:28 +00:00
ehofman
5733464305 Melchior FRANZ:
The caption should already be set when the window is opened. This is
important for some window managers. (KDE's kwin, for example, can store
special settings for certain windows, such as "no border" and "always
on top". KDE uses the window title to determine if a special rule is
to be applied. KDE will be made more tolerant, too.)
2004-11-08 17:41:30 +00:00
ehofman
85df309a3b David Culp:
Here are files to get automated contrails working.  I've set up contrails for
the 737, using my simple, untextured contrail model.  Vivian has made another
contrail model, but I'm still trying to get his to work.  I'm hoping others
will try to make contrail models also.

Here's some code that defines a top to thermals.  When the top of a thermal is
reached the strength is phased-out linearly over the next 100 feet of
altitude.  At first I tried just capping the thermal at the top, but the
change in thermal strength was too fast for the FDM to handle well.

Included is a new version of the thermal scenario that includes a top
(height-msl) to the thermal.  The default value is 5000 feet.
2004-11-07 14:46:21 +00:00
ehofman
3420e23833 MSVC fix. 2004-11-07 14:23:48 +00:00
david
2f13bafff5 Use angular momentum so that the compass can overshoot and oscillate
before settling.
2004-11-06 16:23:18 +00:00
david
079bc3196e Fixed typo that prevented DME groundspeed display. 2004-11-06 16:22:17 +00:00
david
0f2aad8320 Minor code clean-up. 2004-11-06 16:21:41 +00:00
david
b0c1fb7755 Added acceleration error to compass (most obvious during heavy braking
on the ground) -- this is based on some wild guesses, but it seems
reasonable for now.

The next step will be to give the compass some angular momentum so
that it does not snap instantly to a heading, and so that it can
overshoot a heading and oscillate.
2004-11-05 00:18:58 +00:00
david
04842a0f5b Add errors for pitch, based on a modified equation contributed by
Chris Metzler.
2004-11-04 02:24:46 +00:00
david
956823b161 Begin a rewrite of the magnetic compass code. So far, only northerly
turning error is supported, and I don't know if this works properly in
the southern hemisphere.
2004-11-03 15:59:49 +00:00
david
63cb4e59b7 Begin a rewrite of the magnetic compass code. So far, only northerly
turning error is supported, and I don't know if this works properly in
the southern hemisphere.
2004-11-03 15:15:32 +00:00
david
889dba8d65 Make FlightGear work with 16bpp:
1. Check that SDL actually initializes successfully and sets up its
   video mode.

2. Do not try to enable stencil in 16bpp.
2004-11-03 04:18:27 +00:00
curt
b82cc40c58 Make separate left/right flap surface positions in the net_fdm.hxx
structure for future use.  Right now they are tied together.
2004-10-29 00:13:32 +00:00
ehofman
e3c89b1d33 gcc fixes. 2004-10-28 11:03:15 +00:00
ehofman
73313ed0e1 Boris Koenig:
After applying the attached patches (based on latest CVS) you should
have a new option available within your version that should also
show up using fgfs --help, the syntax is:

    fgfs --min-status={level} --show-aircraft

whereas "level" can be anything between

    "alpha","beta","early-production" and "production"

Of course running something like

    fgfs --min-status=alpha --show-aircraft

should not return any aircraft right now, as none of the
current aircraft definition files in your base-package is using the
required

    <status></status>

tag - but you can easily give it a try by adding something like

    <status>alpha</status>

The tag should be placed as a sub-tag within <sim> - so directly behind
the <description> tag would be just fine and straight-forward.
2004-10-28 09:37:21 +00:00
ehofman
4668174848 Move the submodels from the /systems proprty subtree into /ai instead. 2004-10-28 08:44:24 +00:00
ehofman
670ea7c881 David Culp:
Here's code to support a new AICarrier class, which I think will be
sufficiently different from a basic AIShip that it should have its own class.
2004-10-28 08:33:55 +00:00
ehofman
e5b1ab4831 Vivian Meazza:
As a result of recent requests, I've implemented the ability to switch off
aerodynamic stabilisation:

This has to be added to the submodel.xml files:

<aero-stabilised>false</aero-stabilised>

When false the submodel retains the pitch given at instantiation.

It defaults to true.
2004-10-28 08:29:15 +00:00
ehofman
2a94cedeba Fix some warnings. 2004-10-26 12:09:31 +00:00
ehofman
ba7fd47740 Roy Vegard Ovesen:
I've made an encoder and a transponder. The transponder gets C-Mode altitude
information from the encoder. These two might not be very usefull right now,
but I think they might come in handy when the ATC network gets going.
2004-10-26 12:06:45 +00:00
ehofman
5071415bd1 Melchior FRANZ:
input.cxx allocates memory for js->getNumAxes() axes and for jsCaps.wNumButtons
or MAX_JOYSTICK_BUTTONS buttons per joystick. But it doesn't check if some
xml config defines bindings for more axes/buttons, in which case it writes
to unallocated memory and causes crashes. This is a real world example:
sidewinder-force-feed-pro.xml defines 7 axes, but only newer versions of
this js do actually have that many. Older ones (-> gameport) don't. The patch
drops unused and unusable bindings.
2004-10-24 14:45:52 +00:00
ehofman
0ab2a40c2a Roy Vegard Ovesen:
I've added two new debug log types for the instrumentation and systems. They
used to use the autopilot debug log, because I couldn't figure out how to
make new log types. Well, now I have figured it out.  ;-)
2004-10-24 11:05:14 +00:00
ehofman
ab4f7b4c60 Add commands to load and save property (sub)trees from or to an XML file. 2004-10-24 09:13:17 +00:00
ehofman
29b5147478 Move the submodels code from the Systems manager into it's own Subsystem manager. 2004-10-22 09:58:24 +00:00
ehofman
a938b5b0df Boris Koenig:
This will modify menubar.cxx/hxx so that it exports the
entire menubar (from menubar.xml) to the property tree, so that it can
now be changed dynamically  using Nasal's setprop() instruction and
afterwards running a newly added fgcommand to update the menubar
based on those changes using the appropriate menubar path within
the property tree.

By default the menubar from menubar.xml will be stored within:

    /sim/menubar/default


Erik:

I have moved the loading of menubar.xml into preferences.xml and
made sure that the menubar is destroyed every time a new menubar
is created.
2004-10-22 09:26:51 +00:00
ehofman
3b62b16fe9 Comment out the unalias code also. 2004-10-21 09:27:40 +00:00
ehofman
7d1ec00a2b Frederic Bouvier:
I think I found the problem in props.hxx. I have an exception when copying properties. An alias to a property that has no value trigger this exception. The code that generate that is in AIManager.cxx  :

void FGAIAircraft::bind() {
   FGAIBase::bind();

   props->tie("controls/gear/gear-down",
              SGRawValueMethods<FGAIAircraft,bool>(*this,
                                             &FGAIAircraft::_getGearDown));

   props->getNode("controls/lighting/landing-lights", true)
          ->alias("controls/gear/gear-down");
}

controls/gear/gear-down has no value ( _type == NONE ) and controls/lighting/landing-lights is copied somewhere.


Erik:

Frederic's fix was to change props.hxx but he has expressed his doubts.
For now I've commented out the line that causes the problem so we have more
time to look deeper into the problem.

cvs -z4 -q diff -u props.hxx (in directory I:\FlightGear\cvs\SimGear\simgear\props\)
Index: props.hxx
===================================================================
RCS file: /var/cvs/SimGear-0.3/SimGear/simgear/props/props.hxx,v
retrieving revision 1.4
diff -u -r1.4 props.hxx
--- props.hxx	19 Sep 2004 09:08:12 -0000	1.4
+++ props.hxx	21 Oct 2004 07:10:54 -0000
@@ -622,7 +622,7 @@
   /**
    * Test whether this node contains a primitive leaf value.
    */
-  bool hasValue () const { return (_type != NONE); }
+  bool hasValue () const { return (_type != ALIAS && _type != NONE) || (_type == ALIAS && _value.alias->_type != NONE); }


   /**
2004-10-21 09:21:05 +00:00
ehofman
3d3922cd46 Accelerations should be added to the velocity, not multiplied 2004-10-20 14:27:29 +00:00
ehofman
133a7d4271 Use the right conversion factor and multiply the accelrations by dt. 2004-10-20 09:47:37 +00:00
ehofman
dfb822e461 Directly updating the right properties doesn't work when not uing --fdm=null, create a separate branch instead. 2004-10-20 09:21:08 +00:00
ehofman
96e24a3e8d Melchior:
Don't overwrite user settings from config files.

fgfs had in any case set bump-mapping to false, no matter if this
node did already exist (because it was defined in a config file).
2004-10-20 08:18:29 +00:00
ehofman
dbbad3cdf2 Frederic:
compilation without ENABLE_SP_FMDS defined gave me a lot of link errors. It appeared that symbol used by ADA was still in use in the HUD.

There is also a typo from Curt in instrument_mgr.cxx where he #include "kr_87.cxx" instead of "kr_87.hxx"
2004-10-20 08:15:55 +00:00
ehofman
e2ce033a8c MSVC fix. 2004-10-20 08:12:55 +00:00
curt
9cc4c619cc Fix the kr-87 search functionality so it works in the subsystem/instrumentation
infrastructure.
2004-10-19 19:07:24 +00:00
ehofman
8b53b86aa0 A first stab at an ACMS (Aircraft Condition Monitoring System) Special Purpose support FDM. Move the ADA FDM into the Special Purpose directory and make the SP FDM's a configure option. 2004-10-19 11:10:20 +00:00
curt
1254fdea2a Moved kr_87.[ch]xx and made it a configurable instrumentation item. 2004-10-18 19:58:37 +00:00
curt
8f5cac1403 Move the kr_87 code over to the instrumentation directory. 2004-10-18 19:56:24 +00:00
ehofman
28b751f121 Don't assign a const char* variable to the c_str() value of a temporary (local) string. 2004-10-18 13:29:16 +00:00
ehofman
a112b39c84 Add a tad more information, although it actually might mean nothing at all. 2004-10-17 17:59:02 +00:00
ehofman
2b6b970b80 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
2004-10-17 17:29:34 +00:00
ehofman
7f6466d6f1 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
2004-10-17 17:23:19 +00:00
ehofman
f614545fc5 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.
2004-10-16 12:37:39 +00:00
ehofman
fc2bf98122 prevent a segmentation error under certain circumstances. 2004-10-16 11:24:48 +00:00
ehofman
359fb0d3b7 Fix some bugs 2004-10-15 12:23:36 +00:00
ehofman
ca31288e64 Set the format default to float instead of int. 2004-10-15 11:29:09 +00:00
ehofman
ebae60a00b Add generic input support 2004-10-15 11:11:37 +00:00
ehofman
77d3a549a7 It's usually not a good idea to assign a const char* to a node of a temporary property tree, use string instead. 2004-10-14 09:49:46 +00:00
ehofman
fa7f2468c2 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!  ;-)
2004-10-14 09:19:44 +00:00
ehofman
c0c394c188 PLIB_VERSION is localted in plib/ul.h 2004-10-10 19:19:23 +00:00
ehofman
b7afe856c3 Check for the plib version when using display lists, just to be sure. 2004-10-10 19:06:32 +00:00
ehofman
f61014c2ea Frederic: Add display list support without changing plib. 2004-10-10 17:41:11 +00:00
ehofman
e6c6c666c2 I forgot a linker dependency. It really si time to figure out why these are all needed. 2004-10-08 11:30:07 +00:00
ehofman
5c02b0baf0 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:
2004-10-07 20:34:56 +00:00
ehofman
59348bbeb9 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).
2004-10-06 09:57:37 +00:00
ehofman
57971cbd9b 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
2004-10-06 09:30:36 +00:00
ehofman
b22ece2e01 Handle the new linker dependencies after rearranging the FlightGear header files a week or two ago. 2004-10-06 09:23:51 +00:00
curt
41e217fb9a 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. :-)
2004-10-06 03:29:14 +00:00
ehofman
600384d5c7 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'.
2004-10-03 08:20:54 +00:00
david
fcb67de4f5 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).
2004-10-02 22:35:39 +00:00
ehofman
f6176ec7ef 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.
2004-10-02 14:30:18 +00:00
ehofman
1d081cdd93 Move the calculations of Mach to the base class. 2004-10-02 13:34:06 +00:00
ehofman
0304651a9b Add the Mach vaiable. 2004-10-02 12:05:59 +00:00
ehofman
1af8736df6 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
2004-10-02 12:02:04 +00:00
daveluff
3bb349179d 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. 2004-09-30 15:43:32 +00:00
ehofman
6f8cae6b87 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>
2004-09-27 14:40:31 +00:00
ehofman
328053fe23 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.
2004-09-27 14:24:20 +00:00
ehofman
06bead966b Cache the renderer in a local pointer. 2004-09-27 09:13:12 +00:00
curt
cc66c8fdca Activate the hi res screen capture functionality again, however it is no
longer working 100% correctly. :-(
2004-09-27 02:39:54 +00:00
ehofman
1974be7faf Make the scenerio's work again (now for real) and a small number of updates. 2004-09-23 09:39:55 +00:00
ehofman
4b5d84d7fb Don't forget to unbind() before deleting the class. 2004-09-23 08:57:46 +00:00
ehofman
5570b16192 MSVC fixes. 2004-09-23 07:48:25 +00:00
ehofman
e0e5b325cb 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.
2004-09-22 19:11:36 +00:00
ehofman
82dfd908b7 Make the scenarios work again. 2004-09-22 11:24:45 +00:00
ehofman
9d1b5164e2 fix a segmentation fault situation that is exposed at least on IRIX (but not Linux). 2004-09-22 10:03:26 +00:00
ehofman
26e6b0edcb 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.
2004-09-22 08:47:05 +00:00
ehofman
56f6d3b800 Fix a small number of potential problems. 2004-09-20 19:29:16 +00:00
ehofman
986492d72d 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.
2004-09-20 13:21:51 +00:00
ehofman
3b3600fd21 Make it compile, link and run again (pfew\!) 2004-09-19 18:34:47 +00:00
ehofman
de47d1a7d8 Revert to CVS as of 5000 seconds ago. 2004-09-19 17:59:40 +00:00
ehofman
b2bc573205 Fix the last remaining link problems. 2004-09-19 17:40:25 +00:00
ehofman
88b8990409 Fix some link errors. 2004-09-19 17:29:07 +00:00
ehofman
887c0c0f65 Fix some link errors. 2004-09-19 17:27:44 +00:00
ehofman
db3bbd25e9 Fix some compile errors. 2004-09-19 17:18:11 +00:00
ehofman
5ff3d39ad5 Shoot, this shouldn't have happened yet, but since it is, add the missing files also. 2004-09-19 17:02:16 +00:00
ehofman
cbdeb3be16 Remove unnecessary inclusions of sg.h ans ssg.h 2004-09-19 16:47:00 +00:00
ehofman
409dee5a9d Remove unnecessary inclusions of sg.h ans ssg.h 2004-09-19 16:33:38 +00:00
ehofman
e6a80d793e Make use of cached pointers instead of the hash table. 2004-09-19 12:29:07 +00:00
ehofman
6d76e9da80 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.
2004-09-17 16:32:58 +00:00
curt
cc3d0221ea 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.
2004-09-15 15:52:05 +00:00
ehofman
2836b35989 Sync w. JSBSim CVS 2004-09-15 12:19:46 +00:00
ehofman
2f581faf3e 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).
2004-09-14 08:27:55 +00:00
ehofman
5b340578ae Sync. w. JSBSim CVS. 2004-09-11 12:41:05 +00:00
ehofman
5a2ff68ffc Bump the version number to the current one. 2004-09-11 11:00:02 +00:00
curt
2b22f5678c Preparations for the 0.9.6-pre1 release. 2004-09-10 18:34:00 +00:00
curt
7a011f8354 Remove an unneeded #include. 2004-09-10 18:30:24 +00:00
curt
3a7cef79c8 Add support for "co-pilot" toe brakes. 2004-09-10 17:53:34 +00:00
ehofman
f42e3cb2ac More fixes to get the code working when threads are disabled. 2004-09-10 07:54:45 +00:00
ehofman
d712d18acb 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.
2004-09-09 08:40:08 +00:00
ehofman
bfd8a50294 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.
2004-09-09 08:32:11 +00:00
ehofman
9e315c8797 Move depreciated files to the bitbucket. 2004-09-09 08:29:51 +00:00
ehofman
c542be5330 Make sure the pointer is not being used after deletion, and tie the elapsed time to the particular class instance. 2004-09-08 14:02:25 +00:00
ehofman
9e72a38165 Rearrange ID related code. The (this) pointer is now the unique ID of the AIModel which fixes a number of problems along the way. 2004-09-08 13:21:40 +00:00
ehofman
af7c5e48be Internally keep track of the number of models per type. This really speeds up searching for the number of submodels of one type. 2004-09-07 19:56:22 +00:00
ehofman
0d576e1925 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.
2004-09-07 19:10:10 +00:00
ehofman
d158c8168d Make use of a pointer to a structure to pass multiple parameters around. 2004-09-07 09:53:23 +00:00
ehofman
fed4a2c25a 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.
2004-09-05 09:45:34 +00:00
ehofman
30f3bd5096 Add the missing buoyancy patch. 2004-09-01 21:05:04 +00:00
ehofman
1853012d90 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
2004-09-01 08:32:54 +00:00
ehofman
d2d27f2d76 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). 2004-08-30 11:13:29 +00:00
ehofman
fdab44652e 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. 2004-08-30 09:15:04 +00:00
ehofman
af284e4bb9 David Culp: Here are small changes that allow one to set a life-span for submodels. 2004-08-30 09:11:59 +00:00
ehofman
cfc05f5f0d 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>
2004-08-26 16:25:54 +00:00
ehofman
065d4d8da1 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.
2004-08-26 12:27:39 +00:00
ehofman
c4aa3fa661 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.
2004-08-26 08:38:43 +00:00
ehofman
5a8f277b88 Include multipass clouds by default, enable it by specifying --prop:/sim/rendering/multi-pass-clouds=true 2004-08-24 09:34:42 +00:00
ehofman
2a610d77e7 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. 2004-08-24 08:40:41 +00:00
ehofman
83ca912de2 Fix another one of those mistakes. I really shouldn't mess with code from others (without looking at it closely) :-( 2004-08-23 17:40:46 +00:00
ehofman
c4c67480ff Fix a mistake and make it possible to activate the submodel subsystem again. 2004-08-23 17:33:36 +00:00
ehofman
be6936be80 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.
2004-08-23 17:22:55 +00:00
ehofman
7aa1cd9b5a I forgot a small patch. 2004-08-22 17:04:37 +00:00
ehofman
161912ea4c 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.
2004-08-22 16:22:18 +00:00
ehofman
72b201d96c David Culp:
The AIBase code was updated to fix an uninitialized pointer, and the
AIBallistic code has an improved FDM.
2004-08-21 12:24:54 +00:00
ehofman
4d9a30addc Add the real-weather-fetch options. 2004-08-21 12:00:12 +00:00
ehofman
97114e3159 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. 2004-08-21 11:43:48 +00:00
ehofman
4df8f790d5 IRIX users want pretty colors too. 2004-08-19 12:22:52 +00:00
ehofman
5c18572c64 Melchior FRANZ:
All necessary elements for an ADF gauge had been migrated from
Cockpit/kr_87.cxx to Instrumentation/adf.cxx. Migrating the sound
related elements was apparently planned, but not done yet. This
intermediate state broke the ident morse sound: it couldn't get
turned off and it always indicated "SF", regardless of the tuned-in
frequency. The following patches continue the migration:


adf-radio.diff     => Base/Aircraft/Instruments/adf-radio.xml:
---------------------------------------------------------------
* sets maximum volume to 1 (rather than 2); Not only is 1
  loud enough (and 2 unpleasantly noisy), it also prevents
  the knob from being turned to non-existant positions.  :-)
* fixes wrong use of /instrumentation/adf/ident
* the voice/ident selector(?) remains unchanged, but as it's
  not switched to "IDENT", there'll be no ident sound by default
  this is consistent with other sounds and DME.


radiostack.diff    => src/Cockpit/radiostack.[ch]xx:
---------------------------------------------------------------
* comment out use of FGKR_87 class. kr_87.[ch]xx is now no
  longer used. kr-87adf.xml would no longer work, either, but
  isn't used anywhere, anyway. Future adf radios have to use
  the adf instrument, using xml/Nasal for specific hardware
  implementation details.


adf.diff           => src/Instrumentation/adf.[ch]xx:
---------------------------------------------------------------
* adds ident morse sound capability using two new input
  properties:
  - /instrumentation/adf/volume-norm  (double)
  - /instrumentation/adf/ident-audible  (bool)
2004-08-19 11:54:57 +00:00
ehofman
02d721f8c9 The next version of the two hourly metar update from Melchior: add proxy handling. 2004-08-17 12:26:37 +00:00
ehofman
f2199a4f57 Some code cleanups, and add a number of command line options. 2004-08-17 08:45:45 +00:00
ehofman
d88f31fda2 Show the mouse cursor again, just before exiting. This could prevent an X windows crash for certain harware setups. 2004-08-15 16:53:11 +00:00
ehofman
5cd465354c Melchior FRANZ:
this was always only meant to be a test program for the metar lib, but now
that people are referring to it as a means to get metar reports, I think a
usage info is desirable. The list of test ids, on the other hand, isn't
necessary any more. This can still be handled by a Makefile or the commandline.
I'm all for keeping this tool in cvs, however. And also the not-used stuff
therein is a welcome source for how to use the SGMetar class.
2004-08-15 14:37:42 +00:00
ehofman
827cfded73 iFrederic Bouvier: Postpone rendering the scene until the scenery is loaded. This means that the splash screen remains a bit longer, but the scenery loading time is cut in half. 2004-08-15 11:25:15 +00:00
curt
887793655a Add condition lever (for turbo props) to FGNetCtrls class. 2004-08-06 18:09:23 +00:00
curt
7857ef0381 Tweaks for 0.9.5 release. 2004-07-29 21:54:15 +00:00
curt
f9af52b588 Tweaks for 0.9.5-pre3 release. 2004-07-27 21:40:37 +00:00
curt
7ec5cbff7b Default bump mapped clouds to off for the official release. They can still
be turned back on via the rendering options dialog box.
2004-07-27 20:40:33 +00:00
curt
85fe50dcc5 Add support for a turbo prop condition lever.
Add support in the aircraft config file for a low idle and high idle n2.
2004-07-27 20:39:56 +00:00
curt
e5f0163ce0 Change condition lever position from an "int" to a "double". 2004-07-27 20:39:01 +00:00
ehofman
99a7850cc7 Add a few else statements to make the checking work correct. Thanks Tiago Gusmao for detecting this. 2004-07-27 16:35:34 +00:00
ehofman
2bc09e5268 Get rid of the double comma's for the file section of the generic protocol also. 2004-07-25 18:47:18 +00:00
ehofman
dddc4d4b16 Fix a problem where the protocol file could not be found when using the generic protocol over TCP/IP. 2004-07-25 16:38:33 +00:00
ehofman
009afccb37 Reduce the log-level of the airport not found
message.
2004-07-23 18:58:42 +00:00
ehofman
1a87ef23f5 Jim Wilson:
This is a workaround for an issue where the xml dialogs were shrinking on
subsequent pops.

Andy Ross says:

That looks like it should be fine for a release-time workaround.  The
2 pixel border on dialogs is at best a minor feature, and probably
invisible since the sub-frames all have their own padding.

Clearly the right fix would be to find out where the code is getting
confused by the previous layout.  In principle, the layout should be
idempotent: if you don't change the layout constraints, it shouldn't
change its layout.  There's still a bug in there somewhere.
2004-07-23 07:36:32 +00:00
ehofman
ef84402da1 How on earth???? Replace "and" by && and "or" by || to match C++ more closely........ 2004-07-23 07:33:24 +00:00
ehofman
025a1e2491 Durk Talsma:
I've included the latest fixes to the Traffic Manager/AI flightplan generation
code. Most of the code changes are in AIFllightplan.cxx. This is the code
that runs without depending on predefined FlightPlans in
#FG_ROOT/Data/AI/Flightplans.i

As suggested by Dave, I've also added a new property in
preferences.xml: /sim/traffic-manager/enabled, which is used to control
whether or not the traffic manager is active.

I'm still working on a few more 737 traffic patterns, those are going to take
a little longer, so I didn't want to wait sending in this code.

Finally, I haven't put much effort into ensuring "aeronautical correctness" in
this version yet. The code works on my system, but what the AI plane do may
actaully be quite rediculous. But I'd like to leave that for the next
version.
2004-07-22 18:50:29 +00:00
ehofman
9d972d86bf Jim Wilson: This patch prevents FDM execution until intial scenery load completes making
midair starts in the KSFO area possible again.
2004-07-22 16:42:14 +00:00
curt
517a7a3e5a Updates for v0.9.5-pre2. 2004-07-21 21:49:54 +00:00
ehofman
73e70fdb29 Fix a numeric_limits problem for older stdc++ libraries. 2004-07-21 06:56:59 +00:00
curt
77e21b26d2 Curt:
Stub in hooks for Propeller feathering controls and the turbo prop "condition"
lever.

I added a line in FGFDM.cpp to force control properties to exist if they
don't already.  This way you can specify anything you want and find them
in the property browser, otherwise no one else may create them and you are
stuck.

In PropEngine::solve() the code original sets _running = true at the
beginning and then sets running = false at the end.  I changed this to
save the current value at the start, set to true, solve(), and then
restore the original value at the end.  That way if we start off with
_running = true, we don't have to hack up the calc() routine which wasn't
using the value anyway.

Finally I added some very initial support to shut down a turbine engine
(_running = false) when the condition lever goes to zero.
2004-07-20 22:17:58 +00:00
curt
abb0221c74 Make distance penalty math for opposite oriented navaids more correct. 2004-07-20 00:59:17 +00:00
curt
d5a5c9bb0e Ed Sirett submitted a patch to consider antenna orientation when searching
for localizers.  I further hacked this to support GS and DME transmitters
(although Robin's DME transmitter data doesn't convey orientation
unfortunately.)
2004-07-19 18:02:00 +00:00
ehofman
3215084d13 Add the multiplay.* and jpg-httpd.* files to the EXTRA_DIST line so they get included in the official tarball. 2004-07-17 08:32:48 +00:00
ehofman
a0f522e7c8 Add the _os.* files to the EXTRA_DIST list, otherwise they won't end up in the official tarball. 2004-07-17 08:26:04 +00:00
ehofman
6a19060d2c Fix an indexing problem. 2004-07-16 20:02:36 +00:00
curt
6076c83904 Various tweaks for v0.9.5-pre1. 2004-07-15 18:07:02 +00:00
ehofman
1d2af567bf Frederic Bouvier:
I have 3 issues that are fixed by this set of patches.

1. In extensions.cxx
  #else if !defined( WIN32 )  must be changed by
  #elif !defined( WIN32 ) because the text after #else
  seems to be ignored

2. banner is not available on windows, only cygwin

3. ANSI escape sequences are not interpreted on the
   windows console. We just have garbage that is hard
   to read.
2004-07-03 10:59:34 +00:00
ehofman
5c685b34de Sync. with JSBSim CVS again. This fixes some small issues. 2004-06-27 19:35:54 +00:00
david
25ac349fe4 On a reinit() subsystem event, reconfigure the joystick and other
inputs.  This makes it possible to hot-plug a new joystick while
FlightGear is running (as long as the user explicitly reinits the
input subsystem).
2004-06-24 02:08:38 +00:00
curt
258cd292c6 When searching for nav records ignore stations > 300nm away. 2004-06-20 18:58:44 +00:00
david
2bcec1fbbc Ignore generated files. 2004-06-15 12:48:22 +00:00
curt
19dff3ac44 Alternator should still put out some output when RPM < 800. (Yes I know this
is hard coded for the C172, but so far no one has asked to do this more
generically.)
2004-06-14 21:36:10 +00:00
curt
e32c5d965f Pending white space tweaks I forgot to commit the other day. 2004-06-14 18:47:21 +00:00
curt
886d003688 - Track a saved mouse pointer location from the previous frame so we can detect
motion.

- Track a timeout value so we can optionally hide the mouse pointer after
  some user specified timeout period.

- in doMouseMotion() always update m.x and m.y even if we return early because
  pui wanted the event.  Without this, we can't reliably detect motion vs.
  inactivity.

- in _update_mouse() add a dt parameter so we can decriment the timeout value
  in "real" time.

- in _update_mouse() optionally hide the mouse pointer if m.timeout goes to
  zero.  Restore the pointer (and the timeout counter) if the mouse is moved.
2004-06-14 18:46:58 +00:00
curt
0fa47dbbdc Change the fps toggle property name a bit and add a toggle switch in the
gui/dialog/rendering box.
2004-06-14 16:38:44 +00:00
curt
1fa0f4157c Make the onscreen fps display toggleable via a boolean property. 2004-06-14 16:25:32 +00:00
ehofman
8e1482f746 Sync w. JSBSim CVS 2004-06-14 11:40:45 +00:00
ehofman
56f085b6f1 Melchior FRANZ:
Remove an unused test, counter_hack is initialized to 0 and the test never reaches the increment section but instead will always call loader.update();
2004-06-13 18:47:55 +00:00
ehofman
22c0529280 Work around a potential never ending loop problem. A proper fix will be in the next JSBSim update. 2004-06-13 18:44:21 +00:00
ehofman
dbfc0eb287 Put the sqrt() back in. That was part of another attempt to optimize the code, but it hadn't fully matured yet. 2004-06-12 11:37:47 +00:00
ehofman
c43e514e87 No need to do he calculations twice. FGAIBAse::update() handles them already. 2004-06-12 11:34:05 +00:00
ehofman
24820e6d5a Move the radar update code to the AIBase class. There seems to be a problem where all targets disappear whenever one of them disappears, but that was present in the previous update also. 2004-06-11 13:49:07 +00:00
ehofman
11290e8022 Remove an unnecessary property set. 2004-06-11 08:09:55 +00:00
curt
756f05501b Oops, fix a bug (introduced recently) that could cause the glide slope
indicator to read incorrectly for many approaches.
2004-06-10 19:51:27 +00:00
ehofman
4fe886f008 Introduce a radar/in-range boolean property, end check this to see whether the CPU intensive radar calculations need to be done. If not, skip them. 2004-06-10 19:14:19 +00:00
curt
6c8f7fab01 DME units report a distance based on the assumption that the ground station
will delay it's reply by 50ms.  The ground station can change it's reply delay
to trick the airborn dme unit into reporting a distance that is offset from
the true distance by some constant value.  In FG we model this by subtracting
a fixed distance from the actual distance.

It is thus possible in our implimentation for the displayed distance to become
negative.  This patch clamp DME distance to a minimum value of 0.00 so it can
never go negative.
2004-06-09 20:21:18 +00:00
curt
225298a09e Often, the elevation of an ILS component is not listed in our nav database.
A good elevation is critical for proper glide slope modeling.  This patch
assigns the average field elevation to any ILS component that doesn't have
a valid elevation.

Also, for an ILS approach, use the GS transmitter elevation for glide slope
calculations rather than the localizer elevation, in some cases this can
make a big difference.
2004-06-09 03:13:13 +00:00
curt
a01bbf5a28 iSwitch position changes. 2004-06-09 00:49:04 +00:00
ehofman
ff9258528c Melchior FRANZ:
Wouldn't it be better to prepare the whole list of paths (or two
separate ones for Terrain/Objects if necessary) in FGGlobals::set_fg_scenery,
and to pass the vector<string>s to FGTileEntry::load? It doesn't seem to make
a lot of sense to split the path up, modify it, mount it together to one string
again, and then let FGTileEntry::load split it up again.

Here we go:

Main/globals.cxx
================
As fg_scenery is now a string_list, we don't need initialization. Furthermore,
this list is cleared with every set_fg_scenery() call.

ctor: create default dir from fg_root if necessary. Otherwise check all paths
of --fg-scenery/FG_SCENERY: If the path doesn't exist, ignore it. If it contains
a dir Terrain and/or Objects, then only add that to the list. If it contains
neither, then use the path as is.


Scenery/tileentry.cxx
=====================
Trivial: don't split a "base path", but use the given path_list as is.
(I considered a variable name "path_list" better suited than "search".)


Scenery/FGTileLoader.cxx
========================
No more fiddling with sub-paths. This has to be delivered by get_fg_scenery
already.
2004-06-08 15:32:09 +00:00
ehofman
43df8a9cc0 Remove some debugging code. 2004-06-07 09:55:55 +00:00
ehofman
079890e955 Make use of the new SGPath::add() function and automatically append 'Terren' and 'Objects' the the scenery path when one or both of those subdirectories exsist. 2004-06-07 09:52:11 +00:00
ehofman
1bdcbd69f3 Windows uses ';' instead of ':' as a path separator. 2004-06-06 19:34:31 +00:00
ehofman
86a24bc9e8 Search in share/FlightGear instead of lib/FlightGear 2004-06-06 19:31:42 +00:00