Click or drag to resize

TerrainProviderGetGradient Method

Get the interpolated gradient of height with respect to the terrain at the specified longitude and latitude relative to the provider's Shape. This method produces a vector representing the gradient of height in the ShapeFixedFrame.

Note: The direction for the gradient is defined for use as the outward facing surface normal direction. To obtain the directional derivative for the height (rate of change of height with respect to time), take the negative gradient and dot it with a unit vector along the desired azimuth (change in height with respect to distance), times the speed along that direction in meters/second.

The gradient, as defined above, is parallel to the upward facing terrain surface normal, but its magnitude indicates the rate of change in the height at that location.

Namespace:  AGI.Foundation.Terrain
Assembly:  AGI.Foundation.Models (in AGI.Foundation.Models.dll) Version: 24.3.420.0 (24.3.420.0)
Syntax
public Cartesian GetGradient(
	double longitude,
	double latitude
)

Parameters

longitude
Type: SystemDouble
The longitude, in radians. Requesting a gradient for a longitude less than -π or greater than π will always return NaN.
latitude
Type: SystemDouble
The latitude, in radians. Requesting a gradient for a latitude less than -π/2 or greater than π/2 will always return NaN.

Return Value

Type: Cartesian
The gradient vector in the ShapeFixedFrame at the given location, in meters of height per meters of surface distance.
See Also