+ Reply to Thread
Results 1 to 8 of 8

Thread: Calculating bearing?

  1. #1
    Inactive thesage1014 is on a distinguished road thesage1014's Avatar
    Join Date
    May 2007
    Posts
    8

    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 Images

  2. #2
    Inactive kymagic is on a distinguished road kymagic's Avatar
    Join Date
    Jul 2007
    Location
    Bedford, UK
    Posts
    274

    Default

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

  3. #3
    Inactive Norseman is on a distinguished road Norseman's Avatar
    Join Date
    Jun 2007
    Posts
    84

    Default

    Inverse tangent in a great way to do it.

    Code:
    Angle = atan (X,Y)
    
    What's so hard about that?

  4. #4
    Inactive pogo is on a distinguished road pogo's Avatar
    Join Date
    Jul 2007
    Posts
    51

    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
    Inactive Psawhn is on a distinguished road Psawhn's Avatar
    Join Date
    Aug 2007
    Posts
    37

    Default

    That Distance formula isn'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)
    [FONT=Times New Roman][I][SIZE=3]x* x[/SIZE][/I][/FONT][I][FONT=Times New Roman][SIZE=3]+ 17 = 0[/SIZE][/FONT]
    When keeping it real goes wrong.[/I]

  6. #6
    Inactive thesage1014 is on a distinguished road thesage1014's Avatar
    Join Date
    May 2007
    Posts
    8

    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't the bearing angle, it's just the offset. I need to know what it's angle is.

  7. #7
    Inactive Psawhn is on a distinguished road Psawhn's Avatar
    Join Date
    Aug 2007
    Posts
    37

    Default

    Well, you're right that it's not the bearing - it'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 'North,' or +y referenced to the world.
    [FONT=Times New Roman][I][SIZE=3]x* x[/SIZE][/I][/FONT][I][FONT=Times New Roman][SIZE=3]+ 17 = 0[/SIZE][/FONT]
    When keeping it real goes wrong.[/I]

  8. #8
    Inactive thesage1014 is on a distinguished road thesage1014's Avatar
    Join Date
    May 2007
    Posts
    8

    Default

    Thanks! That's what I wanted. Sorry for not exactly explaining.

+ Reply to Thread

Similar Threads

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

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