gps

how to get precise current location in a building map [closed]

核能气质少年 提交于 2020-01-03 06:38:11
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . i have one building map and it have so many rooms on it. Now i want to drop the pin in that building map, where the user is being in that building and also i want to draw the direction if user want to navigate to

background sensing of shake and GPS problems

旧街凉风 提交于 2020-01-03 05:20:59
问题 MainAcivity.java package com.example.background_shake; import java.util.List; import java.util.Locale; import android.app.Activity; import android.content.Intent; import android.hardware.SensorManager; import android.os.Bundle; import android.util.Log; import android.view.Menu; import android.view.View; import android.view.View.OnClickListener; import android.view.Window; import android.view.WindowManager; import android.widget.Button; public class MainActivity extends Activity implements

Retrieve the Last Known Location when the smartphone was turned off a long time

五迷三道 提交于 2020-01-03 05:15:39
问题 I'm working on an Android project and the application needs the GPS coordinates to work. So after a long sleep, the line of code below give me null when I try to get the coordinates locationManager = (LocationManager)getApplicationContext().getSystemService(LOCATION_SERVICE); Location _lastLocation = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER); So to get them, I've to start Google Maps which is a little bit disapointing . I already read a lot of threads but anyone

Reading GPS data from a gadget

杀马特。学长 韩版系。学妹 提交于 2020-01-03 04:27:05
问题 I have a GPS gadget, and I would like to know how I can receive information with C++ (coordinates) from it? 回答1: This is probably easier to answer than the comments indicate. While most GPS units do support proprietary (usually) binary protocols, nearly all that are even close to current also support NMEA-formatted data, and will supply it by default. Whether connected by serial port, bluetooth or USB, most also look to user programs like a serial port. IOW, you can probably support something

Android LocationListener leave on while phone asleep

谁说我不能喝 提交于 2020-01-03 03:28:08
问题 I set an alarm with the flag RTC_WAKEUP to run a IntentService every 30 seconds to transmit location updates to a server. I'm planning to change the flag to RTC so it won't wake up the phone and just run when another process wake ups the phone. If I leave a LocationListener registered, will it still listen for location updates while the phone is asleep? 回答1: Yes - working location service has it's own wake lock. However better approach is manually set proper wake lock in your broadcast

Swift Convert decimal coordinate into degrees, minutes, seconds, direction

ε祈祈猫儿з 提交于 2020-01-02 19:12:36
问题 How can I covert this to swift? My best guess is that all the int get changed to a var. Removing all the @ that lead ". Also if any can point me to a good source to learn how things convert that would great. - (NSString*)coordinateString { int latSeconds = (int)(self.latitude * 3600); int latDegrees = latSeconds / 3600; latSeconds = ABS(latSeconds % 3600); int latMinutes = latSeconds / 60; latSeconds %= 60; int longSeconds = (int)(self.longitude * 3600); int longDegrees = longSeconds / 3600;

How to programmatically enable and disable GPS in Ionic Framework or Cordova

天大地大妈咪最大 提交于 2020-01-02 06:42:20
问题 My problem is simple. I need a way to turn on and off GPS using a button inside an Ionic app. I've check the docs and read this ng-cordova plugin http://ngcordova.com/docs/plugins/geolocation/ but they don't seem have this funcction. Am I just missing something or is this even possible in Ionic Framework? Thanks! 回答1: As far as I'm aware there isn't the ability to directly disable GPS from your app. If you are trying to allow the user to disable GPS, I achieved this by adding a setting to

How accurate is the GPS on the iPhone 4?

我与影子孤独终老i 提交于 2020-01-02 04:54:10
问题 quick question. How accurate is the GPS on the iPhone 4? I ask because I'm working on an enterprise project for a company, and part 2 of it will deal with iDevice development where I have to determine the position of the user. I'd like to know if the GPS is accurate enough to sense the user moving within rooms because the user will have to "tag" sections of the room as they move about it. Thanks in advance! P.S. Pressuming that it won't make much of a difference, but the users will actually

Read multiple .gpx files

大憨熊 提交于 2020-01-02 04:10:08
问题 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

Get current lat long android

陌路散爱 提交于 2020-01-01 19:53:09
问题 I want to get the Location object on Button press. I know the LocationListener callbacks, however they execute only after a particular time or distance. I want to get Location instantaneously. Are there any methods to do so. 回答1: You are welcome to call getLastKnownLocation() on LocationManager to retrieve the last known location for your requested location provider. However: that location may be old that location may be null Hence, your code will need to be able to cope with both of those