The point at geodetic latitude lat and longitude lon on the ellipsoid (OpenFrames' LatLonGrid formula: the surface point whose normal has those angles).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | r(3) |
semi-axes (scene units) |
||
| real(kind=wp), | intent(in) | :: | lat |
radians |
||
| real(kind=wp), | intent(in) | :: | lon |
radians |
pure function surface_point(r, lat, lon) result(p) real(wp), intent(in) :: r(3) !! semi-axes (scene units) real(wp), intent(in) :: lat, lon !! radians real(wp) :: p(3), n(3), r2(3) n = [cos(lat) * cos(lon), cos(lat) * sin(lon), sin(lat)] r2 = r**2 p = r2 * n / sqrt(dot_product(r2, n**2)) end function surface_point