Sub GPS_LocationChanged (Location1 As Location)
Lat1 = Location1.Latitude
Long1 = Location1.Longitude
Altitude = Location1.Altitude
Dim str As String
Dim digits As Int
Dim sep As String
OSGB.WGS84toOSGB36(Lat1, Long1, Altitude)
str = OSGB.OSGB36toNGR(OSGB.NewLatitude, OSGB.NewLongitude)
digits = 5
sep = " "
ngr = "GridRef: " & str.SubString2(0, 2) & sep & str.SubString2(2, digits + 2)
ngr = ngr & sep & str.SubString2(7, digits + 7) & Chr(13) & Chr(10)
East = NumberFormat2(OSGB.Easting, 1, 0, 0, False)
North = NumberFormat2(OSGB.Northing, 1, 0, 0, False)
End Sub