Longitude

Applies to

GPSFix objects

Description

The Longitude property holds information about the longitude of a position fix.

Usage


In scripts

The Longitude property takes a value of the GPSCoordinate structure, which holds the longitude of a position fix in degrees and minutes in the Eastern or Western hemisphere. The Minute property is a real value. The following example takes the Minute property, separates it into whole minutes and a partial minute, and converts the partial minute into a number of seconds:

SerialGps myGPS
GPSFix myFix
GPSCoordinate myCoord
Integer fixMinutes, rc
Real fixSeconds

MyGPS = CREATE SerialGPS
rc = myGPS.Open()
...
rc = MyGPS.GetFix(myFix)
myCoord = myFix.Longitude
fixMinutes = Integer(myCoord.Minute)
fixSeconds = (myCoord.Minute - fixMinutes) * 60
mle_1.text = "Longitude: " &
   + String(myCoord.degree) + " degrees "  &
   + String(fixMinutes) + " minutes "  &
   + String(fixSeconds) + " seconds "  &
   + String(myCoord.Hemisphere)