Printable versions
This Page
All Pages
PDF (2.0MB)

Index

Component
GpsToolsCE

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 a pre-defined to a custom datum in eVB 3.0:

' WGS84 -> OSGB36 
Dim pos As GpsToolsCE.Position
Set pos = CreateObject("GpsToolsCE.Position")

pos.Datum = WGS_84
pos.Longitude = 36
pos.Latitude = 50

' OSGB36 as a custom datum    
Dim osgb_datum As GpsToolsCE.CustomDatum
Set osgb_datum = CreateObject("GpsToolsCE.CustomDatum")

osgb_datum.SemiMajorAxis = 6377563.396
osgb_datum.E2 = 0.00667054
osgb_datum.DeltaX = 375
osgb_datum.DeltaY = -111
osgb_datum.DeltaZ = 431
    
' Convert!
Set pos.CustomDatum = osgb_datum

' Results
' pos.Longitude 
' pos.Latitude

Convert from custom datum to pre-defined datum in eVB 3.0:

' OSGB36 as a custom datum    
Dim osgb_datum As GpsToolsCE.CustomDatum
Set osgb_datum = CreateObject("GpsToolsCE.CustomDatum")

osgb_datum.SemiMajorAxis = 6377563.396
osgb_datum.E2 = 0.00667054
osgb_datum.DeltaX = 375
osgb_datum.DeltaY = -111
osgb_datum.DeltaZ = 431

' Convert from OSGB36 (custom) to RT90 index
Dim pos As GpsToolsCE.Position
Set pos = CreateObject("GpsToolsCE.Position")

Set pos.CustomDatum = osgb_datum
pos.Longitude = 36
pos.Latitude = 50
    
pos.Datum = RT_90

' Results
' pos.Longitude 
' pos.Latitude

Convert between two custom datums in eVB 3.0:

' OSGB36 as a custom datum    
Dim osgb_datum As GpsToolsCE.CustomDatum
Set osgb_datum = CreateObject("GpsToolsCE.CustomDatum")

osgb_datum.SemiMajorAxis = 6377563.396
osgb_datum.E2 = 0.00667054
osgb_datum.DeltaX = 375
osgb_datum.DeltaY = -111
osgb_datum.DeltaZ = 431

' Convert from custom datum to custom datum
Dim pos As GpsToolsCE.Position
Set pos = CreateObject("GpsToolsCE.Position")
    
Set pos.CustomDatum = osgb_datum
pos.Longitude = 40
pos.Latitude = 34
    
' Convert from osgb36 custom to ireland65 custom

Dim ireland_datum As GpsToolsCE.CustomDatum
Set ireland_datum = CreateObject("GpsToolsCE.CustomDatum")

ireland_datum.SemiMajorAxis = 6377340.189
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
    
Set pos.CustomDatum = ireland_datum

' Results
' pos.Longitude 
' pos.Latitude

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

Syntax
object.CustomDatum = v

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



Pocket PC
© 2016 Franson Technology AB, All rights reserved, Contact | | Affiliate | Login