gps

Haversine formula in Java producing incorrect result

好久不见. 提交于 2019-12-13 09:49:01
问题 I am trying to use this implementation of Haversine formula given on wikipedia for trial but this formula is not giving expected result. public class Haversine { public static final double R = 6372.8; // In kilometers public static double haversine(double lat1, double lon1, double lat2, double lon2) { double dLat = Math.toRadians(lat2 - lat1); double dLon = Math.toRadians(lon2 - lon1); lat1 = Math.toRadians(lat1); lat2 = Math.toRadians(lat2); double a = Math.sin(dLat / 2) * Math.sin(dLat / 2)

GPS in j2me enabled mobiles

三世轮回 提交于 2019-12-13 09:45:34
问题 Does every j2me enabled mobile have GPS service so that the developer can locate its latitude and longitude? 回答1: Just because a phone can run J2ME it does not mean that it's manufacturer placed a GPS unit in it. As far as I know there are mobiles which can run Java applications but do not have a built in GPS. If you want to find the location of your phone, you can resort to triangulation, where you use cell towers to locate the phone. That being said, this method offers at best, a relatively

How to get road name or street name from GPS coordinates?

家住魔仙堡 提交于 2019-12-13 09:36:04
问题 Is there any possibility to get road name or street name when the GPS coordinates are given? I am developing an android application to provide upcoming road accident information to road users who are driving towards the accident situation. Therefore, I need to identify road users who are driving on the same route where the accident is. Hence, I will get the current position of the road user in every 500m. So I need to map this GPS positions with the road address and check whether the road

Geolocation map by default

我只是一个虾纸丫 提交于 2019-12-13 08:58:21
问题 I have a page show customer location on map and he can drage the marker to be more accurate and the GPS coordinates displayed at the top of page as well. the question is , in sometimes , the location can not be detected for some reason, how i can set default location just in case the actual location didn't appear. let's say we want to make the default location is : 25.074217,55.510044 only in case of current location didn't loaded successfully this is the code <!DOCTYPE html> <html> <head> <

Gps Location updates in android is not working

我只是一个虾纸丫 提交于 2019-12-13 08:51:17
问题 From Android official site I have downloaded Location services example & did run in the real device. Every time onLocationChanged method is returning Network's Latitude & Longitude but not accurate GPS location. How to achieve accurate GPS locations from the new android Location API. Here is my service code package com.example.locationservice; import android.app.Service; import android.content.Context; import android.content.Intent; import android.location.Location; import android.location

GPS reading cant be retrieved

*爱你&永不变心* 提交于 2019-12-13 08:37:15
问题 i want to use GPS in my App. but when i tried to retrieve GPS readings as shown belwo in the code, Android studio gave me the belwo mentioned error despit all the required permissions are added to manifest file code : LocationManager lm = (LocationManager) ctx.getSystemService(Context.LOCATION_SERVICE); LocationListener ll = new LocationListener() { @Override public void onLocationChanged(Location location) { Log.w(TAG, "onLocationChanged"); } @Override public void onStatusChanged(String

Can anyone explain me how GPS tracking is working in Android

妖精的绣舞 提交于 2019-12-13 08:01:04
问题 I'm looking for GPS coordinates. My criteria are: is not equal to the last location Accuracy < 500 In general terms, System should accept GPS coords that are <200m aprox. I've made 4 tries in my app: First try: 19.3820126,-99.1647096:Acc:50.528 Last location ( That's why we keep searching - error 3 km) 01-29 10:37:42.698 onLocationChanged﹕ 19.364292,-99.1776019:Acc:660.0 (error: Aprox 60 m - should accept it) 01-29 10:37:47.733 onLocationChanged﹕ 19.3639126,-99.1771124:Acc:660.0 (error: Aprox

Gps tracker received data,

一曲冷凌霜 提交于 2019-12-13 07:59:43
问题 in advance I want to appreciate any answer and suggestion on this problem, I am am working on a GPS tracker module (Model: m528), It's poorly documented so I dont have any paper on the data format which it sends, I have my own server that listens to a special port and gets the data packets sent by the module, I know the position of the latitude and longitude in the received packets, each of them have 4 bytes without N, W, S, E indicators, this are the examples which I think would help, stored

ios Location Background Mode : Update location upto 18 mins only

陌路散爱 提交于 2019-12-13 07:15:08
问题 I have enabled Location background mode and added NSLocationAlwaysUsageDescription . After calling [locationManger startUpdatingLocation]; After placing the application in background (by tapping home button), i can see location-services indicator been added to status bar. After around 18 mins, the location-services indicator went away and app doesn't get any gps points. NOTE: requestAlwaysAuthorization is in place and granted. 回答1: Hi Vinay: App will move on suspended mode that's why you'll

Batch accessing Google or Bing Maps from C#

删除回忆录丶 提交于 2019-12-13 07:09:54
问题 Good morning, I am currently working on a project in which I need to compute the pairwise distance between some 4000 points. Since I have the coordinates of all the points, computing the straight-line distance between them was not very difficult... But now I would like to compute the same ~ 8 million distances using not the straight-line path but the shortest path by road, as given by GPS software. Can I access Google/Bing/other map services from C# to compute these distances? Thank you very