Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Main renderer.cxx, 1.27, 1.28

2005-10-06 Thread Erik Hofman

Dave Culp wrote:

This sounds more like HAA  (height above airport) or HAT (height above 
touchdown).  Height AGL should be the current height above the ground 
directly below the aircraft. 


Height AGL should change as the terrain below the aircraft changes.


What would expect the HUD to display? I'm quite sure that the F-16 
doesn't have a terrain database or an AGL radar.


Erik

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Main renderer.cxx, 1.27, 1.28

2005-10-06 Thread Frederic Bouvier
Quoting Erik Hofman:

 Dave Culp wrote:

  This sounds more like HAA  (height above airport) or HAT (height above
  touchdown).  Height AGL should be the current height above the ground
  directly below the aircraft.
 
  Height AGL should change as the terrain below the aircraft changes.

 What would expect the HUD to display? I'm quite sure that the F-16
 doesn't have a terrain database or an AGL radar.

So the HUD is displaying the height for the last known QFE ?

-Fred

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Main renderer.cxx, 1.27, 1.28

2005-10-06 Thread Erik Hofman

Frederic Bouvier wrote:


So the HUD is displaying the height for the last known QFE ?


I think so. I suppose it just a barometric instrument with a digital 
display. It is synchronized by ATC reports.


Erik

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Main renderer.cxx, 1.27, 1.28

2005-10-06 Thread Mathias Fröhlich

Curt,

Is on my todo list for tomorrow (friday) since I saw Melchior's patch.

 Greetings

   Mathias

On Dienstag 04 Oktober 2005 20:52, Curtis L. Olson wrote:
 For what it's worth, I don't like this patch.  It shouldn't make much
 difference on 24/32 bit cards, which is probably  most everyone now
 anyway, but I think there is a different problem brewing somewhere.

 I haven't had time to look into it, but the AGL reading on the HUD no
 longer reads correctly.  Somewhere along the lines we have introduced
 some sort of height above ground bugs.  I don't know if that is in the
 ground cache code or elsewhere, but the HUD above ground display isn't
 working right anymore.

 If we get that problem fixed so the system knows the correct AGL, then
 we wouldn't need to make this particular huge hack 5 times worse.

 Somehow the gear still knows where the ground is, but I recall specific
 patches to the individual FDM's.  I've lost track of what is going on
 with this section of code, but it's important and it really should get
 fixed before we get too much further!

 I'm going out of town on thursday and rushing to get a bunch of other
 stuff done in the mean time, so I really can't look at this in the near
 term, but someone really needs to volunteer to step up and track down
 what is going on here.

 Regards,

 Curt.

 Melchior Franz wrote:
 Update of /var/cvs/FlightGear-0.9/FlightGear/src/Main
 In directory baron:/tmp/cvs-serv754
 
 Modified Files:
  renderer.cxx
 Log Message:
 prevent view through big hole in carrier deck
 
 
 Index: renderer.cxx
 ===
 RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Main/renderer.cxx,v
 retrieving revision 1.27
 retrieving revision 1.28
 diff -C2 -r1.27 -r1.28
 *** renderer.cxx 1 Oct 2005 09:56:53 -   1.27
 --- renderer.cxx 4 Oct 2005 18:01:45 -   1.28
 ***
 *** 499,503 
   - cur_fdm_state-get_Runway_altitude_m();
 
 ! if ( agl  10.0 ) {
   scene_nearplane = 10.0f;
   scene_farplane = 12.0f;
 --- 499,503 
   - cur_fdm_state-get_Runway_altitude_m();
 
 ! if ( agl  50.0 ) {
   scene_nearplane = 10.0f;
   scene_farplane = 12.0f;
 
 
 ___
 Flightgear-cvslogs mailing list
 [EMAIL PROTECTED]
 http://mail.flightgear.org/mailman/listinfo/flightgear-cvslogs
 2f585eeea02e2c79d7b1d8c4963bae2d

-- 
Mathias Fröhlich, email: [EMAIL PROTECTED]

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Main renderer.cxx, 1.27, 1.28

2005-10-06 Thread Mathias Fröhlich
On Dienstag 04 Oktober 2005 22:17, Melchior FRANZ wrote:
 * Curtis L. Olson -- Tuesday 04 October 2005 22:02:
  You've been granted CVS commit access so use your best judgement.

 Yes. I don't usually touch such things, because I don't understand much
 of this. I did it anyway, because:

 - this change was already in cvs since a great while, and only had been
   reverted recently

 - the commit log of the reverting patch didn't explain why this was
 reverted; it was part of a completely different change and looked like an
 accident

Well, I reverted.
Just because, as it was introduced the first time it was a workaround for 
something, at this time, hard to fix.
At that time, the renderer had a different understanding of ground level than 
the gear code.
I changed that at some time and removed the workaround.
I thought that it was clear that it was a workaround, and I silently restored 
the old, more correct, behavour.

   Greetings

 Mathias

-- 
Mathias Fröhlich, email: [EMAIL PROTECTED]

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Main renderer.cxx, 1.27, 1.28

2005-10-05 Thread Erik Hofman

Melchior FRANZ wrote:

* Curtis L. Olson -- Tuesday 04 October 2005 22:22:

Somewhere since the last release, that got broke and it must get fixed.  
If that was fixed you wouldn't be seeing a hole in the carrier deck. 


The bug was AFAIK there ever since we have helicopters. The same holes
were on rooftops.


Looking at the code (and only at the code) it looks more like a 
misunderstanding than a bug.


What happens with the HUD is that it behaves like a normal instrument 
now (and not a perfect one) by that it specifies the AGL relative to the 
last known good elevation (the airport elevation). I assume it worked 
more like a radar that could precisely determine the AGL at the aircraft 
location.


So what basically happens now is that at the (startup) airport the AGL 
would be reported correctly, but once the terrain elevation increases 
the reported AGL won't change (like in real life).


Maybe we need a different naming for exact AGL (which is computed 
correctly BTW, but under a different name).


Erik

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Main renderer.cxx, 1.27, 1.28

2005-10-05 Thread Dave Culp
 So what basically happens now is that at the (startup) airport the AGL
 would be reported correctly, but once the terrain elevation increases
 the reported AGL won't change (like in real life).

This sounds more like HAA  (height above airport) or HAT (height above 
touchdown).  Height AGL should be the current height above the ground 
directly below the aircraft. 

Height AGL should change as the terrain below the aircraft changes.

Dave

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Main renderer.cxx, 1.27, 1.28

2005-10-04 Thread Curtis L. Olson
For what it's worth, I don't like this patch.  It shouldn't make much 
difference on 24/32 bit cards, which is probably  most everyone now 
anyway, but I think there is a different problem brewing somewhere.


I haven't had time to look into it, but the AGL reading on the HUD no 
longer reads correctly.  Somewhere along the lines we have introduced 
some sort of height above ground bugs.  I don't know if that is in the 
ground cache code or elsewhere, but the HUD above ground display isn't 
working right anymore.


If we get that problem fixed so the system knows the correct AGL, then 
we wouldn't need to make this particular huge hack 5 times worse.


Somehow the gear still knows where the ground is, but I recall specific 
patches to the individual FDM's.  I've lost track of what is going on 
with this section of code, but it's important and it really should get 
fixed before we get too much further!


I'm going out of town on thursday and rushing to get a bunch of other 
stuff done in the mean time, so I really can't look at this in the near 
term, but someone really needs to volunteer to step up and track down 
what is going on here.


Regards,

Curt.


Melchior Franz wrote:


Update of /var/cvs/FlightGear-0.9/FlightGear/src/Main
In directory baron:/tmp/cvs-serv754

Modified Files:
	renderer.cxx 
Log Message:

prevent view through big hole in carrier deck


Index: renderer.cxx
===
RCS file: /var/cvs/FlightGear-0.9/FlightGear/src/Main/renderer.cxx,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** renderer.cxx1 Oct 2005 09:56:53 -   1.27
--- renderer.cxx4 Oct 2005 18:01:45 -   1.28
***
*** 499,503 
 - cur_fdm_state-get_Runway_altitude_m();
 
! if ( agl  10.0 ) {

 scene_nearplane = 10.0f;
 scene_farplane = 12.0f;
--- 499,503 
 - cur_fdm_state-get_Runway_altitude_m();
 
! if ( agl  50.0 ) {

 scene_nearplane = 10.0f;
 scene_farplane = 12.0f;


___
Flightgear-cvslogs mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-cvslogs
2f585eeea02e2c79d7b1d8c4963bae2d
 




--
Curtis Olsonhttp://www.flightgear.org/~curt
HumanFIRST Program  http://www.humanfirst.umn.edu/
FlightGear Project  http://www.flightgear.org
Unique text:2f585eeea02e2c79d7b1d8c4963bae2d


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Main renderer.cxx, 1.27, 1.28

2005-10-04 Thread Melchior FRANZ
* Curtis L. Olson -- Tuesday 04 October 2005 20:52:
 For what it's worth, I don't like this patch.

I find the hole more annoying. Unfortunately, I can't fix what
you think is the real problem. Shall I revert for now? 

m.

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Main renderer.cxx, 1.27, 1.28

2005-10-04 Thread Curtis L. Olson

Melchior FRANZ wrote:


* Curtis L. Olson -- Tuesday 04 October 2005 20:52:
 


For what it's worth, I don't like this patch.
   



I find the hole more annoying. Unfortunately, I can't fix what
you think is the real problem. Shall I revert for now? 
 



I'm not saying the hole isn't annoying, I'm just saying that there is a 
bug because for some reason, the sim thinks you are  10 meters AGL when 
you are sitting on the carrier deck.  There is some ground intersection 
problem going on there.  If the ground interesection was computed 
correctly, the system would think you are  10 meters AGL and everything 
would work the way it is intended.


I'd really like for this to get fixed the right way.  When we slap on 
bandaids without fixing the underlying problems, we end up with a system 
that has a lot of bandaids on top of a rotting infrastructure.  
Similarly whenever we see a stray crash or segfault we should pursue it 
with our utmost agression and stamp those out right away.  Anytime we 
leave these sorts of crashes and problems for later, we end up with a 
system full of unexpected, unexplained, impossible to debug crashes.  
That kind of software is an incredible pain to operate.


In the past I had more time to defend against these things, right now I 
don't.  You've been granted CVS commit access so use your best 
judgement.  I'd just hate to have this slip through the cracks, and when 
someone tries to land on an object that is 50.01 meters tall or more, 
they are going to get a hole again.  We could just remove that check and 
leave the near clip plane in close all the time, but then our terrain 
rendering will really stink for anyone with a 16bit depth buffer ...


It's not an easy problem, but slapping a bandaid ontop will probably 
mask it long enough so that the person who introduced the orignal 
problem will be long gone before we get bit again and no one will know 
how to fix it ...


Regards,

Curt.

--
Curtis Olsonhttp://www.flightgear.org/~curt
HumanFIRST Program  http://www.humanfirst.umn.edu/
FlightGear Project  http://www.flightgear.org
Unique text:2f585eeea02e2c79d7b1d8c4963bae2d


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Main renderer.cxx, 1.27, 1.28

2005-10-04 Thread Melchior FRANZ
* Curtis L. Olson -- Tuesday 04 October 2005 22:02:

 You've been granted CVS commit access so use your best judgement.

Yes. I don't usually touch such things, because I don't understand much
of this. I did it anyway, because:

- this change was already in cvs since a great while, and only had been
  reverted recently

- the commit log of the reverting patch didn't explain why this was reverted;
  it was part of a completely different change and looked like an accident

- I mentioned it in this message and got no reactions:
  http://mail.flightgear.org/pipermail/flightgear-devel/2005-October/039285.html
  not that this is necessarily an agreement, but together with the other
  two reasons I though it would be OK, and better than the whole, which
  I consider a show-stopper.



 I'd just hate to have this slip through the cracks, and when  
 someone tries to land on an object that is 50.01 meters tall or more, 
 they are going to get a hole again.  We could just remove that check and 
 leave the near clip plane in close all the time, but then our terrain 
 rendering will really stink for anyone with a 16bit depth buffer ...

Andy (via IRC) has also looked at the code and suggested that the whole
'if' case is probably not needed any more. I just tested it, and
indeed, with only

scene_nearplane = groundlevel_nearplane-getDoubleValue();
scene_farplane = 12.0f;

the hole doesn't occur any more. I'll be doing some more tests.
But I won't touch that code again without explicit OK from an expert.  :-)

m.

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Main renderer.cxx, 1.27, 1.28

2005-10-04 Thread Curtis L. Olson

Melchior FRANZ wrote:


* Curtis L. Olson -- Tuesday 04 October 2005 22:02:

 


You've been granted CVS commit access so use your best judgement.
   



Yes. I don't usually touch such things, because I don't understand much
of this. I did it anyway, because:

- this change was already in cvs since a great while, and only had been
 reverted recently

- the commit log of the reverting patch didn't explain why this was reverted;
 it was part of a completely different change and looked like an accident

- I mentioned it in this message and got no reactions:
 http://mail.flightgear.org/pipermail/flightgear-devel/2005-October/039285.html
 not that this is necessarily an agreement, but together with the other
 two reasons I though it would be OK, and better than the whole, which
 I consider a show-stopper.



 

I'd just hate to have this slip through the cracks, and when  
someone tries to land on an object that is 50.01 meters tall or more, 
they are going to get a hole again.  We could just remove that check and 
leave the near clip plane in close all the time, but then our terrain 
rendering will really stink for anyone with a 16bit depth buffer ...
   



Andy (via IRC) has also looked at the code and suggested that the whole
'if' case is probably not needed any more. I just tested it, and
indeed, with only

   scene_nearplane = groundlevel_nearplane-getDoubleValue();
   scene_farplane = 12.0f;

the hole doesn't occur any more. I'll be doing some more tests.
But I won't touch that code again without explicit OK from an expert.  :-)
 



Just know that with the near plane set close in, there isn't enough 
depth buffer resolution on 16 bit cards to properly draw the terrain.  
If you look at mountains in the distance, you get lots of odd z-buffer 
fighting.  This is on 16 bit cards.


If we don't care about 16 bit cards any more (that used to be our only 
option in the old voodoo-1/2/3 days) then we could remove that whole if 
statement.


For what it's worth, my laptop can only run FlightGear acceptably in 16 
bit mode so I'm slightly worried about the ramifications of this change.


Ultimately we *really* need to fix the above ground level calculations.  
Somewhere since the last release, that got broke and it must get fixed.  
If that was fixed you wouldn't be seeing a hole in the carrier deck. 
(And the AGL computations in the rest of the sim would start working 
correctly again.)


Regards,

Curt.

--
Curtis Olsonhttp://www.flightgear.org/~curt
HumanFIRST Program  http://www.humanfirst.umn.edu/
FlightGear Project  http://www.flightgear.org
Unique text:2f585eeea02e2c79d7b1d8c4963bae2d


___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] Re: [Flightgear-cvslogs] CVS: FlightGear/src/Main renderer.cxx, 1.27, 1.28

2005-10-04 Thread Melchior FRANZ
* Curtis L. Olson -- Tuesday 04 October 2005 22:22:
 Somewhere since the last release, that got broke and it must get fixed.  
 If that was fixed you wouldn't be seeing a hole in the carrier deck. 

The bug was AFAIK there ever since we have helicopters. The same holes
were on rooftops.

m.

___
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d