iOS Question What's the difference between heading and bearing?

Discussion in 'iOS Questions' started by Albi, Mar 26, 2015.

  1. Albi

    Albi Active Member Licensed User

    After using B4A I thought that heading was the direction (in degrees) you are facing, and bearing was direction (in degrees) to a target.

    The B4i tutorial has only 1 location in it, and the results sometimes give a bearing. What is this bearing??

    The reason I ask is because I'm trying to do a bearingTo.

    This is the bearing code in the tutorial:
    lblBearing.Text = ValueOrNA (Location1.Bearing, 1Chr(176))
    I thought that changing location1 to targetLocation would work. I don't think it does, so I think I don't understand bearing.
    I think I've set up my targetLocation ok because
    works fine.

    I am aware of the other thread about this here and am currently going through it trying to understand what is going on. eg what the variable cPI is (edit in case anyone else gets here looking for cPI - this is the B4x constant for Pi)
    Last edited: Mar 26, 2015
  2. Erel

    Erel Administrator Staff Member Licensed User

    Location.Bearing returns the traveling direction. If you are driving north then it will be north.
  3. Albi

    Albi Active Member Licensed User

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice