/// <summary>
        /// lat =asin(sin(lat1)*cos(d)+cos(lat1)*sin(d)*cos(tc))
        /// dlon=atan2(sin(tc)*sin(d)*cos(lat1),cos(d)-sin(lat1)*sin(lat))
        /// lon=mod( lon1-dlon +pi,2*pi )-pi
        /// </summary>
        /// <param name="coordinate"></param>
        /// <returns></returns>
        public Coordinate GreatCircle(Coordinate coordinate)
        {
            var latitude = new Latitude(
                Angle.Asin(coordinate.Latitude.Sin() * Distance.Cos() + coordinate.Latitude.Cos() * Distance.Sin() * Bearing.Cos()));

            var dlon = Angle.Atan2(Bearing.Sin() * Distance.Sin() * coordinate.Latitude.Cos(),
                                   Distance.Cos() - coordinate.Latitude.Sin() * latitude.Sin());

            var longitude = new Longitude((coordinate.Longitude - dlon + Angle.Pi) % (2 * Angle.Pi) - Angle.Pi);

            return(new Coordinate(latitude, longitude));
        }
 /// <summary>
 /// Great circle distance between two positions.
 ///
 /// From http://williams.best.vwh.net/avform.htm:
 /// d=2*asin(sqrt((sin((lat1-lat2)/2))^2 +
 ///              cos(lat1)*cos(lat2)*(sin((lon1-lon2)/2))^2))
 /// </summary>
 /// <param name="coordinate"></param>
 /// <returns>Angular distance along a great circle</returns>
 public Angle Distance(Coordinate coordinate)
 {
     return(2 * Angle.Asin(Math.Sqrt(Math.Pow(((Latitude - coordinate.Latitude) / 2).Sin(), 2)
                                     + Latitude.Cos() * coordinate.Latitude.Cos() * Math.Pow(((Longitude - coordinate.Longitude) / 2).Sin(), 2))));
 }