1
0
Fork 0
Commit graph

3686 commits

Author SHA1 Message Date
ehofman
6a4b7302b0 Mathias Fröhlich:
I have some small updates to the ground cache.

- Remove the usage of dynamic_cast where it is known that the result will be
  non null.
- Renormalize the surface normal in double precision.
- Place the groundcaches center at the point it was requested not at the
  scenery center. This fixes the problems with JSBSim's trimming together with
  the ground cache. Now I am ready to commit JSBSim's ground cache usage.
2005-04-19 13:21:43 +00:00
ehofman
cc3eacb88e Melchior: Make line wrapping in textboxes configurable, and enable it by default 2005-04-19 13:15:04 +00:00
ehofman
3b5512f573 David Culp:
I'm looking through the AI code, trying to find the bug that's killing the
thermals.  The following things don't look right:

1)  AIManager::101  ,   the Traffic Manager pointer is searched for by name at
every dt.   I'll leave this for you to look at.

2)  AIManager::295  ,  the thermal height is not being set.  We need to
restore the line:         ai_thermal->setHeight(entity->height_msl);
This fixes the thermal problem.

3)  AIManager::328  ,  I changed the fetching of the user state to occur every
sim cycle, and changed the fetching function from by-name lookup to a lookup
by node pointer.  It should be faster now, and more accurate too.  This helps
the air-refueling.
2005-04-19 12:52:26 +00:00
curt
86249209b9 This is a work in progress. I am extending the "ExternalPipe" protocol to
have a "property" mode as well as the original "binary" mode.  The property mode
will allow the remote module to request any set of properties, and it will send
those properties each frame.  The remote module can reply with a list of arbitrary
property name/value pairs to update on the FlightGear side.

This is a first stab, so it's not the cleanest, most well concieved code, but it
allows an external module (communicating via a pipe) to have a huge amount of
flexibility in the data in can access and update.
2005-04-19 01:44:56 +00:00
curt
a69bc500ef Fix a couple typos. 2005-04-19 01:41:17 +00:00
andy
142854d3d1 Upgrade to Nasal 1.0 test candidate 2005-04-18 19:49:13 +00:00
andy
cc09868772 Fix units bug with fuel flow 2005-04-13 19:42:29 +00:00
ehofman
3f6536fee6 Allow for recolloring the dialogs. 2005-04-13 11:39:53 +00:00
andy
88a678eb77 Don't overwrite the castering value with the non-castering one. Also,
make the caster-angle-deg a synonym for the steering angle when the
wheel is non-castering.
2005-04-08 22:39:46 +00:00
andy
a40cab8321 Oops, stray line in the checkin. I'm sure fenv.h would have broken on
at least one system...
2005-04-08 20:55:02 +00:00
andy
7eb194b3f8 Export "rollspeed-ms" and "caster-angle-deg" properties for gear
objects.  Josh Babcock wanted these for the B-29 model so he can
properly animate the gear.
2005-04-08 20:46:43 +00:00
ehofman
d28e99d913 Melchior FRANZ:
Make SDL window resizable; This exposes the same problem that many
GLUT users have: resizing up may cause a temporary switch to software
rendering if the card is low on memory. Resizing down again switches
back to HW rendering. (KSFO is texture intensive, but there are no
problems in LOWL, and elsewhere.) Less and less users will have the
problem as cards become better, and it's no reason not to allow
resizing altogether.
2005-04-06 08:46:39 +00:00
ehofman
28fe28ec4f Melchior FRANZ:
_course_deg is first initialized in the if()-branch (gps.cxx:419). But
this branch isn't entered at first run if wp0==wp1, so that in line 615
fgfs tries to SG_NORMALIZE_RANGE() a random value, which can take a
long while if the number huge. This was occasionally a number greater
than 10160!

- initialize all vars before they are used (fixes endless loop)
- fix some compiler warnings (initialization order, unused vars)
2005-04-06 08:24:30 +00:00
ehofman
d3bdc4e7bc Melchior FRANZ:
FGAIMgr::GenerateSimpleAirportTraffic() tries to determine the airport's local
hour from the /sim/time/gmt-time string, which fails, because at this time the
property is still empty. That's why I don't get ATIS at LOWG (where it is *not*
midnight right now.  :-)    -> use sg's get_cur_time() instead
2005-03-31 17:00:27 +00:00
ehofman
d461e7868f Melchior FRANZ:
- don't treat *every* child in the xml as submodel, especially not a "param"
  block
- do not only *enable* the contrail flag above some altitude, but also
  disable it below
2005-03-31 08:54:04 +00:00
ehofman
f43b011ee3 Cygwin (windows) fix. 2005-03-31 08:41:41 +00:00
ehofman
019a7a186b Melchior FRANZ:
showDialog() is careful not to create a new FGDialog() if a dialog with the
same name is already open (active). But at this point it is already too late:
newDialog(), which was called shortly before, has already overwritten the
dialog properties. This leads to animated garbage in the best case, and a
segfault in format_callback() in the worst case.

- GUI::newDialog(): Don't you overwrite properties of an active dialog!
- GUI::readDir(): You may do that, but delete the old dialog first!
  (necessary for reloading the GUI)

- FGDialog::makeObject(): only set format_callback() with setRenderCallback()
  if the property is "live". Otherwise, only call it once at construction
  time. This isn't only a performance improvement. Without this the label
  was growing until it hit the limit (256).
2005-03-29 08:35:13 +00:00
ehofman
71dd0f8f96 Melchior FRANZ:
The previous message wasn't totally correct. Strings are now allowed, too. And
the pattern is now '[ -+#]?\d*(\.\d*)?l?[fs]' and *may* be embedded in a string.
There may only be one %s or %f, though. %% is allowed in the preamble/postamble.
(Yes, %ls is allowed, too, and treated as %s.)

Also, "end" is superfluous now.
2005-03-26 10:45:00 +00:00
ehofman
db989269b8 Melchior FRANZ:
Printing floats in dialogs with 8 digits after the comma is inappropriate
for most cases.

- implement a "format" property for "text" gui elements (a.k.a. pui label).
  Number formats are set by strtod/snprintf, while formats on non-numbers
  are replaced by "%s". Practical example in the upcoming material.nas update.
  Valid formats regex:  '%[ -]?\d*(\.\d*)?l?f' (IOW: the format must begin
  with '%' and end with 'f').

  # Nasal:
  number = dialog.addChild("text");
  number.set("label", "3.1415926");
  number.set("format", "%.3f");
2005-03-26 10:09:34 +00:00
curt
babb51ba02 Update nasal function name. 2005-03-25 01:37:58 +00:00
curt
f55f96c44a Use standard length types (stdint.h where available) to make the FGNetCTRLS,
FGNetFDM, and FGNetGUI structures more cross platform/architecture portable.
2005-03-24 19:56:57 +00:00
ehofman
4b116a1196 Melchior FRANZ:
The dialog handling has been written at a time when only one dialog was
shown at the same time, and dialogs were shallow -- with only children, but
no grand-children. This makes finding a draggable spot on modern, dialogs
with nested objects quite a challenge. The patches fixes this, and other things:

- check full object tree on button press, not only the outmost layer;
  and don't give up just because we are in *something* (which could well be
  something harmless, like a group); only ignore a few, sensible objects
  (we don't want to drag after a click on a button or into an input field)

- don't lose dialogs as easily when dragging too fast (it does still happen
  if one manages to enter an editable field while dragging, but this is
  a plib problem and I don't feel like fixing that now  :-)

- don't "live"-update input fields while they are in edit mode

- remove some "if (foo) delete foo;" redundancy
2005-03-24 13:41:43 +00:00
andy
c89e5203a5 Insert a sanity hack from Melchior that apparently prevents a NaN from
popping up and crashing when the B-29 model is in use.  This isn't the
right solution; we should fine the NaN condition.  But it's harmless
and allows development with the B-29 to continue.
2005-03-23 18:54:58 +00:00
andy
e4142d94d4 I fixed the gear-ratio handling in the solution computations a while
back, but forgot to put the same fix into the runtime code.  Also
added some comments so I don't get confused again the next time I come
through here. :)
2005-03-22 18:17:08 +00:00
ehofman
50bdf6098a Mathias Fröhlich:
I have done some cleanup where I moved some values out of classes where they
do not belong and such stuff.
Also the fols offsets are now named in the carrier xml file with a more
verbose name (flols-pos/offset-*) than before (only offset-*).
There is a little preparation for definitions of parking positions on the
carrier which should later be used for starting flightgear directly on the
carrier.
2005-03-19 09:57:18 +00:00
curt
ecfaa79b9e Permit a single nasal module to reference any number of files which are all
loaded into that single nasal name space.
2005-03-16 21:36:55 +00:00
curt
ebfaccd95b Add support for "offset" tag ... (value = raw * factor + offset) 2005-03-10 19:06:30 +00:00
curt
2e308fe928 Updated hybrid of original busy-wait frame rate throttling loop combined with
a safe undersleep() to conserve cpu.  Essentially we undersleep our target by
just a bit (to avoid the chance of oversleeping.)  Then we finish off the
remaining time slice with a busy-wait loop.
2005-03-09 21:56:00 +00:00
ehofman
d1168b493a Frederic Bouvier:
Norman Vine wrote :

> Frederic Bouvier writes:
>
>> Quoting Andy Ross:
>>> * Hopefully in a CPU-friendly way.  I know that older versions of
>>>  the NVidia drivers did this by spinning in a polling loop
>>>  inside the driver.  I'm not sure if this has been fixed or not.
>>>
>>> From my experience, the latest non-beta Windows NVidia driver seems to eat CPU
>>
>> even with sync to vblank enabled. The CPU usage is always 100%.
>
> Buried in the PPE sources is a 'hackish' but portable way to limit CPU usage if the desired framerate is met
>
>  /*
>    Frame Rate Limiter.
>
>    This prevents any one 3D window from updating faster than
>    about 60Hz.  This saves a ton of CPU time on fast machines.
>
>    ! I THINK I MUNGED THE VALUE FOR ulMilliSecondSleep() NHV !
>  */
>
>  static ulClock *ck = NULL ;
>
>  if ( frame_rate_limiter )
>  {
>     if ( ck == NULL )
>     {
>       ck = new ulClock ;
>       ck -> update () ;
>     }
>
>     int t_ms = (int) ( ck->getDeltaTime() * 1000.0 ) ; /* Convert to ms */
>
>     if ( t_ms < 16 )
>       ulMilliSecondSleep ( 16 - t_ms ) ;
>  }
>
>

I implemented the method pointed out by Norman. It works great on windows and saves me a lot of CPU cycles. This way, I can get the same framerate in moderately populated areas and have CPU idle 50% of the time instead of wildly looping in the NVidia driver while waiting to sync on vblank.

It has been tested on Linux by Melchior. He saw the same gain in CPU cycles.
2005-03-09 15:12:01 +00:00
ehofman
c1f250fd33 IRIX fixes. 2005-03-08 19:47:51 +00:00
ehofman
811591734e IRIX fix. 2005-03-08 18:05:24 +00:00
curt
fa2a9854a4 Revert last change. 2005-03-03 23:33:29 +00:00
curt
85509fff03 Change fuel selector data type from bool to int. 2005-03-03 23:14:57 +00:00
curt
076aa3b402 Fix a small oops. 2005-03-03 18:25:25 +00:00
curt
61ed285d06 Add support for a simple deadband. 2005-03-03 18:22:48 +00:00
curt
c6c094034c Add support for drawing only a portion of the configured view frustum. This
is one way to get an asymmetric view frustum without needing to compute the
sgFrustum parameters directly.
2005-02-25 22:27:15 +00:00
curt
5accfdeb90 Currently, aspect ratio is computed directly from the window dimensions.
I have added a --aspect-ratio-multiplier=x.xx option to give some end user
control over the aspect ratio.  (This may seem a little strange, but it's a
building block towards the capability of doing asymmetric view frustums in
FlightGear.)
2005-02-25 21:20:17 +00:00
curt
7c43f5c924 Oops, committed some code that should *not* be in the default. 2005-02-25 19:47:40 +00:00
curt
40170cb722 The view frustum is defined in plib apps using calls to ssgSetFOV() and
ssgSetNearFar().  This by default creates a symmetric view frustum which is
typically what an application wants.

However, to get control of the view frustum in order to build support for
asymmetric view frustums, we need to wrap these calls with a bit of our own
logic.

This set of changes wraps all calls to ssgSetFOV() and ssgSetNearFar() with
FGRenderer methods.

I also standardized how the FGRenderer class is handled in globals.[ch]xx.
This led to some cascading changes in a variety of source files.

As I was working my way through the changes, I fixed a few warnings along
the way.
2005-02-25 19:41:53 +00:00
ehofman
7cc58da6a9 Vivian Meazza:
I attach the long-promised improved version of the USS Nimitz.

It includes an improved version of the FLOLS, which requires the attached
diff to be applied to AICarrier.cxx and AICArrier.hxx.

I've made lots of eye-candy in the form or the flightdeck crew.
Unfortunately, it about doubles the size of the tarball. I'll send it to you
later; when I've figured out some way of only loading on request (any advice
would be very welcome).

I could provide a \u2018bare\u2019 version to cut down on the vertex count for
less capable systems however, the count isn\u2019t huge in the first place.
I've cut the textures down as far as I can without losing definition.
2005-02-24 15:05:56 +00:00
ehofman
743379925e update paths. 2005-02-22 18:56:13 +00:00
ehofman
ba13669d32 Add the ability to set the minimum allowed age for metar reports. 2005-02-22 18:12:32 +00:00
ehofman
d871ca845f Cygwin fixes. 2005-02-18 12:40:38 +00:00
ehofman
02a757f9e6 MSVC (warning) fixes. 2005-02-18 10:16:30 +00:00
ehofman
b5bfbcf706 Add the missing carrier files. 2005-02-17 10:37:26 +00:00
ehofman
c2e688244d Mathias Frohlich: Add carrier capabilities for YASim aircraft. 2005-02-17 10:26:14 +00:00
curt
4ec654d043 Add support for aileron and rudder trim. 2005-02-15 18:11:48 +00:00
curt
9d8b687fc5 Add support for aileron and rudder trims. 2005-02-15 18:11:03 +00:00
curt
cdfb43f94d Tweak ... 2005-02-15 18:09:52 +00:00
curt
bf4aa941be Add an "additive-switch" type. 2005-02-15 18:09:20 +00:00
curt
5783208d9d Fix a "signededness" error. 2005-02-15 18:07:06 +00:00
ehofman
5bc15d7a69 Durk Talsma:
I just heard from John Wojnaroski that you and he are going to work on getting
a flightgear demo machine up for the linux expo thursday and Friday. John
indicated that he would very much like to get a CVS version with the new
traffic code up and running before the expo.
2005-02-10 09:01:51 +00:00
daveluff
03f0ac8519 Minor fix 2005-02-02 19:16:51 +00:00
ehofman
a7ee9554e7 Make sure snprintf can be found 2005-02-02 08:47:33 +00:00
curt
ec50bcfb5a Roy Ovesen:
I've added some features to the PID controller:

Ability to set desired sampling interval in seconds. Use <Ts> under <config>
to set the desired sampling interval of the PID controller.

Example:
<config>
     <Ts>0.1</Ts>        <!-- desired sampling interval -->
     <Kp>-0.05</Kp>        <!-- proportional gain -->
     <beta>1.0</beta>    <!-- input value weighing factor -->
     ...
     ...
</config>

Ts defaults to 0.0, so if you don't set it it samples at the highest possible
frequency.


Add an offset to the input variables (input and reference).
Example:
    <reference>
      <prop>/controls/flight/elevator</prop>
      <scale>-1.5</scale>
      <offset>1.0</offset>
    </reference>

Note that <scale> has higher precedence than <offset>, regardless of the order
that they appear in the config file.
2005-02-01 21:00:24 +00:00
ehofman
964349e401 Andrew Midson:
I have made the
'Select Airport from List' option in FlightGear work
(I think) properly. I have some concerns about the
solution, which could be broken by changes to plib (if
they re-use the value I have assigned to
PUCLASS_LIST), but for the moment it seems to work OK.

Erik Hofman:
A request has been sent to John Fay to include the puList
code in the puAux subdirectory of plib so expect some
changes for future version of FlightGear.
2005-01-31 10:36:59 +00:00
ehofman
394fe84351 Put the code at the proper place. 2005-01-29 13:12:34 +00:00
ehofman
9c743fc4c9 Geoff Air:
RE: --aircraft=ufo in system.fgfsrc is ignored

To change a 'feature', one that has been mentioned here many
times, and again recently, place the following code block
into fgInitFGAircraft.

In its favour, I would argue this means FG can be run without
a command line, provided FG_ROOT has been set in the
environment, and that seems to me, as it should be ... ;=))

Perhaps the only counter, is that system.fgfsrc is read twice,
but so are others, like .fgfsrc, for other (local) options ...
or system.fgfsrc should .nt. be used for 'aircraft' ?
2005-01-29 10:22:44 +00:00
ehofman
ded8b8f34e Cosmetic updates. 2005-01-27 10:58:05 +00:00
ehofman
031f062686 Melchior FRANZ:
Here's again one of the more obscure bugs that valgrind complains about: somehow
the STL container classes manage to read out values before they were ever set.
This patch fixes that. This may not cause any harm in this case, but valgrind
seems to *always* be right about them.
2005-01-27 10:49:58 +00:00
andy
671bffe9af Constant-speed props were seeking to engine speed, not prop speed. 2005-01-26 18:30:45 +00:00
ehofman
91cb15d9b0 Martin Spott:
Remove all dependencies of plib's SL sound library.
2005-01-24 10:17:14 +00:00
daveluff
e2a170c7d4 Emergency fix for AI model loading - non existance of the piper model as in the latest base package crashes the program - add exception handler during load. Needs to be replaced with better AI aircraft loading logic at some point 2005-01-21 15:50:29 +00:00
curt
8191d6b00e Fix my contact info. 2005-01-21 01:59:30 +00:00
ehofman
4d8da078a4 Roy Vegard Ovesen:
I guess it is much more efficient to compare integers than comparing long strings like "double-exponential" every frame.
2005-01-20 09:55:47 +00:00
ehofman
33b6694311 Melchior FRANZ:
The following patches to SimGear & FlightGear ...

- create an FGMetar abstraction layer, whose purpose is:
  * provide defaults for unset values
  * interpolate/randomize data (GREATER_THAN)
  * derive additional values (time, age, snow cover)
  * consider minimum identifier (CAVOK, mil. color codes)
- add rain/hail/snow/snowcover support on the METAR side
- add max age of METAR data handling (currently set to
- add support for an external METAR cache proxy server
- add CAVOK handling
- set missing year/month in regular METAR messages
- fix a small bug in metar.cxx (wrong return value)
2005-01-20 09:28:45 +00:00
curt
1ad71dbbe0 Add some formated frequency outputs to aid panel builders. 2005-01-19 02:11:28 +00:00
curt
dd2ea8f77d Throw an exception when no valid scenery path defined. 2005-01-17 22:10:53 +00:00
curt
95e225adf1 Remove unneeded #include's 2005-01-17 13:39:00 +00:00
ehofman
6a6c3a0e9c ... and make sure the number can actually be negative. 2005-01-17 10:48:35 +00:00
ehofman
f88a9aab6a Oops, don't forget that the axisnumber can actually be 0 2005-01-17 10:46:39 +00:00
ehofman
b9c633721f Silently ignore platforms that are not specified within the <number></number> section 2005-01-17 10:39:55 +00:00
ehofman
f488051bd3 Change debug level: try --log-level=debug and you see why (takes very, very, *very* long to output all 21.000 airports that way). 2005-01-15 14:25:58 +00:00
ehofman
38d327ba24 Tie the Scenery loader thread and the real weather fetching thread to CPU1 (if supported). 2005-01-09 10:27:01 +00:00
curt
9f531ff901 A couple minor tweaks to the replay subsystem to allow "pausing" the replay. 2005-01-05 05:45:38 +00:00
curt
632f5993f7 Default KT-70 to serviceable = true. 2005-01-05 04:15:19 +00:00
curt
8512984da5 Add cht (cylinder head temp) and tit (turbine inlet temp) to net_fdm.hxx 2005-01-05 03:43:05 +00:00
curt
e7fa493b0d A quick fix to avoid breaking non-unix-ish platforms. 2005-01-04 22:45:08 +00:00
curt
90e4896fdf Fix a mistake in handling of engine starter property names. 2005-01-03 03:20:31 +00:00
curt
e2875babad Initialize the timer countdown value since this could conceivably start as
any randomly large number (thus preventing the first station seach from
happening at least for a very long time.)
2005-01-03 00:16:16 +00:00
curt
0da1cc6de0 Fix some property names. 2004-12-30 21:49:53 +00:00
curt
66ff2f15d3 Switch from bool to int for more deterministic structure packing. 2004-12-30 20:49:31 +00:00
curt
eef30df0a0 Fix several typos (first time this has been tested since radio/instrumentation
rewrite.)
2004-12-30 20:48:54 +00:00
curt
0b2de7bce0 Remove extraneous property. 2004-12-30 20:48:09 +00:00
curt
8e9f8674a6 Various tweaks to ATC Flight Sim hardware inputs/outputs. 2004-12-30 14:57:58 +00:00
curt
0f8d8bbf05 Add back power button binding, but move the location to /instrumentation/nav
rather than /instrumentation/comm ... we need to be a little careful here
because typically, a single knob controls power to both matched com/nav pairs.
2004-12-30 14:57:12 +00:00
curt
ca80161dcf FGIO::shutdown_all() is called from the FGIO destructor so remove the extra
explicit calls to shutdown_all() which was causing this to be called twice.
This could cause problems with some IO modules (such as attempting to close
an invalid file descriptor the second time.)
2004-12-29 20:40:41 +00:00
curt
3ad6d87576 FGIO::shutdown_all() is called from the FGIO destructor so we don't want
a seperate explicite call or the io channels will be forced to try to shutdown
twice which could cause problems for some IO modules (i.e. attempting to
close an invalid file descriptor the second time ...)
2004-12-29 20:38:17 +00:00
daveluff
7793c32f95 Make sure the ATIS reports surface winds at airports above sea-level 2004-12-27 23:55:54 +00:00
ehofman
a7139a816c Durk Talsma:
Fix a couple of places that were not yet using SGPath
2004-12-27 17:35:22 +00:00
ehofman
499c702ffb Mathias Fröhlich:
We should now be able to find
wires or catapults when the ac3d model is loaded without the crease patch
(caused by the much more unstructured scene graph emitted by the old loader).
It should also emit more warnings if the carrier hardware configuration
includes conflicting definitions.
That code is the most intrusive one, it should not be used until you configure
an aircraft carrier as a aimodel. So I think it should be save to apply that
before the release too.
2004-12-27 13:21:18 +00:00
ehofman
afe94f63ea Remove some stale cout commands. 2004-12-27 13:19:28 +00:00
ehofman
18ff3a6108 Make yasim accept the launchbar and hook properties. They are not tied to anything yet though. 2004-12-27 13:18:29 +00:00
curt
5e81b331e1 David Luff:
Attached is a patched runways.cxx.  This fixes the find runway nearest to a given heading code.  This was returning the last runway loaded at a given airport, not the nearest runway to the heading requested (which seems to always be 270deg by default).  I have no idea how this has survived unnoticed for so long - I think it might be because you need to start at an airport with a runway near to 27 and one much greater than 27 eg. 36 to really tickle it, otherwise the runway nearest to 27 tends to be the final one loaded anyway.  Try starting at KARR with and without the patch and note the surface wind.  This should go in before the release.
2004-12-26 23:31:35 +00:00
curt
4ab7603523 Changes to correspond with ATC hardware code changes. 2004-12-24 02:16:05 +00:00
curt
ec82773222 More work on the ATC FS hardware interface. 2004-12-24 01:23:27 +00:00
curt
222446df29 Replace the data/Airports/basic.dat.gz and data/Airports/runways.dat.gz with
a single apt.dat.gz file which is in the native X-Plane format.

To do this I wrote a front end loader than builds the airport and runway
list.  Some of the changes I needed to make had a cascading effect, so there
are minor naming changes scattered throughout the code.
2004-12-22 23:57:07 +00:00
curt
c362ca795c Updates in preparation for the 0.9.8 release. 2004-12-21 00:16:06 +00:00
ehofman
f541c30e46 gcc 2.95 fix? 2004-12-20 08:36:56 +00:00
ehofman
93e6ebf116 Fix a property path. 2004-12-19 14:32:39 +00:00
ehofman
def25f39d5 gcc 4.0 fixes. 2004-12-18 11:59:33 +00:00
ehofman
127e84cee9 Mathias Fröhlich:
I have a small update which fixes the algorythm used for marking solid
surfaces for some cases where some branch nodes carry the object names I had
expected in the leaf nodes.
That will also introduce the possibility to mark whole subtrees from the
scenegraph solid.
2004-12-18 10:33:36 +00:00
ehofman
800dad8273 Make sound audiable not until after the scenery is loaded. 2004-12-16 13:19:01 +00:00
ehofman
c09d1c92ca Sync. w. JSBSim CVS 2004-12-16 12:47:20 +00:00
ehofman
33a52bdca2 Fix a typo 2004-12-16 08:52:12 +00:00
andy
28f50df1d5 Support for a new "contra" attribute on propellers, which properly
models them as contra-rotating pairs.
2004-12-13 23:48:43 +00:00
ehofman
8214364414 Mathias Fröhlich:
I still work on getting the YASim models see the detailed environment
especially the carrier.

I have *forgotten* to initialize and to destruct the ground cache object!
Oooopppss!
2004-12-08 14:48:06 +00:00
ehofman
ac27ead4a6 Melchior FRANZ:
The attached patch allows to put comments in *.stg files[1]. Lines with
# in the first column (and only there!) are skipped. This has no effect
on overall performance, but has two advantages:

A) possibility to temporarily comment out objects during scenery design,
   (or to put other remarks there);

B) possibility to put marks like "# BEGIN" and "# END" there that allow
   automated merging of local landmarks etc.

--

[1] actually, comments are possible now, too. But they aren't explicitly
    handled and fgfs tries to parse words in "comments" piece by piece. Ugly!

[2] Idea by Chris METZLER, that I make already use of. I have a local
    scenery dir for some tiles with extra objects, such as VOR/DME for
    all of Austria. These are surrounded by "# BEGIN LOCAL" and "# END LOCAL",
    and today I was able to merge the new 0.9.7 scenery with my locally
    changed files.   :-)
2004-12-08 14:45:47 +00:00
ehofman
7a58ef58e7 MSVC fix 2004-12-05 09:34:03 +00:00
curt
75747d3516 A couple more straggling instrumentation clean ups. 2004-12-05 01:04:32 +00:00
curt
c6f0d87a26 A few more radios -> instrumentation name changes thanks to Melchior for
catching these.
2004-12-04 21:06:57 +00:00
curt
a775631226 Create the nodes these modules use if they don't exist already, otherwise
we will segfault when we try to use them later in the routine.
2004-12-03 21:49:21 +00:00
curt
634e79353f Roy Vegard Ovesen:
I've finished the emigration of the radiostack, and I've also removed it
completely. It turned out that the comm radio is completely implemented in
the ATC subsystem. I've changed the affected ATC files to point
to /instrumentation/com, but I guess that the maintainer of the ATC code
should decide wether to make it configureable, and how.

I also had to change some files in Network and Main. The changes in network
should be obvious, but the changes in Main were a bit suspect. The files
included radiostack.hxx, but they weren't directly depending on
radiostack-hxx. They were depending on other files that were included by
radiostack.hxx. I got it to compile, but I'm not sure if I included the
correct directly depending file.

For the data directory I changed every occurrence of /radios/
with /instrumentation/ with this simple one-liner that I found on the net:

find -name '*.xml' -type f | xargs perl -pi -e
's/\/radios\//\/instrumentation\//g'

Instead of me sending all the files that got changed by this I suggest that
you execute the one-liner yourself. Of course I can not guarantee that this
will work perfectly, but I considered hand editing to be not an option (I'm
lazy). I don't want to test every aircraft to see if everything still works,
I think it's better to wait and see if anyone complaints about broken nav
radios/instruments.
2004-12-03 21:21:16 +00:00
ehofman
8ba9f4e3a4 Vivian Meazza:
This is a sub-system which can be added to any carrier.

These files add a functioning Fresnel Lens Optical Landing System (FLOLS).
The orange/red 'source' lights are illuminated according to the position of
the pilot's eye above/below the 3.5 deg glide slope. The apparent position
of the source light relative to the fixed green datum lights allow the pilot
to 'fly the meatball'. The green 'cut' lights flash when the pilot's eye is
below the coverage of the lowest (red) source light.

TODO - add rules for the operation of the wave-off lights.
2004-11-30 12:34:11 +00:00
ehofman
fee003e8cc Melchior FRANZ:
I understand that the new hud/runway feature is still very experimental,
and that the search criteria for the active runway don't necessarily make
much sense. (We are searching for a runway on /sim/presets/airport-id
that matches the current wind direction best, and not the tuned in ILS
runway or something!)

Anyway: the new hud code completely denies the possibility of
globals->get_runways()->search() not finding a runway and returning false.
There's always a runway found at KSFO, but not so at e.g. LOXL, in which
case we are handing garbage over to sg_geodesy.cxx and find ourselves
caught in an endless loop in geo_direct_wgs_84().
2004-11-30 12:14:17 +00:00
ehofman
c537267f96 Durk Talsma:
Okay, here's the latest update to the tarffic manager/AI Manager. AITraffic
can now fly multiple routes and be initialized while sitting statically at
airports.
2004-11-29 09:41:43 +00:00
david
ffafb573b2 Patch from Robert Swam to block enabling stencil at 16 bpp for glut
(allowing FlightGear to work at 16 bpp again for glut users).
2004-11-29 03:17:19 +00:00
ehofman
63c1f4b613 Mathias Fröhlich:
This patch makes the aircraft carrier's hardware  appear in the scenegraph.
2004-11-26 10:24:48 +00:00
curt
91ae7ce82a Add a *really* crude model of ITT, Oil Temp, and Oil Pressure. This
currently just returns a lagged normalized value in the range of 0-1 that
is proportional to N1.  It's up to the engine gauge to scale to the right
range.  This is for lack of a real model of these items so we can have
something to drive the engine gauges.
2004-11-23 21:35:30 +00:00
ehofman
7159e318e1 Mathias Fröhlich:
I have now split out the ground cache functions into src/FDM/groundcache.[ch]xx
Attached are the two files and the patch to integrate that cache into
FGInterface.

The code is nowhere used at the moment, the fdm's need to be updated to use
that ground cache. The JSBSim-dropin.tar.gz from Martins ftp server does this
for example.

The carrier's scenegraph is not yet processed to be visible for ground
intersection testing. So the only benefit up to now is that the api is set
up. Using this I can put the changes to make JSBSim work with that into
JSBSim's cvs. Also I aim to provide Andy a patch to make use of that with
YASim.
2004-11-22 10:10:33 +00:00
curt
16ca655c03 More FreeBSD fixes ... add -lusbhid where needed. 2004-11-21 03:15:19 +00:00
ehofman
4de23ad628 Melchior FRANZ:
Use a suggested exit method as described in the SDL_Quit man page. (fgOSExit() is still uncalled in both fg_os.cxx (glut) and fg_os_sdl.cxx, which makes these functions kind-of useless.) The other changes are fixes for gcc 3.3.4 warnings.
2004-11-20 13:04:26 +00:00
ehofman
b859e77072 MacOS X fix. 2004-11-20 12:47:42 +00:00
ehofman
337d0d1be6 Add some missing bits from Mathias' carrier code. 2004-11-20 12:44:42 +00:00
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