Package x

Class GPS


public class GPS extends Object
...
Author:
Sakdsitt Likhitmetagool
  • Constructor Summary

    Constructors
    Constructor
    Description
    GPS()
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Double
    calLatLong(double lat1, double lon1, double lat2, double lon2, String unit)
     
    static double
    distance(double lng1, double lat1, double lng2, double lat2)
    Calculate the distance between any two points (latitude and longitude) on the earth Longitude of the first point
    static void
    main(String[] args)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GPS

      public GPS()
  • Method Details

    • calLatLong

      public static Double calLatLong(double lat1, double lon1, double lat2, double lon2, String unit)
    • distance

      public static double distance(double lng1, double lat1, double lng2, double lat2)
      Calculate the distance between any two points (latitude and longitude) on the earth Longitude of the first point
      Parameters:
      lat1 -
      lat2 - Latitude of the second point
      Returns:
      Return distance unit: meter
    • main

      public static void main(String[] args)