Syntax: ChangeDatum (Lat, Lon, From_a, From_f, To_a, To_f, Dx, Dy, Dz) As Double()
All arguments are of type Double.
Lat - The Latitude of the source coordinate. (dd.dddd)
Lon - The Longitude of the source coordinate. (ddd.dddd)
From_a - The semi-major axis of the source ellipsoid.
From_f - The flattening of the source ellipsoid.
To_a - The semi-major axis of the target ellipsoid.
To_f - The flattening of the target ellipsoid.
Dx - The change in x between the source and the target datum. (Dx of the source - Dx of
the target).
Dy - The change in y between the source and the target datum.
Dz - The change in z between the source and the target datum.
The function returns an array of two numbers:
0 - The Latitude value. (dd.dddd)
1 - The Longitude value. (ddd.dddd)
The following example converts the coordinates from WGS84 to European Datum 1950
(England).
Example:
Sub Globals
dim ll(0) as double
End Sub
Sub App_Start
converter.New1
lat = 32.5555
lon = 35.2222
ll() = converter.ChangeDatum(
lat,lon,6378137,1/298.257223563,6378388,1/297,86,96,120)
msgbox("Lat: " & ll(0) &
crlf & "Lon: " & ll(1))
End Sub