Ejemplo n.º 1
0
        public static async Task DoRepositionMoveToRadialPoint(this IVehicle vehicle, double moveDistance, double moveVelocity, int radial, CancellationToken cancel)
        {
            var loc = vehicle.Rtt.RelGps.Value;
            var alt = loc.Altitude ?? 0;

            loc = GeoMath.RadialPoint(loc.Latitude, loc.Longitude, moveDistance, radial);
            loc = loc.AddAltitude(alt);
            await vehicle.DoReposition((float)moveVelocity, loc, cancel).ConfigureAwait(false);
        }
Ejemplo n.º 2
0
        public static GeoPoint RadialPoint(this GeoPoint point, double distance, double radial)
        {
            var a = GeoMath.RadialPoint(point.Latitude, point.Longitude, distance, radial);

            if (point.Altitude.HasValue)
            {
                a = a.SetAltitude(point.Altitude.Value);
            }
            return(a);
        }