[Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread David Megginson
I'm fixing the magnetic compass instrument to make its behaviour more
realistic.  I'm starting with the northernly turning error, and found
a useful site that actually gives an equation:

  http://williams.best.vwh.net/compass/node4.html

Here's the equation (radians for all angles):

  Hc: indicated compass heading
  Hm: actual magnetic heading
  phi: bank angle (right positive; the original web page uses theta)
  mu: magnetic dip angle (down positive)

  Hc = atan2(sin(Hm)cos(phi) - tan(mu)sin(phi), cos(Hm))

The result is very realistic as far as bank/turning errors go, much
better than anything I've seen in a desktop sim.  I've checked in the
changes so that others can take a look.

The problem is that this equation assumes that pitch (theta) is 0. 
Now, I need to adapt this equation to incorporate theta as well, so
that the compass will show an error when the nose is pitched up or
down relative to the earth's surface.

I imagine that the problem is fairly obvious to people with a basic
knowledge of geometry and trig, but unfortunately, I am not one of
those people.  I would be very grateful for someone could reply with
an adaption of the above equation integrating theta.
  

Thanks, and all the best,


David

-- 
http://www.megginson.com/

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


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread Martin Spott
David Megginson wrote:
 I'm fixing the magnetic compass instrument to make its behaviour more
 realistic.

Oh, my god, no more nice flight sim   The trouble already began
with the Beaver startup procedure  ;-))

 I imagine that the problem is fairly obvious to people with a basic
 knowledge of geometry and trig, but unfortunately, I am not one of
 those people.  I would be very grateful for someone could reply with
 an adaption of the above equation integrating theta.

Explaining in pictures is easier than dealing with single-line-
equations  :-)  We'll see,

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--

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


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread David Megginson
On Wed, 3 Nov 2004 15:36:33 + (UTC), Martin Spott
[EMAIL PROTECTED] wrote:

 Explaining in pictures is easier than dealing with single-line-
 equations  :-)  We'll see,

Multiple, sequential equations are welcome as well.  Anything, really ...


Thanks,


David

-- 
http://www.megginson.com/

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


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread Boris Koenig
David Megginson wrote:
On Wed, 3 Nov 2004 15:36:33 + (UTC), Martin Spott
[EMAIL PROTECTED] wrote:

Explaining in pictures is easier than dealing with single-line-
equations  :-)  We'll see,

Multiple, sequential equations are welcome as well.  Anything, really ...
Could you go into detail about what kind of compass/error we're
talking ?
Is it a conventional whiskey compass, so I assume no gyro driven
instrument ?
I mean how is it modelled or what is the cause ?
That way it might be easier to come up with a formula/solution...
My first VERY simple *guess* would be that it might be because of an
imbalance in inertia of a compasses moving parts as soon as the pitch
changes accordingly.
---
Boris
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread Chris Metzler
On Wed, 03 Nov 2004 17:25:16 +0100
Boris Koenig [EMAIL PROTECTED] wrote:
 David Megginson wrote:
  On Wed, 3 Nov 2004 15:36:33 + (UTC), Martin Spott
  [EMAIL PROTECTED] wrote:
  
  
 Explaining in pictures is easier than dealing with single-line-
 equations  :-)  We'll see,
  
  
  Multiple, sequential equations are welcome as well.  Anything, really
  ...
 
 Could you go into detail about what kind of compass/error we're
 talking ?

The link that he gave goes into it in detail.

-c

-- 
Chris Metzler   [EMAIL PROTECTED]
(remove snip-me. to email)

As a child I understood how to give; I have forgotten this grace since I
have become civilized. - Chief Luther Standing Bear


pgp3oE2zfBMM9.pgp
Description: PGP signature
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Re: [Flightgear-devel] Key Bindings

2004-11-03 Thread Aaron Wilson


Developers,
I am
planing on developing a HUD instrument to display a virtual outline of
the active runway on the HUD. Is there any developer(s) working on
this task? If not, can anyone tell me how I can get the aircraft's
velocity vector and runway vector in Cartesian coordinates.
Thanks,
Aaron Wilson 
At 04:38 PM 11/2/2004, you wrote:
I just compiled the latest
stable source 0.9.6 and the keyboard commands were not working. The
only way I could get them to fire the binded command was to
set the keys to repeatable (i.e.
repeatabletrue/repeatable). Has anyone else had
this problem? 
Thanks,
Aaron I. Wilson
AST: Computer Engineer
TEL: (304) 367-8299
FAX: (304) 367-8203
[EMAIL PROTECTED]

http://www.ivv.nasa.gov/ 
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d 



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

Re: [Flightgear-devel] Key Bindings

2004-11-03 Thread Curtis L. Olson
Aaron Wilson wrote:
Developers,
I am planing on developing a HUD instrument to display a 
virtual outline of the active runway on the HUD.  Is there any 
developer(s) working on this task?  If not, can anyone tell me how I 
can get the aircraft's velocity vector and runway vector in Cartesian 
coordinates.

Hi Aaron,
Sounds like a fun project. :-)  I'm not aware that any one else is doing 
anything like this.

simgear/math/sg_geodesy.hxx has routines for converting from geodetic 
lon/lat/elev to earth centered cartesian coordinates.  What I've done in 
the past is to use spherical or wgs84 routines to calculate the corner 
points of the runway(s) and then convert the resulting lon/lat into 
cartesian coordinates.  This makes things much easier conceptually, 
but perhaps is not the most efficient approach computationally.

In the FG core code, there is an abs_view_pos vector that gives you the 
earth centered cartesian coordinates of your view point.  I believe we 
also have view direction in the same cartesian coordiante system.

I don't know if we have the aircraft's velocity vector directly, but I'm 
sure you could compute it, or you could estimate it by taking 
cart_pos(n) - cart_pos(n-1)

Once you have all that, it's simply :-) a matter of getting your view 
parameters set up correctly and dumping your runway verticies/lines into 
the opengl pipeline.

Do you plan to account for sloping or hilly runways?  These are found 
both in the real world and in FG ... and they do sometimes make life a 
little more difficult than we'd like.  If you start fiddling with sloped 
runways, you might want to consider some sort of offline process to 
create your runway objects with the proper slope/elevation across their 
surface then store them in some sort of database, rather than trying to 
create them on the fly.

I suppose the accuracy that you need for drawing your hud runways 
depends largely on the accuracy of your sensors, and the tolerances 
within which you need to fly the aircraft.  If you are planning to fly 
all the way to touchdown with zero visibility, then you probably need to 
go the extra mile and account for runway slope.

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
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Key Bindings

2004-11-03 Thread Aaron Wilson
Curtis,
Thanks for the insight into the coordinate systems.  I am planning 
on accounting for a sloped runway via the runway vector.  The cross product 
of the aircraft's velocity vector with the runways vector (which should 
point in the direction of the slope) will give you a vector to rotate about 
and angle to rotate can be calculated from the dot product.  However, the 
runways are only have a center point.  How does does FlightGear determine 
the slope?  More specifically how can I get the four corners of the runway 
with the accurate slope?

Thanks,
Aaron
At 12:00 PM 11/3/2004, you wrote:
Aaron Wilson wrote:
Developers,
I am planing on developing a HUD instrument to display a virtual 
outline of the active runway on the HUD.  Is there any developer(s) 
working on this task?  If not, can anyone tell me how I can get the 
aircraft's velocity vector and runway vector in Cartesian coordinates.

Hi Aaron,
Sounds like a fun project. :-)  I'm not aware that any one else is doing 
anything like this.

simgear/math/sg_geodesy.hxx has routines for converting from geodetic 
lon/lat/elev to earth centered cartesian coordinates.  What I've done in 
the past is to use spherical or wgs84 routines to calculate the corner 
points of the runway(s) and then convert the resulting lon/lat into 
cartesian coordinates.  This makes things much easier conceptually, but 
perhaps is not the most efficient approach computationally.

In the FG core code, there is an abs_view_pos vector that gives you the 
earth centered cartesian coordinates of your view point.  I believe we 
also have view direction in the same cartesian coordiante system.

I don't know if we have the aircraft's velocity vector directly, but I'm 
sure you could compute it, or you could estimate it by taking cart_pos(n) 
- cart_pos(n-1)

Once you have all that, it's simply :-) a matter of getting your view 
parameters set up correctly and dumping your runway verticies/lines into 
the opengl pipeline.

Do you plan to account for sloping or hilly runways?  These are found both 
in the real world and in FG ... and they do sometimes make life a little 
more difficult than we'd like.  If you start fiddling with sloped runways, 
you might want to consider some sort of offline process to create your 
runway objects with the proper slope/elevation across their surface then 
store them in some sort of database, rather than trying to create them on 
the fly.

I suppose the accuracy that you need for drawing your hud runways depends 
largely on the accuracy of your sensors, and the tolerances within which 
you need to fly the aircraft.  If you are planning to fly all the way to 
touchdown with zero visibility, then you probably need to go the extra 
mile and account for runway slope.

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
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

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


Re: [Flightgear-devel] ATI 9200 Direct Rendering problem on Linux

2004-11-03 Thread Martin Spott
Ampere K. Hardraade wrote:

 it seem agpgart is still seeing the i810 and not the ATI card.

Did you already give the OpenSource drivers a try ?

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--

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


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread Martin Spott
Boris Koenig wrote:

 My first VERY simple *guess* would be that it might be because of an
 imbalance in inertia of a compasses moving parts as soon as the pitch
 changes accordingly.

It has to do with the fact that a whiskey compass has it's magentic
'detector' mountet parallel to the earth magnetic field of that area
where the aircraft is supposed to be operated   which means the
detector has some orientation that is anything but parallel to the
surface:

  http://www.phy6.org/Education/wfldline.html

When you bank the aircraft then you'll encounter that the compass does
not only point to the magnetic north, adding to that the 'detector'
tries to orientate parallel to the magnetic field - which doesn't
matter as long as you fly straight because the compass is adjusted
accordingly.

This results in the turning error,

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--

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


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread David Megginson
On Wed, 03 Nov 2004 17:25:16 +0100, Boris Koenig [EMAIL PROTECTED] wrote:

 My first VERY simple *guess* would be that it might be because of an
 imbalance in inertia of a compasses moving parts as soon as the pitch
 changes accordingly.

Other replies have pointed you to links explaining the turning error
due to magnetic dip.  It is quite dramatic in a real plane -- at my
latitude (about 45 deg N), my compass can be more than 50 degrees off
while the wings are banked, depending on the heading.

You are correct, though, that there is also an overshoot error -- the
compass will tend to overshoot and oscillate, rather than locking
immediately onto a new heading.  Alex already had code in place for
that, and I plan to add it back in once I have the turning, pitch, and
acceleration errors working.


All the best,


David

-- 
http://www.megginson.com/

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


Re: [Flightgear-devel] ATI 9200 Direct Rendering problem on Linux

2004-11-03 Thread Ampere K. Hardraade
No.

How do I do so?

Ampere

On November 3, 2004 12:41 pm, Martin Spott wrote:
 Ampere K. Hardraade wrote:
  it seem agpgart is still seeing the i810 and not the ATI card.

 Did you already give the OpenSource drivers a try ?

 Martin.

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


Re: [Flightgear-devel] Key Bindings

2004-11-03 Thread Jon Stockill
Aaron Wilson wrote:
Curtis,
Thanks for the insight into the coordinate systems.  I am 
planning on accounting for a sloped runway via the runway vector.  The 
cross product of the aircraft's velocity vector with the runways vector 
(which should point in the direction of the slope) will give you a 
vector to rotate about and angle to rotate can be calculated from the 
dot product.  However, the runways are only have a center point.  How 
does does FlightGear determine the slope?  More specifically how can I 
get the four corners of the runway with the accurate slope?
Runways aren't just flat sloping planes though - the slope may not be 
constant. Several runways have a hump in the middle, or a slope at just 
one end. There was a mail from curt a few days ago which explained how 
airfields are created and laid over the terrain data.

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


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread Chris Metzler
On Wed, 3 Nov 2004 10:17:34 -0500
David Megginson [EMAIL PROTECTED] wrote:

 I'm fixing the magnetic compass instrument to make its behaviour more
 realistic.  I'm starting with the northernly turning error, and found
 a useful site that actually gives an equation:
 
   http://williams.best.vwh.net/compass/node4.html
 
 Here's the equation (radians for all angles):
 
   Hc: indicated compass heading
   Hm: actual magnetic heading
   phi: bank angle (right positive; the original web page uses theta)
   mu: magnetic dip angle (down positive)
 
   Hc = atan2(sin(Hm)cos(phi) - tan(mu)sin(phi), cos(Hm))
 
 The result is very realistic as far as bank/turning errors go, much
 better than anything I've seen in a desktop sim.  I've checked in the
 changes so that others can take a look.
 
 The problem is that this equation assumes that pitch (theta) is 0. 
 Now, I need to adapt this equation to incorporate theta as well, so
 that the compass will show an error when the nose is pitched up or
 down relative to the earth's surface.
 
 I imagine that the problem is fairly obvious to people with a basic
 knowledge of geometry and trig, but unfortunately, I am not one of
 those people.  I would be very grateful for someone could reply with
 an adaption of the above equation integrating theta.

A simple adaptation doesn't really work.  Using the variables as you've
defined them, and taking theta to be positive for pitched up, write

Hc = atan2(a, b)

with

a = cos(phi)sin(Hm)cos(mu) - sin(phi)cos(theta)sin(mu)
- sin(phi)sin(theta)cos(mu)cos(Hm)

b = cos(theta)cos(Hm)cos(mu) - sin(theta)sin(mu)

I'd appreciate it if someone would check my matrix multiplication
(Euler rotations), but I'm pretty sure this is correct.  It reduces
to the equation you gave for the case of zero pitch (theta = 0).

The way to solve this problem is to imagine not that you're changing
the attitude of the plane, but that you're changing the orientation
of the vector instead.  So you start with the plane heading magnetic
north; the plane's aligned with the B vector in the XY plane (+X = east,
+Y = north) but the vector has a -Z component.  Rotating the plane
to a magnetic heading Hm is equivalent to rotating the XY components
of the B vector counterclockwise Hm.  Then pitching the plane up/down
corresponds to rotating the YZ components of the vector.  Then banking
the plane corresponds to rotating the XZ components of the vector.

You have to do it in this order.  I first tried it by creating the
state described on the web page you gave (plane at magnetic heading
Hm, and banked).  I then tried to apply the pitch.  But that won't
give you the right answer because pitching the plane up and down
in its own reference frame won't correspond to what we call pitch
since the plane is already banked.

-c

-- 
Chris Metzler   [EMAIL PROTECTED]
(remove snip-me. to email)

As a child I understood how to give; I have forgotten this grace since I
have become civilized. - Chief Luther Standing Bear


pgpBGhx0JxHeH.pgp
Description: PGP signature
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

[Flightgear-devel] Re: Plea for help: geometry/trigonometry problem

2004-11-03 Thread David Megginson
I've thought of a simpler way to approach this problem.  Let's say
that I have a plane and the three Euler angles of rotation, phi,
theta, and psi (roll, pitch, and yaw).  Given those three angles, I'd
like to determine which direction around the z axis is most directly
uphill and how steep the hill is.


Thanks, and all the best,


David

-- 
http://www.megginson.com/

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


Re: [Flightgear-devel] ATI 9200 Direct Rendering problem on Linux

2004-11-03 Thread Martin Spott
Ampere K. Hardraade wrote:
 On November 3, 2004 12:41 pm, Martin Spott wrote:
  Ampere K. Hardraade wrote:
   it seem agpgart is still seeing the i810 and not the ATI card.
 
  Did you already give the OpenSource drivers a try ?

 No.
 
 How do I do so?

Install XFree86 or better XOrg from your favorite Linux distribution
and adjust your 'XF86Config' or 'xorg.conf' according the exaple I've
pointed at in my posting on tuesday,

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--

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


Re: [Flightgear-devel] Key Bindings

2004-11-03 Thread Martin Spott
Jon Stockill wrote:

 Runways aren't just flat sloping planes though - the slope may not be 
 constant. Several runways have a hump in the middle, or a slope at just 
 one end.

I believe for the purpose of outlining the runway in order to get the
aircraft down in one piece it is absolutely sufficient to have an
average,

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--

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


Re: [Flightgear-devel] Key Bindings

2004-11-03 Thread Curtis L. Olson
Martin Spott wrote:
Jon Stockill wrote:
 

Runways aren't just flat sloping planes though - the slope may not be 
constant. Several runways have a hump in the middle, or a slope at just 
one end.
   

I believe for the purpose of outlining the runway in order to get the
aircraft down in one piece it is absolutely sufficient to have an
average,
 

Right, the question is how far do you want to take it.  Do you want to 
get down close enough to see the runway and finish the landing 
visually?  Do you want to fly and land 100% blind to the real world?  
Maybe the original poster is remotely flying a UAV rather than a real 
aircraft, so transitioning to visual flight might not be an option?

We did a real world project here where we developed a HUD for ground 
vehicles (snow plows, state patrol, and ambulances.)  The HUD displayed 
lane boundaries and radar/laser targets, as well as other statically 
mapped objects such as mail boxes, guard rails, and jerzey barriers.  We 
did a test with a state patrol car where we mapped and drove a closed 
loop track (Brainerd International Raceway).  The drives were done 100% 
blind, 100% from HUD only.  Our HUD system was differential gps based 
with an update rate of 10hz and it worked amazingly well.  We used real 
state patrol drivers for the study and there must have been some sort of 
behind the scenes wager amongst themselves for who could get through the 
first turn the fastest because many of these guys drove insanely fast.  
I drove the course once, and knowing what I knew about the system and 
technology, I took things a *lot* slower. :-)  In the end though, the 
system worked flawlessly, and the closest thing we had to a mishap was 
almost hitting a deer.

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
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] ATI 9200 Direct Rendering problem on Linux

2004-11-03 Thread Ampere K. Hardraade
If you are referring the radeon driver, itI am using it at the moment and it 
doesn't give me direct rendering either.

Ampere

On November 3, 2004 03:15 pm, Martin Spott wrote:
 Install XFree86 or better XOrg from your favorite Linux distribution
 and adjust your 'XF86Config' or 'xorg.conf' according the exaple I've
 pointed at in my posting on tuesday,

 Martin.

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


Re: [Flightgear-devel] Key Bindings

2004-11-03 Thread Arnt Karlsen
On Wed, 3 Nov 2004 20:17:50 + (UTC), Martin wrote in message 
[EMAIL PROTECTED]:

 Jon Stockill wrote:
 
  Runways aren't just flat sloping planes though - the slope may not
  be constant. Several runways have a hump in the middle, or a slope
  at just one end.
 
 I believe for the purpose of outlining the runway in order to get the
 aircraft down in one piece it is absolutely sufficient to have an
 average,

..aircraft usually _are_ in one piece until they hit such an average
sloping area. ;-)  

-- 
..med vennlig hilsen = with Kind Regards from Arnt... ;-)
...with a number of polar bear hunters in his ancestry...
  Scenarios always come in sets of three: 
  best case, worst case, and just in case.



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


Re: [Flightgear-devel] ATI 9200 Direct Rendering problem on Linux

2004-11-03 Thread Martin Spott
Ampere K. Hardraade wrote:
 If you are referring the radeon driver, itI am using it at the moment and it 
 doesn't give me direct rendering either.

I have to guess what you're meaning   Could you post the Device
and the DRI section of your XF86Config ? Simply use cut 'n paste so I
don't have to fiddle with attachments,

Martin.
-- 
 Unix _IS_ user friendly - it's just selective about who its friends are !
--

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


Re: [Flightgear-devel] ATI 9200 Direct Rendering problem on Linux

2004-11-03 Thread Ampere K. Hardraade
Section Device
Identifier  Generic Video Card
Driver  radeon
EndSection

Section Monitor
Identifier  SyncMaster
HorizSync   30-60
VertRefresh 56-75
Option  DPMS
EndSection

Section Screen
Identifier  Default Screen
Device  Generic Video Card
Monitor SyncMaster
DefaultDepth24
SubSection Display
Depth   1
Modes   1024x768 800x600 640x480
EndSubSection
SubSection Display
Depth   4
Modes   1024x768 800x600 640x480
EndSubSection
SubSection Display
Depth   8
Modes   1024x768 800x600 640x480
EndSubSection
SubSection Display
Depth   15
Modes   1024x768 800x600 640x480
EndSubSection
SubSection Display
Depth   16
Modes   1024x768 800x600 640x480
EndSubSection
SubSection Display
Depth   24
Modes   1024x768 800x600 640x480
EndSubSection
EndSection

Section ServerLayout
Identifier  Default Layout
Screen  Default Screen
InputDevice Generic Keyboard
InputDevice Configured Mouse
InputDevice Generic Mouse
EndSection

Section DRI
Mode0666
EndSection


On November 3, 2004 03:57 pm, Martin Spott wrote:
 I have to guess what you're meaning   Could you post the Device
 and the DRI section of your XF86Config ? Simply use cut 'n paste so I
 don't have to fiddle with attachments,

 Martin.

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


Re: [Flightgear-devel] Re: Plea for help: geometry/trigonometry problem

2004-11-03 Thread Curtis L. Olson
David Megginson wrote:
I've thought of a simpler way to approach this problem.  Let's say
that I have a plane and the three Euler angles of rotation, phi,
theta, and psi (roll, pitch, and yaw).  Given those three angles, I'd
like to determine which direction around the z axis is most directly
uphill and how steep the hill is.
 

Hmmm, that's a good mind bender ... I'm still thinking ... linear 
algebra was *sooo* long ago ... :-)

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
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] ATI 9200 Direct Rendering problem on Linux

2004-11-03 Thread Ampere K. Hardraade
If I keep the radeon in the driver section, the config file isn't read at 
all.  Therefore, I changed it back to ati.

Ampere

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


Re: [Flightgear-devel] Re: Plea for help: geometry/trigonometry problem

2004-11-03 Thread Jon S Berndt
On Wed, 3 Nov 2004 14:05:59 -0500
 David Megginson [EMAIL PROTECTED] wrote:
I've thought of a simpler way to approach this problem.  Let's say
that I have a plane and the three Euler angles of rotation, phi,
theta, and psi (roll, pitch, and yaw).  Given those three angles, I'd
like to determine which direction around the z axis is most directly
uphill and how steep the hill is.
For JSBSim, the order of rotation is z, y, x (heading, pitch, roll). 
Given that, note that pitch and roll don't affect heading. I assume 
you are talking about the aircraft z axis in your last sentence. Also, 
I assume that you mean, which angle about the z axis is most vertical 
with respect to the local horizontal? I _think_ this answer might have 
something to do with constructing an omega rotation vector using the 
Euler angles, transforming it to the local frame, and taking a dot 
product, but I'd have to think about this one for a little bit. This 
is kind of a cool problem. Probably someone else will have figured 
this out by the time I post this email ... :-)

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


Re: [Flightgear-devel] Re: Plea for help: geometry/trigonometry problem

2004-11-03 Thread Curtis L. Olson
David Megginson wrote:
I've thought of a simpler way to approach this problem.  Let's say
that I have a plane and the three Euler angles of rotation, phi,
theta, and psi (roll, pitch, and yaw).  Given those three angles, I'd
like to determine which direction around the z axis is most directly
uphill and how steep the hill is.
Thanks, and all the best,
David
 

I'm sitting here wiggling a cd around and thinking ...
If you roll the cd only, the highest point on the disk will be straight 
out the left/right side depending on the roll direction.

If you pitch the cd only, the highest point on the disk will be straight 
out the front/back depending on the pitch direction.

It *seems* like if you combine roll and pitch, the highest point on the 
cd/disk will be a combination of the roll and pitch amounts ... perhaps 
simple trig functions would apply here, but that's based on shakey 
intuition only.  The vertical component of disk edge movement is 
relative to sin(angle), if you pitch and roll identical amounts, then 
your highest point is at a 45 degree offset which seems to fall in line.

Now playing fast and loose, what if you look straight down on a disk ... 
+X is up, +Y is right, just a standard 2d cartesian system.  Now map 
the amount of roll to X and the amount of pitch to Y.

The highest point on the disk should be x = sin(roll)*cos(pitch), y = 
cos(roll)*sin(pitch) and there's probably a - sign that goes in there 
someplace.

I'm not sure if we can get away with directly mappy roll to X and pitch 
to Y ... might need some sort of trig function of roll/pitch to get X, Y?

Then it seems like you could take the answer you get when isolating 
roll/pitch and add in the heading as an offset ... of course that would 
be dependant on the order your euler angles are designed to be multipled ...

Once you have the most upward pointing vector on the surface of the 
disk, then it's easy to find the angle with horizontal.  Project the 
most upward pointing vector onto a flat plane, and then figure out the 
angle between the projected vector and the original vector ...

I'm probably way off here, but maybe this will spark someone else's 
brain cells to figure out the right way to do this ...

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
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Re: Plea for help: geometry/trigonometry problem

2004-11-03 Thread Jon S Berndt
On Wed, 03 Nov 2004 15:28:26 -0600
 Curtis L. Olson [EMAIL PROTECTED] wrote:
I think you're on the right track. I think you want to determine the 
orientation of the aircraft body Z axis w.r.t. the local vertical 
axis. That can tell you both the magnitude and direction of the most 
vertical ascent about the local vertical axis.

Geez ... yes, it has been a long time ...
:-)
Jon

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


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread David Megginson
On Wed, 3 Nov 2004 14:04:05 -0500, Chris Metzler [EMAIL PROTECTED] wrote:

 A simple adaptation doesn't really work.  Using the variables as you've
 defined them, and taking theta to be positive for pitched up, write
 
 Hc = atan2(a, b)
 
 with
 
 a = cos(phi)sin(Hm)cos(mu) - sin(phi)cos(theta)sin(mu)
 - sin(phi)sin(theta)cos(mu)cos(Hm)
 
 b = cos(theta)cos(Hm)cos(mu) - sin(theta)sin(mu)

Thanks for all the work on that.  I just tried it out, though, and it
gives strange behaviour with negative (left) roll angles, even when
pitch is close to 0.  It's possible that I caused some confusion by
using theta for pitch, when the original equation used it for roll --
here's the original equation from the Web page, translated into our
normal phi/theta/psi variables, mu for magnetic dip, and preserving Hc
for the indicated compass heading:

  Hc = atan2(sin(psi)cos(phi) - tan(mu)sin(phi), cos(psi))

In other words

  a = sin(psi)cos(phi) - tan(mu)sin(phi)
  b = cos(psi)

Your suggested equation, using the same variable names, is

  a = cos(phi)sin(psi)cos(mu) - sin(phi)cos(theta)sin(mu)
- sin(phi)sin(theta)cos(mu)cos(psi)

  b = cos(theta)cos(psi)cos(mu) - sin(theta)sin(mu)

I'm really bad at this kind of thing, but when I set theta to 0, I end up with

  a = cos(phi)sin(psi)cos(mu) - sin(phi)sin(mu)
  b = cos(psi)cos(mu) 

Does that actually work out to the same thing by messing around with the trig?


Thanks, and all the best,


David

-- 
http://www.megginson.com/

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


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread Jon S Berndt
On Wed, 3 Nov 2004 16:47:37 -0500
 David Megginson [EMAIL PROTECTED] wrote:
What does arctan(-phi/theta) give you?
Jon
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread Jon S Berndt
On Wed, 3 Nov 2004 16:47:37 -0500
 David Megginson [EMAIL PROTECTED] wrote:
After having scribbled for a LITTLE WHILE on the back of an envelope
;-) I am thinking that what you want is this:
-atan2(-phi,theta)
but I'll have to play a little bit more. I think this would give you 
the angle about the local vertical from the aircraft X axis to the 
most vertical ascent angle given the plane located by the aircraft X 
and Y axes.

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


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread David Megginson
On Wed, 03 Nov 2004 16:02:19 -0600, Jon S Berndt [EMAIL PROTECTED] wrote:

 After having scribbled for a LITTLE WHILE on the back of an envelope
 ;-) I am thinking that what you want is this:
 
 -atan2(-phi,theta)
 
 but I'll have to play a little bit more. I think this would give you
 the angle about the local vertical from the aircraft X axis to the
 most vertical ascent angle given the plane located by the aircraft X
 and Y axes.

I put it in a Perl script and played with it for different values of
phi and theta, and all of the results looked reasonable. Now, how can
I calculate the most vertical ascent angle itself?


Thanks, and all the best,


David

-- 
http://www.megginson.com/

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


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread Chris Metzler
On Wed, 3 Nov 2004 16:47:37 -0500
David Megginson [EMAIL PROTECTED] wrote:
 
 Thanks for all the work on that.  I just tried it out, though, and it
 gives strange behaviour with negative (left) roll angles, even when
 pitch is close to 0.  It's possible that I caused some confusion by
 using theta for pitch, when the original equation used it for roll --
 here's the original equation from the Web page, translated into our
 normal phi/theta/psi variables, mu for magnetic dip, and preserving Hc
 for the indicated compass heading:
 
   Hc = atan2(sin(psi)cos(phi) - tan(mu)sin(phi), cos(psi))
 
 In other words
 
   a = sin(psi)cos(phi) - tan(mu)sin(phi)
   b = cos(psi)
 
 Your suggested equation, using the same variable names, is
 
   a = cos(phi)sin(psi)cos(mu) - sin(phi)cos(theta)sin(mu)
 - sin(phi)sin(theta)cos(mu)cos(psi)
 
   b = cos(theta)cos(psi)cos(mu) - sin(theta)sin(mu)
 
 I'm really bad at this kind of thing, but when I set theta to 0, I end
 up with
 
   a = cos(phi)sin(psi)cos(mu) - sin(phi)sin(mu)
   b = cos(psi)cos(mu) 
 
 Does that actually work out to the same thing by messing around with the
 trig?

Yes, it does.  Basically, just leave the cos(psi) in the denominator,
and divide the cos(mu) that's in the denominator into a.  In other words,

cos(phi)sin(psi)cos(mu) - sin(phi)sin(mu)
-
  cos(psi)cos(mu) 

=

cos(phi)sin(psi)cos(mu)sin(phi)sin(mu)
----   ---
   cos(psi)cos(mu) cos(psi)cos(mu)

(in the first term, cancel out the cos(mu) in the numerator and
denominator; in the second term, take the sin(mu)/cos(mu) and
replace it with a tan(mu) in the numerator)

=

cos(phi)sin(psi)   sin(phi)tan(mu)
 - ---
cos(psi)   cos(psi)

=

(cos(phi)sin(psi) - sin(phi)tan(mu))/cos(psi)

which is what you have above.  So yeah, it does work out.

I'll check my algebra again, but what are the chances that the
strange behavior (you didn't describe what it was) you're seeing
are numerical?  In other words, when it occurs, what's the
typical value of the argument of the arctan?

-c

-- 
Chris Metzler   [EMAIL PROTECTED]
(remove snip-me. to email)

As a child I understood how to give; I have forgotten this grace since I
have become civilized. - Chief Luther Standing Bear


pgprkfqCL2EnT.pgp
Description: PGP signature
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread Jon S Berndt
On Wed, 03 Nov 2004 16:02:19 -0600
 Jon S Berndt [EMAIL PROTECTED] wrote:
On Wed, 3 Nov 2004 16:47:37 -0500
 David Megginson [EMAIL PROTECTED] wrote:
After having scribbled for a LITTLE WHILE on the back of an envelope
;-) I am thinking that what you want is this:
-atan2(-phi,theta)
Maybe I am missing what you are trying to do, but I just tried this in 
Excel:

-atan2(theta,phi)
which gives this:
theta   phi angle (from forward, positive clockwise)
45  0   0
45  -45 45
0   -45 90
-45 -45 135
-45 0   -180
-45 45  -135
0   45  -90
45  45  -45
0   0   BAD!
10  0   0
10  80  -82.87498365
80  10  -7.125016349
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread Curtis L. Olson
David Megginson wrote:
On Wed, 03 Nov 2004 16:02:19 -0600, Jon S Berndt [EMAIL PROTECTED] wrote:
 

After having scribbled for a LITTLE WHILE on the back of an envelope
;-) I am thinking that what you want is this:
-atan2(-phi,theta)
but I'll have to play a little bit more. I think this would give you
the angle about the local vertical from the aircraft X axis to the
most vertical ascent angle given the plane located by the aircraft X
and Y axes.
   

I put it in a Perl script and played with it for different values of
phi and theta, and all of the results looked reasonable. Now, how can
I calculate the most vertical ascent angle itself?
 

1. a plane in the geometrical sense can be defined with a point and a 
vector that is perpedicular to that plane.  Define a plane by picking 
your current location as the point, and pick the local up vector 
(opposite of the gravity vector) as your perpendicular vector.

2. define a vector as the x,y,z distances to the highest point on your 
rotated/pitched/yawed disk (which appears to be calculated with the 
atan2() formula above.

3. simgear/math/vector.hxx defines a function that maps/projects the 
vector from (2) onto the plane from (1) 
sgmap_vec_onto_cur_surface_plane() returning the mapped/projected vector 
as the result.

Now you have a vector that lies on your horizontal plane, and a vector 
to your highest elevation point.  All you need to do is find the angle 
between the two which off the top of my head is the arcsin of the dot 
product of the two vectors (probably normalized.)  My linear algebra 
book is at home so this is all off the top of my head.

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
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread David Megginson
On Wed, 03 Nov 2004 16:17:24 -0600, Jon S Berndt [EMAIL PROTECTED] wrote:

 Maybe I am missing what you are trying to do, but I just tried this in
 Excel:
 
 -atan2(theta,phi)
 
 which gives this:
 
 theta   phi angle (from forward, positive clockwise)
 45  0   0
 45  -45 45
 0   -45 90
 -45 -45 135
 -45 0   -180
 -45 45  -135
 0   45  -90
 45  45  -45
 0   0   BAD!
 
 10  0   0
 10  80  -82.87498365
 80  10  -7.125016349

Those look pretty reasonable for offsets from the aircraft's current
heading.  For example, if you're at 0 pitch a 45 degree right bank,
uphill will be 90 degrees to the left of your current heading (-90). 
If you're pitched down 45 degrees and banked 45 degrees to the right,
uphill will be 135 degrees to the left of your current heading; and so
on.


All the best,


David

-- 
http://www.megginson.com/

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


Re: [Flightgear-devel] Key Bindings

2004-11-03 Thread Curtis L. Olson
Martin Spott wrote:
Jon Stockill wrote:
 

Runways aren't just flat sloping planes though - the slope may not be 
constant. Several runways have a hump in the middle, or a slope at just 
one end.
   

I believe for the purpose of outlining the runway in order to get the
aircraft down in one piece it is absolutely sufficient to have an
average,
 

Right, the question is how far do you want to take it.  Do you want to 
get down close enough to see the runway and finish the landing 
visually?  Do you want to fly and land 100% blind to the real world?  
Maybe the original poster is remotely flying a UAV rather than a real 
aircraft, so transitioning to visual flight might not be an option?

We did a real world project here where we developed a HUD for ground 
vehicles (snow plows, state patrol, and ambulances.)  The HUD displayed 
lane boundaries and radar/laser targets, as well as other statically 
mapped objects such as mail boxes, guard rails, and jerzey barriers.  We 
did a test with a state patrol car where we mapped and drove a closed 
loop track (Brainerd International Raceway).  The drives were done 100% 
blind, 100% from HUD only.  Our HUD system was differential gps based 
with an update rate of 10hz and it worked amazingly well.  We used real 
state patrol drivers for the study and there must have been some sort of 
behind the scenes wager amongst themselves for who could get through the 
first turn the fastest because many of these guys drove insanely fast.  
I drove the course once, and knowing what I knew about the system and 
technology, I took things a *lot* slower. :-)  In the end though, the 
system worked flawlessly, and the closest thing we had to a mishap was 
almost hitting a deer.

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
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread Chris Metzler
On Wed, 3 Nov 2004 17:19:09 -0500
Chris Metzler [EMAIL PROTECTED] wrote:

 I'll check my algebra again,

Checked; I can't find a mistake.  As a third check, I ran it through
Maple and got the same result.  It appears to have the correct
limiting behavior for both pitch -- 0 and roll -- 0 independently.
And the problem seems straightforward to me.  The compass needle
is constrained to move on the horizontal plane in the aircraft's
reference frame; the question is simply what's the (perpendicular)
projection of the magnetic field vector onto that plane, and what
direction does that point?  You can move the plane by from
level flight towards the north pole by yaw, then pitch, then roll;
or you can do the opposite transformations on the magnetic field
vector itself (same order, but opposite value of angles), and
get the same relative orientation of the field vector to the
aircraft.

So I think this is analytically correct.  What's the weird behavior?
For what part of parameter space?

-c

-- 
Chris Metzler   [EMAIL PROTECTED]
(remove snip-me. to email)

As a child I understood how to give; I have forgotten this grace since I
have become civilized. - Chief Luther Standing Bear


pgpWXAX5R5Qip.pgp
Description: PGP signature
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread Jon S Berndt
More:
 theta  phi   heading  magnitude
 45.00   0.000.0045.00
 45.00 -45.00   45.0075.00
  0.00 -45.00   90.0045.00
-45.00 -45.00  135.0075.00
-45.00   0.00 -180.0045.00
-45.00  45.00 -135.0075.00
  0.00  45.00  -90.0045.00
 45.00  45.00  -45.0075.00
 45.00   0.000.0045.00
Not sure if this is really true, cause I have not yet figured out by 
longhand the ascent angle at 45/45 degrees, but it looks close if not 
right.  The heading (as stated before) is:

-ATAN2(theta,phi)
The ascent angle magnitude is (where theta and phi are supplied in 
radians):

1.57 - ACOS(COS(theta)*(SIN(ABS(phi + ABS(theta)
This might be able to be cleaned up considerably.
Jon
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


RE: [Flightgear-devel] Re: Plea for help: geometry/trigonometry problem

2004-11-03 Thread Norman Vine
David Megginson writes:
 
 I've thought of a simpler way to approach this problem.  Let's say
 that I have a plane and the three Euler angles of rotation, phi,
 theta, and psi (roll, pitch, and yaw).  Given those three angles, I'd
 like to determine which direction around the z axis is most directly
 uphill and how steep the hill is.

see
sgEulerToQuat( sgQuat quat, const sgVec3 hpr ) ;

HTH

Norman

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


Re: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread David Megginson
On Wed, 3 Nov 2004 20:16:08 -0500, David Megginson
[EMAIL PROTECTED] wrote:

 I understand, logically, why this is happening: flying west with a
 magnetic dip of 71 and a bank of 20 to the south, I have an angle of
 over 90 degrees to the magnetic flow.  I think I even remember the
 original article mentioning something like this, but I have no
 recollection of my airplane whiskey compass swinging around 180
 degrees suddenly in real life -- if there's a window tomorrow before
 the low icing stuff moves in, I'll try to go up and take a look at
 what actually happens.

To answer myself, here's the relevant part of the original web page:

==**==

For steep turns, where the sum of the dip angle and bank angle exceeds
90 degrees, the compass will ``hang up''. The compass will refuse to
turn through 360 degrees as the airplane makes a complete circle.

It's easy to see why. Imagine being on a heading of East in the
Northern hemisphere, and gradually increasing bank angle to the right.
Initially, the north seeking end of the compass needle will point
exactly North, towards the left wing tip. However, as the bank angle
increases, a point is reached where the magnetic field becomes
parallel to the airplane's vertical axis. Beyond this point, the
compass needle will swing 180 degrees to point to the lower, right
wingtip and the compass then indicates West instead of East! So it is
not quite true to say there is no Northerly turning error on headings
of East and West. Beyond the critical bank angle (equal to 90 minus
the dip angle), the compass lags by 180 degrees when the airplane is
banked toward the equator.

==**==

Obviously, when the dip is over 70 degrees, it doesn't take a steep
turn to cause this effect.  The question is, does the compass hang
up (i.e. bind and refuse to turn), or does it swing around?  If it
hangs up, that would explain why I haven't noticed the effect.

Any comments from other pilots on the list, especially those who fly
north of 40 in North America?


Thanks, and all the best,


David

-- 
http://www.megginson.com/

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


RE: [Flightgear-devel] Plea for help: geometry/trigonometry problem

2004-11-03 Thread Jon Berndt

 Oops.

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


[Flightgear-devel] RE: [Not-so-OFFLINE] Plea for help:geometry/trigonometry problem

2004-11-03 Thread Jon Berndt
 On Wed, 3 Nov 2004 19:40:57 -0600, Jon Berndt [EMAIL PROTECTED] wrote:

  Well, I don't know if my calculations helped any, but it sure was a fun
  diversion for a little while ...

 Since Jon accidentally went online with this, I'd like to thank him
 for the work.  It turned out that I didn't need to add the extra steps
 (that I had asked for before seeing Chris's equation).

 Thanks,

 David

Heh. You're welcome. :-) I didn't see Chris's work 'til after I had finished up. If I 
had,
I probably wouldn't have tried - but glad I did. Whether I was correct or not, it was 
fun.

Now for my next trick: well-formed XML parsing changes in JSBSim ...

Jon


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


Re: [Flightgear-devel] Multiheaded video cards?

2004-11-03 Thread Dale E. Edmons
Curtis L. Olson wrote:
I periodically get asked about multiheaded video cards for 
FlightGear.  My standard answer is that I don't know for sure, but I 
suspect they wouldn't work well for FlightGear.  However, the 
questions keep coming and I feel like I'm not able to give a really 
good answer.

So can anyone help me out?  For instance, has anyone tried one of 
these sorts of cards?

   http://www.matrox.com/mga/products/parhelia/series.cfm
I was looking into these by my slush fund died a sudden death.  :(
What kind of opengl support is available under linux?

I run a Matrox G450 in the dual-head configuration.  The primary channel 
has the acceleration.  If you run glxgears on both displays, the 
secondary display outperforms the primary.  If you run fgfs on both, the 
secondary display almost stops and the primary display alternates 
between smooth flight and very slooow.
The dual headed G450 would be great for a primary display and an 
instructors display or for groking code while flying the sim.

The GL stuff works great within limits.  Here is the performance I get 
(primary display only):
   (fgfs-cvs --hud-tris )
   night   160fps steep circling turn over airport, 300fps level flight 
away from airport
   noon   11fps steep circling turn over airport, 30fps level flight 
away from airport

I don't have a clue if these values are good or bad, but it's what FGFS 
reports.

The Matrox card support is minimal but it works great for me.  I run two 
20' monitors side-by-side and the GL stuff is always on the primary.  
Anything can go on the secondary but GL will kill performance of both 
displays.

Don't, but, don't us Xinerama as it is non-accelerated and generally a pain.
Has anyone played around with any of these options who can report 
success or failure or something in between?  What kind of performance 
are you getting?

Thanks,
Curt.
Dale
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


Re: [Flightgear-devel] Multiheaded video cards?

2004-11-03 Thread Dale E. Edmons
Chris Metzler wrote:
On Tue, 02 Nov 2004 12:37:40 -0600
Curtis L. Olson [EMAIL PROTECTED] wrote:
 

I periodically get asked about multiheaded video cards for FlightGear.  
My standard answer is that I don't know for sure, but I suspect they 
wouldn't work well for FlightGear.  However, the questions keep coming 
and I feel like I'm not able to give a really good answer.

So can anyone help me out?  For instance, has anyone tried one of these 
sorts of cards?

   http://www.matrox.com/mga/products/parhelia/series.cfm
What kind of opengl support is available under linux?
   

I haven't used these cards.  However, the card I used before the one
I have now was the immediate predecessor to the Parahelia, the Matrox
Millenium G550.  It was equipped for multihead, but I never used it.
What I can tell you, though, is that DRI and OpenGL support for Matrox
cards under Linux sucks rocks.  First of all, Matrox' drivers are open,
and their proprietary HAL module doesn't really buy you anything, so
 

No real arguments here, but there is useable code for the card in the 
native X11.

for just a taste.  There's a lot more there too.  Personally, I had
constant hard lockups requiring a full system reset, with lots of
DMA idle timeout messages to my X log, whenever I tried flightgear
for very long with the Matrox card.  From other messages in the Matrox
 

Sounds like the ASUS (junk!)  motherboard I had.  My 1GHz athalon on its 
ASUS
board sits collecting dust (it doesn't even do that very well).  The 
G450 I have is very
robust as is the code.  I run Debian Linux without a single lockup in 
over a year now.

The ASUS with a simple ATI GL card still locks up.  What a waste of silicon!
Dale
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d