To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.org.ca.rtltorontoOpen lugnet.org.ca.rtltoronto in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Organizations / Canada / rtlToronto / 14265
14264  |  14266
Subject: 
Re: OT: Math Help
Newsgroups: 
lugnet.org.ca.rtltoronto
Date: 
Fri, 5 Aug 2005 20:20:10 GMT
Viewed: 
525 times
  
In lugnet.org.ca.rtltoronto, Dan Boger wrote:
On Fri, Aug 05, 2005 at 07:25:52PM +0000, Rob Antonishen wrote:
Using trig, for each value accumulate the sum of the sines and the sum
of the cosines. Then divide each of these sums by the number of
entries to get:
x = average cosine and y = average sine. Then use the arctan2 function
to get the average angle as: Angle = arctan2( x , y), except this
fails if x=0 and y=0, as would be the case when trying to average 90
and 270, sot here is no simple solution to that problem with trig...

So any smart people up to the challenge?

I think using vector math (as you do above) is the right way to go.  As
for the special cases, meh, deal with it :)

And if you stop and think about it for a second or two, you'll realize
your special case really does deserve special consideration.  The average
is no wind at all, so the direction would be undefined.



Message is in Reply To:
  Re: OT: Math Help
 
(...) I think using vector math (as you do above) is the right way to go. As for the special cases, meh, deal with it :) (19 years ago, 5-Aug-05, to lugnet.org.ca.rtltoronto)

9 Messages in This Thread:




Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR