toGps method

GpsCoordinates toGps()

Convert a record of (lat, long) in meters into GpsCoordinates.

Implementation

GpsCoordinates toGps() {
  final degreeLatitude = lat / GpsToMeters.metersPerLatitude;
  final degreeLongitude = long / GpsToMeters.metersPerLongitude(degreeLatitude);
  return GpsCoordinates(latitude: degreeLatitude, longitude: degreeLongitude);
}