MathGroup Archive 2002

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

Search the Archive

Re: calculating the azimuth between two lat/lon's


Benjamin Tubb wrote:
 > There appears to be a syntax error in your code here for the Mod[] function,
 > in which you include three arguments when it only allows one. Please
 > clarify.
 >
 > CC=Mod[p[B]-p[A],2Pi,-Pi];
 >
 > "DrBob" <majort at cox-internet.com> wrote in message
 > news:<aec3co$4nl$1 at smc.vnet.net>...
 >
 >
 >>\[IndentingNewLine]CC =
 >
 >
 >>Mod[p[B] - p[A], 2 Pi, \(-Pi\)];
 >
 >
 > Benjamin Tubb
 >
 > brtubb at writeme.com
 >
 >
 >
 >
Benjamin,

See the help browser:

Mod[m, n, d] gives a result x such that d <= x <= d+n and x mod n == m mod n

So in this case the result lies in [-Pi,Pi]

Peter



  • Prev by Date: Problem with entering text into a mathematica notebook by VB or QuicKeys
  • Next by Date: Convolution problem
  • Previous by thread: Re: calculating the azimuth between two lat/lon's
  • Next by thread: RE: Re: calculating the azimuth between two lat/lon's