MLocation extends Measurement implements Comparable<MLocation> { public double bearingTo(@NonNull MLocation dest) { return Geo.bearing(latitude, longitude, dest.latitude, dest.longitude); } MLocation(long millis, double latitude, double longitude, double altitude_gps,
                     double climb, // Usually taken from altimeter
                     double vN, double vE,
                     float hAcc, float pdop, float hdop, float vdop,
                     int satellitesUsed, int satellitesInView);  MLocation(); @NonNull @Override String toRow(); @NonNull @Override String toString(); double groundSpeed(); double totalSpeed(); double glideRatio(); double glideAngle(); double bearing(); @NonNull LatLng latLng(); double bearingTo(@NonNull MLocation dest); double bearingTo(@NonNull LatLng dest); double distanceTo(@NonNull MLocation dest); double distanceTo(@NonNull LatLng dest); @NonNull LatLng moveDirection(double bearing, double distance); @Override int compareTo(@NonNull MLocation loc); boolean equals(@NonNull MLocation loc); final double latitude; final double longitude; final double altitude_gps; public float hAcc; final float pdop; final float hdop; final float vdop; final int satellitesUsed; final int satellitesInView; final double climb; }
@Test public void bearings() { assertEquals(bearing, seattle.bearingTo(la), 0.01); }