         self.init(latitude: location.latitude, longitude: location.longitude)
     }
     
-    /// Check that location is valid
+    /// Calculate relative bearing to another location, if we have a course
+    /// CLLocationDirection is always specified as a positive value so result may be larger than 180
     ///
-    /// - note: This is a hack… 0.0;0.0 is a valid location. It is, however, also the default location
-    ///  returned when coordinate acquisition fails… Apple really needs an 'invalid' flag on this class
-    func isValid() -> Bool {
-        return self.coordinate.isNonZero()
+    /// See CLLocationCoordinate2D for absolute bearing
+    ///
+    /// - note: This not completely accurate on large scales.
+    /// MKMapPoint should be used for those purposes.
+    func relativeBearingTo(other:CLLocation) -> CLLocationDirection {
+        guard self.course.isValid() &&
+            coordinate.isValid() &&
+            other.coordinate.isValid() else {
+            return -1.0
+        }
+
+        let absoluteBearing = coordinate.bearingTo(other.coordinate)
+        if absoluteBearing >= course {
+            return absoluteBearing - course
+        } else {
+            return 360.0 - course - absoluteBearing
+        }
     }
 }
 

        }
    }

    /// Check that location is valid
    ///
    /// - note: This is a hack… 0.0;0.0 is a valid location. It is, however, also the default location
    ///  returned when coordinate acquisition fails… Apple really needs an 'invalid' flag on this class
    func isNonZero() -> Bool {
        return latitude != 0.0 && longitude != 0.0
    }


    //CLLocationCoordinate2DIsValid
}

extension CLLocation {

    }

    ///meters per pixel for current viewport
    func metersPerPixel() -> CLLocationDistance {
        return MKMetersPerMapPointAtLatitude(centerCoordinate.latitude) * visibleMapRect.size.width / Double(bounds.size.width)
    }
}
