Click or drag to resize

MagneticExtensionsGetMagnetic Method (Coordinate, DataModel)

Creates a Magnetic object from a Coordinate. Assumes height is at MSL and a provided data model.

Namespace:  CoordinateSharp.Magnetic
Assembly:  CoordinateSharp.Magnetic (in CoordinateSharp.Magnetic.dll) Version: 1.1.2.0
Syntax
C#
public static Magnetic GetMagnetic(
	this Coordinate coordinate,
	DataModel dataModel
)

Parameters

coordinate
Type: CoordinateSharpCoordinate
Coordinate
dataModel
Type: CoordinateSharp.MagneticDataModel
Data Model

Return Value

Type: 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).
Examples
Creating a Magnetic object from a coordinate.
Coordinate c = Coordinate(25,25, new DateTime(2020,1,1));
Magnetic m = c.GetMagnetic(DataModel.WMM2020);
See Also