Пример #1
0
 /**
  * Execute a Helmert Transform on this ECEF using the specified Bursa-Wolf Parameters
  *
  * @param     BursaWolfParameters    $bursaWolfParameters    The Bursa-Wolf parameter to use for the transform
  * @return    void
  * @throws    Exception
  */
 private function helmertTransform(BursaWolfParameters $bursaWolfParameters)
 {
     $ppmScaling = 1 + $bursaWolfParameters->getScaleFactor() / 1000000;
     $xCoordinate = $bursaWolfParameters->getTranslationVectors()->getX()->getValue() + $this->xCoordinate->getValue() * $ppmScaling + -$bursaWolfParameters->getRotationMatrix()->getX()->getValue(Angle::RADIANS) * $this->yCoordinate->getValue() + $bursaWolfParameters->getRotationMatrix()->getY()->getValue(Angle::RADIANS) * $this->zCoordinate->getValue();
     $yCoordinate = $bursaWolfParameters->getTranslationVectors()->getY()->getValue() + $bursaWolfParameters->getRotationMatrix()->getZ()->getValue(Angle::RADIANS) * $this->xCoordinate->getValue() + $this->yCoordinate->getValue() * $ppmScaling + -$bursaWolfParameters->getRotationMatrix()->getX()->getValue(Angle::RADIANS) * $this->zCoordinate->getValue();
     $zCoordinate = $bursaWolfParameters->getTranslationVectors()->getZ()->getValue() + -$bursaWolfParameters->getRotationMatrix()->getY()->getValue(Angle::RADIANS) * $this->xCoordinate->getValue() + $bursaWolfParameters->getRotationMatrix()->getX()->getValue(Angle::RADIANS) * $this->yCoordinate->getValue() + $this->zCoordinate->getValue() * $ppmScaling;
     $this->xCoordinate->setValue($xCoordinate);
     $this->yCoordinate->setValue($yCoordinate);
     $this->zCoordinate->setValue($zCoordinate);
 }
Пример #2
0
 public static function getDistances($results)
 {
     $distances = array();
     foreach ($results as $key => $value) {
         $newDistance = new Distance();
         $newDistance->setValue($value[2]);
         $distances[$value[0] . $value[1]] = $newDistance;
     }
     return $distances;
 }