Results 1 to 3 of 3

Math Help - Need help writing a function

  1. #1
    Newbie
    Joined
    Oct 2006
    Posts
    2

    Need help writing a function

    My math skills have lapsed and I am having a bit of trouble trying to reorganize the following formula so that I can get latitude2 OR longitude2 if all other values are known.

    ~distance in miles=3958.899 * acos((sin(latitude1*0.01745329252)*sin(latitude2*0 .01745329252)) + (cos(latitude1*0.01745329252)*cos(latitude2*0.0174 5329252)*cos((longitude1*0.01745329252) - (longitude2*0.01745329252))));

    Any help on this would be greatly appreciated.

    -Jeff
    Last edited by JOttinger; October 27th 2006 at 08:20 AM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    11,807
    Thanks
    697
    Hello, Jeff!

    It's very difficult to interpret what you wrote, and there seems to be an omission.
    . . And can't we get rid of those ugly decimals?

    I'll use T for latitude, G for longitude.

    Let k = 3958.899,\;a = 0.01745329252


    And I think the problem goes like this . . .

    . . Get T_2 OR G_2 if all other values are known.

    . . d \;=\;k\cdot\cos^{-1}[\sin(a\cdot T_1)\cdot\sin(a\cdot T_2) + \cos(a\cdot T_1)\cos(a\cdot T_2)\cos(a\cdot G_1) - \underbrace{\cos}_{\text{?}}(a\cdot G_2)]

    And the asymmetry of the right side makes me suspect even more typos.


    I can't possibly work on it until I'm sure of the original statement.

    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Oct 2006
    Posts
    2
    Sorry, I'm converting this from a Javascript function and wasn't familiar with how things are typically written.

    multiplying degrees by 0.01745329252 gives you radians

    3958.899 is the radius (in miles) of the Earth

    acos is arccosine

    The '*' character is a multiplication symbol

    The ((longitude1*a)-(longitude2*a)) at the end of the formula should be calculated before multiplying it to the other expression.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Writing a Sinusoidal Function?
    Posted in the Trigonometry Forum
    Replies: 1
    Last Post: August 2nd 2011, 11:06 AM
  2. Writing a function in standard form
    Posted in the Algebra Forum
    Replies: 1
    Last Post: February 28th 2011, 02:53 PM
  3. Writing out the minimum function
    Posted in the Algebra Forum
    Replies: 4
    Last Post: June 23rd 2010, 03:30 AM
  4. Writing a Sin and Cos Function Equation
    Posted in the Trigonometry Forum
    Replies: 1
    Last Post: April 16th 2009, 12:22 PM
  5. writing a function given zeros
    Posted in the Algebra Forum
    Replies: 2
    Last Post: August 8th 2008, 04:21 PM

Search Tags


/mathhelpforum @mathhelpforum