| @@ 157-174 (lines=18) @@ | ||
| 154 | * Reference values for transformation are taken from http://www.globalmapper.com/helpv9/datum_list.htm |
|
| 155 | * @return LatLng |
|
| 156 | */ |
|
| 157 | public function toED50(): LatLng |
|
| 158 | { |
|
| 159 | if ($this->refEll == RefEll::international1924()) { |
|
| 160 | return $this; |
|
| 161 | } |
|
| 162 | ||
| 163 | $asWGS84 = $this->toWGS84(); |
|
| 164 | ||
| 165 | $tx = 87; |
|
| 166 | $ty = 98; |
|
| 167 | $tz = 121; |
|
| 168 | $s = 0; |
|
| 169 | $rx = deg2rad(0); |
|
| 170 | $ry = deg2rad(0); |
|
| 171 | $rz = deg2rad(0); |
|
| 172 | ||
| 173 | return $asWGS84->transformDatum(RefEll::international1924(), $tx, $ty, $tz, $s, $rx, $ry, $rz); |
|
| 174 | } |
|
| 175 | ||
| 176 | /** |
|
| 177 | * Convert this LatLng object to NAD27 datum. |
|
| @@ 181-198 (lines=18) @@ | ||
| 178 | * Reference values for transformation are taken from Wikipedia |
|
| 179 | * @return LatLng |
|
| 180 | */ |
|
| 181 | public function toNAD27(): LatLng |
|
| 182 | { |
|
| 183 | if ($this->refEll == RefEll::clarke1866()) { |
|
| 184 | return $this; |
|
| 185 | } |
|
| 186 | ||
| 187 | $asWGS84 = $this->toWGS84(); |
|
| 188 | ||
| 189 | $tx = 8; |
|
| 190 | $ty = -160; |
|
| 191 | $tz = -176; |
|
| 192 | $s = 0; |
|
| 193 | $rx = deg2rad(0); |
|
| 194 | $ry = deg2rad(0); |
|
| 195 | $rz = deg2rad(0); |
|
| 196 | ||
| 197 | return $asWGS84->transformDatum(RefEll::clarke1866(), $tx, $ty, $tz, $s, $rx, $ry, $rz); |
|
| 198 | } |
|
| 199 | ||
| 200 | /** |
|
| 201 | * Convert this LatLng object to Ireland 1975 datum. |
|