gps

GPS/GIS Calculations: Algorithm to predict future position based on movement/mph?

泪湿孤枕 提交于 2019-12-03 03:14:20
Looking for resources or algorithm to calculate the following in a navigation app: If my current GPS position is (0,0) and I'm heading 32 degrees at 15 miles per hour, how can I calculate what my position will be in 10 seconds? i.e.: GPSCoordinate predictedCoord = GPSCoordinate.FromLatLong(0, 0).AddByMovement(32, 15, TimeSpan.FromSeconds(10)); Edit: Current code based on answer below: public GPSCoordinate AddMovementMilesPerHour(double heading, double speedMph, TimeSpan duration) { double x = speedMph * System.Math.Sin(heading * pi / 180) * duration.TotalSeconds / 3600; double y = speedMph *

How can I evaluate the GPS signal strength? (iPhone)

亡梦爱人 提交于 2019-12-03 03:13:21
I need a way of categorising the strength of the GPS signal. So far I have come across the horizontalAccuracy property of CLLocation ( Class Reference ). To be more specific I need to create something like the following; the issue I'm having is filling in the if statements. if (someLocation.horizontalAccuracy ...) { // No Signal } else if (someLocation.horizontalAccuracy ...) { // Poor Signal } else if (someLocation.horizontalAccuracy ...) { // Average Signal } else if (someLocation.horizontalAccuracy ...) { // Good Signal } else { // Excellent Signal } Please can someone assist me in this? I

How to ask user to enable GPS at the launch of application?

匿名 (未验证) 提交于 2019-12-03 03:10:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: private void turnGPSOn(){ String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED); if(!provider.contains("gps")){ //if gps is disabled final Intent poke = new Intent(); poke.setClassName("com.android.settings", "com.android.settings.widget.SettingsAppWidgetProvider"); poke.addCategory(Intent.CATEGORY_ALTERNATIVE); poke.setData(Uri.parse("3")); sendBroadcast(poke); } } see the Logcat I tried many other option like package manager, location manager, etc but not able to do what I want. I

HTML5 Geolocation from external GPS

匿名 (未验证) 提交于 2019-12-03 03:09:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We have used HTML5s navigator.geolocation and found it to be very good on iOS and Android smartphones. Now the users want the same HTML5 web app to run on a laptop with external GPS. Using Windows 7 on the laptop I just can't figure a way to share the location to a HTML5 browser (tried Safari, FF, IE, Chrome). For testing I am using a GlobalStat BU-353 USB GPS which works standalone and I have found GPSDirect (cool freeware) to feed that signal to Win7 Sensor Location Services but still the HTML5 browsers do not see the GPS. Anyone had any

Get gps location of a photo

匿名 (未验证) 提交于 2019-12-03 03:03:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I know how to get the current GPS location of a mobile phone. I also know how to save the GPS location to the photo when you take it. (Camera option Samsung galaxy s2). But how can I get the GPS location of that photo (later)? When I open the photo on the computer, I can see the GPS location data, but got no idea how to extract them later in android. So could someone put me in the good direction? To make question more clearly: How can I get the GPS location of a photo that is already taken? Thanks already, Bigflow 回答1: josnidhin made this

Interpreting GPS info of exif data from photo in python

匿名 (未验证) 提交于 2019-12-03 02:56:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am writing a small program to get the GPS info of a iphone jpg photo. The library I am using is the PIL in python. Now I am able to get the GPSInfo, which is something like: {1: 'N', 2: ((1, 1), (20, 1), (5365, 100)), 3: 'E', 4: ((103, 1), (41, 1), (1052, 100)), 5: 0, 6: (43, 1), 7: ((15, 1), (32, 1), (7, 1)), 16: 'T', 17: (77473, 452), 29: '2013:10:25'} How can I interpret this? And I notice the tag is not continuous, so is there any cheating sheet which I can refer to in order to get a better understanding of all the number tags and what

iOS Swift. How to get a GPS metadata from just a UIImage (NSURL)?

匿名 (未验证) 提交于 2019-12-03 02:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: Have a reference to an image only having its NSURL. How to get a GPS metadata from it? Of course, I can load a UIImage from NSURL, but then what? Majority of answers I've found here is regarding UIImagePicker, and using ALAssets then, but I have no such option. 回答1: Answering my own question. The memory-effective and fast way to get a GPS metadata is let options = [ kCGImageSourceShouldCache as String : kCFBooleanFalse ] if let data = NSData ( contentsOfURL : url ), imgSrc = CGImageSourceCreateWithData ( data , options ) { let

Turn off GPS icon when LocationListener is sleeping

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am struggling a bit with the LocationListener in Android. I want to make an app that will get the current GPS location, and then afterwards sleep for a long time. A day or more. In this period of time i want the GPS notification icon to not show. What i have now, is in the onLocationChanged a Thread.sleep(x) but this will keep the icon on in the sleep period. How can i do this, and is there a better approach than to use Thread.sleep? Thanks in advance 回答1: You have to turn off the LocationManager completly for that. I did it in

PHP extract GPS EXIF data

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to extract the GPS EXIF tag from pictures using php. I'm using the exif_read_data() that returns a array of all tags + data : GPS.GPSLatitudeRef: N GPS.GPSLatitude:Array ( [0] => 46/1 [1] => 5403/100 [2] => 0/1 ) GPS.GPSLongitudeRef: E GPS.GPSLongitude:Array ( [0] => 7/1 [1] => 880/100 [2] => 0/1 ) GPS.GPSAltitudeRef: GPS.GPSAltitude: 634/1 I don't know how to interpret 46/1 5403/100 and 0/1 ? 46 might be 46° but what about the rest especially 0/1 ? angle/1 5403/100 0/1 What is this structure about ? How to convert them to

how to use direction angle and speed to calculate next time's latitude and longitude

荒凉一梦 提交于 2019-12-03 02:41:57
I have know my current position({lat:x,lon:y}) and I know my speed and direction angle; How to predict next position at next time? First, calculate the distance you will travel based on your current speed and your known time interval ("next time"): distance = speed * time Then you can use this formula to calculate your new position (lat2/lon2): lat2 =asin(sin(lat1)*cos(d)+cos(lat1)*sin(d)*cos(tc)) dlon=atan2(sin(tc)*sin(d)*cos(lat1),cos(d)-sin(lat1)*sin(lat2)) lon2=mod( lon1-dlon +pi,2*pi )-pi For an implementation in Javascript, see the function LatLon.prototype.destinationPoint on this page