com.eurotech.framework.protocol.pcn
Class Gps2Distance

java.lang.Object
  extended by com.eurotech.framework.protocol.pcn.Gps2Distance

public class Gps2Distance
extends Object


Constructor Summary
Gps2Distance(double latitude1, double longitude1, double latitude2, double longitude2)
          Gps2Distance constructor.
 
Method Summary
 double getDistanceKm()
          Reports distance between two points in kilometers.
 double getDistanceMi()
          Reports distance between two points in miles.
 double getLatitude1()
          Reports start point latitude.
 double getLatitude2()
          Reports end point latitude.
 double getLongitude1()
          Reports start point longitude.
 double getLongitude2()
          Reports end point longitude.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gps2Distance

public Gps2Distance(double latitude1,
                    double longitude1,
                    double latitude2,
                    double longitude2)
             throws Exception
Gps2Distance constructor.

Parameters:
latitude1 - - start point latitude as double
longitude1 - - start point longitude as double
latitude2 - - end point latitude as double
longitude2 - - end point longitude as double
Throws:
Exception
Method Detail

getLatitude1

public double getLatitude1()
Reports start point latitude.

Returns:
start point latitude as double

getLongitude1

public double getLongitude1()
Reports start point longitude.

Returns:
start point longitude as double

getLatitude2

public double getLatitude2()
Reports end point latitude.

Returns:
end point latitude as double

getLongitude2

public double getLongitude2()
Reports end point longitude.

Returns:
end point longitude as double

getDistanceKm

public double getDistanceKm()
Reports distance between two points in kilometers.

Returns:
distance in kilometers as double

getDistanceMi

public double getDistanceMi()
Reports distance between two points in miles.

Returns:
distance in miles as double


Copyright © 2013. All Rights Reserved.