MagneticExtensionsGetMagnetic(Coordinate, Double, DataModel) Method

Creates a Magnetic object from a Coordinate with a specified height in meters above MSL and a provided data model.

Definition

Namespace: CoordinateSharp.Magnetic
Assembly: CoordinateSharp.Magnetic (in CoordinateSharp.Magnetic.dll) Version: 1.1.11.0
XMLNS for XAML: Not mapped to an xmlns.
C#
public static Magnetic GetMagnetic(
	this Coordinate coordinate,
	double height,
	DataModel dataModel
)

Parameters

coordinate  Coordinate
Coordinate
height  Double
Height in Meters
dataModel  DataModel
Data Model

Return Value

Magnetic
Magnetic

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Coordinate. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Example

Creating a Magnetic object from a coordinate with a specified height.
C#
Coordinate c = Coordinate(25,25, new DateTime(2020,1,1));
//Height in meters.
Magnetic m = c.GetMagnetic(1000, DataModel.WMM2020);

See Also