Exemple #1
0
 public function testConvertFromWGS84()
 {
     $ecefObject = new ECEF($this->_xyz);
     $datum = new Datum(Datum::OSGB36);
     $ecefObject->fromWGS84($datum);
     $this->assertEquals(3805.0701543279, $ecefObject->getX()->getValue());
     $this->assertEquals(-198.86566320382, $ecefObject->getY()->getValue());
     $this->assertEquals(5097.7821917469, $ecefObject->getZ()->getValue());
 }
 public function testSetZValue()
 {
     $matrixObject = new ECEF($this->_xyz);
     $fluidReturn = $matrixObject->setZ($this->_distance);
     $matrixZValue = $matrixObject->getZ();
     $this->assertTrue(is_object($matrixZValue));
     $this->assertTrue(is_a($matrixZValue, 'Geodetic\\Distance'));
     $this->assertEquals(12345.0, $matrixZValue->getValue());
     //    Test fluid return object
     $this->assertTrue(is_object($fluidReturn));
     //    ... of the correct type
     $this->assertTrue(is_a($fluidReturn, 'Geodetic\\ECEF'));
 }