コード例 #1
0
 /**
  * Get the Radius of Curvature along the Prime Vertical at a specified latitude
  * for this Reference Ellipsoid object
  *
  * The formula used here is from http://www.epsg.org/guides/docs/G7-2.pdf
  *
  * @param     integer|float    $latitude    Angle of Latitude for the Radius of Curvature,
  *                                              positive when to the north of the equator, negative when to the south
  * @param     string           $degrad      Indicating whether the Angle of Latitude is being specified
  *                                              in degrees or radians
  * @param     string           $uom         Unit of Measure for the returned value
  * @return    float            The Radius of Curvature along the Prime Vertical at the specified latitude
  *                                 for this ellipsoid
  * @throws    Exception
  */
 public function getRadiusOfCurvaturePrimeVertical($latitude = null, $degrad = Angle::DEGREES, $uom = Distance::METRES)
 {
     $latitude = LatLong::validateLatitude($latitude, $degrad);
     if ($this->dirty) {
         $this->calculateDerivedParameters();
     }
     $radius = $this->semiMajorAxis->getValue() / pow(1 - $this->firstEccentricitySquared * self::sinSquared($latitude), 0.5);
     return Distance::convertFromMeters($radius, $uom);
 }