+ Reply to Thread
Results 1 to 8 of 8

Thread: Calculating bearing?

  1. #1
    Wire Noob thesage1014's Avatar
    Join Date
    May 2007
    Posts
    6

    Default

    Okay, I need to figure out how to get an angle from 2 gps detectors. I have made a diagram >.<
    Right, so how would you find that angle? My brother said he only knows how to do it with inverse tan. Any help at all would be great!
    Attached Thumbnails Attached Thumbnails Calculating bearing?-bearing.jpg  

  2. #2
    Wire Sofaking kymagic's Avatar
    Join Date
    Jul 2007
    Location
    Bedford, UK
    Posts
    495

    Default

    Well why dont you do it with trig?
    Common sense no longer applies.

  3. #3
    Wire Amateur Norseman's Avatar
    Join Date
    Jun 2007
    Posts
    90

    Default

    Inverse tangent in a great way to do it.

    Code:
    Angle = atan (X,Y)
    What&#39;s so hard about that?

  4. #4
    Wire Amateur pogo's Avatar
    Join Date
    Jul 2007
    Posts
    62

    Default

    Can be done completely with the expression tool.

    In: AX AY AZ BX BY BZ
    Out: Dist X Y Z Bearing Elevation

    X = BX - AX
    Y = BY - AY
    Z = BZ - AZ
    Dist = sqrt( sqrt( X^2 + Y^2 ) + Z^2 )

    Bearing = atan( Y/X )
    Elevation = atan( Z/sqrt(X^2 + Y^2) )[/b]

  5. #5
    Wire Amateur Psawhn's Avatar
    Join Date
    Aug 2007
    Posts
    34

    Default

    That Distance formula isn&#39;t quite right. It should be
    Code:
    Dist = sqrt( sqrt(X^2+Y^2)^2 + Z^2)
    or [code]Dist = sqrt(X^2+Y^2 + Z^2)
    x* x+ 17 = 0
    When keeping it real goes wrong.

  6. #6
    Wire Noob thesage1014's Avatar
    Join Date
    May 2007
    Posts
    6

    Default

    Can be done completely with the expression tool.

    In: AX AY AZ BX BY BZ
    Out: Dist X Y Z Bearing Elevation

    X = BX - AX
    Y = BY - AY
    Z = BZ - AZ
    Dist = sqrt( sqrt( X^2 + Y^2 ) + Z^2 )

    Bearing = atan( Y/X )
    Elevation = atan( Z/sqrt(X^2 + Y^2) )[/b]
    But that isn&#39;t the bearing angle, it&#39;s just the offset. I need to know what it&#39;s angle is.

  7. #7
    Wire Amateur Psawhn's Avatar
    Join Date
    Aug 2007
    Posts
    34

    Default

    Well, you&#39;re right that it&#39;s not the bearing - it&#39;s actually the angle as in that diagram in your first post.
    The better formula would be:

    Code:
    Bearing = atan2(X, Y)
    Well, actually that formula gives the azimuth, which are degrees clockwise of &#39;North,&#39; or +y referenced to the world.
    x* x+ 17 = 0
    When keeping it real goes wrong.

  8. #8
    Wire Noob thesage1014's Avatar
    Join Date
    May 2007
    Posts
    6

    Default

    Thanks! That&#39;s what I wanted. Sorry for not exactly explaining.

+ Reply to Thread

Similar Threads

  1. Help on calculating 3d distances
    By lucasmontec in forum Installation and Malfunctions Support
    Replies: 12
    Last Post: 03-09-2009, 12:48 PM
  2. Need help with calculating velocity of a vector
    By ace1313 in forum Expression 2 Discussion & Help
    Replies: 3
    Last Post: 03-07-2009, 03:54 AM
  3. Need Help Calculating Yaw & Pitch From 2 XYZ coordinates
    By Meatloaftwo in forum Installation and Malfunctions Support
    Replies: 16
    Last Post: 10-20-2008, 10:19 AM
  4. Calculating Bearing, Elevation, and Distance with vectors
    By GhostMX in forum Installation and Malfunctions Support
    Replies: 8
    Last Post: 08-11-2008, 02:20 PM
  5. Calculating Bearing and Elevation from GPS co-ords
    By MistaGiggles in forum Installation and Malfunctions Support
    Replies: 4
    Last Post: 06-06-2007, 12:41 AM

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
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots