Beispiel #1
0
        /// <summary>
        /// Calculates new LonLat position based on a start point, bearing and distance
        /// </summary>
        /// <param name="startPosition">LonLat of start point</param>
        /// <param name="distance">distance to travel in meters</param>
        /// <param name="bearing">bearing to travel in degrees</param>
        /// <returns>LonLat of destination</returns>
        public static LonLat DestinationPoint(LonLat startPosition, double distance, double bearingDegrees)
        {
            double  angularDistance = distance / GeoCentricRadius(startPosition.Latitude);
            double  bearingRadians  = ToRadians(bearingDegrees);
            NVector nVec            = new NVector(startPosition);

            nVec = DestinationPoint(nVec, angularDistance, bearingRadians);
            return(nVec.GetLonLat());
        }
Beispiel #2
0
 /// <summary>
 /// Returns a x,y coord distance from the map origin
 /// </summary>
 /// <param name="geoPosition">A lat lon of the position</param>
 /// <returns>a map relative x,y from origin coord in meters</returns>
 public double[] GetMapPosition(LonLat geoPosition)
 {
     return(GetMapPosition(geoPosition.Longitude, geoPosition.Latitude));
 }
Beispiel #3
0
        public LonLat GetLonLat()
        {
            LonLat geolocation = new LonLat(this.GetLongitude(), this.GetLatitude());

            return(geolocation);
        }
Beispiel #4
0
 public NVector(LonLat geolocation)
 {
     nVec = new Vector3();
     SetLongitudeLatitude(geolocation.Longitude, geolocation.Latitude);
 }