public function testED50ToWGS84() { $LatLng = new LatLng(12.30121, 12.30071, RefEll::Heyford1924()); $LatLng->ED50ToWGS84(); $expected = "(12.30069, 12.3)"; self::assertEquals($expected, $LatLng->__toString()); }
/** * Convert this LatLng object from ED50 datum to WGS84 datum. * Reference values for transformation are taken from http://www.globalmapper.com/helpv9/datum_list.htm * @return void */ public function ED50ToWGS84() { if ($this->refEll != RefEll::Heyford1924()) { trigger_error('Current co-ordinates are not using the Heyford ellipsoid', E_USER_WARNING); } $wgs84 = RefEll::WGS84(); $heyford1924 = RefEll::Heyford1924(); $tx = -87; $ty = -98; $tz = -121; $s = 0; $rx = deg2rad(0); $ry = deg2rad(0); $rz = deg2rad(0); $this->transformDatum($wgs84, $heyford1924, $tx, $ty, $tz, $s, $rx, $ry, $rz); }