+ Reply to Thread
Results 1 to 3 of 3

Translate from javascript to VBA

  1. #1
    Forum Contributor
    Join Date
    06-16-2011
    Location
    London
    MS-Off Ver
    Excel XP
    Posts
    276

    Translate from javascript to VBA

    This one is beyond me.

    I'm trying to work out the compass bearing of a direct (rhumb line, constant bearing) route between two points on a sphere using latitude and longitude in radians. I've found a formula online but don't understand a word of it:

    Please Login or Register  to view this content.
    Someone much clevered than me has posted this in javascript:

    Please Login or Register  to view this content.
    And I dont speak java. I vaguely get the first line but don't understand the var q = line at all. Does anyone speak Java in here?

    And yes, I realise I've put a formula in [ code ] tags but it may as well be in code.....a 64bit encrypted code.
    Last edited by swoop99; 01-31-2012 at 12:03 PM.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Translate from javascript to VBA

    I'm not going to even try to understand the maths, but the js above can be written as the below, hope it makes more sense to you than me!
    Please Login or Register  to view this content.
    Last edited by Kyle123; 01-31-2012 at 05:26 AM.

  3. #3
    Forum Contributor
    Join Date
    06-16-2011
    Location
    London
    MS-Off Ver
    Excel XP
    Posts
    276

    Re: Translate from javascript to VBA

    Not really but the required output seems to be logical. :-) Thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1