Re: [Flightgear-devel] latest Git next, endless loop from FGATCMgr and missing JSBsim fuel-used property

2011-09-29 Thread Scott
On Wed, 2011-09-28 at 09:09 +0100, James Turner wrote:

 On 25 Sep 2011, at 09:10, James Turner wrote:
 
  2. After about 1hour of flying, FG seems to go into a endless loop; the 
  sound continues to play, however the screen is frozen (goes to black if 
  you minimise then re-maximise it), and all network activity drops off (ie: 
  you disappear from multi-player)
  I ran it with gdb and notice the following stack;
  
  We've seen issues like that before, when _geo_inverse_wgs_84 is used over 
  large (eg, half the planet) distances. The workaround / fix has been to 
  switch range checks of this nature to convert coordinates to cartesian 
  space (earth centred) and then use cartesian distance - not appropriate for 
  navigation, but fine for a range check (and quicker too).
 
 I just pushed a tweak to make this code work in cartesian space, thanks for 
 the bug report.
 
 James


Thanks James, that looks like it fixed that up, I re-flew the same route
and no problems.


cheers
   S.




 
 
 --
 All the data continuously generated in your IT infrastructure contains a
 definitive record of customers, application performance, security
 threats, fraudulent activity and more. Splunk takes this data and makes
 sense of it. Business sense. IT sense. Common sense.
 http://p.sf.net/sfu/splunk-d2dcopy1
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] latest Git next, endless loop from FGATCMgr and missing JSBsim fuel-used property

2011-09-28 Thread James Turner

On 25 Sep 2011, at 09:10, James Turner wrote:

 2. After about 1hour of flying, FG seems to go into a endless loop; the 
 sound continues to play, however the screen is frozen (goes to black if you 
 minimise then re-maximise it), and all network activity drops off (ie: you 
 disappear from multi-player)
 I ran it with gdb and notice the following stack;
 
 We've seen issues like that before, when _geo_inverse_wgs_84 is used over 
 large (eg, half the planet) distances. The workaround / fix has been to 
 switch range checks of this nature to convert coordinates to cartesian space 
 (earth centred) and then use cartesian distance - not appropriate for 
 navigation, but fine for a range check (and quicker too).

I just pushed a tweak to make this code work in cartesian space, thanks for the 
bug report.

James


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


[Flightgear-devel] latest Git next, endless loop from FGATCMgr and missing JSBsim fuel-used property

2011-09-25 Thread Scott Hamilton
  

Greetings, 

 I've noticed two small problems with the current Git
next (as at 2011-09-25), is anyone else seeing these? 

 1. the JSBsim
per-engine /fdm/jsbsim/propulsion/engine[]/fuel-used-lbs property has
disappeared
 2. After about 1hour of flying, FG seems to go into a
endless loop; the sound continues to play, however the screen is frozen
(goes to black if you minimise then re-maximise it), and all network
activity drops off (ie: you disappear from multi-player)
 I ran it with
gdb and notice the following stack; 

(gdb) bt 
#0 0x74be1894 in
?? () from /lib64/libm.so.6 
#1 0x74be1e21 in sin () from
/lib64/libm.so.6 
#2 0x00be4c21 in _geo_inverse_wgs_84
(lat1=-6.78754886, lon1=-79.8275082,
lat2=6.2889446375175346, lon2=99.797031571359014, az1=0x7fffd350, 

az2=0x7fffd348, s=0x7fffd340) at SGGeodesy.cxx:387 
#3
0x00be54be in SGGeodesy::distanceM (p1=..., p2=...) at
SGGeodesy.cxx:468 
#4 0x00be5553 in SGGeodesy::distanceNm
(from=..., to=...) at SGGeodesy.cxx:479 
#5 0x004c2095 in
FGATCMgr::FreqSearchRangeFilter::pass(FGPositioned *) const
(this=0x7fffd550, aPos=0x2640860) at ATCmgr.cxx:260 
#6
0x00a0c66c in flightgear::CommStation::findByFreq
(freqKhz=11830, pos=..., filt=0x7fffd550) at CommStation.cxx:52 
#7
0x004c24aa in FGATCMgr::FreqSearch (this=0xd3c9430,
navcomm=comm, unit=1) at ATCmgr.cxx:271 
#8 0x004c18d5 in
FGATCMgr::update (this=0xd3c9430, dt=0.03) at
ATCmgr.cxx:130 
#9 0x004362c5 in fgMainLoop () at main.cxx:157

#10 0x004aede5 in fgOSMainLoop () at fg_os_osgviewer.cxx:283

#11 0x004389cd in fgMainInit (argc=20, argv=0x7fffda48) at
main.cxx:662 
#12 0x0043551c in main (argc=20,
argv=0x7fffda48) at bootstrap.cxx:249 
(gdb) cont 
Continuing. 
^C

Program received signal SIGINT, Interrupt. 
0x74bd2024 in ?? ()
from /lib64/libm.so.6 
(gdb) bt
#0 0x74bd2024 in ?? () from
/lib64/libm.so.6
#1 0x74bdce95 in atan2 () from
/lib64/libm.so.6
#2 0x00be4d06 in _geo_inverse_wgs_84
(lat1=-6.78754886, lon1=-79.8275082,
lat2=6.2889446375175346, lon2=99.797031571359014, az1=0x7fffd350,

az2=0x7fffd348, s=0x7fffd340) at SGGeodesy.cxx:393
#3
0x00be54be in SGGeodesy::distanceM (p1=..., p2=...) at
SGGeodesy.cxx:468
#4 0x00be5553 in SGGeodesy::distanceNm
(from=..., to=...) at SGGeodesy.cxx:479
#5 0x004c2095 in
FGATCMgr::FreqSearchRangeFilter::pass(FGPositioned *) const
(this=0x7fffd550, aPos=0x2640860) at ATCmgr.cxx:260
#6
0x00a0c66c in flightgear::CommStation::findByFreq
(freqKhz=11830, pos=..., filt=0x7fffd550) at CommStation.cxx:52
#7
0x004c24aa in FGATCMgr::FreqSearch (this=0xd3c9430,
navcomm=comm, unit=1) at ATCmgr.cxx:271
#8 0x004c18d5 in
FGATCMgr::update (this=0xd3c9430, dt=0.03) at
ATCmgr.cxx:130
#9 0x004362c5 in fgMainLoop () at
main.cxx:157
#10 0x004aede5 in fgOSMainLoop () at
fg_os_osgviewer.cxx:283
#11 0x004389cd in fgMainInit (argc=20,
argv=0x7fffda48) at main.cxx:662
#12 0x0043551c in main
(argc=20, argv=0x7fffda48) at bootstrap.cxx:249
(gdb)
cont
Continuing.
^C
Program received signal SIGINT,
Interrupt.
_geo_inverse_wgs_84 (lat1=-6.78754886,
lon1=-79.8275082, lat2=6.2889446375175346,
lon2=99.797031571359014, az1=0x7fffd350, az2=0x7fffd348,
s=0x7fffd340)
 at SGGeodesy.cxx:398
398 tc =
f*cos2saz*(4.0+f*(4.0-3.0*cos2saz))/16.0;
(gdb) bt
#0
_geo_inverse_wgs_84 (lat1=-6.78754886, lon1=-79.8275082,
lat2=6.2889446375175346, lon2=99.797031571359014, az1=0x7fffd350,
az2=0x7fffd348, s=0x7fffd340)
 at SGGeodesy.cxx:398
#1
0x00be54be in SGGeodesy::distanceM (p1=..., p2=...) at
SGGeodesy.cxx:468
#2 0x00be5553 in SGGeodesy::distanceNm
(from=..., to=...) at SGGeodesy.cxx:479
#3 0x004c2095 in
FGATCMgr::FreqSearchRangeFilter::pass(FGPositioned *) const
(this=0x7fffd550, aPos=0x2640860) at ATCmgr.cxx:260
#4
0x00a0c66c in flightgear::CommStation::findByFreq
(freqKhz=11830, pos=..., filt=0x7fffd550) at CommStation.cxx:52
#5
0x004c24aa in FGATCMgr::FreqSearch (this=0xd3c9430,
navcomm=comm, unit=1) at ATCmgr.cxx:271
#6 0x004c18d5 in
FGATCMgr::update (this=0xd3c9430, dt=0.03) at
ATCmgr.cxx:130
#7 0x004362c5 in fgMainLoop () at main.cxx:157
#8
0x004aede5 in fgOSMainLoop () at fg_os_osgviewer.cxx:283
#9
0x004389cd in fgMainInit (argc=20, argv=0x7fffda48) at
main.cxx:662
#10 0x0043551c in main (argc=20,
argv=0x7fffda48) at bootstrap.cxx:249
(gdb)

The call to
_geo_inverse_wgs_84() has the same values on each call, there is about
15seconds between the CTRL-C interrupts here. 

and I'm using the
following options;


--enable-real-weather-fetch
--disable-ai-traffic
--prop:/sim/ai-traffic/enabled=false

Re: [Flightgear-devel] latest Git next, endless loop from FGATCMgr and missing JSBsim fuel-used property

2011-09-25 Thread James Turner

On 25 Sep 2011, at 08:36, Scott Hamilton wrote:

  2. After about 1hour of flying, FG seems to go into a endless loop; the 
 sound continues to play, however the screen is frozen (goes to black if you 
 minimise then re-maximise it), and all network activity drops off (ie: you 
 disappear from multi-player)
  I ran it with gdb and notice the following stack;

We've seen issues like that before, when _geo_inverse_wgs_84 is used over large 
(eg, half the planet) distances. The workaround / fix has been to switch range 
checks of this nature to convert coordinates to cartesian space (earth centred) 
and then use cartesian distance - not appropriate for navigation, but fine for 
a range check (and quicker too).

James


--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] latest Git next, endless loop from FGATCMgr and missing JSBsim fuel-used property

2011-09-25 Thread Ron Jensen
On Sunday 25 September 2011 01:36:25 Scott Hamilton wrote:
 Greetings,

  I've noticed two small problems with the current Git
 next (as at 2011-09-25), is anyone else seeing these?

  1. the JSBsim
 per-engine /fdm/jsbsim/propulsion/engine[]/fuel-used-lbs property has
 disappeared

I see it in the code, and in my fgfs. It should be automatically created for 
every JSBSim engine. What aircraft are you flying?

Thanks,
Ron

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] latest Git next, endless loop from FGATCMgr and missing JSBsim fuel-used property

2011-09-25 Thread Scott

From: Scott scott.hamil...@popplanet.biz
To: flightgear-devel@lists.sourceforge.net
Subject: Re: [Flightgear-devel] latest Git next, endless loop from
FGATCMgr and missing JSBsim fuel-used property
Date: Mon, 26 Sep 2011 08:37:06 +1000

On Sun, 2011-09-25 at 13:49 -0600, Ron Jensen wrote: 

 On Sunday 25 September 2011 01:36:25 Scott Hamilton wrote:
  Greetings,
 
   I've noticed two small problems with the current Git
  next (as at 2011-09-25), is anyone else seeing these?
 
   1. the JSBsim
  per-engine /fdm/jsbsim/propulsion/engine[]/fuel-used-lbs property has
  disappeared
 
 I see it in the code, and in my fgfs. It should be automatically created for 
 every JSBSim engine. What aircraft are you flying?


Hi ya Ron,

   I was flying the A380 and thought it was not being created as the
A380 has a JSBsim Post function to convert it to fuel-used-kg, so I
thought that was creating the fuel-used-lbs when reading it.
   I then tried the 747-400 and I see fuel-used-lbs is being created as
zero, but is not been updated, it remains at zero once you start the
engines, so that looks like the problem, it is not being updated.

   So I notice that when I did a 'git pull next' yesterday, a whole lot
of FDM/jsbsim/propulsion changes, it was probably about 3 - 4 weeks
prior that I did the last git pull next, when fuel-used-lbs property was
updated correctly for each engine.



   cheers
  S.


   

 
 Thanks,
 Ron
 
 --
 All of the data generated in your IT infrastructure is seriously valuable.
 Why? It contains a definitive record of application performance, security
 threats, fraudulent activity, and more. Splunk takes this data and makes
 sense of it. IT sense. And common sense.
 http://p.sf.net/sfu/splunk-d2dcopy2
 ___
 Flightgear-devel mailing list
 Flightgear-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/flightgear-devel



--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] latest Git next, endless loop from FGATCMgr and missing JSBsim fuel-used property

2011-09-25 Thread Ron Jensen
On Sunday 25 September 2011 16:46:32 Scott wrote:
 From: Scott scott.hamil...@popplanet.biz
 To: flightgear-devel@lists.sourceforge.net
 Subject: Re: [Flightgear-devel] latest Git next, endless loop from
 FGATCMgr and missing JSBsim fuel-used property
 Date: Mon, 26 Sep 2011 08:37:06 +1000

 On Sun, 2011-09-25 at 13:49 -0600, Ron Jensen wrote:
  On Sunday 25 September 2011 01:36:25 Scott Hamilton wrote:
   Greetings,
  
I've noticed two small problems with the current Git
   next (as at 2011-09-25), is anyone else seeing these?
  
1. the JSBsim
   per-engine /fdm/jsbsim/propulsion/engine[]/fuel-used-lbs property has
   disappeared
 
  I see it in the code, and in my fgfs. It should be automatically created
  for every JSBSim engine. What aircraft are you flying?

 Hi ya Ron,

I was flying the A380 and thought it was not being created as the
 A380 has a JSBsim Post function to convert it to fuel-used-kg, so I
 thought that was creating the fuel-used-lbs when reading it.
I then tried the 747-400 and I see fuel-used-lbs is being created as
 zero, but is not been updated, it remains at zero once you start the
 engines, so that looks like the problem, it is not being updated.

So I notice that when I did a 'git pull next' yesterday, a whole lot
 of FDM/jsbsim/propulsion changes, it was probably about 3 - 4 weeks
 prior that I did the last git pull next, when fuel-used-lbs property was
 updated correctly for each engine.



cheers
   S.

Ah, the fuel consumption code was refactored and the mechanism for setting 
that property was removed. The attached patch, which is now in JSBSim head 
fixes the issue.

Sorry,
Ron
From 67779f1d563d6d1661cb5295c210c6ac67ef74b4 Mon Sep 17 00:00:00 2001
From: rjensen w...@jentronics.com
Date: Sun, 25 Sep 2011 17:53:04 -0600
Subject: [PATCH] Make the total fuel expended counter work again.

---
 src/models/propulsion/FGPiston.cpp|1 +
 src/models/propulsion/FGTurbine.cpp   |1 +
 src/models/propulsion/FGTurboProp.cpp |1 +
 3 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/models/propulsion/FGPiston.cpp b/src/models/propulsion/FGPiston.cpp
index d055056..f8baaa8 100644
--- a/src/models/propulsion/FGPiston.cpp
+++ b/src/models/propulsion/FGPiston.cpp
@@ -481,6 +481,7 @@ void FGPiston::Calculate(void)
 double FGPiston::CalcFuelNeed(void)
 {
   FuelExpended = FuelFlowRate * in.TotalDeltaT;
+  if (!Starved) FuelUsedLbs += FuelExpended; 
   return FuelExpended;
 }
 
diff --git a/src/models/propulsion/FGTurbine.cpp b/src/models/propulsion/FGTurbine.cpp
index 5b676ed..b86bf76 100644
--- a/src/models/propulsion/FGTurbine.cpp
+++ b/src/models/propulsion/FGTurbine.cpp
@@ -385,6 +385,7 @@ double FGTurbine::CalcFuelNeed(void)
 {
   FuelFlowRate = FuelFlow_pph / 3600.0; // Calculates flow in lbs/sec from lbs/hr
   FuelExpended = FuelFlowRate * in.TotalDeltaT; // Calculates fuel expended in this time step
+  if (!Starved) FuelUsedLbs += FuelExpended; 
   return FuelExpended;
 }
 
diff --git a/src/models/propulsion/FGTurboProp.cpp b/src/models/propulsion/FGTurboProp.cpp
index 41f7967..7def4fb 100644
--- a/src/models/propulsion/FGTurboProp.cpp
+++ b/src/models/propulsion/FGTurboProp.cpp
@@ -410,6 +410,7 @@ double FGTurboProp::CalcFuelNeed(void)
 {
   FuelFlowRate = FuelFlow_pph / 3600.0;
   FuelExpended = FuelFlowRate * in.TotalDeltaT;
+  if (!Starved) FuelUsedLbs += FuelExpended;
   return FuelExpended;
 }
 
-- 
1.7.4.4

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel