Exemple #1
0
        /**
         * Reset the origin.
         *
         * @param[in] lat0 latitude at origin (degrees).
         * @param[in] lon0 longitude at origin (degrees).
         * @param[in] h0 height above ellipsoid at origin (meters); default 0.
         *
         * \e lat0 should be in the range [−90°, 90°].
         **********************************************************************/
        public void Reset(double lat0, double lon0, double h0 = 0)
        {
            _lat0 = GeoMath.LatFix(lat0);
            _lon0 = GeoMath.AngNormalize(lon0);
            _h0   = h0;
            _earth.Forward(_lat0, _lon0, _h0, out _x0, out _y0, out _z0);
            double sphi, cphi, slam, clam;

            GeoMath.Sincosd(_lat0, out sphi, out cphi);
            GeoMath.Sincosd(_lon0, out slam, out clam);
            Geocentric.Rotation(sphi, cphi, slam, clam, _r);
        }
Exemple #2
0
 public LocalCartesian()
     : this(Geocentric.WGS84())
 {
 }
Exemple #3
0
 public LocalCartesian(double lat0, double lon0, double h0 = 0)
     : this(lat0, lon0, Geocentric.WGS84(), h0)
 {
 }
Exemple #4
0
 /**
  * Default ructor.
  *
  * @param[in] earth Geocentric object for the transformation; default
  *   Geocentric::WGS84().
  *
  * Sets \e lat0 = 0, \e lon0 = 0, \e h0 = 0.
  **********************************************************************/
 public LocalCartesian(Geocentric earth)
 {
     _earth = earth;
     Reset(0, 0, 0);
 }
Exemple #5
0
 /**
  * Constructor setting the origin.
  *
  * @param[in] lat0 latitude at origin (degrees).
  * @param[in] lon0 longitude at origin (degrees).
  * @param[in] h0 height above ellipsoid at origin (meters); default 0.
  * @param[in] earth Geocentric object for the transformation; default
  *   Geocentric::WGS84().
  *
  * \e lat0 should be in the range [−90°, 90°].
  **********************************************************************/
 public LocalCartesian(double lat0, double lon0, Geocentric earth, double h0 = 0)
 {
     _earth = earth;
     Reset(lat0, lon0, h0);
 }