Re: [Flightgear-devel] 2d clouds

2010-08-12 Thread syd adams
While Im not positive this is the problem ... I noticed these lines in
cloud.cxx starting at line 706:

if (sp_dist  0) {
bx = cos((180.0-direction) * SGD_DEGREES_TO_RADIANS) * sp_dist;
by = sin((180.0-direction) * SGD_DEGREES_TO_RADIANS) * sp_dist;
}

I dont see where 'direction' is calculated - it appears to always be 0
unless I'm missing something
Changing those above lines to this :


if (sp_dist  0) {
bx = cos((180.0-getDirection()) * SGD_DEGREES_TO_RADIANS) *
sp_dist;
by = sin((180.0-getDirection()) * SGD_DEGREES_TO_RADIANS) *
sp_dist;
}

seems to solve the problem , but I only did a short test ...that may not be
a proper fix.

Hope this help narrow down the search

Cheers
--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev ___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] 2d clouds

2010-08-12 Thread syd adams
nope still broken :(

On Wed, Aug 11, 2010 at 11:29 PM, syd adams adams@gmail.com wrote:

 While Im not positive this is the problem ... I noticed these lines in
 cloud.cxx starting at line 706:

 if (sp_dist  0) {
 bx = cos((180.0-direction) * SGD_DEGREES_TO_RADIANS) * sp_dist;
 by = sin((180.0-direction) * SGD_DEGREES_TO_RADIANS) * sp_dist;
 }

 I dont see where 'direction' is calculated - it appears to always be 0
 unless I'm missing something
 Changing those above lines to this :


 if (sp_dist  0) {
 bx = cos((180.0-getDirection()) * SGD_DEGREES_TO_RADIANS) *
 sp_dist;
 by = sin((180.0-getDirection()) * SGD_DEGREES_TO_RADIANS) *
 sp_dist;
 }

 seems to solve the problem , but I only did a short test ...that may not be
 a proper fix.

 Hope this help narrow down the search

 Cheers

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev ___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] 2d clouds

2010-08-12 Thread James Turner

On 12 Aug 2010, at 00:40, Stuart Buchanan wrote:

 This was re-factored to get rid of some old vector calculations by James:
 
 http://gitorious.org/fg/simgear/commit/aa859c488f21d0b1f8d54c657e23a738dcadacca
 
 From a code read of the diffs, I think the course for the viewer
 movement was reversed during the refactoring and should be from the
 current position to the last position, as we want the cloud field to
 move towards us. However, changing that didn't have the effect I
 expected, just shifted the problem by 90 degrees so the clouds moved
 away from the aircraft when heading E/W rather than N/S. Eventually I
 hacked the the ay value as the patch below shows, which does appear to
 give the correct behaviour (at least around EGPH).
 
 That suggests the texture coordinates are reversed in the y-axis, but
 I don't see how that could have changed recently to introduce this
 discrepancy
 
 I'll take another look when I get the chance, but in the meantime if
 anyone has any bright ideas, please let me know.

I'll take a look when I get a free moment, hopefully this evening but maybe the 
weekend. As you say, I really don't understand how the Point3D removal could 
have caused a 90 degree shift; it's entirely possible I introduced a 180 degree 
shift. Hmm.

James


--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Curved screens

2010-08-12 Thread Tim Moore
On Thu, Aug 12, 2010 at 5:03 AM, John Wojnaroski cas...@mminternet.comwrote:

 There is a program called Nthusim ( http://nthusim.com ) that will
 warp an MS windows screen for projection onto a curved surface.

 Is there any such capability in OSG?  If not, any thoughts on adding the
 function to FlighrGear or OSG that would work with X windows under
 Linux.

 OSG has built-in support for some specific displays e.g. domes with a
fisheye lens and some eLumens displays. If you wanted to take this further
you could use that existing code as an example.

Tim

 JW



 --
 This SF.net email is sponsored by

 Make an app they can't live without
 Enter the BlackBerry Developer Challenge
 http://p.sf.net/sfu/RIM-dev2dev
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev ___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Crash with new p51d-jsbsim

2010-08-12 Thread Hal V. Engel
On Wednesday, August 11, 2010 02:10:07 pm Stuart Buchanan wrote:
 Hi All,
 
 I'm getting consistent crashes with the new p51d-jsbsim. Backtrace below.
 
 My simgear and flightgear source are up to date (as far as I can tell).
 
 Anyone else seeing this?
 
 -Stuart

Just to follow up.  I am not running current GIT of FG.  My copy is GIT as of 
about 3 weeks ago and I am not seeing this issue.  The JSBSIm P-51D is doing 
some things that are a little unusual and that push the limits of what can be 
done in JSBSIm.  So it is more likely to run into things that cause crashes 
than most models.

It appears that it is crashing when it tries to do something with a switch.  
You might want to try bisecting to see which commit is causing the problem.

Hal

 
 setStores
 
 Program received signal SIGSEGV, Segmentation fault.
 0x009ba8ba in SGPropertyNode::get_int (this=0x100e3740)
 at props.cxx:370
 370 return (static_castSGRawValueint*(_value.val))-getValue();
 (gdb) bt
 #0  0x009ba8ba in SGPropertyNode::get_int (this=0x100e3740)
 at props.cxx:370
 #1  SGPropertyNode::getDoubleValue (this=0x100e3740) at props.cxx:1219
 #2  0x005bce52 in JSBSim::FGSwitch::test::GetValue
 (this=0x101cca50) at FGSwitch.h:164
 #3  JSBSim::FGSwitch::Run (this=0x101cca50) at FGSwitch.cpp:169
 #4  0x0055425d in JSBSim::FGFCS::Run (this=0x10172810) at
 FGFCS.cpp:215 #5  0x0051bbe5 in JSBSim::FGFDMExec::Run
 (this=0x101887e0) at FGFDMExec.cpp:331
 #6  0x0051bc58 in JSBSim::FGFDMExec::RunIC (this=0x101887e0)
 at FGFDMExec.cpp:347
 #7  0x0053abfb in JSBSim::FGTrimAxis::Run (this=0x7fffd0054080)
 at FGTrimAxis.cpp:406
 #8  0x00539707 in JSBSim::FGTrim::DoTrim (this=0x7fffd0053f90)
 at FGTrim.cpp:262
 #9  0x00501177 in FGJSBsim::do_trim (this=0x10290f80)
 at JSBSim.cxx:1166
 #10 0x00501be2 in FGJSBsim::update (this=0x10290f80,
 dt=value optimised out) at JSBSim.cxx:501
 #11 0x004e7258 in FDMShell::update (this=0xd22aca0,
 dt=value optimised out) at fdm_shell.cxx:162
 #12 0x009f645d in SGSubsystemGroup::Member::update (this=0xd1b41f0,
 delta_time_sec=value optimised out) at subsystem_mgr.cxx:339
 #13 0x009f83c8 in SGSubsystemGroup::update (this=0xddcf68,
 delta_time_sec=value optimised out) at subsystem_mgr.cxx:177
 #14 0x009f624a in SGSubsystemMgr::update (this=0xddcea0,
 delta_time_sec=value optimised out) at subsystem_mgr.cxx:432
 #15 0x00431a8a in fgMainLoop () at main.cxx:164
 #16 0x0047b9a2 in fgOSMainLoop () at fg_os_osgviewer.cxx:200
 #17 0x00432899 in fgMainInit (argc=2, argv=0x7fffe318)
 at main.cxx:664
 #18 0x0042fe1e in main (argc=2, argv=0x7fffe318)
 at bootstrap.cxx:243
 (gdb) print _value
 Cannot access memory at address 0x88
 
 ---
 --- This SF.net email is sponsored by
 
 Make an app they can't live without
 Enter the BlackBerry Developer Challenge
 http://p.sf.net/sfu/RIM-dev2dev
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Crash with new p51d-jsbsim

2010-08-12 Thread Ron Jensen
On Thursday 12 August 2010 18:52:28 Hal V. Engel wrote:
 On Wednesday, August 11, 2010 02:10:07 pm Stuart Buchanan wrote:
  Hi All,
 
  I'm getting consistent crashes with the new p51d-jsbsim. Backtrace below.
 
  My simgear and flightgear source are up to date (as far as I can tell).
 
  Anyone else seeing this?
 
  -Stuart

 Just to follow up.  I am not running current GIT of FG.  My copy is GIT as
 of about 3 weeks ago and I am not seeing this issue.  The JSBSIm P-51D is
 doing some things that are a little unusual and that push the limits of
 what can be done in JSBSIm.  So it is more likely to run into things that
 cause crashes than most models.

 It appears that it is crashing when it tries to do something with a switch.
 You might want to try bisecting to see which commit is causing the problem.

 Hal

In yesterday's standalone JSBSim the p51d aborts because some properties are 
being used without being declared.  Try the attached patch to the p51d.xml and 
see if it works any better for you.

Ron
( I tried sending the whole file but it errorred out for being too many 
kbytes.)

diff --git a/aircraft/p51d/p51d.xml b/aircraft/p51d/p51d.xml
index 5a264c9..00eb3a3 100644
--- a/aircraft/p51d/p51d.xml
+++ b/aircraft/p51d/p51d.xml
@@ -665,6 +665,9 @@ Hal V. Engel hven...@astound.net
 outputgear/gear-pos-norm/output
 /kinematic
 /channel   
+property/controls/gear/brake-left/property
+property/controls/gear/brake-right/property
+property/controls/gear/brake-parking/property
 
 channel name=Brakes

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Crash with new p51d-jsbsim

2010-08-12 Thread Hal V. Engel
On Thursday, August 12, 2010 07:24:36 pm Ron Jensen wrote:
 On Thursday 12 August 2010 18:52:28 Hal V. Engel wrote:
  On Wednesday, August 11, 2010 02:10:07 pm Stuart Buchanan wrote:
   Hi All,
   
   I'm getting consistent crashes with the new p51d-jsbsim. Backtrace
   below.
   
   My simgear and flightgear source are up to date (as far as I can tell).
   
   Anyone else seeing this?
   
   -Stuart
  
  Just to follow up.  I am not running current GIT of FG.  My copy is GIT
  as of about 3 weeks ago and I am not seeing this issue.  The JSBSIm
  P-51D is doing some things that are a little unusual and that push the
  limits of what can be done in JSBSIm.  So it is more likely to run into
  things that cause crashes than most models.
  
  It appears that it is crashing when it tries to do something with a
  switch. You might want to try bisecting to see which commit is causing
  the problem.
  
  Hal
 
 In yesterday's standalone JSBSim the p51d aborts because some properties
 are being used without being declared.  Try the attached patch to the
 p51d.xml and see if it works any better for you.
 
 Ron
 ( I tried sending the whole file but it errorred out for being too many
 kbytes.)
 
 diff --git a/aircraft/p51d/p51d.xml b/aircraft/p51d/p51d.xml
 index 5a264c9..00eb3a3 100644
 --- a/aircraft/p51d/p51d.xml
 +++ b/aircraft/p51d/p51d.xml
 @@ -665,6 +665,9 @@ Hal V. Engel hven...@astound.net
  outputgear/gear-pos-norm/output
  /kinematic
  /channel
 +property/controls/gear/brake-left/property
 +property/controls/gear/brake-right/property
 +property/controls/gear/brake-parking/property
 
  channel name=Brakes

The above is a little confusing I think.  It appears that this patch is for 
the p51d.xml file but p51d.xml is the YASim xml file.  This probably needs to 
be 
applied against p51d-jsbsim.xml instead. 

I see that GIT was last synced with JSBSim CVS Aug 3 and the sync before that 
was on July 16. I am running a build from about July 20.  So it looks like it 
is time to for me to rebuild FG to get the latest JSBSim code.  I tested the 
above patch applied to p51d-jsbsim.xml with my older version of GIT and it did 
not cause any issues for me.  I will include it with the next merge of the 
P-51D. 

Hal 

 
 ---
 --- This SF.net email is sponsored by
 
 Make an app they can't live without
 Enter the BlackBerry Developer Challenge
 http://p.sf.net/sfu/RIM-dev2dev
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] Crash with new p51d-jsbsim

2010-08-12 Thread Hal V. Engel
On Thursday, August 12, 2010 07:24:36 pm Ron Jensen wrote:
 On Thursday 12 August 2010 18:52:28 Hal V. Engel wrote:
  On Wednesday, August 11, 2010 02:10:07 pm Stuart Buchanan wrote:
   Hi All,
   
   I'm getting consistent crashes with the new p51d-jsbsim. Backtrace
   below.
   
   My simgear and flightgear source are up to date (as far as I can tell).
   
   Anyone else seeing this?
   
   -Stuart
  
  Just to follow up.  I am not running current GIT of FG.  My copy is GIT
  as of about 3 weeks ago and I am not seeing this issue.  The JSBSIm
  P-51D is doing some things that are a little unusual and that push the
  limits of what can be done in JSBSIm.  So it is more likely to run into
  things that cause crashes than most models.
  
  It appears that it is crashing when it tries to do something with a
  switch. You might want to try bisecting to see which commit is causing
  the problem.
  
  Hal
 
 In yesterday's standalone JSBSim the p51d aborts because some properties
 are being used without being declared.  Try the attached patch to the
 p51d.xml and see if it works any better for you.
 
 Ron
 ( I tried sending the whole file but it errorred out for being too many
 kbytes.)
 
 diff --git a/aircraft/p51d/p51d.xml b/aircraft/p51d/p51d.xml
 index 5a264c9..00eb3a3 100644
 --- a/aircraft/p51d/p51d.xml
 +++ b/aircraft/p51d/p51d.xml
 @@ -665,6 +665,9 @@ Hal V. Engel hven...@astound.net
  outputgear/gear-pos-norm/output
  /kinematic
  /channel
 +property/controls/gear/brake-left/property
 +property/controls/gear/brake-right/property
 +property/controls/gear/brake-parking/property
 
  channel name=Brakes

I just tested with this change against a fresh GIT build of FG and simgear.  
Worked OK.

Hal

 
 ---
 --- This SF.net email is sponsored by
 
 Make an app they can't live without
 Enter the BlackBerry Developer Challenge
 http://p.sf.net/sfu/RIM-dev2dev
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel