Esempio n. 1
0
        public void Pre()
        {
            double degree = Math.PI / 180;
            double lat1 = phi1 / degree, lon1 = lam1 / degree, azi1 = al12 / degree;

            GlobalGeodesicLine = new geod_geodesicline(GlobalGeodesic, lat1, lon1, azi1, GEOD.NONE);
        }
Esempio n. 2
0
 /// <summary>
 /// The general direct geodesic problem.
 /// </summary>
 /// <param name="lat1">The atitude of point 1 (degrees).</param>
 /// <param name="lon1">The longitude of point 1 (degrees).</param>
 /// <param name="azi1">The azimuth at point 1 (degrees).</param>
 /// <param name="flags">Bitor'ed combination of <see cref="GEOD"/> flags; GEOD.ARCMODE
 /// determines the meaning of s12_a12 and GEOD.LONG_UNROLL "unrolls" lon2.</param>
 /// <param name="s12_a12">If flags&amp;GEOD.ARCMODE is 0, this is the
 /// distance between point 1 and point 2 (meters); otherwise it is the
 /// arc length between point 1 and point 2 (degrees); it can be negative.</param>
 /// <param name="outmask">The mask specifying the values to calculate.</param>
 /// <param name="plat2">The latitude of point 2 (degrees).</param>
 /// <param name="plon2">The longitude of point 2 (degrees).</param>
 /// <param name="pazi2">The (forward) azimuth at point 2 (degrees).</param>
 /// <param name="ps12">The distance between point 1 and point 2 (meters).</param>
 /// <param name="pm12">The reduced length of geodesic (meters).</param>
 /// <param name="pM12">The geodesic scale of point 2 relative to point 1 (dimensionless).</param>
 /// <param name="pM21">The geodesic scale of point 1 relative to point 2 (dimensionless).</param>
 /// <param name="pS12">The area under the geodesic (square meters).</param>
 /// <remarks>
 /// g must have been initialized with a call to geod_init(). lat1
 /// should be in the range [-90deg, 90deg]; lon1 and azi1
 /// should be in the range [-540deg, 540deg). The function
 /// value a12 equals s12_a12 if flags &amp; GEOD.ARCMODE.
 ///
 /// With <paramref name="flags"/> &amp; GEOD.LONG_UNROLL bit set, the longitude is "unrolled" so
 /// that the quantity lon2-lon1 indicates how many times and in
 /// what sense the geodesic encircles the ellipsoid. Because lon2 might be
 /// outside the normal allowed range for longitudes, [-540deg, 540deg), be sure to normalize
 /// it, e.g., with fmod(lon2, 360.0) before using it in subsequent calculations.
 ///</remarks>
 /// <returns>a12 arc length of between point 1 and point 2 (degrees).</returns>
 public double geod_gendirect(double lat1, double lon1, double azi1, GEOD flags, double s12_a12, GEOD outmask,
     out double plat2, out double plon2, out double pazi2, out double ps12, out double pm12, out double pM12, out double pM21, out double pS12)
 {
     geod_geodesicline l=new geod_geodesicline(this, lat1, lon1, azi1, outmask|((flags&GEOD.ARCMODE)!=0?GEOD.NONE:GEOD.DISTANCE_IN)); // Automatically supply GEOD_DISTANCE_IN if necessary
     return l.geod_genposition(flags, s12_a12, outmask, out plat2, out plon2, out pazi2, out ps12, out pm12, out pM12, out pM21, out pS12);
 }
		public void Pre()
		{
			double lat1 = phi1 / Proj.DEG_TO_RAD, lon1 = lam1 / Proj.DEG_TO_RAD, azi1 = al12 / Proj.DEG_TO_RAD;

			GlobalGeodesicLine = new geod_geodesicline(GlobalGeodesic, lat1, lon1, azi1, GEOD.NONE);
		}
		/// <summary>
		/// The general direct geodesic problem.
		/// </summary>
		/// <param name="lat1">The atitude of point 1 (degrees).</param>
		/// <param name="lon1">The longitude of point 1 (degrees).</param>
		/// <param name="azi1">The azimuth at point 1 (degrees).</param>
		/// <param name="flags">Bitor'ed combination of <see cref="GEOD"/> flags;
		/// GEOD.ARCMODE determines the meaning of s12_a12 and
		/// GEOD.LONG_UNROLL "unrolls" lon2.</param>
		/// <param name="s12_a12">If flags&amp;GEOD.ARCMODE is 0, this is the distance
		/// from point 1 to point 2 (meters); otherwise it is the arc length
		/// from point 1 to point 2 (degrees); it can be negative.</param>
		/// <param name="plat2">The latitude of point 2 (degrees).</param>
		/// <param name="plon2">The longitude of point 2 (degrees).</param>
		/// <param name="pazi2">The (forward) azimuth at point 2 (degrees).</param>
		/// <param name="ps12">The distance from point 1 to point 2 (meters).</param>
		/// <param name="pm12">The reduced length of geodesic (meters).</param>
		/// <param name="pM12">The geodesic scale of point 2 relative to point 1 (dimensionless).</param>
		/// <param name="pM21">The geodesic scale of point 1 relative to point 2 (dimensionless).</param>
		/// <param name="pS12">The area under the geodesic (square meters).</param>
		/// <remarks>
		/// g must have been initialized with a call to geod_init(). lat1
		/// should be in the range [-90deg, 90deg]. The function
		/// value a12 equals s12_a12 if flags &amp; GEOD.ARCMODE.
		///
		/// With <paramref name="flags"/> &amp; GEOD.LONG_UNROLL bit set, the longitude is "unrolled" so
		/// that the quantity lon2-lon1 indicates how many times and in
		/// what sense the geodesic encircles the ellipsoid.
		///</remarks>
		/// <returns>a12 arc length of from point 1 to point 2 (degrees).</returns>
		public double geod_gendirect(double lat1, double lon1, double azi1, GEOD flags, double s12_a12,
			out double plat2, out double plon2, out double pazi2, out double ps12, out double pm12, out double pM12, out double pM21, out double pS12)
		{
			GEOD outmask = GEOD.LATITUDE | GEOD.LONGITUDE | GEOD.AZIMUTH | GEOD.DISTANCE | GEOD.REDUCEDLENGTH | GEOD.GEODESICSCALE | GEOD.AREA;

			geod_geodesicline l = new geod_geodesicline(this, lat1, lon1, azi1, outmask | ((flags & GEOD.ARCMODE) != 0 ? GEOD.NONE : GEOD.DISTANCE_IN)); // Automatically supply GEOD_DISTANCE_IN if necessary
			return l.geod_genposition(flags, s12_a12, out plat2, out plon2, out pazi2, out ps12, out pm12, out pM12, out pM21, out pS12);
		}