MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Need help writing geology software using cirlces

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29300] Re: Need help writing geology software using cirlces
  • From: Adalbert Hanssen <hanssen at zeiss.de>
  • Date: Tue, 12 Jun 2001 04:18:20 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

>Pete,
>I assume all angles are measured in a counter-clockwise direction from the
>positive x axis.
>
>Take the average of the angles, then use Mod to find the value from 0 to 360
>degrees.

Then it may happen, that for a series of measured angles, they jump across
0 degrees, consider e.g. a series of measuring angles 
 
   list={1, 359, 0, 2, 388, 0}

If you sum them up, you get 720, dividing by 6, you get 120! This is 
definitely not the mean angle.

Supposing that the noise in the data is much lower than 180 degrees, you
might consider taking the first measuring value, let's call it v1 and add
modulo 360 180-v1 to all values in the list. 

   v1=First[list];
   shift=180-v1;
   (shift+#)& /@ list

yields:

   {180, 538, 179, 181, 567, 179}

Then the values are far away from jumping across the 0 degree-boundary 
and the shifted measuring values can be averaged, as any other sequence 
of measuring values. Of course you have to undo the shift (modulo 360)
on the averaged result.
   
Regards

Adalbert Hanszen

>
>The attached note shows the results for the examples you provided.
>[Contact the author to get this - moderator]
>
>If you are going to use trigometric functions to plot points, etc., then
>determining the sign of the function is covered in the trig texts.
>
>Average or Mean is straightforward.  I suspect this is not the complete
>answer, but it is a beginning.
>
>Sherman C. Reed
>sherman.reed at att.net
>----- Original Message -----
>From: "Peter Wilson" <peter at midar.com>
To: mathgroup at smc.vnet.net
>To: mathgroup at smc.vnet.net
>Subject: [mg29300] [mg29132] [mg29117] Need help writing geology software using cirlces
>
>
>> I am currently writing a computer program that needs to calculate the
>> average angle, given numerous angles in a previous sequence.
>>
>> Examples:
>> 1) Given the angles, 0  and 45   the average is definitely 22.5 
>>
>> 2) Given 2 angles of 350 and 45, the average should be 17.5 degrees
>> (hmmm...Is that right?)
>>
>> 3) Given 0 and 180 the average can be considered either 90 or 270
>>
>> 4) Given 0, 90, 180 and 270, the average may? be considered 0. In such 
>> cases my program will cope fine.
>>
>>
>> =============
>> Here's my question
>> =============
>> Q. What formula can I use to find the average angle in a circle, from 
>> a series of angles?
>> i.e.. 0,45,56,135,270,360,2,18... etc.
>>
>> Please note that I understand basic trigonometry, but that's about it.
>>I'm a computer programmer, not a mathematician.
>>
>> I would appreciate any help.  My computer program is currently used in
>> Geology to track the course of a river, and to provide a predictive 
>> model of the same river in previous and future years.  It currently 
>> works, however
>> it's a bit rough and I'm currently looking for refinement algorithms.
>>
>> Cheers,
>>
>> Pete
>>


  • Prev by Date: Re: Normal vector on a surface
  • Next by Date: frameticks without numbers
  • Previous by thread: Re: looking inside FindMininum
  • Next by thread: frameticks without numbers