Re: [Flightgear-devel] B1900d: Failed to open file at FG_ROOT/Aircraft/b1900d/Panel/AP-hotspots.xml

2008-05-06 Thread
On Tue, 6 May 2008 23:40:51 +1000
"George Patterson" <[EMAIL PROTECTED]> wrote:

> Hi All,
> 
> I just resync my cvs data and have found that for the B1900d  there is
> either a missing file or the path is set incorrectly.
> 
> The file Aircraft/b1900d/Panel/b1900d-pedestal.xml contains a
> reference to AP-hotspots.xml but that file ether doesn't exist in CVS
> or is supposed to be
> 
> # fgfs --aircraft=b1900d --airport=KSFO
> Error reading panel:
> Failed to open file
>  at /usr/local/share/FlightGear/Aircraft/b1900d/Panel/AP-hotspots.xml
>  (reported by SimGear XML Parser)
> Failed to load model: Failed to load panel
> Aircraft/b1900d/Panel/b1900d-pedestal.xml
> Segmentation fault (core dumped)
> 
> 
> 
> As a workaround I have symlinked  the primus-1000 version to where the
> xml parser expects to see find it.
> ln -s $FG_ROOT/Aircraft/Instruments-3d/primus-1000/AP-hotspots.xml
> $FG_ROOT/FlightGear/Aircraft/b1900d/Panel/AP-hotspots.xml
> 
> Obviously this is not a great solution but gets the plane back in the air.
> 
> I am happy to supply a backtrace if required but probably not
> necessary at this stage.
> 
> Regards
> 
> 
> George
> 
> -
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
> Don't miss this year's exciting event. There's still time to save $100. 
> Use priority code J8TL2D2. 
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> ___
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Hi George , I,m on a lunch break , dont have time to look at it now , but 
should be able to fix it tonight.
Cheers
-- 
Syd&Sandy <[EMAIL PROTECTED]>

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Replace SGThread classes with OpenThreads (simgear)

2008-05-06 Thread Benoît Laniel
Hello,

Here is the updated patch to remove the dependencies on SGThread for
*SimGear* (FlightGear will follow later).

Here is what it does:

- Replace SGMutex with OpenThreads::Mutex.
- Replace SGGuard with OpenThreads::ScopedLock (which acts exactly like
SGGuard, see include/OpenThreads/ScopedLock).
- Use global variables for mutex where needed to be thread safe (as
pointed by Tim).

No other changes are made (it does not touch configure or makefiles) so
it should be safe to use even with other soft like fg ;).

Best regards,
Benoît
Index: simgear/scene/model/shadanim.cxx
===
RCS file: /var/cvs/SimGear-0.3/source/simgear/scene/model/shadanim.cxx,v
retrieving revision 1.13
diff -u -r1.13 shadanim.cxx
--- simgear/scene/model/shadanim.cxx	4 Dec 2007 22:38:41 -	1.13
+++ simgear/scene/model/shadanim.cxx	6 May 2008 16:50:14 -
@@ -36,9 +36,10 @@
 #include 
 #include 
 
+#include 
+#include 
+
 #include 
-#include 
-#include 
 
 #include 
 #include 
@@ -125,6 +126,8 @@
   SGVec4f _lastLightColor;
 };
 
+static OpenThreads::Mutex cubeMutex;
+
 static osg::TextureCubeMap*
 getOrCreateTextureCubeMap()
 {
@@ -132,8 +135,7 @@
   if (textureCubeMap.get())
 return textureCubeMap.get();
 
-  static SGMutex mutex;
-  SGGuard locker(mutex);
+  OpenThreads::ScopedLock lock(cubeMutex);
   if (textureCubeMap.get())
 return textureCubeMap.get();
 
@@ -212,13 +214,14 @@
 StateSetMap;
 }
 
+static OpenThreads::Mutex chromeMutex;
+
 // The chrome effect is mixed by the alpha channel of the texture
 // on the model, which will be attached to a node lower in the scene
 // graph: 0 -> completely chrome, 1 -> completely model texture.
 static void create_chrome(osg::Group* group, osg::Texture2D* texture)
 {
-static SGMutex mutex;
-SGGuard locker(mutex);
+OpenThreads::ScopedLock lock(chromeMutex);
 static StateSetMap chromeMap;
 osg::StateSet *stateSet;
 StateSetMap::iterator iterator = chromeMap.find(texture);
Index: simgear/scene/tgdb/obj.cxx
===
RCS file: /var/cvs/SimGear-0.3/source/simgear/scene/tgdb/obj.cxx,v
retrieving revision 1.34
diff -u -r1.34 obj.cxx
--- simgear/scene/tgdb/obj.cxx	1 May 2008 12:21:52 -	1.34
+++ simgear/scene/tgdb/obj.cxx	6 May 2008 16:50:14 -
@@ -50,8 +50,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 
 #include "SGTexturedTriangleBin.hxx"
 #include "SGLightBin.hxx"
Index: simgear/scene/tgdb/pt_lights.cxx
===
RCS file: /var/cvs/SimGear-0.3/source/simgear/scene/tgdb/pt_lights.cxx,v
retrieving revision 1.14
diff -u -r1.14 pt_lights.cxx
--- simgear/scene/tgdb/pt_lights.cxx	21 Dec 2007 06:24:53 -	1.14
+++ simgear/scene/tgdb/pt_lights.cxx	6 May 2008 16:50:15 -
@@ -50,10 +50,11 @@
 
 #include 
 
+#include 
+#include 
+
 #include 
 #include 
-#include 
-#include 
 #include 
 #include 
 
@@ -123,6 +124,8 @@
   return image;
 }
 
+static OpenThreads::Mutex lightMutex;
+
 static osg::Texture2D*
 gen_standard_light_sprite(void)
 {
@@ -131,8 +134,7 @@
   if (texture.valid())
 return texture.get();
   
-  static SGMutex mutex;
-  SGGuard guard(mutex);
+  OpenThreads::ScopedLock lock(lightMutex);
   if (texture.valid())
 return texture.get();
   
Index: simgear/scene/util/SGSceneFeatures.cxx
===
RCS file: /var/cvs/SimGear-0.3/source/simgear/scene/util/SGSceneFeatures.cxx,v
retrieving revision 1.3
diff -u -r1.3 SGSceneFeatures.cxx
--- simgear/scene/util/SGSceneFeatures.cxx	8 Jun 2007 06:50:16 -	1.3
+++ simgear/scene/util/SGSceneFeatures.cxx	6 May 2008 16:50:15 -
@@ -31,9 +31,10 @@
 #include 
 #include 
 
+#include 
+#include 
+
 #include 
-#include 
-#include 
 
 SGSceneFeatures::SGSceneFeatures() :
   _textureCompression(UseARBCompression),
@@ -44,14 +45,15 @@
 {
 }
 
+OpenThreads::Mutex SGSceneFeatures::_instanceMutex;
+
 SGSceneFeatures*
 SGSceneFeatures::instance()
 {
   static SGSharedPtr sceneFeatures;
   if (sceneFeatures)
 return sceneFeatures;
-  static SGMutex mutex;
-  SGGuard guard(mutex);
+  OpenThreads::ScopedLock lock(_instanceMutex);
   if (sceneFeatures)
 return sceneFeatures;
   sceneFeatures = new SGSceneFeatures;
Index: simgear/scene/util/SGSceneFeatures.hxx
===
RCS file: /var/cvs/SimGear-0.3/source/simgear/scene/util/SGSceneFeatures.hxx,v
retrieving revision 1.3
diff -u -r1.3 SGSceneFeatures.hxx
--- simgear/scene/util/SGSceneFeatures.hxx	8 Jun 2007 06:50:16 -	1.3
+++ simgear/scene/util/SGSceneFeatures.hxx	6 May 2008 16:50:15 -
@@ -22,6 +22,8 @@
 #ifndef SG_SCENE_FEATURES_HXX
 #define SG_SCENE_FEATURES_HXX
 
+#include 
+
 #include 
 
 namespace osg { class Texture; }
@@ -94,6 +96,8 @@
   bool _pointSpriteLights;
   bool _distanceAttenuationLights;
   int  _textureFilter;
+
+  static Ope

[Flightgear-devel] B1900d: Failed to open file at FG_ROOT/Aircraft/b1900d/Panel/AP-hotspots.xml

2008-05-06 Thread George Patterson
Hi All,

I just resync my cvs data and have found that for the B1900d  there is
either a missing file or the path is set incorrectly.

The file Aircraft/b1900d/Panel/b1900d-pedestal.xml contains a
reference to AP-hotspots.xml but that file ether doesn't exist in CVS
or is supposed to be

# fgfs --aircraft=b1900d --airport=KSFO
Error reading panel:
Failed to open file
 at /usr/local/share/FlightGear/Aircraft/b1900d/Panel/AP-hotspots.xml
 (reported by SimGear XML Parser)
Failed to load model: Failed to load panel
Aircraft/b1900d/Panel/b1900d-pedestal.xml
Segmentation fault (core dumped)



As a workaround I have symlinked  the primus-1000 version to where the
xml parser expects to see find it.
ln -s $FG_ROOT/Aircraft/Instruments-3d/primus-1000/AP-hotspots.xml
$FG_ROOT/FlightGear/Aircraft/b1900d/Panel/AP-hotspots.xml

Obviously this is not a great solution but gets the plane back in the air.

I am happy to supply a backtrace if required but probably not
necessary at this stage.

Regards


George

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] Nasal class for GPS instruments

2008-05-06 Thread Sébastien MARQUE
Hi all,

I've written a nasal class to simulate GPS calculation. you can find the 
script here: http://seb.marque.free.fr/fichiers/flightgear/gps.nas

I'm aware it is maybe not as well-written as other .nas scripts found in 
$FGROOT/Nasal :p, but I think it could be interresting to put it in CVS 
for further development (for this, it is possible to remove the first 
lines concerning GPL, and maybe the 2 demos included), and to allow some 
aircraft mainteners and instruments creators to create gps in their 
aircraft.

I've chosen this solution more than route manager because it is (at 
least for me) more easier to create a gps instrument from this class. 
I've created 2 demos instruments, they are included in the script, you 
can find them at the end of file:
- gps.demo.show(): this one pop-up a dialog with some lines depending of 
the used mode (off, to, free and track). it is possible to enter 
parameters for the gps (coordinates, speed, course, altitude).

- gps.demo2.show(): this one allows you to follow a route, 
imported from a xml file (example around lfbt (france): 
http://seb.marque.free.fr/fichiers/flightgear/route-example.xml). For 
now the route file is searched from FGHOME directory, waiting for a 
better place. It shows how the gpsDevice class manages the route. Here 
is an other script in perl 
http://seb.marque.free.fr/fichiers/scripts/perl/flightplan (ex 
./plandevol-eng*) that can create route file suitable with gps:
./flightplan -d ksfo -a knid -wpt=KSFO-KNID.xml
I let the creator of instruments chose their own way to select correct 
route file for their device if they allow route management for it.

Features: please read top of gps.nas for an exhaustive list of exported 
properties and available methods.

best regards,
seb

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] FG Tracker

2008-05-06 Thread Gabor Toth
Hi,

  FG Tracker have been restarted due to power failure, please restart MP 
servers.

Thanx,
Gabor

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel