1
0
Fork 0
Commit graph

5071 commits

Author SHA1 Message Date
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