gps

How to convert GPS degree to decimal and vice-versa in jquery or javascript and PHP?

房东的猫 提交于 2019-12-05 09:31:30
does someone know how to convert GPS degree to decimal values or vice versa? I have to develop a way where users can insert an address and get the GPS values (both degree and/or decimal), but the main thing i need to know is how to convert the values, cause users can also insert GPS values (degree or decimal). Because i need to get the map from google maps this needs decimal. I've tryed some codes but i get big numbers...like this one: function ConvertDMSToDD(days, minutes, seconds, direction) { var dd = days + minutes/60 + seconds/(60*60); //alert(dd); if (direction == "S" || direction == "W"

Read multiple .gpx files

核能气质少年 提交于 2019-12-05 09:13:53
Suppose I have a number of .gpx files (these contain GPX waypoint data from a Garmin eTrex). I want to load them into R with different names and manipulate them. I can read one file thus: library(maptools) gpx.raw <- readGPS(i = "gpx", f = "file1_w_12_f_ddf.gpx", type="w") Suppose I want to read a number of them into memory. I could try a for loop: files <- list.files(".",pattern = "*.gpx") for(x in files){ #Create new file name temp <- strsplit(x,"_",fixed=TRUE) visit.id <- sapply(temp,FUN=function(x){paste(x[1],x[4],substr(x[5],1,3),sep="_")}) #read file with new filename assign(visit.id,

Is Fused Location Provider good choice?

一个人想着一个人 提交于 2019-12-05 09:12:10
I am developing an application where I want to use Fused Location Provider. But I have some doubts, and couple of questions. When GPS is off and I set priority to HIGH, does that mean that the GPS will be automatically turned on, or not? Can I set UpdateLocation with Fused provider with HIGH priority on demand to save battery at least a little bit? How can I know what Fused provider is using (is it a GPS or a network provider)? And finally Is Fused provider really the best choice for android location? Are there any negative points about it? What is your opinion? Thanks in advance. blackkara

iPhone SDK: Do I need to ask user for permissions to use GPS?

南笙酒味 提交于 2019-12-05 09:08:00
In my iPhone application I need to use GPS (CoreLocation to be exact) to get current position of the device. I know that most (if not all) applications using GPS have a popup implemented asking the user to allow GPS access. Is that done automatically by the iPhone SDK or should I implement such functionality myself? I've tried to run my app on iPhone Simulator and it didn't ask for permissions at all so I'm wondering if the same thing will happen on the actual phone. And if I implement that itself and the SKD provides that out-of-the-box then I'll have two confirmation in my app which I don't

unity GPS coordinates to (X,Y,Z), rotating north

蓝咒 提交于 2019-12-05 08:05:06
问题 I'm making an app with Unity3D which uses GPS coordinates to place a "thing" in the 3D world, as you walk in real world close to it, you will find it getting close. kinda like PokemonGO So the problem is: I managed to place the object at the right place and distance, using a function dist(lat1,lon1,lat2,lon2) which give me the distance in meters between the 2 coordinates (see below). What i want to do next is to make the scene turn around the Y axis in order to head north (Z axis+ should be

Reading GPS RINEX data with Pandas

徘徊边缘 提交于 2019-12-05 07:41:26
I am reading a [RINEX-3.02] (page 60) Observation Data file to do some timed based satellite ID filtering, and will eventually reconstruct it latter. This would give me more control over the selection of satellites I allow to contribute to a position solution over time with RTK post processing. Specifically for this portion though, I'm just using: [python-3.3] [pandas] [numpy] Here is an sample with the first three time stamped observations. Note: It is not necessary for me to parse data from the header. 3.02 OBSERVATION DATA M: Mixed RINEX VERSION / TYPE CONVBIN 2.4.2 20130731 223656 UTC PGM

Convert GPS coordinates to a city name / address in Swift

守給你的承諾、 提交于 2019-12-05 07:18:38
I have a latitude/longitude location that I want to convert to the location name String in Swift. What is the best way to do this? i believe it's best to use the reverseGeocodeLocation function but not exactly sure how to. This is what I have so far: func locationManager(manager: CLLocationManager!, didUpdateLocations locations: [AnyObject]!) { if (locationFixAchieved == false) { locationFixAchieved = true var locationArray = locations as NSArray var locationObj = locationArray.lastObject as CLLocation var coord = locationObj.coordinate var latitude = coord.latitude var longitude = coord

Get *coarse* location from GPS provider on Android

五迷三道 提交于 2019-12-05 07:07:15
My app only needs very rough location data, so I originally set my manifest permissions to ACCESS_COARSE_LOCATION , and set up a location listener for NETWORK_PROVIDER . This gave me exactly the kind of rough location estimate I needed, but only with Google Location Services turned on. I was expecting that if the user only had GPS enabled, that I would still receive a rough estimate of their location. But it seems like the only way to get ANY location information from the GPS_PROVIDER is by using the ACCESS_FINE_LOCATION permission. So, is it true that with only GPS enabled, an app cannot

How to set the location in the iOS simulator without writing code?

和自甴很熟 提交于 2019-12-05 07:05:33
My problem was how to set the gps location of my app when running in the iOS simulator The home screen in my app displays sunrise and sunset times based on gps location and I wanted a screen shot with sensible values - I'm in the UK and the sunrise times were showing UK times for American sunrise and sunset. As it is on the launch screen one solution, going to Debug -> Simulate Location, is too late for me. Took me a while to work out and I wasn't finding the answer when I searched here (maybe not asking the question the right way . So I'm going to answer my own question below in the hope it

What is the best way to calculate distance travelled over a period of time?

梦想的初衷 提交于 2019-12-05 06:29:04
问题 I am trying to calculate the distance elapsed over a period of time in an app for the Android platform. What is the best way to do this? At the moment, I am implementing LocationListener interface. I am overriding the method onLocationChanged I am currently doing something like this: public void onLocationChanged(Location location) { Log.d("onLocationChanged", "onLocationChanged"); old_location.set(new_location); new_location.set(location); totalDistanceElapsed += new_location.distanceTo(old