Re: [Flightgear-devel] working ridge lift !!

2009-04-25 Thread Mathias Fröhlich
Hi Curt, On Thursday 23 April 2009 01:06:08 Curtis Olson wrote: I'm seeing a ton of these nan's when I start at KHAF ... it's just one or two or three per frame, but that ends up spewing an awful lot of extra text to my console. If you use todays OpenSceneGraph trunk, then, since friday

Re: [Flightgear-devel] working ridge lift !!

2009-04-24 Thread Torsten Dreyer
I just commited this patch with some changes: The properties probe_elev_m[0..4] were uninitialized and used in the Run() method before being initialized by a scan of the ground elevations. The first scan was performed after one second, so for the first second the probe_elev_m were used in an

Re: [Flightgear-devel] working ridge lift !!

2009-04-24 Thread jean pellotier
Torsten Dreyer a écrit : I just commited this patch with some changes: The properties probe_elev_m[0..4] were uninitialized and used in the Run() method before being initialized by a scan of the ground elevations. The first scan was performed after one second, so for the first second the

Re: [Flightgear-devel] working ridge lift !!

2009-04-24 Thread Torsten Dreyer
Torsten Dreyer a écrit : I just commited this patch with some changes: The properties probe_elev_m[0..4] were uninitialized and used in the Run() method before being initialized by a scan of the ground elevations. The first scan was performed after one second, so for the first second

Re: [Flightgear-devel] working ridge lift !!

2009-04-24 Thread Patrice Poly
I just commited this patch with some changes: The properties probe_elev_m[0..4] were uninitialized and used in the Run() method before being initialized by a scan of the ground elevations. The first scan was performed after one second, so for the first second the probe_elev_m

Re: [Flightgear-devel] working ridge lift !!

2009-04-24 Thread syd adams
Just updated and recompiled looks good here , no more warnings -- Crystal Reports #45; New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty#45;free

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Stuart Buchanan
Patrice Poly wrote: I'm a bit at lost for now, as I really don't see any NaN anymore here, and don't have another platform to test on. I would be interested to see on which platforms / configuration this happens, maybe when more feedback comes in ?? I've been seeing this every time I

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Martin Spott
Stuart Buchanan wrote: I've been seeing this every time I load on Ubuntu Hardy. I'm 90% sure that the ridge-lift enhancement is the root cause - it's the only source change that went in when I rebuilt last. We've occasionally seen lots of NaN's before addition of the ridge-lift as well and

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread gerard robin
On jeudi 23 avril 2009, Martin Spott wrote: Stuart Buchanan wrote: I've been seeing this every time I load on Ubuntu Hardy. I'm 90% sure that the ridge-lift enhancement is the root cause - it's the only source change that went in when I rebuilt last. We've occasionally seen lots of NaN's

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Erik Hofman
gerard robin wrote: Yes it is difficult to trap these nan which are coming ( + or - randomly ? ? ? , though, getting trouble with carrier) ), and when we get it the system is closed to be frozen , with black screen, and command line overflowed with messages. And when i tried with GDB

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Patrice Poly
so, a possible fix : line 218-220 should be : probe_lon_rad[i] = fmod((deg2rad*user_longitude_deg+asin(sin(ground_wind_from_rad) *sin(dist_probe_m[i]/earth_rad_m)/cos(probe_lat_rad[i]))+PI)

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Patrice Poly
the fix, as a patch http://www.bentha.net/fgfs/ridge-lift/Environment.diff.bz2 hope this works... This includes the correction for the lee side, according to Ian's advice based on real fly. -- Stay on top of

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Patrice Poly
so, a possible fix : line 218-220 should be : probe_lon_rad[i] = fmod((deg2rad*user_longitude_deg+asin(sin(ground_wind_from_rad) *sin(dist_probe_m[i]/earth_rad_m)/cos(probe_lat_rad[i]))+PI)

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Torsten Dreyer
I posted the correct version to www.bentha.net/fgfs/ridge-lift/ridge-lift-in-environment.zip Can you please send a diff to current cvs? Torsten -- Stay on top of everything new and different, both inside and around

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Patrice Poly
Can you please send a diff to current cvs? its in the previous post I made. Sorry, I messed up a bit with mail this morning... -- Stay on top of everything new and different, both inside and around Java (TM)

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread jean pellotier
Patrice Poly a écrit : the fix, as a patch http://www.bentha.net/fgfs/ridge-lift/Environment.diff.bz2 hope this works... nope, same behaviour!! i think that on my slow PC, your ridge lift is sometimes initialised a little to early (while position is 0,0,0 maybe), resulting in some nan

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Patrice Poly
nope, same behaviour!! i think that on my slow PC, your ridge lift is sometimes initialised a little to early (while position is 0,0,0 maybe), resulting in some nan in the result of terrain scan, wich lead to a nan in /environment/ridge-lift-fps. and as it's used to compute the next

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Ron Jensen
On Thu, 2009-04-23 at 11:56 -0400, Patrice Poly wrote: nope, same behaviour!! i think that on my slow PC, your ridge lift is sometimes initialised a little to early (while position is 0,0,0 maybe), resulting in some nan in the result of terrain scan, wich lead to a nan in

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Ron Jensen
On Thu, 2009-04-23 at 10:56 -0600, Ron Jensen wrote: On Thu, 2009-04-23 at 11:56 -0400, Patrice Poly wrote: nope, same behaviour!! i think that on my slow PC, your ridge lift is sometimes initialised a little to early (while position is 0,0,0 maybe), resulting in some nan in the

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Detlef Faber
Am Donnerstag, den 23.04.2009, 17:43 +0200 schrieb jean pellotier: Patrice Poly a écrit : the fix, as a patch http://www.bentha.net/fgfs/ridge-lift/Environment.diff.bz2 hope this works... nope, same behaviour!! i think that on my slow PC, your ridge lift is sometimes

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread syd adams
I tried this but no luck here Im still getting this message about every second: Warning: invalid line segment passed to IntersectVisitor::addLineSegment(..) nan nan 3.87514e+06 nan nan 3.85687e+06 segment ignored. i tested : _ridge_lift_fps_node-setDoubleValue( 0 ); and no

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Alex Romosan
syd adams writes: I tried this but no luck here Im still getting this message about every second: Warning: invalid line segment passed to IntersectVisitor::addLineSegment(..) nan nan 3.87514e+06 nan nan 3.85687e+06 segment ignored. i think this depends on the version of osg

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Patrice Poly
so here comes another attempt to reduce these error to silence : line 238 : if ( alt 0.1 ) { probe_elev_m[i] = alt; } else { probe_elev_m[i] = 0.1 ;}; lines 319-321 for desperate cases : strength = lift_mps * SG_METER_TO_FEET ; if(isnan(strength)) strength=0;

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread Patrice Poly
udpated the patch again, with another Nan killer from jano. That seems to have worked for him, at least http://www.bentha.net/fgfs/ridge-lift/Environment.diff.bz2 -- Crystal Reports #45; New Free Runtime and 30 Day Trial

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread syd adams
On Thu, Apr 23, 2009 at 12:29 PM, Alex Romosan romo...@sycorax.lbl.govwrote: syd adams writes: I tried this but no luck here Im still getting this message about every second: Warning: invalid line segment passed to IntersectVisitor::addLineSegment(..) nan nan

Re: [Flightgear-devel] working ridge lift !!

2009-04-23 Thread syd adams
Just a note : I applied the last patch posted here and success ! No more warnings so far ,with the 777-200, at least. I'll try more. -- Crystal Reports #45; New Free Runtime and 30 Day Trial Check out the new simplified

Re: [Flightgear-devel] working ridge lift !!

2009-04-22 Thread jean pellotier
hi And ty Torsten for committing ! I hope it doesn't trigger too much bugs. My side I don't see weird things. for me FG is quite impossible to use with the ridge drift, on startup it start having full of nan nan nan, cull visitor and so on, with 1 fps, nearly 90% of my try to start are

Re: [Flightgear-devel] working ridge lift !!

2009-04-22 Thread Martin Spott
Patrice Poly wrote: I have just received a mail from Ian Forster-Lewis , the author of the original ridge lift ground sampling algorithm, in which he agrees for inclusion of his work into FG, provided that his name and link is included in the code. Great addition, marvellous !

Re: [Flightgear-devel] working ridge lift !!

2009-04-22 Thread Patrice Poly
for me FG is quite impossible to use with the ridge drift, on startup it start having full of nan nan nan, cull visitor and so on, with 1 fps, nearly 90% of my try to start are bad. i commented some lines in ridge_lift.cxx (from 210 to 307, and change 309 to:

Re: [Flightgear-devel] working ridge lift !!

2009-04-22 Thread Curtis Olson
I'm seeing a ton of these nan's when I start at KHAF ... it's just one or two or three per frame, but that ends up spewing an awful lot of extra text to my console. Regards, Curt. On Wed, Apr 22, 2009 at 5:32 PM, Patrice Poly wrote: for me FG is quite impossible to use with the ridge

Re: [Flightgear-devel] working ridge lift !!

2009-04-22 Thread Martin Spott
Curtis Olson wrote: I'm seeing a ton of these nan's when I start at KHAF ... it's just one or two or three per frame, but that ends up spewing an awful lot of extra text to my console. That's weird, at least using the ASK 21 I don't see a single one - on Linux/AMD64 with GCC-4.3.2,

Re: [Flightgear-devel] working ridge lift !!

2009-04-22 Thread Patrice Poly
Le Wednesday 22 April 2009 19:20:54 Martin Spott, vous avez écrit : Curtis Olson wrote: I'm seeing a ton of these nan's when I start at KHAF ... it's just one or two or three per frame, but that ends up spewing an awful lot of extra text to my console. That's weird, at least using the ASK

Re: [Flightgear-devel] working ridge lift !!

2009-04-22 Thread Curtis Olson
With floating point numbers you usually don't want to check for zero. Usually you want to check if fabs( number ) epsilon (where epsilon is some really small number.) This is more stable since inside the computer, a floating point number is just an approximation ... 1/10 for instance becomes a

Re: [Flightgear-devel] working ridge lift !!

2009-04-22 Thread Marcin Koziol
I'm a bit at lost for now, as I really don't see any NaN anymore here, and don't have another platform to test on. I would be interested to see on which platforms / configuration this happens, maybe when more feedback comes in ?? Hi! I'm new here. I have checked out CVS version of FG about

Re: [Flightgear-devel] working ridge lift !!

2009-04-22 Thread Ron Jensen
On Wed, 2009-04-22 at 19:57 -0400, Patrice Poly wrote: Le Wednesday 22 April 2009 19:20:54 Martin Spott, vous avez écrit : Curtis Olson wrote: I'm seeing a ton of these nan's when I start at KHAF ... it's just one or two or three per frame, but that ends up spewing an awful lot of extra

Re: [Flightgear-devel] working ridge lift !!

2009-04-22 Thread jean pellotier
I would be interested to see on which platforms / configuration this happens, maybe when more feedback comes in ?? I've got a 32 bits debian SID system, and my athlon xp 2800+ is a single core, i usually got nearly 20 fps near KSFO. jano

Re: [Flightgear-devel] working ridge lift !!

2009-04-20 Thread AJ MacLeod
On Sunday 19 April 2009 17:51:13 Patrice Poly wrote: I have just received a mail from Ian Forster-Lewis , the author of the original ridge lift ground sampling algorithm, in which he agrees for inclusion of his work into FG, provided that his name and link is included in the code. You can

Re: [Flightgear-devel] working ridge lift !!

2009-04-20 Thread Ian Lewis
I'll see if I can help a bit with the FG ridgelift implementation. Which glider has the best flight model and instruments? Ridgelift only really pays off when you have a decent glider. I've expanded the wiki stub http://wiki.flightgear.org/index.php/Improving_Glider_Realism to at least create

Re: [Flightgear-devel] working ridge lift !!

2009-04-20 Thread Torsten Dreyer
Patrice, I had some nice ridge flights with your work and really enjoyed it! That is a great improvement not only for sail planes. Everything compiled nicely here on linux and I hope it does so on the other supported platformes, too. I have just committed your files, let's wait for the bugs to

Re: [Flightgear-devel] working ridge lift !!

2009-04-20 Thread Curtis Olson
On Mon, Apr 20, 2009 at 9:24 AM, Torsten Dreyer tors...@t3r.de wrote: Patrice, I had some nice ridge flights with your work and really enjoyed it! That is a great improvement not only for sail planes. Everything compiled nicely here on linux and I hope it does so on the other supported

Re: [Flightgear-devel] working ridge lift !!

2009-04-20 Thread Torsten Dreyer
On Mon, Apr 20, 2009 at 9:24 AM, Torsten Dreyer tors...@t3r.de wrote: Patrice, I had some nice ridge flights with your work and really enjoyed it! That is a great improvement not only for sail planes. Everything compiled nicely here on linux and I hope it does so on the other

Re: [Flightgear-devel] working ridge lift !!

2009-04-20 Thread AJ MacLeod
On Monday 20 April 2009 13:12:27 Ian Lewis wrote: I'll see if I can help a bit with the FG ridgelift implementation. Fantastic! This is something that we've been missing for a long time in FG. Which glider has the best flight model and instruments? Ridgelift only really pays off when you have

Re: [Flightgear-devel] working ridge lift !!

2009-04-20 Thread Patrice Poly
Hi Torsten/Patrice, What steps would a person need to perform to test out this code. Is it on by default? Can I see the effect in any aircraft? Thanks, Curt. Hello Curt, I'm very happy to see this found some interest ! you don't need to set anything, its on by default, just monitor

Re: [Flightgear-devel] working ridge lift !!

2009-04-19 Thread Patrice Poly
I have just received a mail from Ian Forster-Lewis , the author of the original ridge lift ground sampling algorithm, in which he agrees for inclusion of his work into FG, provided that his name and link is included in the code. He also proposes a refinement of the way sink is calculated on

Re: [Flightgear-devel] working ridge lift !!

2009-04-15 Thread Patrice Poly
I have it working now in environment. It leaves room for thermals, and mixes good with them. I also refined the thermal model, so that it behaves more like a real thermal. I am still waiting for an answer from the guy who wrote the algorithm for ridge lift, regarding licensing. I'm almost

Re: [Flightgear-devel] working ridge lift !!

2009-04-13 Thread Vadym Kukhtin
2009/4/11 Patrice Poly p.pol...@gmail.com: I made a working ridge lift in a AI object. It WORKS, and , even, it works GOOD ! Great!! I'm wait for this feature already for a couple of years... Please keep to develop it! -- --- WBR, Vadym.

Re: [Flightgear-devel] working ridge lift !!

2009-04-12 Thread Patrice Poly
This looks really neat. I'm not sure why you put it into the AI subsystem, though. It makes more sense to me to have it in Environment/environment.cxx with the other basic wind calculations? I have been looking into environment.cxx I am not sure I understand how this works. environment.cxx

[Flightgear-devel] working ridge lift !!

2009-04-11 Thread Patrice Poly
Hello, thanks to the info by Hooray in the forum, and most of all thanks to the awesome paper found by him here : http://carrier.csi.cam.ac.uk/forsterlewis/soaring/sim/fsx/dev/sim_probe/sim_probe_paper.html I made a working ridge lift in a AI object. It WORKS, and , even, it works GOOD ! I am

Re: [Flightgear-devel] working ridge lift !!

2009-04-11 Thread Ron Jensen
On Sat, 2009-04-11 at 04:52 -0400, Patrice Poly wrote: Hello, thanks to the info by Hooray in the forum, and most of all thanks to the awesome paper found by him here : http://carrier.csi.cam.ac.uk/forsterlewis/soaring/sim/fsx/dev/sim_probe/sim_probe_paper.html I made a working ridge