public function testSetXValue()
 {
     $matrixObject = new ECEF($this->_xyz);
     $fluidReturn = $matrixObject->setX($this->_distance);
     $matrixXValue = $matrixObject->getX();
     $this->assertTrue(is_object($matrixXValue));
     $this->assertTrue(is_a($matrixXValue, 'Geodetic\\Distance'));
     $this->assertEquals(12345.0, $matrixXValue->getValue());
     //    Test fluid return object
     $this->assertTrue(is_object($fluidReturn));
     //    ... of the correct type
     $this->assertTrue(is_a($fluidReturn, 'Geodetic\\ECEF'));
 }
示例#2
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());
 }