Printable versions
This Page
All Pages
PDF (2.0MB)

Index

Component
GpsToolsNET

Class
Position

Methods
Copy

LatitudeDMS
LongitudeDMS
LatitudeString
LongitudeString
Altitude

SetLatitudeDMS
SetLongitudeDMS
SetAltitude

Distance
Bearing
Move

IsSameDatum
IsSameGrid
MakeSameDatum
MakeSameGrid

Properties
Latitude
Longitude
LatitudeRads
LongitudeRads

Northing
Easting
Zone

Datum
Grid
CustomDatum
CustomGrid

ModifiedCount

Position.CustomDatum GpsTools v2.20 and later

Converts position to a custom datum. Set this property instead of Position.Datum when the datum you want to use isn't a built in datum found here: Datum

Convert from pre-defined to custom datum in C#:

// Custom datum WGS84 -> OSGB36
GpsToolsNET.Position pos = new GpsToolsNET.Position();
pos.Longitude = 36;
pos.Latitude = 50;

GpsToolsNET.CustomDatum osgb_datum = new GpsToolsNET.CustomDatum();
osgb_datum.SemiMajorAxis = 6377563.3960;
osgb_datum.E2 = 0.0066705400;
osgb_datum.DeltaX = 375;
osgb_datum.DeltaY = -111;
osgb_datum.DeltaZ = 431;

// Convert!
pos.CustomDatum = osgb_datum;

// Results
double lon = pos.Longitude;
double lat = pos.Latitude;

Convert from custom datum to pre-defined datum in C#:

// Convert from OSGB36 (custom) to RT90 index
GpsToolsNET.Position pos = new GpsToolsNET.Position();

GpsToolsNET.CustomDatum osgb_datum = new GpsToolsNET.CustomDatum();
osgb_datum.SemiMajorAxis = 6377563.3960;
osgb_datum.E2 = 0.0066705400;
osgb_datum.DeltaX = 375;
osgb_datum.DeltaY = -111;
osgb_datum.DeltaZ = 431;

pos.CustomDatum = osgb_datum;
pos.Longitude = 36;
pos.Latitude = 50;

pos.Datum = GpsToolsNET.Datum.RT_90;

// Results
double lon = pos.Longitude;
double lat = pos.Latitude;

Convert between two custom datums in C#:


// Convert from custom datum to custom datum
GpsToolsNET.Position pos = new GpsToolsNET.Position();

GpsToolsNET.CustomDatum osgb_datum = new GpsToolsNET.CustomDatum();
osgb_datum.SemiMajorAxis = 6377563.3960;
osgb_datum.E2 = 0.0066705400;
osgb_datum.DeltaX = 375;
osgb_datum.DeltaY = -111;
osgb_datum.DeltaZ = 431;

pos.CustomDatum = osgb_datum;
pos.Longitude = 40;
pos.Latitude = 34;

// Convert from osgb36 custom to ireland65 custom
GpsToolsNET.CustomDatum ireland_datum = new GpsToolsNET.CustomDatum();
ireland_datum.SemiMajorAxis = 6377340.1890;
ireland_datum.E2 = 0.00667054015;
ireland_datum.DeltaX = 482.53;
ireland_datum.DeltaY = -130.596;
ireland_datum.DeltaZ = 564.557;
ireland_datum.RotX = -1.042;
ireland_datum.RotY = -0.214;
ireland_datum.RotZ = -0.631;
ireland_datum.ScaleFactor = 0.00000815;

pos.CustomDatum = ireland_datum;

// Results
double lon = pos.Longitude;
double lat = pos.Latitude;

See also:
Position.MakeSameDatum
Position.IsSameDatum
Position.Datum
Position.CustomGrid

Syntax
object.CustomDatum = v

Part Type Description
object GpsToolsNET.Position An object that evaluates to an GpsToolsNET.Position object.
v CustomDatum Object defining a custom datum.



Compact Framework
© 2016 Franson Technology AB, All rights reserved, Contact | | Affiliate | Login