title: How do I calculate the Azimuth (angle to north) between two WGS84 coordinates
body: <p>I have got two WGS84 coordinates, latitude and longitude in degrees. These points are rather close together, e.g. only one metre apart.</p>
  
  <p>Is there an easy way to calculate the azimuth of the line between these points, that is, the angle to north?</p>
  
  <p>The naive approach would be to assume a Cartesian coordinate system (because these points are so close together) and just use</p>
  
  <p>sin(a) = abs(L2-L1) / sqrt(sqr(L2-L1) + sqr(B2-B1))</p>
  
  <p>a = azimuth
  L1, L2 = longitude
  B1, B2 = latitude</p>
  
  <p>The error will be larger as the coordinates move away from the equator because there the distance between two longitudinal degrees becomes increasingly smaller than the one between two latitudinal degrees (which remains constant).</p>
  
  <p>I found some quite complex formulas which I don't really want to implement because they seem to be overkill for points that are that close together and I don't need very high precision (two decimals are enough, one is probably fine either since there are other factors that reduce precision anyway, like the one the GPS returns).</p>
  
  <p>Maybe I could just determine an approximate longitudinal correction factor depending on latitude and use somthing like this:</p>
  
  <p>sin(a) = abs(L2*f-L1*f) / sqrt(sqr(L2*f-L1*f) + sqr(B2-B1))</p>
  
  <p>where f is the correction factor</p>
  
  <p>Any hints?</p>
  
  <p>(I don't want to use any libraries for this, especially not ones that require runtime licenses. Any MPLed Delphi Source would be great.)</p>