1
0
Fork 0
Commit graph

5825 commits

Author SHA1 Message Date
mfranz
030035a32a include cstring for memset() (necessary for gcc 4.3.*; backported
from JSBSim/cvs)
2008-07-15 13:08:03 +00:00
fredb
dce2d5d7cd MSVC doesn't have a round function 2008-07-14 09:48:09 +00:00
durk
cf2bd4003c Removal of depricated version of Airports/trafficcontrol.[ch]xx
(See src/ATC for it's new location)
2008-07-13 12:57:06 +00:00
durk
17c42deae1 Initial attempt to establish a better integration between AI and ATC code.
Various other patches that have been lingering around for a while:
 * Moved trafficcontrol.[ch]xx from the Airports directory to ATC, where
   it really belongs.
 * AI aircraft will request startup clearance, and ground control will
   approve.
 * Starting AI Aircraft will be pushed back to a predefined holding point
   on the ground network, and wait a while before taxiing out to the runway
2008-07-13 12:51:06 +00:00
mfranz
44fdf77601 "load"/"save" flight: enforce ".sav" extension 2008-07-11 20:55:43 +00:00
mfranz
76a13e689d use same path validation process for fgcommands "load", "save",
"loadxml", ans "savexml" as is used for io.open(). This is still
Nasal based for now. See $FG_ROOT/Nasal/io.nas.
2008-07-11 16:36:54 +00:00
ehofman
ce7f695ea2 add a reference for memset() 2008-07-11 14:11:54 +00:00
ehofman
f7f17a4744 Update to the latest version of JSBSim which supports Lighter Than Air craft
(like Airships) and external forces.
2008-07-10 17:23:02 +00:00
mfranz
c9dccf4841 return attribute mask as unsigned 2008-07-10 11:36:10 +00:00
mfranz
f08d1bf5b4 let n.getAttribute("last") return SGPropertyNode::LAST_USED_ATTRIBUTE
(this is the same constant value for all properties)
2008-07-10 10:58:06 +00:00
mfranz
1ace68e836 don't run the help browser from a property that a user could have
changed to something evil, but rather make sure that the browser
string can be trusted. (TODO: change system() to vfork()/execvp() ?)
2008-07-09 19:35:53 +00:00
mfranz
1b062a1cf0 let the --prop: option overwrite write-protected properties
("The user is always right, but not always bright.")
2008-07-09 15:09:23 +00:00
mfranz
0ae36e3979 remove depreciated and unused src/GUI/trackball.* 2008-07-09 12:44:32 +00:00
mfranz
b8d62d212c remove depreciated and unused src/GUI/trackball.* 2008-07-09 12:37:54 +00:00
mfranz
9f571a0f00 remove depreciated gui_local.[ch]xx:
- drop unused parts (MouseQuat/GuiQuat)
- move "old-reinit-dialog" fgcommand to fg_command.cxx under new name
  "reset" for now. (May later get merged with fgcommand "reinit".)
- move reInit() to fg_init.cxx: This was used by Shift-Esc and
  Menu->File-Reset (via fgcommand "old-reinit-dialog"). We have already
  a similar function fgReInitSubsystems() in fg_init.cxx, so these two
  functions will probably get merged later.)
2008-07-09 12:22:33 +00:00
mfranz
de527e3891 rename attributes write/read to writable/readable (The original names
where chosen to match the SGPropertyNode::WRITE/READ symbol names and
should make it more consistent, but this isn't really something that
should be exposed to the Nasal developer.)
2008-07-07 10:23:24 +00:00
mfranz
ecd5521bf8 - remove unused puObject args in gui fgcommands
- remove no longer used PU macros
2008-06-23 18:28:02 +00:00
mfranz
889f3926f2 - make sure /sim/fg-current can't get preset and write protected, so
it's reliable at Nasal init time.
- make sure the cwd buffer is terminated
2008-06-22 11:29:32 +00:00
mfranz
dec96cfa45 while abort() is really only useful for listeners (in all other cases
we know the stack trace), it's better to use a separate function for
it, as this can be used conditionally, as in:

  setlistener("/the/property", func(n) {
      if (n.getValue() < 0) # who's writing negative numbers to /the/property?!
          abort();          # let's check the backtrace ...
  });
2008-06-19 17:18:42 +00:00
mfranz
37559fee21 make fgfs abort() after a listener with runtime arg == -1 was triggered
and its function called. This is useful for debugging purposes, to get
a core dump which unveils which C++ code was writing to the property.
This isn't any more of a security problem as other Nasal code that
makes fgfs crash, such as:  var x = func call(x); x();  The difference
is that the listener doesn't use up all memory before and is much quicker.
2008-06-19 10:39:12 +00:00
mfranz
88839f0b7a set_fg_root: prevent circumvention of the Nasal security code through
pre-setting and write-protecting /sim/fg-root in *-set.xml files
2008-06-16 07:46:55 +00:00
mfranz
afc5225272 - allow users to set fg-home dir via FG_HOME environment variable, but
- don't allow to do that from any XML file. This is to prevent malign
  code from writing a new fg-home in ~/.fgfs/autosave.xml or other files
  in ~/.fgfs/.
2008-06-13 10:52:47 +00:00
timoore
a9319336ba From Benoit Laniel: replace SG threading constructs with OpenThreads 2008-06-12 08:24:39 +00:00
mfranz
0317d992b9 cosmetic changes *only*:
- fix mixed tab/space indentation (replace all tabs by 8 spaces)
- remove trailing spaces
- rename one local variable (ttt -> pwd)
2008-06-11 18:02:19 +00:00
mfranz
5cb6e43767 Anders GIDENSTAM: catch all exceptions to avoid aborting fgfs after
commands like "ls .."
2008-06-11 17:16:50 +00:00
timoore
876bd2055c Don't add guiCamera, which is now a slave, to the scene graph. 2008-06-08 20:50:30 +00:00
fredb
7c8c8ff381 FGFontCache::initializeFonts() now portable across platform through the use of plib 2008-06-07 08:10:46 +00:00
timoore
bfc1967529 Revert most iostream-related changes to JSBSim
So many files in JSBSim use cout that it is not productive to remove
iostream from header files.
2008-06-06 21:21:57 +00:00
timoore
18bece731a Fix GUI and HUD text rendering problems.
After the changes that moved the GUI and HUD to a slave camera, the
texture-based fonts wouldn't display. The main fixes here are making
sure that the TXF textures are all loaded into the font cache early,
and explicitly setting the active texture unit in the GUI / HUD
drawImplementation.
2008-06-06 19:02:17 +00:00
mfranz
b27f73f4f4 make route manager input case insensitive 2008-06-06 07:49:41 +00:00
mfranz
c9d2243960 Anders GIDENSTAM: "only override the receive port when it isn't set already" 2008-06-03 15:57:33 +00:00
mfranz
9fc99b10e2 Fred BOUVIER & Stuart BUCHANAN: make search function case-insensitive
mf: add leading space to allow search for word boundaries (" wat")
2008-06-03 10:25:58 +00:00
timoore
5d5b1f3ca4 One more try at the osg 2.5.1 pager fix 2008-06-03 07:32:03 +00:00
timoore
97d86e10f7 Fix typo in DatabasePager interface changes for OSG 2.4 2008-06-03 05:36:19 +00:00
timoore
8d1c97d94b Changes for new DatabasePager interface in OSG 2.5.1 2008-06-02 21:10:13 +00:00
timoore
32e9505eed Clean up header file use of iostream and "using" declarations
Replace include <iostream> with istream, ostream and/or iosfwd as
appropriate.

Remove using namespace std and using std::foo from header files.
2008-06-02 21:09:51 +00:00
timoore
fe1dd9474e iostream cleanup wip 2008-06-02 21:09:10 +00:00
timoore
a251fd35cb Include <iostream> and using declarations as needed.
SimGear no longer includes iostream and avoids using declarations in
header files, so various fixups are needed.
2008-06-02 21:07:35 +00:00
mfranz
eb2a167331 attach listener after setting the default values (of course :-) 2008-06-02 11:44:02 +00:00
mfranz
47b9da740b - export font properties to the property tree again
- don't keep oodles of class member variables public (eek!)
- use ::hasValue() instead of ::getType() != SGPropertyNode::NONE
- consistency fixes and cosmetics
2008-06-02 09:32:37 +00:00
mfranz
4b245467c7 change default font values 2008-06-01 18:16:35 +00:00
mfranz
e0aeda5a51 Csaba HALASZ & Syd ADAMS: make radar font configurable
mf: move font color parts to the font listener
2008-06-01 18:08:01 +00:00
fredb
68124ca36d Remove unused variables 2008-06-01 14:59:20 +00:00
fredb
af879b8310 Fix Traffic Manager XML parser 2008-06-01 11:56:32 +00:00
frohlich
61dc8df110 Implement rotation offsets for cameras. 2008-05-26 20:34:26 +00:00
fredb
cc8c65a6ee puInitialize returns nothing. 2008-05-20 06:35:37 +00:00
timoore
580ebf637b Clean up OSG camera setup and interface to plib PUI
Switch to defining PU_USE_NONE and providing our own callback
functions to pui for "get window" and "get window size." A new
WindowSystemAdapter class assigns ID numbers to windows for the
purpose of identifying them to plib; the window size can be extracted
from the osg::GraphicsContext class in all the different
implementations (osgViewer, glut, sdl).

Implement a GraphicsContextOperation that runs code in a particular
graphics context, perhaps in another thread, and provides an
isFinished() method to test if the operation has finished. This allows
us to initialize plib PUI properly if there are multiple graphics
contexts without using fgMakeCurrent(). fgMakeCurrent() can't work in
multi-threaded OSG configurations.

Eliminate fgMakeCurrent() and all its uses, either by using
GraphicsContextOperation or by seeing that it is not necessary.

Attach the GUI camera as a slave camera.

Don't manipulate the OSG state in the drawImplementation() functions
for SGHUDAndPanelDrawable and SGPuDrawable; it's not needed.
2008-05-19 21:21:03 +00:00
mfranz
c92dcc6b24 - use fireValueChanged() instead of setBoolValue(true) (micro-optimization :-)
- comment out rather pointless FDM status message
2008-05-18 21:13:25 +00:00
mfranz
6fb7b8ead9 noise-- 2008-05-18 21:05:11 +00:00
timoore
4dea9807f6 fg: move most scenery-related code to simgear
From Till Busch.
2008-05-14 22:10:07 +00:00
fredb
87b6632ba6 Rename FontStatus enum labels because ERROR is already a macro under Windows 2008-05-14 09:51:11 +00:00
durk
ee405fbdd0 Make sure that the compiler knows about the new location of the ATC code. 2008-05-12 14:58:43 +00:00
durk
4e24fba0d5 Merging David Luff's AI/ATC code with AIModels. Part 1:
- Move Dave's original code to a new directory (ATCDCL) so we can recycle
    the original ATC directory for generic ATC functions.
2008-05-12 10:38:04 +00:00
durk
aacebaf4b8 Merging David Luff's AI/ATC code with AIModels. Part 1:
- Move Dave's original code to a new directory (ATCDCL) so we can recycle
    the original ATC directory for generic ATC functions.
2008-05-12 10:07:41 +00:00
mfranz
a6a78b7185 - rename fgcommand "set-mouse" to "set-cursor"
- write new {x,y} coords to /devices/status/mice/mouse/{x,y}, so that
  they are immediately available
2008-05-08 10:07:51 +00:00
durk
0e59cf4a08 - Add some DEBUG level log messages to help users in getting traffic files
to work.
 - Add the possibility to load only proportion of traffic in order to
   reduce some of the workload, in case of a slower computer.
2008-05-08 06:11:43 +00:00
mfranz
60dc921a80 add fgcommand "set-mouse", which sets mouse coordinates and cursor type 2008-05-07 21:49:35 +00:00
timoore
6cd9794b0c Add a subclass of fntTexFont that defers font loading
Loading is deferred until the first render so that it has a chance of
happening in the proper graphics context.
2008-05-06 21:31:01 +00:00
mfranz
ff06e015c9 read runway start offset from /sim/airport/runways/start-offset-m
(Defaults to 5.0, which was hard-coded before. /sim/airport/runways/
does already exist and contains the runway search parameters.)
2008-05-02 21:31:30 +00:00
mfranz
ad2788bf74 add unit suffixes -nm and -deg to /sim/presets/offset-{distance,azimuth} 2008-05-01 21:14:02 +00:00
mfranz
1454c1e4cc cleanup after last commit 2008-04-29 15:35:09 +00:00
mfranz
2ece66aded - improve comments (contents and spelling)
- fix bad indentation (mixed 2/4 spaces or tabs/spaces)
2008-04-29 14:49:44 +00:00
mfranz
3842fa0edc Csaba "Jester" HALASZ:
Attached patch adds support for multiple FIXes with the same name.
Applies to both branches.
New functionality is in query_and_offset, which now returns the FIX
closest to the passed in location.
Updated route manager to take advantage of this.

Otherwise, query functions return an unspecified member from the set
of identically named FIXes. (This was previously the one occurring
last in the database file, but I don't think anybody counted on that.)
2008-04-28 11:26:02 +00:00
mfranz
3fa32b1fcc remove sgVec3Slider.hxx use 2008-04-27 18:07:38 +00:00
mfranz
907b9a7240 remove obsolete constants for hardcoded pui dialogs (after sgVec3Slider removal) 2008-04-27 18:00:21 +00:00
mfranz
8904a17277 move sgVec3Slider dialog to the Attic/:
- it's unused
- it's hardcoded (we already got rid of all other hardcoded dialogs)
- we'll have to consider switching to osgWidget, which is planned to
  get imported into osg. It's unlikely that we add *more* of PLIB
  in the meantime.
2008-04-27 17:56:05 +00:00
mfranz
586bfe0aea move constants here so that the file is complete in the Attic/ 2008-04-27 17:50:44 +00:00
mfranz
881274b1fd remove sgVec3Slider.cxx sgVec3Slider.hxx altogether. Files will follow. 2008-04-27 17:44:14 +00:00
mfranz
17adffc5f9 comment out currently unused symbols (gui_msg_OK etc.) 2008-04-27 16:18:23 +00:00
mfranz
f134a708df comment out unused widget. Needs to be reviewed and either actually
used or removed
2008-04-27 16:16:45 +00:00
mfranz
c8f2013c77 Nicolas: make screenshot target dir configurable (idea and first draft)
--prop:sim/paths/screenshot-dir=/tmp
2008-04-26 22:34:46 +00:00
mfranz
8f509ba82a restore NumPad translation 2008-04-26 17:01:08 +00:00
mfranz
4c5d7bb0f9 - export modifier bitmask
- consider negative keys returned from an event handler as invalid
  (was 0 before)
- warning--
2008-04-26 13:25:08 +00:00
mfranz
160e246a0c add hyper support 2008-04-25 23:21:47 +00:00
mfranz
dd3fbd50d8 after OSG 2.4 upgrade, remove modifier workaround and comment out numpad
workaround (we have yet to verify if the latter is really obsolete)
2008-04-25 22:45:43 +00:00
timoore
de277df8b8 make --enable-osgviewer the default
From Till Busch
2008-04-25 21:29:03 +00:00
mfranz
a04d4cbed6 Till BUSCH:
"the [...] patch (for fg) increases the time before invisible geometry (i.e.
geometry not inside the view frustrum) gets deleted. default was 10 seconds
which i am increasing to 2 minutes."
2008-04-25 08:43:59 +00:00
mfranz
5588acbd42 - make online stats mode directly settable, rather than just in steps
- cosmetics: put each argument list member in a separate line, so that
  one doesn't have to break lines again whenever one inserts a new
  member
2008-04-21 14:18:30 +00:00
mfranz
b61cc37e30 - let the OSG on-screen-statistics function no longer be hard-coded
on the '*'-key, but allow to cycle it by setting
  /sim/rendering/on-screen-statistics to "true"
- move that function to the Debug menu (no more key assigned!)
- add "print-statistics" menu entry
2008-04-20 18:24:52 +00:00
durk
9416c13477 Small patch that prevents displaying a "local echo" of one's own aircraft
under some circumstances. The history of this patch is somewhat unclear,
but was brought to my attention by Martin Spott, while preparing for the
Lelystad FSWeekend show. See also my posting on FlightGear devel, on
November 22, 2007 "(Multiplayer Local Echo Patch)", but wasn't committed
then because I/we assumed that had been superseded by other code
modifications. The local echo problem still persists, however, albeit
under specific circumstances. The current patch reportedly prevents this
from happening.
2008-04-19 10:42:06 +00:00
durk
8055c315ac Torsten Dreyer: Check whether a valid graphic context has been created
before using a camera.
2008-04-19 10:28:07 +00:00
timoore
ebf2e996e9 Fixes for compiling with gcc 4.3
Include standard header files and qualify with std:: where needed.

Qualify various char parameters and variables with const.
2008-04-13 21:12:36 +00:00
durk
3bc15df56b Syd Adams: Enable bank limit controls with the autopilot. 2008-04-06 06:49:36 +00:00
durk
7783e64953 Some tweaks and finetuning made possible by the multihreaded modelloader
and the pushback code:
 - Traffic manager starts modelload requests immediately upon program
   loading
 - Only create legs 1 (push back) or five (cruise) of AI traffic.
 - AIAircraft's rather obsessive behavior to circle around a waypoint is
   largely resolved
 - More realistic ground steering for AI aircraft.
2008-04-02 19:01:48 +00:00
durk
78aaa1ce7a Forward port from CVS/PLIB: Use a more memory allocation efficient replay
system.
2008-04-02 18:55:39 +00:00
timoore
d28b509e5f autopilot filter deque fixes
Thanks to Vivian Meazza for debugging this. The output deque for
FGDigitalFilter was not being kept long enough for the
doubleExponential filter. Reads from output[1] could cause a crash.
2008-03-24 22:46:47 +00:00
fredb
34e435429c Win32 fix 2008-03-22 12:18:53 +00:00
timoore
fd492a297a model paging patch from Till Busch
From Till:
i started the project at the end of february with a simple idea: move all
3d-model loading to the DatabasePager-thread. my first attempts looked
promising, though they were a little too optimistic (or naive?). the patch
has evolved a lot since.

currently it does the following things:
1. revive SGModelLib, move functions for xml-model-loading there

2. replace all calls to sgLoad3dModel with calls to either
SGModelLib::loadModel() or SGModelLib::loadPagedModel()
almost all models will be loaded by the DatabasePager. the few exceptions are:
your own plane, shared models in scenery, random objects, AIBallistic models.

3. simplify mode-loading functions (avoid passing around fg_root)

4. avoid supurious MatrixTransform nodes in loaded models

5. fix some memory leaks
2008-03-22 09:31:06 +00:00
timoore
662ea715e8 For the agRadar, initialize property nodes with defaults.
Introduce a convenience member function in wxRadarBg for creating an
SGPropertyNode and initializing it in one step. Use this in
agRadar. This eliminates buggy behavior when the necessary radar
properties aren't defined.
2008-03-22 09:19:21 +00:00
timoore
7800918499 Small cleanup of terrain radar 2008-03-17 08:47:31 +00:00
timoore
c2040f30a2 ground radar from Vivian Mezza 2008-03-17 08:47:16 +00:00
mfranz
d03e63a059 remove debug message :-) 2008-03-15 12:52:22 +00:00
mfranz
fa30b79576 add --version option that works something like this:
$ fgfs --version
  2.0pre-20080314
  FG_ROOT=/usr/local/share/FlightGear
  FG_HOME=/home/foo/.fgfs

... assuming that VERSION in config.h is "2.0pre-20080314". Which it isn't.
Instead it's "1.0.0" since yesterday, and was "0.9.10" before that. This
has yet to be discussed, and I'll add the option to options.xml later.
2008-03-15 12:10:44 +00:00
mfranz
e5c22e159f Tatsuhiro NISHIOKA: "enables osgviewer version of FlightGear to show
window frame, menubar, and Docks properly" (Mac OSX)
2008-03-12 12:38:54 +00:00
mfranz
2100394117 - require plib 1.8.5
- switch puList to puaList
- drop src/GUI/puList.[ch]xx
- remove #ifdefs, FIXMEs, and workarounds that have accumulated over time
- warnings--
2008-03-11 15:58:57 +00:00
mfranz
f375f649c1 remove redundant --airport-id option (OK'ed by Curt, no longer used by fgrun) 2008-03-10 17:08:37 +00:00
fredb
278ab25f21 Win32 fix 2008-03-09 22:09:17 +00:00
timoore
b8de58bcdd cleanup of precipitation contribution
Reindent to Stroustrup style.

Make FGPrecipitationMgr an SGSubsystem and remove all references to it
in main.cxx and renderer.cxx.

Use SGGeod::makeZUpFrame instead of a private function in
tileentry.cxx. Rewrite that function, WorldCoordinate, to use
makeZUpFrame too.
2008-03-04 09:03:54 +00:00
timoore
eb26cb3590 precipitation effects from Nicolas Vivien 2008-03-04 09:02:24 +00:00
mfranz
24277bf0c0 add /sim/model/livery/file for internal use in the aircraft.livery class;
This is meant to contain the basename of a livery file in the livery dir.
2008-02-29 16:13:02 +00:00
fredb
482f1db990 Csaba Halsz :
Makes it possible to start at a parking location defined in the AI/Airports/*/parking.xml files, using the parkpos command line option.
Note that the name to pass is the concatenation of the "name" and "number" fields in the xml.
2008-02-28 21:39:25 +00:00
mfranz
366178f801 Change update order to event manager -> view manager -> io manager.
This allows Nasal managed views thanks to the proximity of the
event manager (which executes Nasal loops). The io manager must
come after the view manager to avoid jitter in network replay.
2008-02-25 12:59:24 +00:00
mfranz
e5b5f7c2b1 upgrade important log messages 2008-02-23 23:58:19 +00:00
mfranz
0bca82cb6c revert revisions 1.246 to 1.248. This fixes the jitter for chase
view in network replay, and re-introduces jitter in some (rare)
cases of Nasal managed views.
2008-02-23 09:45:56 +00:00
timoore
72a42c2240 Cleaned up comments to tile entry code 2008-02-21 22:50:05 +00:00
curt
c3ee389fe0 Till Busch:
As discussed with Tim on irc: Here is a quick fix for the memory-hungry tile
manager. Due to bugs in FGNewCache, old tiles were never deleted.

I left the timestamp-updates in the cull-traversal. but imho things work
just as well when timestamps are updated in FGNewCache::insert_tile() and
FGNewCache::get_tile()
2008-02-21 21:36:20 +00:00
mfranz
7d5c5e4aaf Roy Vegard OVESEN & Lee ELLIOT:
Lee has added two new filter types, "gain" and "reciprocal". These filters can
read their gain factor from a property. In the process we also added minimum
and maximum output clamps that are applicable to all filters.

I added the ability to configure adaptive controllers i.e. the controller gain
can be tied to a property, so that it can be changed at runtime. This
requires a change in the xml structure of the autopilot configuration file:

<Kp>
  <prop>/autopilot/KAP140/settings/ROL/Kp</prop>
  <value>0.10</value>
</Kp>        <!-- proportional gain -->

The old method <Kp>0.10</Kp> still works so as to not break all existing
autopilots, but it will output a warning to use the new method.
2008-02-17 09:44:03 +00:00
mfranz
b99a5465b0 Csaba HALASZ: implement conditional (e.g. seasonal) texture loading at startup 2008-02-15 17:54:23 +00:00
timoore
79e251383b Wingman code from Vivian Meazza 2008-02-15 11:06:27 +00:00
timoore
bb90bb4466 Call particle initialization code in simgear namespace 2008-02-15 06:45:38 +00:00
timoore
113be9d8be particles from Tiago_G 2008-02-15 06:45:19 +00:00
timoore
f6723429a0 Toggle tree effect on /sim/rendering/random-vegetation property 2008-02-07 23:02:51 +00:00
mfranz
5253a271c7 The Concorde Maintainer:
- replace hardcoded name "inst-vertical-speed-indicator" by the one from
  the instrumentation config

mf: some indentation fixes, remove redundant block
2008-02-07 20:41:00 +00:00
mfranz
fa5c059295 any wind < 1kt is "calm", not just 0.0 2008-02-07 16:42:32 +00:00
durk
ecc6548d71 cygwin related fixes, and some minor future release related maintenance
work.
2008-02-04 20:03:52 +00:00
curt
15cd4284fb Roy Ovesen:
Please find attatched a new version of xmlauto.cxx.

Remove the call to build() in reinit(). This prevents build() from being
called twice when Reload Autopilot is selected from the Debug menu.

I've also added the ability to define an enabled property for the filters.
It's used like the PID controllers. If there is no enabled tag then the
filter defaults to enabled so that nothing should get broken by this change.

This ability can be used to create a filter between the output of a PID
controller and the property that it controls (a control surface). By putting
a noise spike filter between the output of a controller and the control
surface that it controls, we can simulate the limited movement rate that is
inherent in autopilot servos.
2008-02-04 20:01:20 +00:00
andy
e00b796b3c Maik: remove tow end force smoothing. 2008-02-01 19:56:51 +00:00
mfranz
7bfade1a3a Daniyar ATADJANOV:
This patch contains bugfixes from my previous patch
 (i made mistakes when using "diff" utility last time):

    1. Now ATC do not tells us to go around because of
       traffic on RWy, when that traffic is WE.
    2. Now ATC don't say that we must follow ourself
       (like "GFS, number two, follow GFS on final").

And new Tower-ATC features:

    1. Requesting departure clearance. When you are
       on taxiway, you can request departure clearance.
       Tower will answer with something like:
       "Line up runway two eight right".

       TODO: check if any AI-Planes on final and tell
       something like: "After the landing AI-CALLSIGN
       line up runway two eight right".

    2. Requesting take-off clearance. If you are on
       runway, you can tell to ATC that you are ready
       for take-off. So, Tower will tell you that you
       are cleared for take-off (or immediate take-off).

    3. Reporting landing gear position on final by pilot.
       If you are on aircraft, which landing gear can
       be UP, when reporting final you will tell
       "Gear down, ready to land".

    4. Reporting landing gear position on final by ATC.
       When i was newbie and was flying on Cessna 310, i
       ALWAYS forgot landing gears on final. Now if you are on
       final and forgot landing gear, Tower will tell you:
       "LANDING GEAR APPEARS UP" or "Check wheels down and
       locked". So you will have some time to push gear
       down or execute missed approach ;)

    5. ATIS phonetic ID in requesting landing message.
       In FG pilots says: "for full stop with ATIS" everytime
       (when airport doesn't have ATIS too). But in real life
       pilot saying phonetic ID of ATIS message. Now we have:
       "for full stop, information alpha ... / ... zulu".
       If airport doesn't have ATIS, pilot don't say this.

       TODO: add this feature to AI-Planes too.

     6. Advising weather condition in airport by Tower.
        If you are requesting take-off or landing in airport
        that doesn't have ATIS service, Tower will tell you
        about wind direction and speed, visibility and QFE.

     7. Reporting downwind if missed approach. When some AI-Plane
        is on final FG's ATC tell you to "continue approach".
        And then you lost radio transmission. Now ATC says:
        "continue approach and report left/right downwind".
        And now we have "Report Downwind" entry (button)
        in "ATC Communication" form.
2008-01-31 22:33:32 +00:00
curt
4fa75196ce Clear chat messages when an aircraft becomes inactive in the property tree. 2008-01-29 15:02:47 +00:00
mfranz
380c9f90c4 set MAX_ENGINES=12 (10 aren't enough for the DO-X) 2008-01-26 14:02:53 +00:00
fredb
fc55979c34 near and far are #defined in MSVC 2008-01-26 07:48:05 +00:00
timoore
b47157041e Fix main window aspect ratios other than 4/3
This also fixes distortion weirdness in the osgviewer version. That
was caused by osg::GraphicsContext getting in the act on resize events
and adding its own scaling to the projectionOffset of slave cameras!
2008-01-25 18:44:45 +00:00
timoore
00f8463ab4 Another round of memory leak fixes from Till Busch 2008-01-24 23:05:58 +00:00
mfranz
f754d42fcf remove last traces of PSL 2008-01-23 13:03:50 +00:00
andy
ae66636ac5 Fix leak in interpolate(). Also give property nodes a name so they
look better in debug output
2008-01-22 20:09:02 +00:00
curt
98d940a790 Packet should be formated in network byte order. 2008-01-21 19:11:32 +00:00
timoore
1b439f8501 Memory leak fixes from Till Busch 2008-01-19 18:06:05 +00:00
timoore
fde0f8eb3c segfault in fg_fx.cxx fix
Check for null fx node, submitted by Tiago Gusmão.
2008-01-17 08:28:43 +00:00
fredb
63f471e394 Josh Babcock:
I got tired of watching all those http requests scroll over the screen, so I made them SG_LOG( SG_IO, SG_INFO, );

FB: adapt a bit
2008-01-12 17:13:57 +00:00
timoore
50461db267 Add checks to avoid writing NaNs into the scene graph transforms 2008-01-10 08:22:48 +00:00
andy
2679517fff OS X build fixes from Hans Fugal 2008-01-09 19:59:56 +00:00
timoore
1066c6b23a cleanup of dead code and change ViewPartitionNode::makeNewProjMat be public static 2008-01-06 23:03:19 +00:00
timoore
b2b35568d7 Ballistics underslung load changes from Vivian Meazza 2008-01-04 22:31:18 +00:00
timoore
4208cf8226 Add ViewPartionNode to the scenegraph
ViewPartitionNode addresses Z-fighting issues by rendering near and far
parts of the scene seperately.
2008-01-04 07:35:43 +00:00
curt
9f9d2f934a Return the --fov= to it's original functionality. 2007-12-29 21:51:39 +00:00
timoore
7aee6b0a60 Ballistics fix from Vivian Meazza 2007-12-28 22:05:14 +00:00
frohlich
e81af16b75 Modified Files:
src/Main/renderer.cxx: Use osg::Hint instead of glHint.
2007-12-26 20:33:55 +00:00
frohlich
b69ec6fceb Modified Files:
fg_os_osgviewer.cxx: Use the DISPLAY environment variable
	if not set otherwise.
2007-12-26 12:19:20 +00:00
timoore
d5ba35dddb Remove references to SceneView and CameraView 2007-12-22 23:26:56 +00:00
timoore
9ecc3415fb Experimental patch for applying force to ballistic objects
From Vivian Meazza
2007-12-21 23:37:05 +00:00
mfranz
4ac892c23e s/no-warning/depreciated/, so people adding that to custom huds understand
better what they are doing  :-)
2007-12-21 12:03:10 +00:00
mfranz
57f4876c59 depreciation warning for users of old custom HUDs 2007-12-21 11:39:51 +00:00
fredb
bcebdaa053 Fix tabs and spaces. No overflow risk here 2007-12-21 07:52:26 +00:00
timoore
853e371d1e Fix for "falling through ground" problem
The LOD far range on the tile entry scenegraph node was initialized to
0. This meant that any traverals of active children that happened
before the tile manager updated the node would ignore the node
altogether. Among these is the groundcache traversal which was failing
at startup even though scenery was loaded.

Also added a function to dump scene graph nodes to files; very handy
in gdb.
2007-12-20 23:20:51 +00:00
timoore
f105f47e91 Added copyright to SceneryPager. Removed FGTileLoader 2007-12-15 06:01:24 +00:00
timoore
7ca1a60e91 Check if request has already been satisfied 2007-12-14 22:52:57 +00:00
timoore
7cb5fd170a schedule tiles in Inited state if we get a valid bucket 2007-12-14 22:52:31 +00:00
timoore
17b321c44f Set up pager in GLUT embedded osgViewer 2007-12-14 22:52:15 +00:00
timoore
616b2bf4f6 Use the OSG DatabasePager instead of FGTileLoader
Make an OSG file reader for .stg files.

New class flightgear::SceneryPager, which is a subclass
osg::DatabasePager to handle explicit delete requests.

Modify FGNewCache, FGTileEntry, and FGTileManager to use
SceneryPager. Mostly this involved removing the queues that talked to
FGTileLoader.

Calculate accurate tile timestamps from the time they are traversed in
the cull stage (which means that they are visible) instead of updating
them periodically.

Replace tile entry transform and range node with one LOD node
2007-12-14 22:51:56 +00:00
timoore
149419386d Update GroundLightManager
Also use GroundLightManager to manage light node masks.
2007-12-13 23:30:54 +00:00
timoore
3b26a3219c Fix mouse warping for embedded osgviewer in SDL
As in the GLUT implementation, let the FGManipulator drain its event queue.
2007-12-12 22:36:23 +00:00
timoore
1ec9d615ff Handle warped pointer in embedded GLUT osgViewer
Signal the FGManipulator that a warp has occured so that it can drain its
event queue, but otherwise no warp handling is done in GLUT specific code.
2007-12-12 08:24:27 +00:00
durk
50ba7b93b8 Make sure fgfs finds the correct version of the base package. 2007-12-11 21:48:00 +00:00
timoore
579b60b8e4 Check if scenery is available before blowing away existing values in ground cache
This fixes a race condition when teleporting somewhere outside of the
currently loaded scenery. Before, if there was no valid scenery, an
aircraft might end up at the center of the earth...
2007-12-11 11:10:35 +00:00
frohlich
aed97e0dd4 Use a render target fallback that works in any case.
Avoids a crash on dri cards on linux.
2007-12-11 06:19:08 +00:00
andy
57918533eb Maik: add ROTORBALANCE axis. Fix spelling of ROTORRELTARGET. 2007-12-10 19:25:24 +00:00
mfranz
b0cd31415a Tatsuhiro NISHIOKA: initialize classes (fixes segfault on exit on MacOS) 2007-12-10 19:17:57 +00:00
mfranz
603778eb1e add some generic properties for free use 2007-12-08 09:49:16 +00:00
timoore
d6c97951ca Check for valid multiplayer packet.
Instead of just reporting that the magic number, length, etc. of a
multiplayer packet is invalid, abort processing this packet. Also,
check if enough space remains to send a property string.
2007-12-07 12:43:42 +00:00
timoore
743522fcd1 Add an option to FGTextureManager to create dynamic textures.
Dynamic textures shouldn't have their STATIC attribute set.
2007-12-07 09:14:16 +00:00
timoore
3426e3cde3 Changed GLUT support to use an embedded osgViewer too 2007-12-07 09:11:46 +00:00
mfranz
8380fb4463 - move exception handling from init() and childAdded() to add_model()
- tell why loading a model failed
2007-12-06 18:32:43 +00:00
mfranz
50dabcaf66 tell *why* loading a model failed 2007-12-06 18:04:19 +00:00
mfranz
98afaf4450 add runway number as "id" to the runway hash within an airport hash
(It's already available as runway hash key, but the runway hash shouldn't
depend on it and be self-contained.)
2007-12-05 10:57:51 +00:00
mfranz
32dfdaea61 backport from JSBSim/cvs: apply prop sense only once (OK'ed by JSB) 2007-12-04 20:22:36 +00:00
fredb
1d44e93c73 Win32 fix 2007-12-02 12:29:29 +00:00
mfranz
2d6f38505d make the state of the Meta and Super modifier keys available. These keys
are not available out-of-the-box on all systems and keyboards, and should
therefore not be used in files committed to CVS. This makes them well
suited for local key bindings, as they aren't likely to get overwritten
with later releases. SDL supports Meta and Super, OSG supports only Meta,
and GLUT supports neither.

(Somehow this part escaped the previous commit. :-)
2007-12-02 10:36:58 +00:00
mfranz
7167d20f4f read key code and modifiers back in after event interface call 2007-12-01 23:37:58 +00:00
mfranz
5934acbef9 add <mod-meta> and <mod-super> XML elements for key bindings 2007-12-01 16:38:49 +00:00
mfranz
9fa86acc65 make the state of the Meta and Super modifier keys available. These keys
are not available out-of-the-box on all systems and keyboards, and should
therefore not be used in files committed to CVS. This makes them well
suited for local key bindings, as they aren't likely to get overwritten
with later releases. SDL supports Meta and Super, OSG supports only Meta,
and GLUT supports neither.
2007-12-01 13:09:11 +00:00
timoore
ae8509c827 Rewrite SDL code to use an embedded osgViewer.
This uses the osgViewer infrastructure instead of setting up and osg::SceneView.
When the same change is made for glut, much of render.cxx can be deleted.
2007-11-30 00:01:01 +00:00
timoore
49f7330150 move callback registration functions to fg_os_common.cxx 2007-11-30 00:00:36 +00:00
timoore
ec61e15e89 backport of code using ModelRegistry 2007-11-29 23:59:47 +00:00
timoore
a76f3863bf Move to loading tiles and their submodels only by name.
Some cleanup in tileentry.cxx, but mostly code to implement loading of tiles
and their models without reference to FGTileEntry or SGBucket structures.
Also, don't do deferred model loading; load them when the tile is loaded.
2007-11-29 23:59:14 +00:00
mfranz
d76f26dcea Tiago GUSMAO: keep sound muted after pause/unpause 2007-11-24 08:40:04 +00:00
timoore
2a03296e5e initialize _material pointer in FGGroundCache
_material was uninitialized. This was causing a segfault with
as-yet-to-be-checked-in paging code; I don't know if it ever resulted
in a segfault with the old tile loader, but it certainly could have.
2007-11-22 23:46:39 +00:00
curt
8f64d4820c Add a command to dump just the terrain portion of the scene graph to a .osg
file.  Possible uses of this functionality could include converting the
model to some other format or coordinate system for use in some other
visualization or simulation.
2007-11-21 20:51:49 +00:00
mfranz
9ce320c558 initialize release_keys array 2007-11-17 17:38:48 +00:00
durk
1acc536de1 Changed to use getId() instead of using a direct iterator comparison,
because MSVC8 crashed on that.
2007-11-17 13:46:35 +00:00
mfranz
8ec42c1aae - move temporary keyboard fix from input.cxx to fg_os{,_sdl}.cxx.
This is required to make sure the same letter key gets released,
  which got the press event. (After Ctrl-press -> a-press -> Ctrl-release
  a-release we want the Ctrl-a binding released, not the a binding.)

- add key listener interface for direct key access from Nasal space
2007-11-12 19:29:08 +00:00
mfranz
5b76cb5409 also copy name & type to /sim/current-view
That's useful for animations, and we can't rely on numbers. And shouldn't.
2007-11-09 17:43:22 +00:00
frohlich
ba10199188 Move some values exclusively used by LaRCsim to LaRCsim 2007-11-09 05:39:13 +00:00
mfranz
e69b633060 don't overwrite rudder position with nose wheel position 2007-11-07 17:41:31 +00:00
mfranz
2d23ccd650 mainloop: move event_mgr and viewmgr updated before spatial sound calculations 2007-11-07 15:57:38 +00:00
mfranz
271487328a move event_mgr and view_mgr bundle right before the requestRedraw()
This fixes the last jitter problems with views attached to MP/AI
objects, and doesn't seem to cause any new ones.
2007-11-06 21:05:38 +00:00
mfranz
0ad534b55d change update order to fdm -> events -> viewmanager
This removes some jitter in cases where Nasal is used to set up view
parameters from FDM data, such as position and orientation. (The event
subsystem handles Nasal's settimer() calls.)
2007-11-06 12:01:29 +00:00
mfranz
7810fbc632 revert swapping of x & y offsets in "lookat" mode
This was correct in the old repository and in revision 1.1 of the new,
but then broken in revision 1.2. After that, "lookat" and "lookfrom"
mode used different coordinate systems, and the "Adjust View Distance"
didn't work correctly in "lookat" mode.
2007-11-05 22:19:39 +00:00
mfranz
5d8e5f29e0 Csaba HALASZ: fix IVSI instrument problem
"I have been investigating the Concorde IVSI problem. I came to the
conclusion that the trouble is that the environment altitude and thus
the pressure (which is calculated from that) is lagging by 1 frame.
Normally that wouldn't be a problem, but the IVSI calculates rate of
change and it will use the new dt with the old value difference,
thereby arriving at bad results if dt changes (and it does)."
2007-11-03 21:02:28 +00:00
mfranz
d79ae7a819 sorting nodes -> don't use shared pointer 2007-11-03 17:04:04 +00:00
curt
0ddb883451 Add a --vehicle= option which is a synonym for --aircraft= but is more
natural when selecting ground vehicles like a jeep or a snowplow.
2007-11-02 18:39:10 +00:00
mfranz
f8d792e82d sort entries alphabetically (consistent with property browser) 2007-10-27 21:28:56 +00:00
mfranz
eadb480b31 try to fix yet another crash bug (don't worry, there's one for anybody!) 2007-10-27 19:16:39 +00:00
mfranz
b303db13e3 re-active commented out "delete". Doesn't seem to crash anymore. 2007-10-27 19:13:42 +00:00
mfranz
57a70fc141 unescape \a and \b as well 2007-10-27 17:25:39 +00:00
mfranz
1c1559f36c make sure snprintf() buffer is terminated 2007-10-27 17:16:00 +00:00
andy
6432d714cc Fix memory leak introduced when we stopped using _context for script
invocations, but left it in place for miscellaneous allocation work.
Contexts cache allocated objects in a temps vector and only clear it
out when they are used.

Also, fix a type warning while I'm in there.
2007-10-24 18:07:02 +00:00
mfranz
44a1dbf090 don't initialize iterator twice 2007-10-22 17:28:08 +00:00
mfranz
dd964fef6e getAttribute(): s/refcount/references/ 2007-10-21 20:19:12 +00:00
durk
270444a675 Use SGSharedPointer instead of the ssgSharedPointer from the plib branch. 2007-10-20 18:28:22 +00:00
mfranz
2a70b87493 make node.getAttribute("refcount") return the SGSharedPtr's refcount
(meant for debugging purposes)
2007-10-20 17:16:43 +00:00
durk
f5e9e1898f Miscellaneous tweaks and Bugfixes. Mostly memory leaks ported from the plib
version
* Delete ai list objects in ~ATC/AIMgr.cxx:AIMgr::~AIMgr()
* Delete colors in GUI/new_gui.cxx: NewGui::~NewGui.cxx
* Delete memory allocated to the class member "route" in
  Instrumentation/gps.cxx
* Delete all globals (except a few "unsafe" ones that still cause segfaults
  and need further examination.
* Use an SGShared pointer for navaid memory allocation, so that pointers to
  individual navaid objects can be included safely in multiple navaid lists
2007-10-20 08:36:21 +00:00
mfranz
6d3ff7b125 - airportinfo(): don't bark when no airport was found (K. HOERCHER)
- simplify listener purging and fix removelistener() return value for
  one-shot listeners
- listener: inherit virtualness
- s/handler/code/ in listener code to be consistent with NasalSys::call
2007-10-18 11:43:38 +00:00
mfranz
200abfef2d - listener: re-order and change callback function args; simplify code
- make code look like Andy wrote it (so people know whom to blame :-)
- nasal-props.cxx: warning--
2007-10-16 15:15:41 +00:00
mfranz
dbd0b136b8 - use refcounted node pointers, so that no subsystem (nasal!) can invalidate them
- add frame signal for debugging purposes
2007-10-16 15:01:19 +00:00
mfranz
2b338113af give FDMs one update cycle time before setting the fdm-initialized signal
(YASim needs that to fully initialize the landing gear)
2007-10-16 07:55:43 +00:00
mfranz
fa44895b5f (depreciated) cmdarg() should return _node, not parent 2007-10-15 19:12:03 +00:00
mfranz
3a03671566 - add argc/argv arguments to FGNasalSys::call
- add support for childAdded/childRemoved listeners
- use regular function arguments for property ghosts
- warning--
2007-10-15 16:28:40 +00:00
mfranz
02a813abde revert meaning of third, optional argument, and add an optional fourth
argument:

  setlistener(<property>, <func> [, <initial=0> [, <persistent=1>]])

This definition defaults to the old behavior. The fourth argument can
be set to zero, in which case the function is only called when the
node value has actually changed. It should really default to zero, but
then all callers would have to be reviewed, which is a bit too dangerous
"shortly" before a release.
2007-10-14 18:01:26 +00:00
mfranz
b90c95269f fix off-by-one bug for airport type handling 2007-10-14 10:05:41 +00:00
mfranz
40f8213b0f airportinfo(): add possibility to search for next airport of a particular
type: "airport" (default), "seaport", "heliport"
2007-10-14 07:51:11 +00:00
mfranz
73bec9e1f8 - make weighting factors for search function with target heading permanent
- add "good" offset as suggested by Thomas FOERSTER
- minor tweaks
2007-10-12 20:53:46 +00:00
mfranz
c979136e5b add new listener type: setlistner(<prop>, <func> [, <type=0>]);
0 -> trigger whenever property is written to (even if it's the old value; default)
1 -> like 0, but also trigger the function initially
2 -> trigger initially, but then only on changes
2007-10-12 17:24:43 +00:00
mfranz
44b8f3704a fix another creative char[] == "" comparison 2007-10-12 10:20:54 +00:00
mfranz
aefae6b55a ignore strange 00 entry in apt.dat.gz as committed today; example:
00 12600 HONOLULU CNTR
2007-10-11 16:22:39 +00:00
mfranz
5f9d70fce6 cleaner & faster (don't use STL functions ::size() and ::end() in loop
condition statements, don't use multiple vector array access via index)
2007-10-11 15:33:24 +00:00
mfranz
97d3b07a1f prevent endless loop. The new awy.dat.gz has entries like line 2632 ...
AMIBO  34.973889  021.658056 ARLOS  34.625278  023.000000 1 095 195 M871-MT E-MT W-N4
... where unexpected ids follow (here E-MT W-N4). The loader didn't skipeol.
The additional values are for a first quick&dirty fix just dropped.
2007-10-11 13:51:11 +00:00
mfranz
4022edc5ba make that __MWERKS__ :-} 2007-10-11 09:28:05 +00:00
mfranz
b66ea980ad Make sure the __MWERKS__ test can't go unnoticed. It's really time to
remove all those 41 hacks if possible. Metrowerks is under category
"Defunct software companies" in Wikipedia, its compiler was known to
work on PowerPC (which we don't support, anway, right?) and on some
Unices. The hacks are in CVS since the first commit 2002/9/10 (old
repository!) and probably were in the code long before that. Any
platform where such a broken compiler is still used, will hardly
be suitable to run fgfs at all.
2007-10-11 09:19:49 +00:00
mfranz
40fd20d5d4 setprop(): make sure return value is always set 2007-10-11 07:58:56 +00:00
mfranz
06c7c3c0f4 rename FGAirportSearchFilter::acceptable() -> ::pass() 2007-10-11 07:53:17 +00:00
mfranz
602e41bab6 don't write past array bounds 2007-10-11 07:41:44 +00:00
mfranz
405c013618 JSB: "Fixed uninitialized variables; patch by Anders Gidenstam"
mf: backporting from JSB/CVS to fix serious gear problem
2007-10-10 22:11:14 +00:00
mfranz
e3c2cf3abc setprop(): report error on writing to unwritable property 2007-10-10 19:24:17 +00:00
mfranz
6e72aa6a57 checking the brutal way whether the 41 ugly __MWERKS__ hacks are really
still needed. At some point they must have fixed their broken compiler.
2007-10-10 18:34:28 +00:00
mfranz
79fec97f9f save some startup parameters under /sim/startup/options/. options.cxx puts
them under /sim/presets/ but they aren't save there, and as fgInitPosition
and its subroutines overwrite them, we lose the information about what the
user really wanted. This is a temporary solution -- it really belongs into
options.cxx.
2007-10-07 19:27:05 +00:00
mfranz
75383a3996 better check all runways, not just the first one :-) 2007-10-07 17:45:58 +00:00
mfranz
e599cbae3b very funny ... mes is a char*! :-} 2007-10-06 14:56:08 +00:00
mfranz
d0308be073 use airport search filter to only search for "regular" airports (no
seaports or heliports, as they aren't rendered at the moment, anyway).
This shall later be made configurable via argument.
2007-10-05 22:15:55 +00:00
mfranz
15139a42b6 - make FGAirport::search() more versatile, so that it can't only search
the next airport or airport with METAR station, but about any type of
  airport
- as a side effect this change makes it also 30 to 50% faster  :-)

In the long run this linear search shall be replaced with a spatial
algorithm (like octree), which will be a much bigger performance gain.
2007-10-05 21:54:52 +00:00
mfranz
516ef6bc4b fix another victim of the new runway search method 2007-10-05 14:34:04 +00:00
mfranz
f8b8077801 - rename dynamics to _dynamics for consistency reasons
- preserve information from apt.dat about whether an airport is a "normal"
  airport, a seaport, or a heliport. Do it without wasting another byte
  in the FGAirport structure (saves 50kB of memory). Yes, I know bitfields. :-)
2007-10-05 12:59:43 +00:00
mfranz
2cef9cc16a revert pitch/roll change (caused problems on reset and on the carrier) 2007-10-04 21:52:50 +00:00
timoore
411435a48f Make comparisons against OSG version less flakey
Turn OPENSCENEGRAPH_MAJOR_VERSION, OPENSCENEGRAPH_MINOR_VERSION and
OPENSCENEGRAPH_PATCH_VERSION into a single number for comparisons in the
preprocessor.
2007-10-04 20:40:29 +00:00
mfranz
37cc06e335 minor fix to please (other) pedants :-) 2007-10-04 20:16:27 +00:00
mfranz
70de6eac24 never add an untested "harmless" one-liner before committing ... 2007-10-04 17:23:10 +00:00
mfranz
6a8197968a on't hardcode heading-deg to 270 (and pitch-deg to 0.424 ...) 2007-10-04 17:14:37 +00:00
mfranz
7c3f46e82f - if no heading preset was given (>=9999), use wind-from direction
- write chosen runway to /sim/atc/runway, so that ATC can give a hint
- minor cleanup
2007-10-04 17:13:41 +00:00
mfranz
d20db83c86 when searching for the runway best matching a target heading, also consider
the runway length/width/surface material, so that fgfs doesn't drop one on
the ridiculous grass stripe parallel to the grown up concrete runway
(LOWL, LOXZ, ...). The weighting factors are for now made configurable,
so that they are easier to adjust. This can later be made static.
(will soon get forward ported to fg/osg)
2007-10-04 17:11:19 +00:00
mfranz
5986ddc6d6 stop runway searching when the first airport id doesn't match 2007-10-03 06:42:49 +00:00
mfranz
3511607527 add thresholds and stopways 2007-10-02 17:08:10 +00:00
durk
ba3f716c86 Fix tiny memory leak, as reported by Valgrind. 2007-10-02 16:14:16 +00:00
mfranz
8b7c493d41 forgot to consider the Liberia--Burma--U.S.A problem 2007-10-02 16:03:27 +00:00
mfranz
f65dbf5538 add airportinfo() function, which returns airport/runway data:
Usage:  airportinfo("KSFO");
        airportinfo(37, 122);  # airport closest to lat/lon
        airportinfo();         # airport closest to current position

Returns nil on error, or a data hash otherwise. Example:

  # length of runway 28R
  var len = airportinfo("KSFO").runways["10L"].length;

Note that only one side of a runway is returned.
2007-10-02 15:31:03 +00:00
mfranz
c8de2cd08b if a local (ai/mp) root node is given, append it to the module name, so
that one instance doesn't destroy the namespace of all other instances
2007-10-01 15:59:24 +00:00
mfranz
539c1891d3 degrade FGNasalModelData log message from SG_ALERT to SG_WARN 2007-09-30 11:56:21 +00:00
mfranz
c39a994c82 don't draw minor ticks where major ticks are to be drawn
(looks ugly on semitransparent huds)
2007-09-30 10:06:28 +00:00
mfranz
5246e4541f Transfer a variant index of type integer. What the number means is
determined by the aircraft. This allows to let an aircraft appear in
the same livery/variant on all machines which the pilot chose.
2007-09-29 18:21:35 +00:00
mfranz
a5696122f1 ... and keep the "groundradar" update rate :-) 2007-09-28 10:14:43 +00:00
mfranz
62ec8fd1d4 add instrument name & index to subsystem name id 2007-09-28 09:59:34 +00:00
timoore
428acda9e8 Fix for runway search glitch
Suggested by K.Hoercher <wbhoer@gmail.com>
2007-09-23 20:55:55 +00:00
timoore
ec8be8c67a Added copyright to ground radar files 2007-09-10 05:08:57 +00:00
timoore
7ad0813990 Ground radar and tower control panel for ATC.
This piggybacks on the weather radar for a cool ATC display.
2007-09-09 23:22:14 +00:00
timoore
78228d2734 Change tower location to an SGGeod. Include taxiways too.
This has been split from Csaba's ATC ground radar contribution.
2007-09-09 23:21:48 +00:00
timoore
474df2414e Add an autohide property for the 2D panel.
Author:Csaba Halasz
2007-09-09 23:21:20 +00:00
andy
7f546e94d3 revert accidental checkin 2007-09-05 02:03:15 +00:00
andy
f52165731a Ron Jensen: extend atmosphere tables to match environment data 2007-09-05 02:01:57 +00:00
timoore
24173c0398 Corrected atmosphere data, extended above 62000ft
Author: John Denker
Reviewed by: Ron Jensen and Gerard Robin
2007-08-31 18:01:07 +00:00
andy
a408d248ad vivian: add misc. MP properties 2007-08-27 20:58:14 +00:00
timoore
aa2858b5bd Handle scroll wheel events in osgViewer version 2007-08-20 21:38:25 +00:00
timoore
86c1a089a4 osgviewer mouse warp fixes
After a mouse warp drop all pointer motion events for the entire frame.

Author: Melchior FRANZ
2007-08-19 05:29:00 +00:00
timoore
3f41c9f91b Really implement fgWarpMouse for osgviewer
This fixes a bug that caused both the x and y values of the mouse to
be reset when the cursor was recentered due to hitting the screen
edge.

Based on a suggested patch from Stuart Buchanan
2007-08-18 22:07:11 +00:00
durk
e038ca1d76 Harald Johnsen: Change directory exists() logic to enable traffic loading
on Windows-XP machines.
2007-08-18 05:09:46 +00:00
timoore
e23f731ef7 Fix for weather interpolation problem from Anders Gidenstam
Anders said:
With Stuart's help I've looked closer at this and I think I've tracked
down the cause of the problem:
At least on my computer the sort() call on line 234 in
Environment/environment_ctrl.cxx sorts the vector entries by memory
address instead of altitude, i.e. the custom comparison predicate is not
used. This causes the tables of environment conditions to be reordered
into a wrong order at some weather updates, depending, basically,
on where the memory allocator places the objects. (Btw. why are they are
freshly allocated for each update?)
2007-08-15 15:22:44 +00:00
timoore
3bf9ab1098 Fix test for osg::Viewer.setUpdateVisitor
My last attempt reversed the sense of the test and for to include the
osg/Version header file.
2007-08-13 15:02:42 +00:00
timoore
41a22fa6a9 Compilation fix for OSG 2.1.4
setUpdateViewer has been moved to the osgViewer::Viewer object.
2007-08-12 23:01:51 +00:00
fredb
9d67f94005 Win32 fix and add a reminder in an unfinished function 2007-08-12 13:38:36 +00:00
durk
1c8f2e3c5b - Ground network XML parsing code reads the new attributes "holdPointType"
and "isOnRunway".
- Added initial support for AI controlled pushback operations, making use of the
  current editing capabilities of TaxiDraw CVS / New_GUI_CODE. The current
  implementation is slightly more computationally intensive than strictly
  required, due to the currently inability of taxidraw to link one specific
  pushBack point to to a particular startup location. FlightGear now determines
  this dynamically, and once we have that functionality in TaxiDraw, the
  initialization part of createPushBack() can be further simplified.
- Smoother transition from pushback to taxi. No more skipping of waypoints, and
  aircraft wait for two minutes at pushback point.
- The classes FGTaxiNode, FGTaxiSegment, and FGParking, now have copy
  constructors, and assignment operators.
- Removed declaration of undefined constructor FGTaxiNode(double, double, int)
- Array boundry checks and cleanup.
- Modified Dijkstra path search algoritm to solve partial problems. Currently
  limited to include pushback points and routes only, but can probably be
  extended to a more general approach.
- Added initial support for giving certain routes in the network a penalty, in
  order to discourage the use of certain routes over others.
2007-08-08 06:09:58 +00:00
frohlich
15defbb233 Modified Files:
projects/VC8/FlightGearLib.vcproj src/Include/config.h-msvc8:
	Build system updates from Olaf Flebbe.
2007-08-07 04:57:42 +00:00
mfranz
fad737b41e prevent multiple loading of one and the same scenario 2007-08-03 18:02:33 +00:00
mfranz
e1019eb359 Stuart BUCHANAN:
"interpolates METAR changes over time as follows:
1) Wind changes are interpolated as vectors, so the change is much more
natural than before - no-longer will your aircraft be suddenly shoved to
one side.
2) Visibility is interpolated as an X-value, which looks pretty neat.
3) Cloud heights and thicknesses are interpolated if they are close to the
aircraft. Cloud textures are not."
2007-08-03 12:06:17 +00:00
mfranz
7d94177636 Vivian MEAZZA: fix subsubmodels 2007-08-01 10:44:17 +00:00
andy
bf02d9bdd0 Maik: Use exact calculation instead of 1st order approximation 2007-07-31 15:51:04 +00:00
timoore
acaf611495 Load BTG files through the osgDB::Registry
This is part of changes leading towards using the OSG database pager thread.
2007-07-29 22:34:15 +00:00
mfranz
d1fb32b315 cleanup: extract globals->get_controls() 2007-07-29 17:36:30 +00:00
mfranz
306b818490 generic/output:
- support optional <preamble> and <postamble> which are written right
  after opening and before closing respectively. This can be used for a header
  line or an XML header.
- unescape <preamble>, <postamble>, <format>, <line_separator>, <var_separator>
  so that \t, \n, \r, \f, \v, \xnn, \nnn can be used directly (\a and \b are
  ignored; use \\ for the backslash) The long names ("carriagereturn") are still
  supported for <var_separator>, but one can just use \r, or \r\n too.
- don't abort when a chunk doesn't have a <node>. This is useful for adding
  constant chunks which consist only of a <format>, such as XML tags.
2007-07-29 13:58:58 +00:00
mfranz
991c2ff06a add unescape function for conversion of \t, \n, \x1b etc. in <format> strings 2007-07-29 12:26:33 +00:00
frohlich
ed677676c0 Modified Files:
src/Scenery/scenery.cxx: Use geodetic down vector for
	ground intersection.
2007-07-29 10:51:41 +00:00
frohlich
17262df51c Modified Files:
src/FDM/flight.cxx src/FDM/flight.hxx
	src/FDM/LaRCsim/LaRCsim.cxx src/FDM/SP/ADA.cxx
	src/Scenery/scenery.cxx src/Scenery/scenery.hxx:
	Remove obviously unused variables from FGInterface, make use of
	SGMath functions. No longer use plib math functions in FGInterface.
2007-07-29 10:21:22 +00:00
mfranz
22de2508aa - set filter dt only once
- make throttle more responsive (again)
2007-07-28 08:08:22 +00:00
mfranz
26af6a3207 - add (damped) aileron/rudder trimming (may be needed for mibs)
- use an FPS-independent lowpass filter for all damped properties
- cleanup
2007-07-27 21:57:55 +00:00
frohlich
49779e64f0 Modified Files:
src/AIModel/AIFlightPlanCreateCruise.cxx
	src/Traffic/Schedule.cxx:
	SGGeoc::fromCart should now work correct.
2007-07-27 19:31:44 +00:00
mfranz
b0bb63bf79 Nick "Lethe" WARNE: prevent crash caused by improper use of --multiplay
mf: stripped down the log message a bit :-)
2007-07-25 15:17:06 +00:00
timoore
a91c194b98 avoid g++ warning about the members being initialized out of order
Author: Hans Ulrich Niedermann <hun@n-dimensional.de>
Committer: Tim Moore <timoore@redhat.com>
2007-07-24 05:36:27 +00:00
andy
0368accc6d Maik: add a downwashfactor tunable 2007-07-23 16:10:21 +00:00
durk
c51c0b1664 Slightly altered calling sequence ensures AI aircraft are removed from
memory when flying out of user range.
2007-07-21 12:29:09 +00:00
durk
721d849c79 - Added ultra-light traffic is now a separate traffic class that can have its
own preferential runway support. In future versions, we might want to
condider having a more generic mechanism for this.
- Keep a history of active runway for each class, so that runway assignments
are more consistent after whether updates or time-related schedule changes.
2007-07-21 11:05:20 +00:00
timoore
3a0b1286ff Support for linking against OSG debugging libraries. 2007-07-20 17:29:31 +00:00
mfranz
5c912ffad9 remove redundant if check in cases of if (foo) delete foo;
The C++ standard explicitly allows deleting a null pointer.
2007-07-20 14:46:45 +00:00
durk
da77779436 Martin Spott:
On most Unix platforms like FreeBSD, Solaris, IRIX (AIX is even worse)
- just not on Linux - the linker wants to know about _all_ required
libraries. So even if a shared library "libosgViewer" itself is linked
against "libosgGA" and "libosgText", you still have to name these in
order to build an "fgfs" binary.

Currently, other libraries like "-losgDB" and "-losgUtil" are
explicitly mentioned on the "fgfs" linker command, but "-losgGA" and
"-losgText" are not. This simple patch lets the linker honour
everything that's required
2007-07-17 18:00:06 +00:00
durk
b452234cb2 Fixes and code clean-up:
- Airports Directory
Thomas Foerster: Pulls out the FGTaxiNode implementation into gnnode.cxx.
Melchior / Durk: Copy Constructor and assignment operator for FGTaxiRoute

- AIModels Directory
Durk / Melchior / Czaba Halasz: Ensure that all derived classes use AIBase
member 'callsign'. Adapted, moved and deleted getter/setter functions where
necessary
Czaba Halasz: Fix AIBase model path vs. submodel path consistency.

- Traffic Directory and AIModels CreateFlightPlanCruise
DT: Temporary revert parts of the position estimation code.
2007-07-15 14:08:31 +00:00
mfranz
aacabde342 remove material name from the class 2007-07-14 07:35:12 +00:00
frohlich
e19b2289c9 Also untie waypoint-missed-count. 2007-07-14 04:27:47 +00:00
mfranz
cbcc7af5d0 move the other parts of _init_keyboard() to _postinit_keyboard(), too.
This is still before anything else than the splash screen is displayed,
and it's cleaner that way. (The Nasal processing parts *must* be there.)
2007-07-13 10:15:48 +00:00
mfranz
5246e69b5a - use ostringstream instead of sprintf() for the __js%d namespaces
- set namespace __kbd for all keyboard Nasal code (not meant for public use)
- read <nasal><script> blocks from the keyboard file
2007-07-12 22:57:14 +00:00
mfranz
f8691bb86e make properties created via --prop option default to type UNSPECIFIED.
For compatibility with the old behavior just ask for a string:
--prop:string:foo=0  or shorter  --prop:s:foo=0
2007-07-12 14:45:46 +00:00
mfranz
1e6fa7d2a5 a token can be empty (empty line), in which case there's no token[0] 2007-07-11 15:18:24 +00:00
mfranz
94326d14af don't use _tgt_rudder uninitialized 2007-07-11 10:56:33 +00:00
mfranz
158bfd1860 Hans FUGAL: mac compilation fix 2007-07-10 18:35:50 +00:00
durk
fdc1a2ba54 Bugfixes: 1) Fix the if (next) setLeadDistance bug
(reported by Csaba Halaszi /helijah)
          2) Decrease AI aircraft Heading error tolerance to 1% of its
             original value. This is necessary to mitigate spinning and
             makes for actual "on-runway" landings.
2007-07-10 07:01:54 +00:00
andy
fe5ac84f8c Maik: remove redundant (and innapropriate in the YASim core) property interface for the rotorgear. 2007-07-09 19:51:01 +00:00
mfranz
80467ed6d0 Harald JOHNSEN: initialize elapsedTime 2007-07-09 17:15:11 +00:00
durk
83c37cc860 Publish and update callsigns of Traffic Manager (TM) created AITraffic. 2007-07-09 05:07:56 +00:00
frohlich
c1e29d0998 Modified Files:
src/AIModel/AIFlightPlan.hxx
	src/AIModel/AIFlightPlanCreateCruise.cxx
	src/AIModel/AITanker.cxx src/Traffic/Schedule.cxx:
	Move member variables that should better be in function local
	scope into the functions. Make more use of SGMath functions.
2007-07-08 08:46:29 +00:00
durk
f83fbfdf9c Fix "Tankers fly at warp 2" bug. 2007-07-08 07:08:49 +00:00
durk
e01ae98824 Fixed an overly ambitious checkForCircularWaits() function. AI Aircraft
don't mysteriously disappear anymore when confronted with the user
controlled aircraft.
2007-07-07 12:52:49 +00:00
mfranz
98d23457ac Maik JUSTUS: swap stereo L/R, and fix Doppler 2007-07-06 20:53:48 +00:00
andy
389e23b867 Wrong subtraction order lead to the "extra" space available (instead
of the extra space *required*) in a rowspan object being redistributed
back into the span, leading to a near-doubling of the size for small
objects with large span ranges.
2007-07-05 21:25:01 +00:00
durk
4238a46faa Thomas Foerster: Made FGParking a subclass of FGTaxiNode
Fixed bug due to longstanding inconsistency in FGAirport
                 getter functions return types.
Durk Talsma:     Fixed traffic record initialization bug that occured
                 when taxiing traffic was waiting for traffic on runway
2007-07-05 19:00:59 +00:00
mfranz
6168ba7850 Vivian MEAZZA: remove no longer needed debug messages 2007-07-05 15:28:44 +00:00
durk
33486a0308 Thomas Foerster:
I refactored the XML loading code out of FGAirportDynamics and
FGRunwayPreference. I also added a new class XMLLoader, which serves as a
facade to the loader functions. Further I changed FGRunwayPreference to just
keep a FGAirport ref, which is more concise and closer to the right(tm)
solution than storing the airport data a second time ;-)
2007-07-04 17:42:20 +00:00
durk
7dfae1562b Thomas Foerster:
I refactored the XML loading code out of FGAirportDynamics and
FGRunwayPreference. I also added a new class XMLLoader, which serves as a
facade to the loader functions. Further I changed FGRunwayPreference to just
keep a FGAirport ref, which is more concise and closer to the right(tm)
solution than storing the airport data a second time ;-)
2007-07-04 17:39:03 +00:00
mfranz
bb634fcd2e make target RTT texture configurable as <radar-texture-path>
(ported from fg/plib, but doesn't yet work here)
2007-07-03 18:24:45 +00:00
mfranz
4ba64132b9 John DENKER: validate_format(): handle multiple flags correctly 2007-07-03 17:26:54 +00:00
mfranz
d1dfc42dce remove the "terrain-elevation" command again. This is no longer necessary,
as we have the geodinfo() Nasal function now.
2007-07-03 15:41:03 +00:00
mfranz
beef8cd1ed - limit max number of messages displayed at the same time to 5 (Ideally,
it should be just one, but we don't want to block everything and
  don't want to miss messages either.)
- prevent message duplicates
2007-07-03 15:35:55 +00:00
mfranz
d40678628f John DENKER: don't grow /sim/logging/classes indefinitely on read-out 2007-07-03 05:46:59 +00:00
mfranz
f40d2f3b00 - allow multiple message/error dialogs
- hand the generation of the message dialog over to
  $FG_ROOT/gui/dialogs/message.xml
2007-07-02 14:32:30 +00:00
mfranz
9d0c571c9a Tim MOORE:
"This patch fixes the use of the keypad with numlock in the osgViewer
version of FlightGear."

"This also restores the handling of resize events while trying to stay
out of the way of the multiple display code."
2007-07-01 16:39:52 +00:00
mfranz
2eb175e772 Csaba HALASZ: use the OSG member variables right away
mf: remove redundant ARC check
2007-07-01 14:26:06 +00:00
mfranz
50e19ee239 - fix carttogeod() function (don't convert the altitude from radian to degree ;-)
- better argument check in parsexml()
2007-07-01 11:07:53 +00:00
mfranz
1a108d2015 minor cleanup: don't need the args array in the class anymore 2007-06-30 09:44:33 +00:00
mfranz
4faf9d4a74 Vivian MEAZZA: allow to turn off heading marker (symbol for own aircaft)
mf: remove commented out
2007-06-30 08:53:06 +00:00
mfranz
663ff14364 sync with recent changes to fg/plib 2007-06-29 22:44:41 +00:00
mfranz
a907b29b6c add parsexml() function, which is a wrapper around the built-in easyxml
parser. Advantages over xml.nas:             (reviewed and OK'ed by Andy)

- faster (33% ... only. I had hoped for more.)
- more standards compliant
- should support UTF
- I don't have to support it.  ;-)

Usage: parsexml(<path> [, <start-tag> [, <end-tag> [, <data> [, <pi>]]]]);

<path> is an absolute file path, the rest are optional callback functions.

Example:
    parsexml("/tmp/foo.xml", nil, nil, func(d) { print("DATA FOUND: ", d) });
2007-06-29 15:34:38 +00:00
mfranz
3482c5bc40 comment out cout (XMLVisitor::endXML() works now) 2007-06-29 10:55:52 +00:00
mfranz
8c3f03ae03 make it nicer & shorter :-) 2007-06-28 19:23:57 +00:00
durk
f4529e5cfe AI traffic now honors separate runway assignments for different types of
traffic (i.e. commercial airliners will use a differnt part of the airport
than general avation, ultralight and/or military traffic.
2007-06-28 18:30:35 +00:00
mfranz
cb15006f53 allow to specify a node type: --prop:[type:]name=value
where type is one of string (default), double, float, long, int, bool
Using only the first letter works, too.

  --prop:foo=123         ... sets property foo to string 123 (old behavior)
  --prop:string:foo=123  ... verbose version of above
  --prop:s:foo=123       ... slightly less verbose version of above
  --prop:bool:foo=1      ... makes property a bool of value 'true'

I hope this isn't considered a silly gimmick. I need this often and maybe
other developers do, too. It's useful in cases where the difference really
matters. if (getprop("/foo")), for instance, is TRUE even when the property
contains string "false", as all strings are TRUE.
2007-06-28 11:26:40 +00:00
durk
54ef3b77d5 Thomas Foerster: Replaced AI network route tracing algorithm by a much more
efficiently performing "Dijkstra algorithm".

Durk Talsma: Added the detection of "circular" wait situations in the AI
ground network. A circular wait is a situation where aircraft a waits for
b; b waits for c; and c (in turn) waits for a. The checkCircularWaits
function detects these situations.

The current "solution" to a circular wait is rather crude: Remove the
aircraft from the scene. A proper solution needs a lot more work, however,
and at least this patch stops the AI system from clogging up. in case of a
circular wait.
2007-06-28 07:54:39 +00:00
durk
1613d7e63e Thomas Foerster: Prepare for the inclusion of aircraft specific performance
data for AI traffic. Default performance classes are still available as a
backup. This database will allow the calculation of aircraft-specific
take-off speed and estimate runway lenght requirements. Further added
rudimentary support for take-off and landing rotation of AIAircraft.
2007-06-28 07:47:20 +00:00
mfranz
0b84cddee7 set north/east/down speed to make radar map mode work 2007-06-27 15:28:23 +00:00
curt
50c7a31de8 Fix a long standing bug in a code path that is probably executed very rarely. 2007-06-26 21:29:59 +00:00
mfranz
bb413bf3e2 make update interval configurable, even though the default 1.0 is supposed
to be a realistic value
2007-06-24 22:13:25 +00:00
mfranz
143e3f34d4 what is this "plib" thing?! 2007-06-24 20:34:01 +00:00
mfranz
ae4b9b0ce3 Maik JUSTUS: avoid Doppler artifacts (listener changes position quickly, etc.) 2007-06-24 20:32:02 +00:00
mfranz
60ad87fc54 the former weather radar is now a generic radar (weather and aircraft),
so rename the instrument from <wxradar> to <radar>
2007-06-24 19:50:15 +00:00
mfranz
1b55d67ff7 - don't mix /instrumentation/radar and /instrumentation/wxradar wildly
together -- there's only *one* instrument node now
- don't take "random" tacan, but <tacan-source> from the instrumentation
  config (or /instrumentation/tacan[0] by default)
- don't take "random" display-controls from /instrumentation/tacan[0]
- default name is now "radar" (formerly "wxradar")
2007-06-24 17:15:48 +00:00
mfranz
5abe6dffdb degrade "Warning: catching up on tile delete queue" from SG_ALERT to SG_WARN.
* it says it's a warning (while in fact it's just saying what it's doing)
* the user can't do much here (yes, flying slower, but it doesn't say that :-)
* scrolling those countless messages in the terminal puts stress on the CPU
  in a time when it's apparently already struggling
2007-06-24 08:30:55 +00:00
mfranz
800dd73551 Vivian MEAZZA & Tim MOORE:
- re-enable od_gauge ("owner drawn" render-to-texture instruments)
- implement radar in c++ (unlimited number of clouds/ai/mp/... objects,
  better performance)
2007-06-24 07:57:45 +00:00
mfranz
848d850328 Tim MOORE: addCamera() method (needed by og_gauge) 2007-06-24 07:52:50 +00:00
mfranz
3461466c81 add geodinfo(<lat>, <lon>) function that returns an array [<elev>, <matdata>]
or nil if no terrain intersection could be made (tile not loaded yet).
<matdata> is a hash with information about the surface material, or nil
if no material is assigned (shouldn't really happen, but one never knows).

Example:

  var ac = geo.aircraft_position();
  var data = geoddata(ac.lat(), ac.lon());
  debug.dump(data);

  # which outputs
  [ 294.5862574369132, { light_coverage : 0, bumpiness : 0, load_resistance : 1e+30,
  solid : 1, names : [ "pc_taxiway", "dirt_rwytaxiway" ], friction_factor : 1,
  rolling_friction : 0.02 } ]

With this information it can be determined how far an object would sink in,
if the coordinate is on a runway, etc.

  foreach (var n; data[1].names)
      if (string.match(n, "p[ac]_*"))
          im_on_a_runway();
2007-06-23 15:25:41 +00:00
mfranz
ee23145936 Maik JUSTUS: "ease the rotor of the hornet if not rotating" 2007-06-23 06:41:17 +00:00
mfranz
a0789e1c35 increase range of searched and displayed frequencies 40 -> 50 nm 2007-06-22 18:12:31 +00:00
mfranz
6dd5f0f6d5 Maik JUSTUS: prevent occasional OpenAL crashes after resets 2007-06-22 16:51:12 +00:00
mfranz
aca95e99e0 Maik JUSTUS: fix/implement directional sound 2007-06-21 21:49:46 +00:00
mfranz
2c208deab8 ... but use the exception text, of course. :-) 2007-06-19 10:56:50 +00:00
mfranz
5123de61ee fix bug that prevented /sim/sceneryloaded from ever becoming "true" if
/sim/screneryloaded-override was "true". At least one subsystem (od_gauge)
waits for /sim/sceneryloaded to bypass CPU intensive code until the scenery
is up. This broke e.g. the RTT-radar when using /sim/screneryloaded-override

--prop:sim/sceneryloaded-override=true has the effect that fgfs
doesn't show the splash screen until the scenery is loaded, but shows
the OTW view (scenery/aircraft) at the earliest possible moment. This is
useful for developers who often need to run fgfs only to check some minor
detail, while not caring about stuttering caused by scenery loading.
2007-06-19 10:18:14 +00:00
mfranz
588ce7e470 loadxml, savexml: don't pop up a GUI error message on error, but use a
simple SG_LOG instead. The user didn't call the fgcommand, so why should
s/he be bothered with that? And the actually caller of the command gets a
return value and can pop up a dialog if it thinks it's necessary.
2007-06-19 10:10:00 +00:00
mfranz
49a89950a8 256 Bytes ought to be enough for anybody ... hmm, better 512.
Why /sim/fg-current at all? Because we have a file selector dialog
(still unfinished), and one might like to start it from the current
directory, to find saved flights/screenshots/whatever.
2007-06-17 08:14:02 +00:00
mfranz
0c6ecd1271 set /sim/fg-current to current working directory; getcwd() is defined in
unistd.h (which was already included), and should be available in direct.h
under name _getcwd on MS Windows.
2007-06-16 21:35:16 +00:00
mfranz
58e0deb56b Maik JUSTUS: add functions carttogeod() and geodtocart() to convert between
x/y/z and lat/lon/alt                                      (OK'ed by Andy)
2007-06-16 18:22:20 +00:00
mfranz
b502cef066 Don't catch a (potentially) meaningful exception only to replace it with
a meaningless one. bootstrap.cxx/main() will catch it, anyway.
2007-06-16 16:25:40 +00:00
fredb
97ed8554c6 Win32 fix 2007-06-16 16:16:15 +00:00
fredb
69f0a797b3 OSG file renamed 2007-06-16 16:15:49 +00:00
fredb
291462c25e Consistency fix 2007-06-16 15:57:42 +00:00
mfranz
b5917d62d2 Tim MOORE:
FGManipulator.*:
"This patch works around a bug in OSG's handling of modifier keys. The
symptom of the bug is that modifier keys don't appear to be released."

fg_os_osgviewer.cxx:
"This patch fixes the test for support of cursor changes in OSG 2.0."
2007-06-16 09:39:56 +00:00
mfranz
28da7c0a90 Maik JUSTUS: "small update to the tilt-rotor feature" 2007-06-16 07:22:47 +00:00
durk
6fc1a51e1d Removed a stray debug message. 2007-06-16 05:38:05 +00:00
durk
0643b21baa Fix for refueling and radar calculations. 2007-06-15 20:52:32 +00:00
durk
864fd40ee9 Alex Bory: TACAN has to search the new AI submode 'tanker'. 2007-06-14 05:26:57 +00:00
andy
d0550441bb Maik: Adding support for tilting of the rotor. Can be used for small
autogyros or even for the Osprey.
2007-06-13 21:10:23 +00:00
mfranz
c09224cb11 Make loadxml use an absolute path, like savexml (for consistency reasons, and
because this allows to load from FG_HOME. To reduce security risks, always
append an ".xml" extension if there was none. Makes it hard to read /etc/secret
and to overwrite ~/.bashrc.  :-)
2007-06-12 16:13:21 +00:00
mfranz
b4cdfed406 Vivian MEAZZA:
simulate rotational moment of inertia by using a filter
2007-06-11 20:47:20 +00:00
mfranz
37b4f921e1 - make next_view()/pref_view() trigger listeners, otherwise the "view_cycle"
fgcommand doesn't activate Dynamic View, Fly-By View, etc.
- consistent indentation (broke that with my last commit :-)
2007-06-11 19:02:01 +00:00
mfranz
d39432ea6c Vivian MEAZZA:
- let sumodels without subsubmodels die on impact
- remove "sub-id" tying

mf: move variable declarations to better places, variable renaming
2007-06-10 18:24:48 +00:00
curt
b163af3010 Fix indentation. 2007-06-10 16:01:09 +00:00
curt
ba6f4cb42f Syd Adams:
Export ground speed to property system under /velocities.
2007-06-10 15:58:50 +00:00
durk
514acc9f5f Changed formatting to K&R/4 by "popular demand". 2007-06-10 06:06:57 +00:00
durk
fd71817c3b Added back in a few defines that I had accidentally deleted before. 2007-06-09 13:25:21 +00:00
durk
ba8ed137cf Code cleanup of AIModels (mainly AIAircraft), by Thomas Foerster 2007-06-09 11:49:16 +00:00
mfranz
dbdfc9012b use getNode instead of hasValue (it's just a dir node and doesn't need a value) 2007-06-09 10:15:50 +00:00
frohlich
01f9b2d7b2 Modified Files:
fg_os_osgviewer.cxx: Enable mouse cursor change code on
	sufficiently recent osg versions.
2007-06-08 07:14:56 +00:00
frohlich
94bb4ac29b Modified Files:
src/Main/options.cxx:
	Olaf Flebbe: Make use of SGSceneFeatues for anisotropic filtering,
        clean up.
2007-06-08 06:50:38 +00:00
mfranz
2e1756156f another secret commit to sneak in stuff:
- cleanup
2007-06-07 22:48:37 +00:00
andy
99885791e9 Remove the GUI popup from the screen capture C++ code (a request via
IRC wanted this to be scritable) and add it back (as a tip popup) via
a little nasal in the keyboard handler.  Also put the synthesis of
property nodes back into fgcommand(), because I got cold feet.
2007-06-07 16:57:59 +00:00
mfranz
5a73a46cd0 Vivian MEAZZA:
- collision detection for AI objects
- subsubmodels

mf: various modifications; more general cleanup to do
2007-06-07 16:30:26 +00:00
andy
b693047703 Allow the second (property node) argument to fgcommand() to be nil or
missing, for sanity.  Note that this will pass the resulting NULL
pointer through into the underlying SGCommand handlers, some of which
may be unprepared for it.  So basically this is now yet another way
you can use Nasal to exercise bugs and hose your sim; no biggie.
2007-06-07 16:17:48 +00:00
mfranz
b3b87842b1 savexml: analog to loadxml, if no <sourcenode> is given, save file
contents from the argument tree's <data> node. That way one doesn't have
to plug a temporary branch into the main tree.
2007-06-06 21:18:25 +00:00
frohlich
532389a5bd Modified Files:
FGManipulator.cxx: Stuart Buchanan: add tab key translation.
2007-06-05 17:44:49 +00:00
andy
a90a24d9dd Maik: fix crash when using aircraft with hitches under the command
line solver.  (He promises to get all the MP interaction out of the
FDM in a future patch.)
2007-06-05 16:01:43 +00:00
mfranz
ff454131d5 loadxml: if argument "targetnode" isn't defined, return the file data in
the argument tree under "data". This is useful in cases where the file
data are only needed temporarily and shouldn't remain in the main tree.
2007-06-04 10:07:31 +00:00
mfranz
d11e18f9a7 Syd ADAMS:
"normalize the radar x and y-shift , 0 to 1.0 based on
/instruments/radar/range to make animation simpler"
2007-06-03 18:17:05 +00:00
mfranz
158dbdd96c Sync w. JSBSim CVS (merge from PRE_OSG_PLIB_20061029 branch) 2007-06-03 12:49:19 +00:00
mfranz
3cda82e0a9 Sync w. JSBSim CVS (merge from PRE_OSG_PLIB_20061029 branch) 2007-06-03 09:37:02 +00:00
durk
2c3dc5fca1 -Minor fix: Only read traffic from data/Traffic/fgtraffic.xml if that path really exists.
- Added a comment explaining why the first 1000 frames are skipped.
2007-05-31 19:53:53 +00:00
mfranz
bbb1d2d0c3 - add heading-deg, pitch-deg, roll-deg to impact/
- if no <impact-reports> node is defined for a particular submodel, then
  write the path to /ai/models/model-impact instead
- don't tie() properties that are only ever set a single time, if at all!
- better variable names
2007-05-31 18:08:12 +00:00
mfranz
e8f2255039 Maik JUSTUS: fix typo (ROTORRELTARGET) 2007-05-31 16:58:58 +00:00
frohlich
ba5544e652 Modified Files:
src/Cockpit/panel_io.cxx: use existing function to parse an
	interpolation table.
2007-05-31 12:12:06 +00:00
frohlich
b59e3fe6ec Modified Files:
src/GUI/dialog.cxx src/GUI/menubar.cxx
	src/Include/config.h-msvc8 src/Main/fg_os_osgviewer.cxx:
	Olaf Flebbe: build fixes for osgviewer on win32.
2007-05-30 13:15:14 +00:00
frohlich
8bce048752 Modified Files:
src/Main/options.cxx:
	Olaf Flebbe: Improoved texture filtering.
2007-05-28 05:21:45 +00:00
andy
1a5bbec83b Maik: add ROTORELTARGET and ROTORENGINEMAXRELTORQUE input axes 2007-05-27 20:19:15 +00:00
frohlich
46ccdeffd4 Modified Files:
src/Input/input.cxx src/Input/input.hxx
	src/Main/FGManipulator.cxx src/Main/fg_os.cxx
 	src/Main/fg_os.hxx src/Main/fg_os_osgviewer.cxx
	src/Main/fg_os_sdl.cxx src/Main/renderer.cxx
	src/Main/renderer.hxx: First cut of osg multi view configurations.
2007-05-26 13:53:46 +00:00
frohlich
4317dbf729 Modified Files:
src/Scenery/tileentry.cxx: Jonathan Wagner:
	Removes black dots by accounting for radius of nodes
	when calculating visible nodes for traversal without removing the
	optimization.  Confirmed fix with a few people on IRC.
2007-05-26 13:51:23 +00:00
frohlich
0b44409fca Modified Files:
src/GUI/gui.h src/GUI/gui_funcs.cxx src/Main/fg_commands.cxx
	src/Main/renderer.cxx src/Main/renderer.hxx: Tim Moore:
	These patches implement a command to dump the entire OSG scene graph as
        a .osg text file. While large, this allows debuggers to really see
        what's happening in the scene graph.
2007-05-26 11:39:13 +00:00
frohlich
c9c90f17fe Modified Files:
src/Main/renderer.cxx:
	Tim Moore:
	This patch fixes the (lack of) spin animation in the osgViewer version.
2007-05-26 11:33:11 +00:00
andy
7986caf75b Maik: place the contact points at the rotor blade tips (center+radius), not at center+diameter 2007-05-25 22:58:04 +00:00
andy
96f7bd90de Maik: add unbalance and testing of rotor ground contact 2007-05-25 21:15:59 +00:00
frohlich
e21d51c4bb Modified Files:
src/Main/FGManipulator.cxx: Tim Moore:
	This adds support for the keypad and the ever-important backspace and
	delete (!) to the osgViewer code.
2007-05-25 18:08:37 +00:00
durk
5b6e0f6cc1 Don't fix what ain't broke. 2007-05-25 07:20:41 +00:00
frohlich
ca69697ca6 Quit the application on window close. 2007-05-23 17:57:05 +00:00
andy
66cef84e55 Need to pull in config.h before plib/pu.h or else PUI thinks it's in
Glut mode and the build breaks under SDL
2007-05-21 19:24:57 +00:00
frohlich
7443b8b5e8 Modified Files:
configure.ac src/Main/Makefile.am src/Main/fg_os.cxx
	src/Main/fg_os.hxx src/Main/fg_os_sdl.cxx src/Main/main.cxx
	src/Main/renderer.cxx src/Main/renderer.hxx
	src/Network/jpg-httpd.cxx
Added Files:
	src/Main/FGManipulator.cxx src/Main/FGManipulator.hxx
	src/Main/fg_os_osgviewer.cxx:
	Tim Moore: Make use of osgViewer.
2007-05-21 17:50:02 +00:00
curt
95015dc61f Fix an array overrun error (Ok'd by Jon) 2007-05-17 20:25:16 +00:00
curt
738b40158d Ladislav Michnovič: fix a 64bit problem. 2007-05-17 18:43:36 +00:00
curt
a8a971b79d For now, OSG head should look for the same "data" tree version as the plib
branch.
2007-05-16 03:53:47 +00:00
mfranz
b0fd3deeb0 reverting a small part; shouldn't make a difference, though 2007-05-15 21:37:16 +00:00
mfranz
5bbd649b5a Maik JUSTUS: "further (final?) modifications for the jet ranger rotor" 2007-05-15 21:30:33 +00:00
mfranz
b727604591 drop /ai/models/ballistic[]/impact/signal node, and allow instead to define
a report node in the submodels config:

  <impact-reports>/sim/model/cow/impact</impact-reports>

When an impact happens, then the path of the submodel will be written to
this node. An attached listener function can evaluate the impact properties.
2007-05-15 19:45:41 +00:00
mfranz
4de2c7619a - add leading underscores to class member variables
- initialize ht_agl_ft with high value to avoid premature impact animation
- cosmetics
2007-05-15 17:22:49 +00:00
mfranz
7d5952b185 Vivian MEAZZA: add terrain collision for submodels on request
(set <impact>1</impact> in the submodel config)

mf: minor modifications & cleanup; more to come
2007-05-15 16:19:11 +00:00
mfranz
1bdea279cd - don't abort just because a sample wasn't found
- rename to play-audio-sample (not every sound is a message)
2007-05-15 14:39:56 +00:00
mfranz
8eeafbac8e Andy ROSS:
add systime() function for benchmarking purposes. It returns UNIX epoch
time in seconds.
2007-05-14 16:24:41 +00:00
mfranz
30295a7d37 let "terrain-elevation" also return material name ("material" -> "Grass")
and solid state ("solid")
2007-05-13 19:03:15 +00:00
mfranz
26d6fa87a2 s/resistence/resistance/ 2007-05-13 11:58:36 +00:00
mfranz
ab2209be8c s/resistence/resistance/ 2007-05-13 11:53:21 +00:00
mfranz
aa386b577d silence MSVC8 2007-05-13 08:43:40 +00:00
mfranz
76e76bb95d add error messages for invalid args to settimer() 2007-05-12 18:15:45 +00:00
mfranz
baac43778e Anders GIDENSTAM: fix slip skid ball (merge from JSBSim/cvs)
JSB: "Fixed a problem with turn coordinator bounding while at rest on the runway"
2007-05-12 15:10:39 +00:00
mfranz
0a9d71ee51 Vivian MEAZZA:
- extract common parts of load() and loadAI() into setData()
- fix trigger handling for aircraft that set a not yet existing property
2007-05-12 10:39:56 +00:00
mfranz
71cdd8c59a - degrade electrical XML SG_ALERT to SG_WARN. The reason why this is output
at all is that this method is meant to be deprecated. But if it doesn't
  say that, and there's no generic replacement at all, then it's rather
  pointless.
- simplify parameter initialization (The old code copied from Instrumentation/
  but has been simplified there in the same manner a few months ago
  The new method is less picky about additional nodes ane outputs less
  pointless alerts. If there shall really be a check for that, then
  this should be a separate function. But it's nowhere else done in fgfs.
2007-05-11 18:00:07 +00:00
mfranz
a4fde6c4d8 - don't abort just because of an unexpected "repeat period"! Complain and
recover instead
- it was apparently planned to run the updated loop only every 1000th
  frame, but the counter isn't reset, so it runs every frame
- use SG_LOG instead of cerr
- don't add redundant slashes in SGPath::append()
2007-05-10 14:28:17 +00:00
mfranz
794f5cc154 - One of the most frequent bug reports is about "terminate called after
throwing an instance of 'sg_io_exception'\nAbandon". And this is caused
  by compiling fgfs/sg without exception support (unlikely) or linking
  against a libSDL/libglut that was compiled/linked without execption
  support. While we can't fix that, we can tell the users who's to blame. :-)
- handle  const char *  exceptions
2007-05-10 12:50:50 +00:00
mfranz
adcd01d7dc Maik JUSTUS: remove temporary debugging message 2007-05-09 21:12:20 +00:00
mfranz
282156ecf8 degrade SG_ALERT message about phi/delta3 values to SG_WARN (should
probably be SG_DEBUG!?)
2007-05-09 21:01:19 +00:00
frohlich
16a2bb0118 Modified Files:
src/ATC/AIPlane.cxx src/ATC/ATC.cxx src/ATC/ATCDialog.cxx
	src/ATC/ATCmgr.cxx src/ATC/Makefile.am src/ATC/approach.cxx
	src/ATC/atis.cxx src/ATC/ground.cxx src/ATC/tower.cxx
	src/GUI/mouse.cxx src/Main/Makefile.am src/Main/fg_init.cxx
	src/Main/fg_props.cxx src/Main/globals.cxx
	src/Main/globals.hxx src/Main/main.cxx src/Main/renderer.cxx
	src/Model/acmodel.cxx src/Scenery/scenery.cxx
	src/Scenery/scenery.hxx src/Scenery/tilemgr.cxx
	src/Scenery/tilemgr.hxx
Removed Files:
	src/ATC/ATCdisplay.cxx src/ATC/ATCdisplay.hxx:
	Remove unused functions and the disabled ATC display.
2007-05-09 20:41:08 +00:00
mfranz
7b05646ed0 Maik JUSTUS:
"minor update for the rotor FDM. It results in a more realistic
calculation of the phase shift of rotor and therefor in a little bit
more realistic flight behavior.
(Additionally you can modify the initial position of the rotor and some
(not finished) modifications for the jet ranger rotor)."
2007-05-09 20:36:43 +00:00
frohlich
b51292d9db Modified Files:
src/FDM/groundcache.cxx src/Main/fg_commands.cxx
	src/Main/main.cxx src/Main/renderer.cxx
	src/Scenery/FGTileLoader.cxx src/Scenery/scenery.cxx
	src/Scenery/scenery.hxx src/Scenery/tileentry.cxx
	src/Scenery/tileentry.hxx src/Scenery/tilemgr.cxx
	src/Scenery/tilemgr.hxx: Simplify scenegraph structure.
2007-05-08 06:12:26 +00:00
mfranz
b1b08beef8 (untested) last-minute changes are evil! :-) 2007-05-07 14:37:38 +00:00
mfranz
e88ba9a037 property_list.cxx: in verbose mode (toggle with Ctrl-'.'-entry) also
show "secret" values, that is: values of nodes with children. These
  can be used like all normal (leaf) properties, but their values were
  until now only shown in writeProperties() dumps. Also show the
  number of attached listeners. Example:    foo = 'bar' (string, AU, L3).

dialog.cxx: add warning message for broken <format>s; cosmetics
2007-05-07 14:29:40 +00:00
mfranz
ef3fb93056 let foo.getAttribute("listeners") return the number of listeners attached
to props.Node foo  (shall be used in debug.nas and possibly props.nas)
2007-05-07 14:23:56 +00:00
mfranz
1ec6acce39 cosmetics: make the reason for the cast obvious. (Now that almost all of
fgfs has to be recompiled (because of a patch to simgear/props/props.hxx)
this is the right time to commit this completely unimportant patch. :-)
2007-05-07 14:06:05 +00:00
mfranz
52a4c527a6 initialize variables before using them 2007-05-06 14:02:44 +00:00
mfranz
939f83118f use STL_IOMANIP to load <iomanip> 2007-05-05 11:40:12 +00:00
mfranz
3d9ed0a10f revert last: keep --props option because of option architecture 2007-05-05 09:57:17 +00:00
mfranz
158e3ebdb4 Declare --props option obsolete and issue a warning message. Rationale:
- props is easy to mix up with the --prop option (for setting properties)
- the name is unspecific and inconsistent: other option names describe
  the protocol -- the way to get the properties. How is, for example,
  --httpd less about prop(ertie)s?
- two identical options easily confuse people, as can be seen in The
  FlightGear Manual, where --telnet and --props were described differently
2007-05-05 09:16:59 +00:00
frohlich
4fe615fff5 Modified Files:
src/AIModel/AIBase.cxx src/AIModel/AICarrier.cxx
	src/ATC/AIEntity.cxx src/Cockpit/hud_rwy.cxx
 	src/FDM/Makefile.am src/FDM/flight.hxx src/FDM/groundcache.cxx
	src/Instrumentation/HUD/HUD_runway.cxx src/Main/Makefile.am
	src/Main/fg_init.cxx src/Main/main.cxx src/Main/renderer.cxx
	src/Main/viewer.cxx src/Main/viewer.hxx src/Model/acmodel.cxx
	src/Model/modelmgr.cxx src/Scenery/scenery.cxx
	src/Scenery/scenery.hxx src/Scenery/tileentry.cxx
	src/Time/tmp.cxx: Remove the scenery center handling.
	Osg has double valued transforms at any relevant place.
2007-05-05 08:08:24 +00:00
mfranz
f80d5676b4 add missing property names 2007-05-04 19:34:19 +00:00
mfranz
5d8f383ded - remove dependence on /sim/number-views: the view manager just uses all
/sim/view[*] that it finds. It's not only unnecessary that view definitions
  have subsequent indices, but aircraft are now *requested* to use indices
  100++. /sim/view[0] .. /sim/view[99] are reserved for the system. (Not
  that we'd ever need that many, This is just a convention, it's nowhere
  hard-coded.)
- replace the string operations for property paths by method calls & other
  improvements
2007-05-04 14:58:52 +00:00
mfranz
dad550e0eb write a more useful list on shift-"."-click, not the whole subtree 2007-05-03 21:20:15 +00:00
mfranz
3eb6d4f708 new fgcommand: "terrain-elevation"
- input:  longitude-deg, latitude-deg
- output: elevation-m
2007-05-03 19:15:20 +00:00
mfranz
7e070759ad property browser: shift click on the "." entry dumps the contents of that
dir level to the terminal (remember: ctrl-click -> toggle additional info,
and ctrl-click on ".." move to root level)
2007-05-03 19:00:55 +00:00
frohlich
19e2e7a461 Modified Files:
src/Main/renderer.cxx src/Scenery/Makefile.am
Added Files:
	src/Scenery/redout.cxx src/Scenery/redout.hxx:
	Add simple redout effect.
2007-05-03 18:47:39 +00:00
frohlich
2f8beb56ea Modified Files:
src/GUI/new_gui.cxx src/GUI/new_gui.hxx src/Main/main.cxx
 	src/Main/renderer.cxx src/Main/renderer.hxx
	src/Main/splash.cxx src/Main/splash.hxx
	src/Scenery/scenery.hxx: Move splash screen into the scenegraph.
2007-05-03 18:12:29 +00:00
mfranz
9438288755 Free the splash texture memory when it's no longer needed. Nowadays splash
textures are mostly 512x512 pixels, so we wasted 786 kB (RGB) or 1MB (RGBA)
during the whole fgfs runtime for mere startup prettification.
2007-05-02 18:49:31 +00:00
mfranz
1f07903cd6 move the "interpolator" subsystem into the INIT group (same as "nasal"),
because nasal's f_interpolate() may be called in Nasal at times when the
GENERAL subsystem group is being deconstructed; access it by addressing
the group directly, as using globals->get_subsystem() does then not
work any more then; yeah, it's all for a rare border case ...  :-)
2007-05-01 18:06:48 +00:00
mfranz
ac0f49a929 remove util.cxx workaround for listener-call-at-exit-segfault, and make
NasalSys.cxx more robust instead. The reason for the crash was that during
fgfs shutdown destroyed subsystems (GENERAL group) still need Nasal access
(for AI Model destruction listeners), but at that point globals->get_subsystem()
can't even deliver the "nasal" subsystem (INIT group). One way to solve that
problem would have been to replace  globals->get_subsystem("nasal") by
globals->get_subsystem_mgr()->get_group(SGSubsystemMgr::INIT)->get_subsystem("nasal"),
but Andy decided to store a pointer to the active "nasal" subsysten in
NasalSys.cxx instead, as the "nasal" subsystem needs to be accessed in
every single Nasal extension function, and multiple "nasal" subsystems are
out of the question, anyway.
2007-05-01 17:03:50 +00:00
mfranz
83418376d7 since the submodel_mgr subsystem does now also hold references to AI models,
we need to explicitly destroy that here, too, so that it has guaranteed
access to the Nasal subsystem. Otherwise we get a segfault on exit. When
the next subsystem needs this special treatement (radar?), we should
introduce a new subsystem group (in addition to INIT and GENERAL)
2007-05-01 09:18:11 +00:00
mfranz
b0c7a401d6 set viewport in every progress step, so that the splash texture gets rescaled
on window resize in fg/osg (works in fg/plib without that, but can't hurt
there either)                                       (thanks to Tim MOORE)
2007-04-29 21:15:45 +00:00
mfranz
a516ad6bcd (hopefully) fix the problem that some people have:
"FATAL: PUI: No Live Interface! Forgot to call puInit ?"
We shouldn't use the splash progress message before guiInit().

Leave the "idle_state" step for now, to keep the similarity
with fg/plib as big as possible. This can be dropped later.
2007-04-29 09:58:37 +00:00
mfranz
4e1d4bf3e6 re-order gl commands for better rgba texture support 2007-04-28 20:34:21 +00:00
mfranz
8f17140003 allow rgba splash textures (I don't expect that they'll be used much, but
they don't cost much either, and allow contoured images with colored
backgrounds -- nice for squadron emblems etc.)
2007-04-28 12:37:20 +00:00
mfranz
922812a913 make listeners aware of their id, and output trigger message in
log levels "debug" and "bulk"
2007-04-27 14:30:05 +00:00
mfranz
3233ce8a44 Vivian MEAZZA:
"BUGFIX - fix initiation order - make sure that the AI Model list is
populated before we attempt to attach submodels."
2007-04-27 11:02:39 +00:00
mfranz
235b35ef9a set tower position at startup 2007-04-26 20:27:25 +00:00
mfranz
3b5fed01ca Vivian MEAZZA:
"Bugfix. Restore earlier bugfix to ensure tacan works when there is no
aircraft carrier in the environment"
2007-04-26 06:49:54 +00:00
curt
c8986567ae Syd Adams:
Patch to enable atc chatter (and any other arbitrary "message" audio file)
to be played at any specified volume.  (Previously these messages were always
played at a hardcoded volume of 1.0)
2007-04-20 18:32:42 +00:00
frohlich
f9e288fce2 Modified Files:
src/FDM/groundcache.cxx: Csaba Halász: use wires[i].ends[k] instead
	of yet uninitialized end[k].
2007-04-08 17:19:19 +00:00
frohlich
f690bfd113 Modified Files:
src/Main/renderer.cxx src/Model/panelnode.hxx: Make it compile with
	current osg svn.
2007-04-07 09:54:18 +00:00
mfranz
df4f1aa248 - save pairs of <file>/<path> for each *-set.xml file in autosave.xml
- loop up file name in the cache at startup. If it's found, check if the
  file exists and use it, otherwise scan $FG_ROOT/Aircraft/ as usual,
  and create a new cache while doing that. Rebuild cache on FG_ROOT change.
2007-04-05 19:59:44 +00:00
mfranz
d996d27121 - move fgInitTowerLocationListener() from fgInitPosition() to the init
part of fgIdleFunction() in main.cxx. fgInitPosition() is called again
  at every reset, which would every time attach another listener.
2007-04-04 19:05:59 +00:00
mfranz
b5f53c349f setAttribute("archive", 1) sets this attribute to "true", and
getAttribute("archive") returns 1 if the attribute is set, and 0 otherwise.

Allow to query and to set all properties by not specifying an attribute
string:  getAttribute() returns all attributes bit coded in an integer,
and setAttribute(attr) sets all attributes. No assumptions may be made
about the meaning of the bits -- they can be changed in future fgfs releases.
The only valid use is to compare or set attribute numbers obtained in the
same fgfs run. This is meant for allowing full copies of property branches.
Also add getAttribute query strings "children" for the number of children,
and "alias".
2007-04-04 14:42:38 +00:00
mfranz
2621ba7a47 Csaba "Jester" HALASZ: radar fix & extension
- fix breakage due to former commit (AIManager.cxx, r1.72)
- make AI properties available in AIBase
- add <valid> property for animations/nasal scripts
- support more MP and AI targets
- add target select and altitude display
2007-04-04 09:51:41 +00:00
fredb
b5ab955877 Win32 fix 2007-04-03 11:36:47 +00:00
mfranz
1eb5de245b fgFindAircraftPath(): put the MAX_DEPTH check at a place where it makes sense 2007-04-02 23:19:36 +00:00
mfranz
3cb5b0159d MS Windows can't handle the symbols ... sigh 2007-04-02 17:20:05 +00:00
mfranz
887a1a732e - move format checking to the GUIInfo class. It has all the info, and this
keeps copy_to_gui() cleaner
- add "float", "int" and "long"
2007-04-02 15:42:45 +00:00
mfranz
b361105202 Csaba HALASZ: don't treat every entry in a scenario file as model entry,
especially those called <description>. This was responsible for the aircraft
at --lon=0 --lat=0.
2007-04-02 12:47:26 +00:00
mfranz
d9cbdb53ff drop plib render callback, validate <format> in setupObject(), and apply
it in copy_to_pui()
2007-04-02 12:12:23 +00:00
mfranz
851e860b52 more recent MS Windows systems reportedly support more than two joysticks,
so we need to rely on plib to tell us
2007-04-01 22:22:05 +00:00
mfranz
8a6c95451b allow AI models to contain <nasal><load> and <nasal><unload> blocks in
their XML wrapper/animation file. They can access their /ai/models node
via cmdarg() function. Example:

  <nasal>
          <load>
                  print("Hi, I'm the Nimitz. My data are under ",
                                  cmdarg().getPath());
          </load>
          <unload>
                  ...
          </unload>
  </nasal>

Note, however, that the <unload> block is only called on exit at the moment,
not when the tile is unloaded.
2007-04-01 12:39:20 +00:00
mfranz
77c176424e Ron JENSEN: turn cout into SG_LOG/SG_WARN (merge from JSBSim/cvs) 2007-04-01 12:23:54 +00:00
mfranz
724ba5b4ad yet another round() ... 2007-03-31 17:45:23 +00:00
mfranz
570b19b2ff another case of round() 2007-03-31 15:27:21 +00:00
mfranz
b395c12fdb use round() from SG, as this isn't available everywhere 2007-03-31 15:17:55 +00:00
mfranz
ed4f3afcdf obsolete through changes to Instrumentation/{instrument_mgr,altimeter}.?xx
and Systems/static.?xx, and addition of Environment/atmosphere.?xx
2007-03-31 12:28:04 +00:00
mfranz
7e6bc192ba John DENKER:
"This altimetry method is valid to above 100,000 feet, and
correctly handles Kollsman settings"
2007-03-31 09:36:19 +00:00
mfranz
bec023b43c Vivian MEAZZA:
"""
"Flight plans" which can start at a given time (gmt)

WAITUNTIL tokens which pause the flight plans until a given time (gmt)

Submodels can now be attached to any AI objects (except submodels - it can
be done, but in my experimental code it's too expensive in frame rate atm)

"No-roll" attribute added to Ballistic objects - useful for wakes and the
like

"Random" attribute added to Ballistic objects (adds =- 5% to the Cd) -
useful for smoke, exhausts

If the <trigger> tag is not specified the Ballistic object/s will be
released at start-up (cannot be stopped)

Submodels are not released from AI Objects if the AI Object is more than 15
miles away.
"""


mf: minor code and formatting fixes; submodels.?xx were FUBAR and are thus
    astyle formatted;

    NOTE that <name> tags END, EOF, WAIT, WAITUNTIL are *depreciated*.
    Don't get too used to them. This will have to be moved from the "name"
    to regular engries.
2007-03-30 22:51:52 +00:00
mfranz
caa83238b8 fix spectacularly useless error messages 2007-03-29 21:26:33 +00:00
andy
c30ff46f83 Sync with Nasal CVS (soon to become Nasal 1.1). Notable new features:
Nasal now supports calls to "subcontexts" and errors can be thrown
across them, leading to complete stack traces when call() is used,
instead of the truncated ones we now see.

Vectors can now be concatenated using the ~ operator that used to work
only for strings.

Better runtime error messages in general due to a fancier
naRuntimeError() implementation

A big data size shrink on 64 bit systems; the size of a naRef dropped
by a factor of two.

"Braceless code blocks" have been added to the parser, so you can
write expressions like "if(a) b();" just like in C.  Note that there's
still a parser bug in there that fails when you nest a braced block
within a braceless one.

Character constants that appear in Nasal source code can now be
literal multibyte UTF8 characters (this was always supported for
string literals, but character constants were forced to be a single
byte).

New modules: "bits", "thread", "utf8" and (gulp...) "io".  The bits
library might be useful to FlightGear, the utf8 one probably not as
Plib does not support wide character text rendering.  The thread
library will work fine for spawning threads to do Nasal stuff, but
obviously contact with the rest of FlightGear must be
hand-synchronized as FlightGear isn't threadsafe.  The io library is
no doubt the most useful, as it exposes all the basic stdio.h
facilities; it's also frighteningly dangerous when combined with
networked code...
2007-03-29 18:50:28 +00:00
mfranz
37acfd4e25 add signal on GUI reinit; needed for reloading Nasal loaded XML dialogs 2007-03-28 20:33:18 +00:00
mfranz
f27d7b2340 layout-props.cxx: hrule/vrule shall be accepted as widgets even if they
have no children (in which case they default to 1px thickness & stretch).
    This allows to just write <hrule/> instead of <hrule><dummy/></hrule>.
    One can still use <hrule><pref-height>3</pref-height></hrule>, of course.
layout.cxx: drop silly do??Box calls for hrule/vrule (yes, I wrote that :-)
2007-03-26 15:17:38 +00:00
mfranz
60516c8a3f If text contains "{display|voice}" groups, skip the delimiters and
discard the display part. The curly braces wouldn't be spoken anyway,
and the | would be spoken as "vertical bar", which is completely
useless (which is why it had been disabled in the past already).
2007-03-23 15:53:58 +00:00
mfranz
2e9cf978b7 - turn \n, \t, \r into spaces. Otherwise Festival spells out ".^M" as
"period".
- fix rather embarrassing string concatenation bug  :-)
2007-03-23 10:45:11 +00:00
mfranz
e85b413f99 - FGPropertyManager.{cpp,h}: fix memory corruption bug
- JSBSim.?xx: use guarded SGPropertyNode pointers
2007-03-19 16:37:36 +00:00
mfranz
937ec42fda revert condition() patch. This can as easily be done in pure Nasal. 2007-03-18 10:52:11 +00:00
mfranz
8c7c217037 set module namespace in globals, otherwise two subsequent calls can't share
variables, which makes the whole module kind-of pointless
2007-03-17 20:51:06 +00:00
mfranz
cc30d4d80e New Nasal command _condition(p) where p is a property node containing
a condition as described in $FG_ROOT/Docs/README.condition. Returns 1 if
condition is true, 0 if false, and nil on error.
2007-03-17 15:58:15 +00:00
mfranz
002b880e7e Vivian MEAZZA:
"Implement 'flightplans' for AIShips. This patch also introduces the concept
of a 'WAIT' token for AIShips: when the flightplan reaches a 'WAIT', the
AIShip stops and pauses for the specified time (secs)."
2007-03-05 21:40:39 +00:00
frohlich
b230c0a1e8 Modified Files:
src/Main/renderer.cxx: Guard the OpenGL state around pui a bit more
2007-03-01 18:12:48 +00:00
mfranz
4232c116a3 Hans Ulrich NIEDERMANN:
"""
Fix Y2K bug triggering string overflow

sim_control_.date_string is a char[7], so it can contain "yymmdd" and
the terminating '\0'. However, nowtime->tm_year is 107 for the year 2007,
so you'll end up with a 7 digit number and the string written to
sim_control_.date_string is longer than sim_control_.date_string is.
Ouch!
"""

mf: ... and sim_control_.date_string isn't even used.
2007-03-01 17:53:24 +00:00
mfranz
b11196998e Csaba HALASZ: fix dme property name 2007-03-01 17:39:45 +00:00
andy
5ea9821329 Can't assume that the aircraft has a fuel tank. 2007-03-01 00:30:07 +00:00
mfranz
ce4360e157 Vivian MEAZZA: call AI models' ::reinit() methods on reinit 2007-02-26 11:47:04 +00:00
mfranz
1d880a944f don't descend into <nasal> groups to avoid padding space beind added around 2007-02-24 19:43:19 +00:00
mfranz
5d7b9ec1f1 Nick WARNE: fix property name 2007-02-23 21:34:41 +00:00
mfranz
b6f98f91b9 remove "show" command from help screen (command can be removed later) 2007-02-20 21:12:56 +00:00
mfranz
6c95d65afa fix set command: allow strings to contain spaces 2007-02-19 20:52:55 +00:00
frohlich
a533e0c39d Modified Files:
src/Scenery/newcache.cxx: Olaf Flebbe:
	make destructor work.
	Bug: Do not modify a map while iterating over  it.
2007-02-14 17:55:52 +00:00
frohlich
96872a73cb Modified Files:
src/Navaids/awynet.cxx src/Navaids/awynet.hxx: Olaf Flebbe:
	Implement ~FGAirwayNetwork, though it is not called now
	Guard snprint properly.
2007-02-14 17:51:23 +00:00
frohlich
b81a7c8180 Modified Files:
src/Main/Makefile.am: Remove junk
2007-02-14 17:45:57 +00:00
fredb
9ae7377c95 Fix the jpg http server 2007-02-10 16:32:21 +00:00
frohlich
9bb55e78be Modified Files:
navradio.cxx: Olaf Flebbe: Use bool for booleans.
2007-02-09 05:41:42 +00:00
frohlich
4101e6791b Modified Files:
Navaids/navdb.cxx: Olaf Flebbe: plug memory leak.
2007-02-09 05:35:10 +00:00
frohlich
654cc64659 Modified Files:
Airports/runways.cxx: Correct termination condition.
2007-02-09 05:34:34 +00:00
frohlich
d4ecbb8856 Modified Files:
src/Main/renderer.cxx: Avoid an additional camera.
	Guard the plain OpenGL drawables better.
	This change now requires the new osg tarball or osg cvs.
2007-02-06 05:32:24 +00:00
mfranz
d4f8622ff4 export mouse coords of "main" mouse 2007-02-05 20:29:26 +00:00
mfranz
862196a3ab - add two error messages to setlistener() (invalid property or func object)
- adapt last changes to Style Of The Tile
2007-02-03 16:46:39 +00:00
frohlich
32d3d33fea Modified Files:
src/FDM/YASim/Launchbar.cpp: Olaf Flebbe: Make sure expressions
	stay floats.
2007-01-31 20:50:17 +00:00
frohlich
fbb676cbbe Modified Files:
src/FDM/JSBSim/FGFDMExec.cpp: Olaf Flebbe: initialize uninitialized
	variable.
2007-01-31 20:46:19 +00:00
frohlich
0edd68cd36 Modified Files:
src/Main/bootstrap.cxx: Olaf Flebbe: Appears to be requierd for
	static linkage and pthreadswin32.
2007-01-31 20:44:44 +00:00
frohlich
a8a85fa80c Modified Files:
src/Main/util.cxx: Olaf Flebbe: flush the osgDB cache just before
	exit. This avoids a static destructor cleanup problem with static
	osg linkage.
2007-01-31 20:43:10 +00:00
frohlich
dc9750f16e Modified Files:
src/Main/renderer.cxx: Fix typo
2007-01-31 20:37:43 +00:00
frohlich
14c52fb33d Modified Files:
src/Main/renderer.cxx: Avoid the ClearNode
2007-01-30 20:34:07 +00:00
frohlich
d3fdf74e4f Modified Files:
light.cxx light.hxx sunsolver.cxx tmp.cxx: kick out sg.h
2007-01-30 20:14:25 +00:00
frohlich
64b9f93589 Modified Files:
groundcache.hxx groundcache.cxx: Make use of the collision
	library now available in simgear
2007-01-30 20:13:32 +00:00
mfranz
3dd9e4ca5e remove annunciator.[ch]xx; this is now done via Nasal:
<nasal>
      <annunciator>
          <file>Aircraft/Generic/annunciator.nas</file>
      </annunciator>
  </nasal>
2007-01-29 22:36:28 +00:00
fredb
17957439a1 simplify and fix 2007-01-29 07:53:42 +00:00
mfranz
b73bd53744 this should now really be correct; nothing for a beauty contest, though 2007-01-28 22:55:37 +00:00
mfranz
c5cc84baeb make sure entries are actually erased :-) 2007-01-28 20:59:47 +00:00
frohlich
227e96afa6 Modified Files:
src/Scripting/NasalSys.cxx: make sure iterators stay valid
2007-01-28 20:02:49 +00:00
frohlich
4ec7d1553c Modified Files:
src/Main/renderer.cxx: Make it work with current osg cvs.
2007-01-28 20:01:47 +00:00
mfranz
978b7145b1 don't truncate strings output by print() to 1024 bytes. This was apparently
done for performance reasons, but print() should be able to output any
valid string, and when SG_LOG uses strings and streams already, then we
can use that here, too. (Not discussed with Andy yet.)
2007-01-28 12:16:37 +00:00
mfranz
98aa76ad33 Maik JUSTUS: fix bug that caused aircraft zombies on an MP player's last
position after he reset his fgfs
2007-01-28 11:40:56 +00:00
mfranz
c32ffcd3c9 Maik JUSTUS: add a missing pair of parens and rounding 2007-01-24 23:39:48 +00:00
mfranz
85c48d4e2e better message 2007-01-23 23:40:08 +00:00
mfranz
22421f6687 allow listeners to remove themselves. This is done by marking them
dead and letting the next NasalSys::update() remove all dead listeners.
2007-01-23 16:47:04 +00:00
mfranz
016750c865 - remove "nasal-dir-initialized" signal node after use. This code is executed
before the property tree is stored away for reinit, so the signal would
  be emitted again on reset.
- fix inconsistent style that sneaked in with a previous patch
2007-01-23 15:53:04 +00:00
mfranz
197fd50848 Maik JUSTUS: support waterplane anchor 2007-01-22 23:01:39 +00:00
frohlich
52645efa60 Modified Files:
src/Cockpit/hud.cxx src/Cockpit/hud.hxx
	src/Cockpit/hud_labl.cxx src/Instrumentation/HUD/HUD_label.cxx:
	Olaf Flebbe: avoid potential buffer overflows.
2007-01-22 05:46:51 +00:00
frohlich
a498181ac1 Modified Files:
src/FDM/YASim/Launchbar.cpp: Olaf Flebbe:
	Use float consts in float code
2007-01-22 05:36:43 +00:00
mfranz
e71d997c82 Maik JUSTUS: connect fix 2007-01-22 00:10:39 +00:00
mfranz
2af373e13a raise signal "/sim/signals/nasal-dir-initialized" when all Nasal files
in $FG_ROOT/Nasal/* were loaded and executed, and thus all Nasal library
functions are available. This was in the past only done with settimer(..., 0),
constructions, but suchlike triggered timer functions are executed
*after* aircraft specific Nasal files were loaded, so they can't be
used for internal library initialization, where e.g. props.Node() is
already needed.
2007-01-21 19:52:49 +00:00
mfranz
2105d6744d add fgSetString() stub 2007-01-21 10:48:22 +00:00
mfranz
6ebce11275 set /sim/signals/reinit to true before reset, and back to zero after it;
otherwise the last Hobbs time couldn't be read out at a reset
2007-01-21 00:19:39 +00:00
mfranz
8a489eed0b only WARN if fgcommand "load" doesn't find the file; it returns the
success/failure result, and it's up to the caller to complain or ignore
2007-01-20 23:06:44 +00:00
mfranz
39269a1bb9 add fgSetString() stub 2007-01-20 22:45:46 +00:00
mfranz
e142aa2d50 fix messages 2007-01-20 22:22:47 +00:00
mfranz
30ba3a09e1 store the node itself as member, not the path 2007-01-20 21:26:07 +00:00
mfranz
5e2f46e232 Maik JUSTUS: update (messages are only temporary and for testing purposes) 2007-01-20 21:08:04 +00:00
ehofman
46d16035fb *** empty log message *** 2007-01-20 10:08:40 +00:00
ehofman
4dbedefb32 Sync w. JSBSim as of 20/01/2007 2007-01-20 09:28:53 +00:00
mfranz
6094d927d3 Maik JUSTUS: export ground material friction factor to property 2007-01-18 21:46:28 +00:00
mfranz
9d98966685 Maik JUSTUS: minor fix for bending patch 2007-01-17 23:38:13 +00:00
mfranz
415fa8332a Maik JUSTUS: adapt some property names to match common style 2007-01-17 22:29:20 +00:00
mfranz
6d2789816b Maik JUSTUS: aerotowing properties 2007-01-17 20:44:42 +00:00
mfranz
53f09ff6a5 Maik JUSTUS: (OK'ed by Andy)
"""
- ground properties (e.g. feel bumpiness and the reduced friction of
  grass or go swimming with the beaver)
- initial load for yasim gears (to get rid of the jitter the beaver has
  on ground)
- glider/winch/aerotow (do winch start with YASim glider or do aerotow
  over the net) I will place a how-to on the wiki soon, here very short:
  use the sgs233y (or the bocian if you have AJ (up ot now) non-GPL
  bocian)
  winch start: Ctrl-w for placing the winch, hold w to winch, press
               Shift-w to release the tow
  aerotow: Place the glider within 60m to a MP-aircraft, press
           Ctrl-t to tow to this aircraft. If the MP-aircraft is the
           J3 and the patch is installed on both sides, the J3 feels the
           forces, too. The J3-pilot has to taxi very slow up to the
           moment, the glider starts moving. Increase the throttle gently.
           Don't lift the J3 early, wait for the glider being lifted,
           lift gently.
"""
2007-01-17 20:42:39 +00:00
mfranz
15754ccfc1 Maik JUSTUS: rotor bending fix 2007-01-17 20:30:34 +00:00
mfranz
e37b255095 - don't allow removal of active listener (prevents crash)
- error message if removelistener() is called with invalid or no id
2007-01-17 13:56:22 +00:00
mfranz
b7a7de4f30 don't search *-set.xml files in the the *complete* $FG_ROOT/Aircraft/ tree
(including all subdirs and with max depth!), but only the outmost level.
There are no *-set.xml files in deeper nested dirs, and with an ever growing
number of aircraft the search just lasts too long.
2007-01-15 20:58:20 +00:00
frohlich
92772f23b1 Modified Files:
config.h-msvc8: Olaf Flebbe: MSVC8 buildsystem changes
2007-01-15 17:36:10 +00:00
ehofman
3ec74d79c2 Sync. w. JSB CVS as of 15/01/2007 2007-01-15 12:48:54 +00:00
mfranz
4a79d82ba6 make attribute strings lowercase with hyphen instead of underscore;
this is consistent with their use as XML attributes
2007-01-14 13:58:15 +00:00
mfranz
b1fad7d98e let Nasal's fgcommand() return C++ return value (0 -> failure, 1 -> success) 2007-01-13 19:18:03 +00:00
mfranz
747b1e11cc Maik JUSTUS: fix bug in previous commit 2007-01-13 16:04:28 +00:00
durk
7299699903 Maik Justus,
Here is a patch for two bugs in the AI/multiplayer part:

1. Cannot find model file *.ac error message (was only a false message,
anything worked correctly, the model was loaded from the correct path
afterwards).

2. Often many multiplayer aircrafts are missing in the property-tree.
(but I need them for aerotowing). There is still another bug: The
property in some circumstances seems not to be cleaned up after logout
of a multiplayer. I have added a workaround for this, but I don't now,
if it 100% works (should have no side effects, just aerotow would not
work sometimes). For testing I need more traffic on the mp-server.
2007-01-13 09:04:07 +00:00
mfranz
d0bbe1f45d add getAttribute() and setAttribute() method 2007-01-12 18:00:56 +00:00
andy
bb6010f39c Missed changed file somehow, oops. 2007-01-10 19:04:59 +00:00
andy
5aa142ee5f Patch from Joacim to fix a bug where rotor weights were doubled. 2007-01-10 19:03:02 +00:00
andy
23ab95802b Patch from Joacim to export the inertia tensor from the command line solver. 2007-01-10 18:58:50 +00:00
frohlich
99cb08ef87 Modified Files:
src/Model/panelnode.cxx src/Model/panelnode.hxx: Make it compile
	also with osg HEAD.
2007-01-07 19:00:25 +00:00
frohlich
826866b327 Modified Files:
src/GUI/gui.h src/GUI/gui_funcs.cxx src/GUI/gui_local.cxx
	src/GUI/mouse.cxx src/GUI/sgVec3Slider.cxx
	src/GUI/sgVec3Slider.hxx src/Main/fg_commands.cxx:
	Remove some dead code.
2007-01-07 15:51:29 +00:00
frohlich
a788ebf487 Modified Files:
src/Input/input.cxx src/Main/renderer.cxx
	src/Main/renderer.hxx src/Scenery/scenery.cxx
	src/Scenery/scenery.hxx: Move scenery picking into the renderer.
	There is most of the required data defined. Also we can better use
	the pick visitor that will be needed with th upcommung panel code.
2007-01-07 12:02:50 +00:00
frohlich
4c1c10ffef Modified Files:
controls.cxx controls.hxx: Add nose wheel steering control switch
2007-01-07 11:50:39 +00:00
frohlich
ee30992e55 Modified Files:
src/Input/input.cxx: Do not change mouse modes if we had
	a valid scenery pick.
2007-01-07 08:33:02 +00:00
fredb
994c8efa00 Remove useless dependencies on plib and opengl libraries 2007-01-06 19:12:26 +00:00
fredb
f9f2144d7d Update MSVC 7.1 project files 2007-01-06 18:44:25 +00:00
fredb
6abd9f6dab Resurrect config.h-msvc6 2007-01-06 17:26:50 +00:00
fredb
c9c16f57b2 Restore config.h-msvc6 for those that follow CVS and add config.h-msvc8.in to
properly handle version number before release
2007-01-06 16:23:48 +00:00
frohlich
56382700f0 Modified Files:
groundcache.cxx: Return cat start and end in the correct order.
	That makes the seahawk carrier start capable again ...
2007-01-06 16:20:49 +00:00
frohlich
eff14788a7 Modified Files:
src/Main/renderer.cxx: Don't try to render the moon without light...
2007-01-06 15:09:42 +00:00
frohlich
6cf05270f5 Modified Files:
AIBase.cxx AIManager.cxx AIManager.hxx: Remove dead code.
	No ground intersection on AI models. Note that the carrier still
	reenables that nodemask.
2007-01-06 14:25:55 +00:00
frohlich
b8dffe05ab Modified Files:
src/Cockpit/panel.cxx src/Main/renderer.cxx: Make sure we run on
	texture unit 0 in plain opengl code.
2007-01-06 13:51:47 +00:00
frohlich
059c906be5 Modified Files:
src/Cockpit/panel.cxx src/Cockpit/panel.hxx
 	src/Cockpit/panel_io.cxx src/GUI/dialog.cxx src/GUI/dialog.hxx
	src/GUI/menubar.cxx src/GUI/menubar.hxx src/GUI/new_gui.hxx
	src/Input/input.cxx src/Input/input.hxx src/Main/renderer.cxx
	src/Scenery/scenery.cxx src/Scenery/scenery.hxx:
	Use SGBinding instead of FGBinding. Remove FGBinding. Install hooks
	to make the pick animation work.
2007-01-04 13:22:27 +00:00
frohlich
bc539e6284 Modified Files:
globals.cxx: Use the command manager singleton
2007-01-04 12:48:21 +00:00
frohlich
001bff4cbc Modified Files:
src/Main/options.cxx: Olaf Flebbe: remove leftover snprintf
2007-01-03 10:51:54 +00:00
frohlich
93cb29608a Modified Files:
src/FDM/groundcache.cxx src/FDM/groundcache.hxx: Store the material
	that was used to get the croase agl level and return that material
	in case we need to make use of that croase value.
2007-01-02 09:50:35 +00:00
frohlich
f63c96bf0e Modified Files:
options.cxx: Olaf Flebbe: Fix some problems with --help --verbose
	caused by the usage of snprintf. Elimate snprintf usage in favour
	plain std::string manipulations.
2007-01-02 08:32:32 +00:00
frohlich
82d4fc6583 Modified Files:
src/Traffic/Schedule.cxx: Add trailing semicolon ...
2006-12-27 12:42:01 +00:00
durk
e48409d136 New traffic manager initialization. Search for all files
data/AI/Aircraft/*/*.xml and read traffic information from these files.
Current code still mimicks old behavior by reading data/Traffic/fgtraffic.xml
The latter functionality will be disabled once we have some traffic containing
files in data/AI/Aircraft.
2006-12-27 11:53:54 +00:00
durk
0547e72d17 Modified (cleaner) traffic manager initialization procedure, corresponding
to the new data/AI/Aircraft directory scan code that will be committed
in a minute.
2006-12-27 11:50:13 +00:00
frohlich
5a48bcf2a0 Modified Files:
src/FDM/flight.cxx src/FDM/flight.hxx src/FDM/groundcache.cxx:
	Maik Justus: Provide the material we roll on in the groundcache.
2006-12-27 10:47:10 +00:00
frohlich
0a522b383a Modified Files:
src/Scenery/tileentry.cxx: No longer need to lift lights due to agl.
2006-12-27 10:36:18 +00:00
durk
bd34d34d16 Change the traffic manager's position calculations to use a spherical
earth model instead of WGS84. WGS84 precision is overkill for what the
traffic manager requires, and also keeps locking up while computing
course and distance for anti podal points in New Zealand vs. south west
france.
2006-12-27 10:02:13 +00:00
frohlich
bb3d4ad3af Modified Files:
src/Main/renderer.cxx src/Main/viewer.cxx: Clean up the viewers
	frames a bit. Do no longer require a axis permutation in osg's
	viewer.
2006-12-27 09:28:15 +00:00
fredb
0bd6fa4bc0 Maik Justus : if the build is configured without FG_JPEG_SERVER, the compilation fails. 2006-12-25 19:38:34 +00:00
andy
f04499cdc6 Disable the defaulting of gear friction so the tunables actually work 2006-12-22 18:02:17 +00:00
andy
ef7e7f90dd Patch from Maik adds user-settable scaling constants for per-axis fuselage drag and induced drag. 2006-12-18 21:22:20 +00:00
fredb
462dd6900c Remove unused variables 2006-12-17 18:40:55 +00:00
fredb
240feb6961 Use SG_LOG instead of printf 2006-12-17 18:40:17 +00:00
fredb
c9401da22d Remove two g++ warnings 2006-12-17 18:32:56 +00:00
frohlich
cb62950760 Modified Files:
utils/Modeller/Makefile.am src/FDM/YASim/Makefile.am:
	Remove -lssg from the linker lines.
	Do no longer build threedconvert. A very similar functionality
	is available with osgvconv. But leave threedconvert in place
	if somebody will need that ...
2006-12-17 10:12:38 +00:00
durk
8634b9124e Modified the model path verification to take advantage of Maik Justus's
AI search path patch.
2006-12-17 08:01:56 +00:00
durk
b34dc24bdc Maik Justus:
Here the patch that makes fg search for multiplayer aircraft in AI/Aircraft
first.
2006-12-17 08:00:14 +00:00
fredb
e48663b87d Prototype of fake functions should match the real ones 2006-12-16 21:40:38 +00:00
fredb
2422747bcc Port jpg-httpd to OSG 2006-12-16 17:44:46 +00:00
frohlich
1c76f6db74 Modified Files:
src/Cockpit/cockpit.cxx src/Cockpit/cockpit.hxx: Remove unused code
2006-12-14 05:48:33 +00:00
curt
5d18c09c08 Maik Justus:
I found a small conspicuity  in YASim. The destructor of the fdm was
never called, therefore a modification of the heli fdm (not in cvs) did
not work after reset (I tie some properties and untie them in the
destructor, but the destructor was not called and the tieing failed
after reset. I don't know if any other parts of YASim need their
destructors, at least it wastes memory.

Another small fix I have made to the turbulence.cpp. The code needed,
that (a-floor(a)) is >=0 and <1. This is analytical correct, but
numerical only for "small" values. In normal fg-operation a in this
function is always small, but with unrealistic parameters in the
aircraft config file it is not and then fg crashes (instead a crash of
the aircraft or cataputling it far away).
2006-12-09 20:37:59 +00:00
mfranz
b9e4775a7a Roy Vegard Ovesen:
- finish cleanup/optimization of instrumentation system (started by mfranz)
- improve configuration of special properties by
  addressing them directly
2006-12-06 22:11:43 +00:00
mfranz
880e4908ac don't crash when a panel (or one of its elements) can't be found (-> pc7) 2006-12-03 20:14:12 +00:00
frohlich
66b6fa0001 Modified Files:
renderer.cxx: set TexEnv for the 2d stuff.
2006-12-03 16:50:00 +00:00
frohlich
037a961280 Modified Files:
renderer.cxx: Put light information into the update visitor
2006-12-03 16:48:25 +00:00
mfranz
c0e1a380d6 make sure the node for the AI model removal report exists;
addressing a node with its path is unsafe at that time
2006-11-26 12:02:06 +00:00
mfranz
f04aca91b2 Torsten DREYER:
"bind the visibility-property of the SGSky object to a property
named /envirionment/effective-visibility-m. This property is needed to decide
if the aircraft is within clouds or not. I use this property also for the
structural icing code."
2006-11-25 12:21:36 +00:00
durk
78aea9eb80 Reorganization of the AI directory tree. Make FlightGear search for airport
related AI stuff in data/AI/Airports instead of in data/Airports/AI
2006-11-25 09:05:03 +00:00
durk
3bd32f75e4 Removed a potentially illegal cross-container iterator comparison that made
FlightGear crash on mircosoft visual c++ compilers, as reported by Maik
Justus.
2006-11-25 07:52:08 +00:00
frohlich
6ad85fbae9 Modified Files:
src/Main/renderer.cxx: Use a LightSource for the Light.
2006-11-23 17:50:49 +00:00
mfranz
baa16f4995 AJ MacLEOD: don't only turn the adf off with exactly zero voltage
as values like 1E-10 can occur due to binary representation issues;
(analog to navradio.cxx)
2006-11-22 20:08:45 +00:00
frohlich
2e32ccf393 Modified Files:
src/AIModel/AIMultiplayer.cxx: Apply longstanding patch from Maik
	Justus. Fix double aircraft.
2006-11-22 17:16:19 +00:00
frohlich
5d1c390194 Modified Files:
groundcache.cxx: Cheaper ray triangle intersection
2006-11-21 18:25:36 +00:00
frohlich
0adac854dc Modified Files:
renderer.cxx: Fill in that information into the update visitor
2006-11-20 18:16:31 +00:00
frohlich
42528de4ab Modified Files:
src/Main/renderer.cxx src/Cockpit/panel.cxx: Move some more into
	simple scenegraph wrappers. That fixes current problems with
	invisible panels.
2006-11-15 06:07:42 +00:00
durk
e389bed31f Fix for a crash reported by Maik Justus. 2006-11-14 20:08:50 +00:00
frohlich
16aee6ac41 Modified Files:
src/Main/renderer.cxx: Fix some ugly triangle artefacts on the
	bo105's Instrument panel.
2006-11-12 17:22:02 +00:00
fredb
3394d3c840 Don't segfault when sound is not available 2006-11-12 13:54:50 +00:00
frohlich
29778f1496 Modified Files:
src/Main/main.cxx src/Main/renderer.cxx: Avoid an extra clear of
	of the color buffer.
2006-11-12 12:38:57 +00:00
durk
33037b2139 AI Update:
- Ground network slow-down finally works as expected
   (although occasionally causing a traffic jam)
 - Hold position instruction now really sets speed to zero, in addition
   it actually works now for crossing and two-way traffic
 - Attempt to limit execution time of ground network trace algorithm
   to make performance acceptable at high-density networks
 - Removed remaining terminal messages
 - Various minor tweaks and clean-ups
2006-11-11 10:52:05 +00:00
frohlich
bb7c889bbb Modified Files:
src/Time/tmp.cxx src/Time/light.hxx src/Time/light.cxx
	src/Main/renderer.cxx src/Cockpit/panel.cxx: Initialize sky colors
2006-11-10 05:37:50 +00:00
frohlich
9148f9065a Modified Files:
groundcache.cxx: Reorder intersection tests a bit
2006-11-08 20:46:07 +00:00
frohlich
bd97270782 Modified Files:
src/Main/renderer.cxx: Make sure the normalize mode is not set
2006-11-08 20:45:21 +00:00
frohlich
8627dd1669 Modified Files:
src/FDM/groundcache.cxx: Tim Moore: fix for groundcache problems.
2006-11-07 06:09:36 +00:00
frohlich
a8523d94ed Olaf Flebbe: remove unused variable. 2006-11-07 05:39:33 +00:00
fredb
f65abb8a61 Win32 compilation fix 2006-11-02 17:41:53 +00:00
mfranz
a1e62b9c62 remove function declarations for long removed functions 2006-11-01 23:36:46 +00:00
mfranz
8d1ecbfa1b remove obsolete and non-functional menu toggle command 2006-11-01 23:23:26 +00:00
mfranz
65e2ce16d6 remove obsolete preset dialogs 2006-11-01 22:55:15 +00:00
mfranz
4deaed6d99 remove obsolete preset dialogs 2006-11-01 22:48:34 +00:00
frohlich
6e370ce895 Modified Files:
fg_init.cxx: Oops, forgot to commit that chunk
2006-11-01 22:26:57 +00:00
mfranz
284c73a95c remove old property dialog 2006-11-01 22:10:22 +00:00
mfranz
91dbe0c3fe remove old property dialog 2006-11-01 21:59:46 +00:00
frohlich
7e5d6d1d75 Modified Files:
Time/tmp.cxx Main/viewer.hxx Main/viewer.cxx Main/renderer.cxx
	Get rid of an other OSGFIXME. The view matrix had some plib specials
	included. The viewer is now updated for that.
2006-11-01 21:22:25 +00:00
frohlich
b8f9a40fc6 Removed Files:
hitlist.cxx hitlist.hxx: Is obsolete.
2006-11-01 21:14:28 +00:00
mfranz
ef10fcb676 insert punctuation for better festival speech 2006-10-31 11:57:16 +00:00
frohlich
6b9d29194b Modified Files:
src/AIModel/AIBase.cxx src/Main/main.cxx src/Main/renderer.cxx
	Reflect last change in SimGear
2006-10-31 06:27:34 +00:00
frohlich
f62fe07a48 Modified Files:
src/MultiPlayer/multiplaymgr.cxx: Check in long standing broadcast
	multiplayer fix
2006-10-31 06:20:27 +00:00
frohlich
c53eef58e4 Modified Files:
src/Main/Makefile.am: now we need libsgutil ...
2006-10-31 06:19:53 +00:00
mfranz
3bc199c59f ssgSharedPtr.hxx -> SGSharedPtr.hxx 2006-10-30 16:31:45 +00:00
frohlich
b0f9d24f9d Modified Files:
configure.ac src/AIModel/AIAircraft.cxx src/AIModel/AIBase.cxx
 	src/AIModel/AIBase.hxx src/AIModel/AICarrier.cxx
 	src/AIModel/AICarrier.hxx src/AIModel/AIManager.cxx
 	src/AIModel/AIManager.hxx src/ATC/AIEntity.cxx
 	src/ATC/AIEntity.hxx src/ATC/AIMgr.cxx src/ATC/AIMgr.hxx
 	src/ATC/ATCdisplay.cxx src/ATC/ATCdisplay.hxx
 	src/Cockpit/cockpit.cxx src/Cockpit/cockpit.hxx
 	src/Cockpit/hud.cxx src/Cockpit/hud.hxx
 	src/Cockpit/hud_rwy.cxx src/Cockpit/panel.cxx
 	src/Cockpit/panel.hxx src/Cockpit/built_in/FGMagRibbon.cxx
 	src/Cockpit/built_in/FGMagRibbon.hxx src/FDM/flight.cxx
 	src/FDM/groundcache.cxx src/FDM/groundcache.hxx
 	src/GUI/gui_funcs.cxx src/Input/input.cxx
 	src/Instrumentation/od_gauge.cxx
 	src/Instrumentation/od_gauge.hxx
 	src/Instrumentation/render_area_2d.cxx
 	src/Instrumentation/render_area_2d.hxx
 	src/Instrumentation/wxradar.cxx
 	src/Instrumentation/wxradar.hxx
 	src/Instrumentation/HUD/HUD.cxx
 	src/Instrumentation/HUD/HUD.hxx
 	src/Instrumentation/HUD/HUD_runway.cxx src/Main/Makefile.am
 	src/Main/main.cxx src/Main/renderer.cxx src/Main/renderer.hxx
 	src/Main/viewmgr.cxx src/Model/acmodel.cxx
 	src/Model/acmodel.hxx src/Model/model_panel.cxx
 	src/Model/model_panel.hxx src/Model/modelmgr.cxx
 	src/Model/modelmgr.hxx src/Model/panelnode.cxx
 	src/Model/panelnode.hxx src/Navaids/awynet.cxx
 	src/Scenery/Makefile.am src/Scenery/hitlist.cxx
 	src/Scenery/hitlist.hxx src/Scenery/newcache.cxx
 	src/Scenery/scenery.cxx src/Scenery/scenery.hxx
 	src/Scenery/tileentry.cxx src/Scenery/tileentry.hxx
 	src/Scenery/tilemgr.cxx src/Scripting/NasalSys.cxx
 	src/Scripting/NasalSys.hxx src/Time/light.cxx
	Big BLOB on the way to OSG.
2006-10-29 19:30:21 +00:00
mfranz
74faacdf16 Maik JUSTUS: last changes for better consistency with The FlightGear Way. 2006-10-29 12:44:15 +00:00
mfranz
cf86ca67f8 Maik JUSTUS: replace underscore with hyphen in config keywords, to be
consistent with the rest of YASim and almost all of fgfs
2006-10-28 21:14:32 +00:00
mfranz
edd8c25fae Maik JUSTUS: change /rotors/*/blade1_pos to /rotors/*/blade[0]/position-deg,
incidence to incidence-deg, and flap to flap-deg
2006-10-28 20:53:19 +00:00
mfranz
70bab80507 remove unused and empty files 2006-10-28 18:02:47 +00:00
mfranz
4621db6b7c simplify name/number handling 2006-10-26 17:46:05 +00:00
mfranz
fc98b57b15 simplify name/number handling 2006-10-26 17:39:47 +00:00
mfranz
e63b8b3351 - simplify number/name handling
- consistent member naming
- coding style fixes in clock.*
2006-10-26 15:06:12 +00:00
mfranz
19f3ae5133 - simplify namer/number handling
- consistent naming of members with underscore
2006-10-26 14:47:15 +00:00
mfranz
d90922fe1e - don't read the channel always from tacan[0] (even if the existence of
a second tacan may not be likely)
- remove some dead code
- simplify <name>/<number> handling
- let a listener watch over input props and search for new channel/frequency
- allow to set channel number as one number (rather than as single digits),
  as some aircraft may prefer this (the ch53 does so); this is to be set
  in /instrumentation/tacan[n]/frequencies/selected-channel[0]
2006-10-26 14:09:13 +00:00
mfranz
546d76269a emit signal /sim/signals/fdm-initialized when the FDM is up; this is
useful to attach listeners and have their functions run at a time when
they can safely access FDM generated properties
2006-10-26 09:07:41 +00:00
fredb
9827a79987 Leidson Campos A. Ferreira improved the jpeg http server 2006-10-24 17:51:56 +00:00
mfranz
b4a4e9ea86 Vivian MEAZZA: add missing heading-indicator-dg inclusion (instrument_mgr.cxx)
mf:
- fix abs/fabs bug
- typos & cosmetics
2006-10-24 16:03:44 +00:00
mfranz
eb6b28f507 Vivian MEAZZA: Directional Gyro (DG) compass & electrically powered master
reference gyro
2006-10-23 21:58:28 +00:00
mfranz
43ce93303c drop pointless warning. If the sound can't be removed, then proably because
it was never added, which is perfectly normal when the aircraft started
out of range. (Analog to the DME sound, which doesn't have that warning
either.)
2006-10-20 12:12:12 +00:00
curt
39869b582a Fix a typo so that turbulence can work in JSBSim models once again. 2006-10-19 02:39:05 +00:00
mfranz
bdf16b7b7e use correct data type for string::find() 2006-10-17 21:21:26 +00:00
mfranz
f6244d769c Alexis Bory: revert hack; use correct type for string::find() 2006-10-17 20:39:00 +00:00
andy
3362ea2447 A bug was discovered on IRC where an errant script was setting a nil
value on a property.  This becomes a NaN when converted to a numeric
value, which then percolated into the C++ world where it ultimately
caused a crash in YASim's turbulence code.  While converting nil to
NaN isn't *strictly* wrong, it's dangerous for this reason.  Toss a
Nasal exception instead.  Hopefully this won't break too much
preexisting code.
2006-10-17 19:58:33 +00:00
mfranz
4da02e3d99 Vivian MEAZZA: "Bug fix - make TACAN work with no carrier in the environment" 2006-10-16 11:15:35 +00:00
mfranz
cc3ad61175 cerr don't belong in CVS
use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG!
use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG! use SG_LOG!
2006-10-12 22:12:09 +00:00
mfranz
8f7df58c94 don't clutter the terminal with meaningless (to all but one developer)
"cerr" messages (SG_LOG/SG_BULK is meant for that)
2006-10-12 21:48:18 +00:00
frohlich
8a67faaf5a Modified Files:
src/AIModel/AIMultiplayer.cxx src/MultiPlayer/mpmessages.hxx
	src/MultiPlayer/multiplaymgr.cxx
	src/MultiPlayer/multiplaymgr.hxx src/Network/multiplay.cxx
	Apply Stuart Buchanan's multiplayer property/chat patch.
2006-10-10 05:17:07 +00:00
durk
77edd7e57e Initial checkin. 2006-10-06 17:37:09 +00:00
durk
666910a793 Major update of traffic manager and AI related airport facilities.
- Moved AIModels/Traffic Manager related AI functions to a new file
- Rewrote the traffic manager so that the containers use pointers to
  objects instead of the objects themselves, which will allow for a
  more flexible memory management.
- Rewrote parts of the airport groundnetwork code, also because the
  stl containers now contain object pointers instead of the objects
  themselves.
- Fixed an uninitialized iterator in the AI distance tracking code
- Fixed flawed logic in some of the traffic controller's while loops
- Added a tower controller, which paces take-off behavior of AITraffic
  in a more realistic way.
- Various other minor fixes and fine tuning.
2006-10-06 17:36:31 +00:00
durk
fee78e5119 Fixed a potentially tiny memory leak. 2006-09-30 05:17:45 +00:00
fredb
ec4887d1d2 Win32 only : Advertise we need a console when the program is linked as a 'Windows' subsystem 2006-09-27 20:18:08 +00:00
durk
8de6a69e3e Adding some more intelligence to the AI system step 2: Added a system to
detect interfering taxi routes and added a "hold position" instruction to
make one of two conflicting aircraft wait until it's route is cleared again
2006-09-19 17:04:22 +00:00
andy
7c445ccb73 Another fix from Maik 2006-09-14 21:05:34 +00:00
andy
77ecc04676 Helicopter update from Maik:
More realistic calculation of vortices at the blades and therefore
 real airfoil parameters can be used now (not to be mixed up with the
 vortex ring state which is still not simulated), ground effect is now
 continuous e. g. at buildings, calculating of the rotor in more than 4
 directions, better documentation of the airfoil parameters.
2006-09-14 18:18:33 +00:00
curt
2c193be0ca Syd Adams:
- Well I finally licked it, the clipping works great now, in 16 and 32
  bpp mode, on 2d and 3d panels.
- I tried glScissors, didnt work because clipping was done in screen
  co-ordinates.
- Stencil buffer methods worked great for 2d panel, but messed up 3d
  panels,(depth buffer problems I think), and only worked in 32 bpp mode.
- I then tried clip planes , and so far it appears to work with no
  problem, and no framerate drop like I had with the stencil buffer
  method...

I'm attaching the panel.cxx file for testing...
2006-09-05 20:28:48 +00:00
fredb
789779d532 Fix missing return statement and unused local variable 2006-09-02 08:10:13 +00:00
frohlich
4ea7fc6327 Attemp to fix the 'bogous tile problem' 2006-08-31 05:07:50 +00:00
andy
2f2d486778 Curt noticed a while back that YASim was producing alpha and sideslip
values that were angles between the aircraft's orientation and the
global velocity vector, not the airflow velocity.  So the HUD velocity
vector was wrong when the wind was non-zero.  Fix that.
2006-08-28 17:24:34 +00:00
curt
03bba2a792 Clear up a line terminator issue between windows/unix. 2006-08-26 14:24:14 +00:00
durk
5b2e16ca73 Ground network distance tracking code. AIAircraft taxiing at airports
maintain a resonable distance from each other while taxiing on the same
route. The current code does not yet take crossing routes or aircraft
taxiing into opposite directions into account.
2006-08-26 07:22:20 +00:00
fredb
905f5a1029 Better encapsulation for personality 2006-08-25 22:16:31 +00:00
curt
e1edf2366a Tested and working under Linux. I have no way to test this under windows.
If there is a windows problem, look very carefully at the line termination
with a serial port monitor.  It should be \r\n (CR-LF), not \n, not \r\r\n
or any other possible variant.
2006-08-22 00:58:25 +00:00
fredb
2fc8a4bb4b Remove compilation warnings 2006-08-21 07:41:23 +00:00
curt
fe86900e57 Make the vertical acceleration rate scale with vertical performance. The
default case for tankers should still be right about the same as where it was.
2006-08-20 23:38:38 +00:00
curt
2d6f291d4f Add an initial implementation of the Garmin 400 series "Aviation In" data
format.  I have a Garmin 295 to test with, but so far I haven't been able
to make this work (code should compile cleanly though.)  I don't know if
I've made a mistake in the protocol or if my 295 just doesn't support this.
More work on this to come.
2006-08-20 23:37:13 +00:00
mfranz
32c39edf44 - make *all* class members start with underscore (not all but two)
- NEVER EVER use leading underscores for auto variables
- don't store values in auto variables for the next function call (not
  even when they start with underscore :-)   This fixed the TACAN
  channel lookup, which was supposed to be done on channel changes only,
  but was always done)
- only do frequency search if frequency has changed (this was apparently
  planned, but not finished; leftover from adf.cxx?)
- don't use double as bool switch
- some minor cleanup
2006-08-20 15:27:26 +00:00
mfranz
5656526d83 as the "Attempting to schedule tiles for bogus lon and lat = (-1000,0)"
bug happens now on a regular basis, and just ignoring it doesn't seem to
cause any harm, just return after it, rather than abort.
2006-08-19 07:30:52 +00:00
durk
e06e9ccd1e Bugfix of problem reported by Mathias Fröhlich: Ground network trace()
algorithm caused a program crash. Because there is always one waypoint more
than there are routes, the trace function should only pop_back the final route
entry at search depths of one or higher. I also added a lot of of additional
safeguarding code, due to the fact that the new trace algorithm was
apparently not as stable as I'd hoped it would be. ...
2006-08-16 09:58:26 +00:00
andy
0838ca6d35 Giant helicopter code update from Maik Justus. 2006-08-14 21:59:44 +00:00
mfranz
ad0921f3e0 print the whole autosave.xml path, not just the filename. Unfortunately,
in the case of fg_init.cxx we'll only see that if the log-level is set
in preferences.xml, because command line options weren't even processed
at that time.  :-/
2006-08-10 11:21:15 +00:00
mfranz
6a6eb2c00b fix log message 2006-08-10 11:12:39 +00:00
mfranz
371419acbf warnings-- 2006-08-08 18:40:18 +00:00
andy
0c109dabbb More warnings, similar issues. 2006-08-08 18:32:17 +00:00
andy
e26481cf0a Fix a few warnings while I'm in there. Melchior poitned out that my default
configure-generated Makefiles don't include -Wall and a few issues had crept
into the code.
2006-08-08 18:23:20 +00:00
andy
90e7c4ec43 Add a lift/drag vs. AoA graph option to the yasim tool, which
generates a data file of aerodynamic lift and drag (and L/D) against
AoA at a specified speed and altitude through a full circle.  Wrote it
to track down the YF-23 superthrust issue, but it wasn't any help.
All the forces look fine.
2006-08-08 18:05:43 +00:00
frohlich
13ce1e48fb Make better use of SGMath 2006-08-08 17:57:33 +00:00
andy
95da644df9 Melchior sent me a property dump of the YF-23 in the wacky superthrust
state.  The only really obvious problem was a giant negative engine
RPM, which happened because of a lack of clamping in the engine code
combined with the YF-23's ability to actually reach speeds near the
engines _vMax value.  It's not clear to me that this will fix the
superthrust issue at high AoA's, but it's an obvious bug nonetheless.
2006-08-08 14:19:15 +00:00
andy
16b11e311c Fixes from Maik Justus:
+ The wing compilation step was accidentally omitting regions that lie
  between the tips and the first/last control object.  That's a real
  problem for wings that contain no controls, and a significant issue
  for those that contain only a few.  I'm stunned that this went
  undetected for so long.
+ The Surface::flapLift() function was oddly returning 1.0 Newtons as
  a minimum, instead of zero.
2006-08-07 16:49:26 +00:00
mfranz
eb38d1f92b remove experimental and unused code (we read the splash screen style
from /sim/gui/style[0] since a while, not from the preferred style.
This allows overriding it from *-set.xml files.)
2006-08-07 15:19:22 +00:00
mfranz
74391d55a1 cosmetics only:
- unify indentation (throw out 2-space indentation; this file uses 4 spaces)
- fix mixed indentation
- remove trailing spaces
- fix a couple of spelling mistakes
2006-08-07 15:16:46 +00:00
mfranz
d84043fbe2 move GL_TEXTURE_LOD_BIAS_EXT one section up and document what it does
(this was the reason why the first two text lines on the splash screen
looked more blurry than the others). BTW: I played with other values
than -0.5, but this turned out to be the best already. It makes textures
sharper than 0, but not too sharp (and thus flickering).
2006-08-07 15:11:46 +00:00
mfranz
6ce68a226a remove confusing error message that leads first-time users on the wrong
track and is a PITA for support staff. It's this message:

Error reading properties:
Failed to open file
 at /home/newbie/.fgfs/autosave.xml
 (reported by SimGear XML Parser)
2006-08-03 09:37:31 +00:00
mfranz
010e03fab4 throw out "zoomed" tapes. These drew 60% of the scale with bullets rather
than tick marks, and looser (zoomed) than the other 40%. Rationale:

- this was only used in *one* tape of *one* HUD ("custom")
- it's not in the MIL-STD!
- doesn't seem very useful
- relies on integer scale values, while we now have float values in the new HUD

This feature would have had to be rewritten anyway. If someone needs it and
can come forward with a (MIL-)STD description, then it can be added to the
existing tape generator again (using a value->screen-position mapper function).
Otherwise it's simply declared dead.

(Yay, one TODO and a few FIXMEs less.  ;-)
2006-08-02 15:34:33 +00:00
mfranz
46efbb0801 - "almost zero" is zero
- improve/add <format> warning
2006-08-01 21:43:13 +00:00
fredb
d0f8f8351b Avoid redefinition in the same prototype 2006-08-01 21:16:56 +00:00
mfranz
2f8a476c3a add optional <format> property for <tape>s 2006-08-01 21:11:38 +00:00
fredb
762c7ddb89 Olaf Flebbe : MSVC 2005 fix because time_t is defined as __int64 and there is no abs for this datatype 2006-08-01 21:09:26 +00:00
mfranz
b1a4fa24d4 cosmetics 2006-08-01 18:46:59 +00:00
mfranz
3f1af3334f fix no-hole ladder (not that I think this mode will enjoy a long life) 2006-08-01 18:07:26 +00:00
mfranz
866b7c0cbb fix vertical tape gap 2006-08-01 17:25:51 +00:00
mfranz
cc10e1986f use assignment operators (to my defense: the *x/*y were different on both
sides of the equal sign at some time ... :-)
2006-08-01 15:49:29 +00:00
mfranz
4419aa2cb3 - make the alignment function a static HUD member (for namespace
encapsulation, but a real namespace would probably be better)
- extend alignment to optionally adjust x/y, and to return absolute
  l/r/b/t coordinates (as opposed to plib's relative ones!)
- implement tape gaps as per Curt's order  :-)
- shuffling stuff around for fun
2006-08-01 15:31:15 +00:00
frohlich
6afe252440 Use bool where the source and destination variable is bool. 2006-08-01 05:56:49 +00:00
mfranz
46a70b21a6 whoops 2006-07-31 19:32:02 +00:00
mfranz
651861dfb1 cleanup 2006-07-31 19:25:41 +00:00
mfranz
f3dd7c363c draw dive lines always from the center, so that the stipple pattern is
symmetrical
2006-07-31 18:09:13 +00:00
mfranz
3abd816f46 cosmetics & cleanup 2006-07-31 17:36:27 +00:00
mfranz
acc3230fd0 remove obsolete text_width() function (a similiar function will be made
a method of TextList)
2006-07-31 16:56:15 +00:00
mfranz
5bb3eb260b use HUDText adjustment (gauges with text aren't used anywhere, and this
change is untested for now)
2006-07-31 15:57:39 +00:00
mfranz
8cd9535660 use HUDText adjustment 2006-07-31 15:36:48 +00:00
mfranz
ece7aee8a9 - use correct ladder bar angle
- minor dive angle number adjustment
2006-07-31 14:25:09 +00:00
mfranz
3cba94018b - move HUDText constructor/methods to HUD.cxx
- add generic text adjustment and
- use it in the ladder: climb -> vert bar on the outside, numbers below line
                        dive  -> vert bar on the inside, numbers above line
2006-07-31 13:10:26 +00:00
fredb
e35afbdec7 Suppress warnings : remove unused local variables. Use correct, initialized, variables. 2006-07-30 21:04:29 +00:00
mfranz
6a832d0d07 remove temporary fix 2006-07-30 08:08:51 +00:00
mfranz
f012620134 remove unused options & add two new ones 2006-07-29 19:45:17 +00:00
durk
8c2e595ff0 Spectacular improvement in traffic manager initialization and preparatory
work for ground based distance separation of AIAircraft.

Traffic manager initialization related changes:
- Schedules initialize "on the fly", instead of during initialization
- Invalid routes are no longer deleted, but marked as BOGUS and ignored
- Changed loading order from a distance based prioritization to a point-
  score based prioritization, resulting in a much faster establisment of
  AIAircraft near the user's plane.

Preparatory work for ground-based separation of Aircraft.
- The groundnetwork findShrortestRoute function not only returns a list
  of waypoints, but also a list of taxi "segments" (a.k.a. taxiways).
- The taxiway list is stored in the Flightplan, and updated everytime
  a new taxi leg is created.
2006-07-29 18:17:19 +00:00
fredb
46a3200569 Win32 fix 2006-07-29 09:27:50 +00:00
fredb
19dd8133aa Remove ambiguities 2006-07-29 09:22:24 +00:00
curt
d9723e6805 Specify "clip planes" as a separate independent option (not implied from
the type option.)  The clip area is and has always been hard coded, but at
some point we should make it configurable.
2006-07-28 20:17:58 +00:00
mfranz
1576fc1050 reduce marker gap 2006-07-28 18:41:12 +00:00
curt
183fffaa08 Simplify dynamic ladder motion option. 2006-07-28 18:37:33 +00:00
curt
8c38bd4427 Remove some junk.
Note: the previous commit angles the negative ladder marks progressively more
steeply as per MIL-STD.
2006-07-28 14:32:40 +00:00
curt
cccdbddddd Add an option to get a realistic climb dive ladder without all the other
implications.

Fix the ladder so it "moves" around in the hud correctly based on alpha/beta
offset projected onto the horizon line so the horizon is always the horizon.
2006-07-28 14:22:08 +00:00
mfranz
08d1b7748f <option>top</option> draws tbi on top (vertically mirrored) 2006-07-28 10:11:34 +00:00
mfranz
7c3711bcdf - fix turn bank indicator (bank scale type)
- cleanup
2006-07-27 23:34:11 +00:00
mfranz
8a482acf8f SGMiscf isn't known yet: add workaround 2006-07-27 17:12:37 +00:00
frohlich
cdb725528d Clean up scenery center handling. It is set now less often. 2006-07-27 16:36:22 +00:00
frohlich
75f0dcbb1d Add missing includes required to compile 2006-07-27 16:13:37 +00:00
durk
943b1b8e79 Enable the airway database parsing. 2006-07-27 14:49:41 +00:00
durk
10ebe06285 Initial commit of code that reads and parses Robin Peel's awy.dat airway
files.
2006-07-27 14:44:09 +00:00
durk
402046e580 AI Modifications: 1) Added a patch that takes ground speed into consideration
using Curt's new speed adjustment code. 2) Separated the function
FlightPlanCreateCruise() into a new source file in preparation of a more
elaborate airway following scheme.
2006-07-27 14:42:15 +00:00
mfranz
e979f72ea6 - we could use the same property path names in fgUntie that we used int fgTie
- cleanup
2006-07-27 14:28:51 +00:00
durk
a69dfbbc9a Mark's dynamic sun color changes. 2006-07-27 05:16:06 +00:00
curt
f30f4b866b Add support for drawing target markers (circles on top of any AI/MP aircraft)
as part of the conformal HUD ladder.
2006-07-27 02:46:14 +00:00
curt
5fc834f7f5 Attempt to shore up the numerical stability of the AI aircraft movement
computations.  This is probably not needed, but use double's consistently.
2006-07-27 02:27:43 +00:00
curt
1c2a3cc5ac White space ... 2006-07-27 02:26:30 +00:00
curt
f9badcf329 Remove side-slip (aka beta) from the heading offset of the target aircraft.
This is already accounted for in the true heading of the aircraft.
2006-07-27 02:25:58 +00:00
curt
f31088070c Fix a class of problem that could lead to needless extra time "jitter" in the flight dynamics
calculations.  We run the FDM at 120hz and compute how many loops can fit into each FG loop.
Floating point rounding could lead to a situation where we could end up running
1, 3, 1, 3, 1, 3... loops of the FDM when in fact we want to run 2, 2, 2, 2, 2...

If we artificially inflate ml above by a tiny amount to get the
closest integer, then subtract the integer from the original
slightly smaller value, we can get a negative remainder.
Logically this should never happen, and we definitely don't want
to carry a negative remainder over to the next iteration, so
never let the remainder go below zero.
2006-07-26 14:18:06 +00:00
mfranz
5d10e338d5 no more FONT_(LARGE|SMALL) (didn't work, anyway, and isn't needed) 2006-07-25 22:21:56 +00:00
mfranz
9799f05bb7 finally fix the text-in-box alignment (= Rocket Science[TM]!)
(This will be moved to HUD_instrument.cxx, where it will be available to
all draw_text() users.)
2006-07-25 20:05:52 +00:00
mfranz
89d56f0c60 define label box pointer via <pointer-width> (width of base) and
<pointer-length>
2006-07-25 07:07:34 +00:00
mfranz
447c06ecd3 I've heard that endless loops aren't overly popular. 2006-07-24 17:52:20 +00:00
mfranz
77019014d6 8 is a bit too much for <marker-offset> default; use 5 2006-07-24 17:46:08 +00:00
mfranz
04818a4bc7 no longer let top==left and bottom==right. This is necessary for label-box
pointers, and may introduce bugs elsewhere. Not that I've notice any yet.
2006-07-24 17:35:34 +00:00
mfranz
7a52695de0 first stab at label box pointers. <option>top</option> on a <label> makes
such a box:

    _____/\_____
    |   Booo   |
    |__________|

likewise with options bottom, left, right. The size can be set via option
<marker-offset> (analogous to <tape> offsets), which describes the distance
from the base to the peak. Default: 8 px
2006-07-24 17:09:03 +00:00
mfranz
a6c8610682 make old HUD code work with 8 px font size 2006-07-24 16:02:56 +00:00
mfranz
bd9ec88355 - don't use 10 pt font size for width calculations, when in fact we use
a 8 pt font (set 8 pt in preferences.xml, too)
- fix vertical alignment of digits in label and ladder (temporary
  solution -- the whole font handling needs to be reviewd and fixed)
- simplify nadir and zenith (they always want to be horizontally centered
  on the ladder lines, no?)
- simplify and abstract label box drawing (no need for stippled side lines)
- align text (more) correctly in label boxes
2006-07-24 16:00:18 +00:00
curt
b010480bfb Switch sign of beta/drift. 2006-07-23 17:47:23 +00:00