comp.lang.ada
 help / color / mirror / Atom feed
From: Alan Brain <aebrain@dynamite.com.au>
Subject: Re: Ada / Boeing 777
Date: 1996/03/22
Date: 1996-03-22T00:00:00+00:00	[thread overview]
Message-ID: <4ivbt1$q41@fred.netinfo.com.au> (raw)
In-Reply-To: 4iv1id$dlm@gaia.ns.utk.edu

mbk@caffeine.engr.utk.edu (Matt Kennel) wrote:

>The representation (aka implementation) of angle is wrong.  
>
>It should be a complex number of unit magnitude.  Rotations in any
>direction can be implemented as complex multiplication without any
>discontinuities, wrap around errors or problems at 0 or 180 or 360
>degrees.   
>
>This is an easy 2-d representation of the rotation group.  3-d is 
>trickier: either Euler angles or quaternions. 
>
>Don't just hack on the problem: transcend it. 
>
>See, sometimes physicists *can* be useful.  ;-) 


Us Engineers come across this problem often. IMHO the best, in fact the 
ONLY solution is to have something like RADIANS_TYPE, a real, and then 
use subtypes and I/O converters appropriately. So if you're communicating 
with a piece of kit that likes to give you BAMS, you just multiply by the 
constant FROM_BAMS and convert from fixed point to real accordingly. 
Similarly, for some applications, a human-readable readout of 0-359 is 
good; for others, 1-360. Mils, Revs, Radians and Degrees are all useful 
at one time or another: but keep your arithmetic operations in a common 
format, else that way lies madness.







  reply	other threads:[~1996-03-22  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-03-18  0:00 Ada / Boeing 777 Sam Harbaugh
1996-03-22  0:00 ` Matt Kennel
1996-03-22  0:00   ` Alan Brain [this message]
1996-03-22  0:00   ` Ted Dennison
1996-03-27  0:00 ` "Tim Rowe"
  -- strict thread matches above, loose matches on Subject: below --
1996-03-23  0:00 Sam Harbaugh (at Home)
1996-03-19  0:00 Sam Harbaugh
1996-03-21  0:00 ` Ian Ward
1996-03-21  0:00   ` Stuart Palin
     [not found] <4ia0l3INNatk@faatcrl.faa.gov>
1996-03-15  0:00 ` Thomas C. Timberlake
1996-03-18  0:00   ` Thomas C. Timberlake
1996-03-16  0:00 ` "Tim Rowe"
1996-03-18  0:00   ` Ken Garlington
1996-03-19  0:00     ` Bob Kurtz
1996-03-23  0:00       ` "Tim Rowe"
1996-03-18  0:00 ` Ken Garlington
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox