Here you can find the source of isSameGPSLocation(double lon, double lat, double lon1, double lat1)
Parameter | Description |
---|---|
lon | a parameter |
lat | a parameter |
lon1 | a parameter |
lat1 | a parameter |
public static boolean isSameGPSLocation(double lon, double lat, double lon1, double lat1)
//package com.java2s; public class Main { /**/*from w ww . j a v a2s. c om*/ * Same as query for a location in DatabaseHelper.findClosestAirportID() * @param lon * @param lat * @param lon1 * @param lat1 * @return */ public static boolean isSameGPSLocation(double lon, double lat, double lon1, double lat1) { if (((lon - lon1) * (lon - lon1) + (lat - lat1) * (lat - lat1)) < 0.001) { return true; } return false; } }