Re: [Flightgear-devel] aircraft search
I've committed various tweaks to the path/directory code - if you were having difficulties, please update SimGear and try again. In particular, the Win32 broken-ness should be gone - I've tested various aircraft, and --show-aircraft, on Windows and Unix, and things seem fine to me. Alex and Lance, I'm still confused as to the failures you are seeing. Assuming you're still seeing same issues after updating (and anyone else who is seeing something similar), I will make up a debug patch to see what's going on. Thanks, James -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] weather conditions and winds aloft notworking correctly..
Curt, Using the same comparison here between the submodel wind and the particle wind, there is still an error. The particle contrail is still at an angle to the aircraft axis. I will investigate some more. Vivian -Original Message- From: Curtis Olson [mailto:curtol...@gmail.com] Sent: 22 July 2010 16:28 To: FlightGear developers discussions Subject: Re: [Flightgear-devel] weather conditions and winds aloft notworking correctly.. Replying to my own message ... I see a couple simple code cleanups in my first patch so don't worry too much about that. I've been flying tight level circles in a variety of wind conditions (up to 70 kts) with smoke turned on and when I come around and start the circle again, I've been flying into the tail of my own smoke now no matter what the wind is doing. So I think that's how it's supposed to work. It looks *much* better. Curt. On Thu, Jul 22, 2010 at 9:55 AM, Curtis Olson wrote: On the topic of the partical system and the wind vector not being correct. I have a patch here that seems to be working, and it would be great if a few other people could test/review it to see if it makes sense. This is the first time I've dove into the particle system code and the environment manager has always been a bit of a beast. There's probably a better way to do this, but as I worked my way through the logic, this is what I ended up with that made sense to me. SIMGEAR PATCH: diff --git a/simgear/scene/model/particles.cxx b/simgear/scene/model/particles.cxx index 0803790..acac7df 100644 --- a/simgear/scene/model/particles.cxx +++ b/simgear/scene/model/particles.cxx @@ -62,11 +62,13 @@ void GlobalParticleCallback::operator()(osg::Node* node, osg::NodeVisitor* nv) osg::Matrix om(toOsg(q)); osg::Vec3 v(0,0,9.81); gravity = om.preMult(v); +// NOTE: THIS WIND COMPUTATION DOESN'T SEEM TO AFFECT PARTICLES const osg::Vec3 zUpWind = Particles::getWindVector(); -osg::Vec3 w(zUpWind.y(), zUpWind.x(), - zUpWind.z()); +osg::Vec3 w(zUpWind.y(), zUpWind.x(), -zUpWind.z()); wind = om.preMult(w); -//SG_LOG(SG_GENERAL, SG_ALERT, wind vector:w[0],w[1],w[2]\n); +// SG_LOG(SG_GENERAL, SG_ALERT, +//wind vector: w[0] , w[1] , w[2]); } diff --git a/simgear/scene/model/particles.hxx b/simgear/scene/model/particles.hxx index 6dda343..3fd3ccb 100644 --- a/simgear/scene/model/particles.hxx +++ b/simgear/scene/model/particles.hxx @@ -257,6 +257,14 @@ public: * magnitude is the velocity in meters per second. */ static void setWindVector(const osg::Vec3 wind) { _wind = wind; } +static void setWindFrom(const double from_deg, const double speed_kt) { + double map_deg = 0.0 - from_deg; + double map_rad = map_deg * SG_DEGREES_TO_RADIANS; + double speed_mps = speed_kt * SG_KT_TO_MPS; + _wind[0] = cos(map_rad) * speed_mps; + _wind[1] = sin(map_rad) * speed_mps; + _wind[2] = 0.0; +} static const osg::Vec3 getWindVector() { return _wind; } protected: float shooterExtraRange; FLIGHTGEAR PATCH: diff --git a/src/Environment/environment_mgr.cxx b/src/Environment/environment_mgr.cxx index 15268f9..17d1e36 100644 --- a/src/Environment/environment_mgr.cxx +++ b/src/Environment/environment_mgr.cxx @@ -295,7 +295,10 @@ FGEnvironmentMgr::update (double dt) osg::Vec3 windVec(-_environment-get_wind_from_north_fps(), -_environment-get_wind_from_east_fps(), _environment-get_wind_from_down_fps()); - simgear::Particles::setWindVector(windVec * SG_FEET_TO_METER); + // simgear::Particles::setWindVector(windVec * SG_FEET_TO_METER); + double wind_true_deg = _environment-get_wind_from_heading_deg(); + simgear::Particles::setWindFrom( wind_true_deg, + _environment-get_wind_speed_kt() ); } FGEnvironment Curt. On Thu, Jul 22, 2010 at 4:25 AM, Stuart Buchanan wrote: On Wed, Jul 21, 2010 at 5:00 PM, Torsten Dreyer wrote: I don't know if it's somehow related, but the 3d clouds don't seem to drift with the wind, either. Flying with crosswind with a magnitude as your airspeed let you fly toward the clouds at a 45 degree angle. My setup was: Wind from 1...@100, flying heading 270 with 100KTS. The clouds came in from 45degrees out of the right hand side. Torsten That's just a missing feature/bug in the 3d clouds, and I don't think it's related to the particles problem. I haven't managed to find the time to fix it, and I'm unlikely to in the near future (baby due end of August), so if anyone is looking for some work... -Stuart -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___
Re: [Flightgear-devel] aircraft search
James Many thanks All seems well with aircraft search and and the plib change here. Alan -- From: James Turner zakal...@mac.com Sent: Friday, July 23, 2010 8:02 AM To: FlightGear developers discussions flightgear-devel@lists.sourceforge.net Subject: Re: [Flightgear-devel] aircraft search I've committed various tweaks to the path/directory code - if you were having difficulties, please update SimGear and try again. In particular, the Win32 broken-ness should be gone - I've tested various aircraft, and --show-aircraft, on Windows and Unix, and things seem fine to me. Alex and Lance, I'm still confused as to the failures you are seeing. Assuming you're still seeing same issues after updating (and anyone else who is seeing something similar), I will make up a debug patch to see what's going on. Thanks, James -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] flightgear ./configure apr-1-config
On Thu, Jul 22, 2010 at 8:15 PM, Hans Janssen handigehan...@gmail.com wrote: Lance Levsen wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Error message: ./configure: line 10540: apr-1-config: command not found ./configure: line 10541: apr-1-config: command not found Comes from configure.ac: LIBS=`apr-1-config --link-ld` CPPFLAGS=-I/usr/include/subversion-1 `apr-1-config --includes` What is apr-1-config? apr-1-config is part of the apr-util package. Do you have apr-util installed ? That configure test is broken. It should first check that apr-1-config is available. Also, even if it finds the headers it should verify the libraries too and revert to external subversion if not successful. -- Csaba/Jester -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] aircraft search
James Turner zakal...@mac.com writes: Alex and Lance, I'm still confused as to the failures you are seeing. Assuming you're still seeing same issues after updating (and anyone else who is seeing something similar), I will make up a debug patch to see what's going on. still doesn't work for me (same behaviour). i'll try to find some time and figure out what's going on. --alex-- -- | I believe the moment is at hand when, by a paranoiac and active | | advance of the mind, it will be possible (simultaneously with | | automatism and other passive states) to systematize confusion | | and thus to help to discredit completely the world of reality. | -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] aircraft search
On 23 Jul 2010, at 12:42, Alan Teeder wrote: All seems well with aircraft search and and the plib change here. Excellent, thanks for the report. James -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] aircraft search
On 23 Jul 2010, at 13:45, Alex Romosan wrote: Alex and Lance, I'm still confused as to the failures you are seeing. Assuming you're still seeing same issues after updating (and anyone else who is seeing something similar), I will make up a debug patch to see what's going on. still doesn't work for me (same behaviour). i'll try to find some time and figure out what's going on. My basic plan is to send you a patch that adds many log calls, and get you to send me the console output with that applied. If you can get me an ssh login to a box with debug-enabled fgfs, I can do it in GDB, of course. Other suggestions welcome. James -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] weather conditions and winds aloft notworking correctly..
Hi Vivian, I setup the Rascal 110 model with the wing leveler active and full rudder, then manipulated the throttle to hold level altitude. This way I flew pretty tight, consistent circles. I ended up flying into the back of my own smoke, and this worked no matter what velocity or direction I set the winds to, so I think I have the particle wind vector dialed in pretty close now. Curt. On Fri, Jul 23, 2010 at 3:56 AM, Vivian Meazza wrote: Curt, Using the same comparison here between the submodel wind and the particle wind, there is still an error. The particle contrail is still at an angle to the aircraft axis. I will investigate some more. Vivian -Original Message- *From:* Curtis Olson [mailto:curtol...@gmail.com] *Sent:* 22 July 2010 16:28 *To:* FlightGear developers discussions *Subject:* Re: [Flightgear-devel] weather conditions and winds aloft notworking correctly.. Replying to my own message ... I see a couple simple code cleanups in my first patch so don't worry too much about that. I've been flying tight level circles in a variety of wind conditions (up to 70 kts) with smoke turned on and when I come around and start the circle again, I've been flying into the tail of my own smoke now no matter what the wind is doing. So I think that's how it's supposed to work. It looks *much* better. Curt. On Thu, Jul 22, 2010 at 9:55 AM, Curtis Olson wrote: On the topic of the partical system and the wind vector not being correct. I have a patch here that seems to be working, and it would be great if a few other people could test/review it to see if it makes sense. This is the first time I've dove into the particle system code and the environment manager has always been a bit of a beast. There's probably a better way to do this, but as I worked my way through the logic, this is what I ended up with that made sense to me. SIMGEAR PATCH: diff --git a/simgear/scene/model/particles.cxx b/simgear/scene/model/particles.cxx index 0803790..acac7df 100644 --- a/simgear/scene/model/particles.cxx +++ b/simgear/scene/model/particles.cxx @@ -62,11 +62,13 @@ void GlobalParticleCallback::operator()(osg::Node* node, osg::NodeVisitor* nv) osg::Matrix om(toOsg(q)); osg::Vec3 v(0,0,9.81); gravity = om.preMult(v); +// NOTE: THIS WIND COMPUTATION DOESN'T SEEM TO AFFECT PARTICLES const osg::Vec3 zUpWind = Particles::getWindVector(); -osg::Vec3 w(zUpWind.y(), zUpWind.x(), - zUpWind.z()); +osg::Vec3 w(zUpWind.y(), zUpWind.x(), -zUpWind.z()); wind = om.preMult(w); -//SG_LOG(SG_GENERAL, SG_ALERT, wind vector:w[0],w[1],w[2]\n); +// SG_LOG(SG_GENERAL, SG_ALERT, +//wind vector: w[0] , w[1] , w[2]); } diff --git a/simgear/scene/model/particles.hxx b/simgear/scene/model/particles.hxx index 6dda343..3fd3ccb 100644 --- a/simgear/scene/model/particles.hxx +++ b/simgear/scene/model/particles.hxx @@ -257,6 +257,14 @@ public: * magnitude is the velocity in meters per second. */ static void setWindVector(const osg::Vec3 wind) { _wind = wind; } +static void setWindFrom(const double from_deg, const double speed_kt) { + double map_deg = 0.0 - from_deg; + double map_rad = map_deg * SG_DEGREES_TO_RADIANS; + double speed_mps = speed_kt * SG_KT_TO_MPS; + _wind[0] = cos(map_rad) * speed_mps; + _wind[1] = sin(map_rad) * speed_mps; + _wind[2] = 0.0; +} static const osg::Vec3 getWindVector() { return _wind; } protected: float shooterExtraRange; FLIGHTGEAR PATCH: diff --git a/src/Environment/environment_mgr.cxx b/src/Environment/environment_mgr.cxx index 15268f9..17d1e36 100644 --- a/src/Environment/environment_mgr.cxx +++ b/src/Environment/environment_mgr.cxx @@ -295,7 +295,10 @@ FGEnvironmentMgr::update (double dt) osg::Vec3 windVec(-_environment-get_wind_from_north_fps(), -_environment-get_wind_from_east_fps(), _environment-get_wind_from_down_fps()); - simgear::Particles::setWindVector(windVec * SG_FEET_TO_METER); + // simgear::Particles::setWindVector(windVec * SG_FEET_TO_METER); + double wind_true_deg = _environment-get_wind_from_heading_deg(); + simgear::Particles::setWindFrom( wind_true_deg, + _environment-get_wind_speed_kt() ); } FGEnvironment Curt. On Thu, Jul 22, 2010 at 4:25 AM, Stuart Buchanan wrote: On Wed, Jul 21, 2010 at 5:00 PM, Torsten Dreyer wrote: I don't know if it's somehow related, but the 3d clouds don't seem to drift with the wind, either. Flying with crosswind with a magnitude as your airspeed let you fly toward the clouds at a 45 degree angle. My setup was: Wind from 1...@100, flying heading 270 with 100KTS. The clouds came in from 45degrees out of the right hand side. Torsten That's just a
Re: [Flightgear-devel] aircraft search
James Turner zakal...@mac.com writes: My basic plan is to send you a patch that adds many log calls, and get you to send me the console output with that applied. If you can get me an ssh login to a box with debug-enabled fgfs, I can do it in GDB, of course. post the patch, i'll give it a try. --alex-- -- | I believe the moment is at hand when, by a paranoiac and active | | advance of the mind, it will be possible (simultaneously with | | automatism and other passive states) to systematize confusion | | and thus to help to discredit completely the world of reality. | -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] weather conditions and winds aloft notworking correctly..
Thanks for the quick work on this Torsten...with the exception of dew point and altimeter settings everything else appears to be working properly now. Currently I don't think dew point and altimeter are a big deal for what I'm doing personally, but they are/were seemingly intended to work so should probably be addressed as well. Thanks again, cheers! --Jacob -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel
Re: [Flightgear-devel] aircraft search
Alex Romosan romo...@sycorax.lbl.gov writes: James Turner ja...@bugless.co.uk writes: Can you email me what you get for --show-aircraft? (off list, is best) fgfs --show-aircraft Available aircraft: (that is nothing). this on linux. on non ext* file systems readdir doesn't return the file type in d_type so this explains why i kept getting an empty list for show-aircraft (my flightgear directory is on reiserfs). i've already sent the patch to james, but maybe somebody else also wants to give it a try (works for me). diff --git a/simgear/misc/sg_dir.cxx b/simgear/misc/sg_dir.cxx index 9c5aa78..64232c3 100644 --- a/simgear/misc/sg_dir.cxx +++ b/simgear/misc/sg_dir.cxx @@ -119,25 +119,11 @@ PathList Dir::children(int types, const std::string nameFilter) const continue; } -int type = entry-d_type; -if (type == DT_LNK) { - // find symlink target type using stat() - struct stat s; - if (stat(file(entry-d_name).c_str(), s)) { -continue; // stat() failed - } - - if (S_ISDIR(s.st_mode)) { -type = DT_DIR; - } else if (S_ISREG(s.st_mode)) { -type = DT_REG; - } else { -// symlink to block/fifo/char file, ignore -continue; - } -} // of symlink look-through - -if (type == DT_DIR) { +struct stat st; +if(stat(file(entry-d_name).c_str(), st)) + continue; // stat() failed + +if (S_ISDIR(st.st_mode)) { if (!(types TYPE_DIR)) { continue; } @@ -147,7 +133,7 @@ PathList Dir::children(int types, const std::string nameFilter) const continue; } } -} else if (type == DT_REG) { +} else if (S_ISREG(st.st_mode)) { if (!(types TYPE_FILE)) { continue; } --alex-- -- | I believe the moment is at hand when, by a paranoiac and active | | advance of the mind, it will be possible (simultaneously with | | automatism and other passive states) to systematize confusion | | and thus to help to discredit completely the world of reality. | -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel