Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Transform geodetic to geocentric (ECEF) coordinates

```
[X,Y,z]
= geodetic2ecef(spheroid,lat,lon,h)
```

```
[X,Y,Z]
= geodetic2ecef(___,angleUnit)
```

`[X,Y,Z] = geodetic2ecef(lat,lon,h,spheroid)`

`[`

transforms geodetic point locations specified by the geodetic coordinate arrays
`X`

,`Y`

,`z`

]
= geodetic2ecef(`spheroid`

,`lat`

,`lon`

,`h`

)`lat`

(geodetic latitude), `lon`

(longitude), and `h`

(ellipsoidal height) to geocentric
Earth-Centered Earth-Fixed (ECEF) Cartesian coordinates `x`

,
`y`

, and `z`

. The geodetic coordinates
refer to the reference body specified by the spheroid object,
`spheroid`

.

`[X,Y,Z] = geodetic2ecef(lat,lon,h,spheroid)`

This syntax is supported but
not recommended. `lat`

and `lon`

must be in
radians. `spheroid`

can be either a spheroid or an ellipsoid
vector of the form: `[semimajor_axis, eccentricity]`

. In this
case, `h`

must use the same units as the semimajor axis.
`X`

, `Y`

, and `Z`

will be
expressed in these units also.

The geocentric Cartesian (ECEF) coordinate system is fixed with respect to the Earth, with its origin at the center of the spheroid and its positive X-, Y-, and Z axes intersecting the surface at the following points:

Latitude Longitude Notes X-axis 0 0 Equator at the Prime Meridian Y-axis 0 90 Equator at 90-degrees East Z-zxis 90 0 North Pole

`ecef2geodetic`

| `ecefOffset`

| `oblateSpheroid`

| `referenceEllipsoid`

| `referenceSphere`

Was this topic helpful?