Click or drag to resize

ECEF Constructor (Coordinate, Distance)

Creates an ECEF coordinate.

Namespace:  CoordinateSharp
Assembly:  CoordinateSharp (in CoordinateSharp.dll) Version: 2.2.1.1
Syntax
C#
public ECEF(
	Coordinate coordinate,
	Distance height
)

Parameters

coordinate
Type: CoordinateSharpCoordinate
Coordinate
height
Type: CoordinateSharpDistance
Height above Mean Sea Level
Remarks
ECEF values will be populated by converting from the passed geodetic Coordinate object and height (above mean sea level).
Examples
The following example demonstrates how to create a populated ECEF coordinate based on a converted geodetic coordinate and height above mean sea level.
//Create a geodetic coordinate at N25, E45
Coordinate c = new Coordinate(25,45);

//Create a distance object set at 450 meters.
//This will be used to signal the ECEF coordinate is 450 meters above MSL.
Distance height = new Distance(450, DistanceType.Meters);

//Create and convert geodetic to ECEF
ECEF ecef = new ECEF(c, height);

Console.WriteLine(ecef); 4090.204 km, 4090.204 km, 2679.265 km
See Also