gps

GMSMarker bouncing around the corners on GMSPolyline

泪湿孤枕 提交于 2019-12-01 22:01:57
问题 I am working on a navigation app and tracking user's current movement on an already drawn GMSPolyline. It works good when the user is going straight. Now if, suppose there is right / left turn or a u-turn on the GMSPolyline, now as per my GPS location I get one update around 20 meters before taking a turn and another after 30 meters. My GPS fails to collect the points that will exist just at the turning point. In this case my GMSMarker jumps from point x to y and if I apply animation then it

What is active GPS effect on mobile devices battery life?

一个人想着一个人 提交于 2019-12-01 21:35:27
How much does active GPS drain the battery? Without the overhead of the gps navigator software. s ay I want to sample the gps every 2 minutes and save it to a file. how much battery power will that cost me? Will I get 10% shorter life? 20%? ..? I think this can't be answered that easy without measuring it. But you could measure it. Just try how long it takes to empty the whole battery. Once with GPS and once without. It will be noticeable by the user. You definitely don't want to do this kind of thing unless it is a feature the user is explicitly aware of and able to clearly turn on and off

GMSMarker bouncing around the corners on GMSPolyline

那年仲夏 提交于 2019-12-01 21:27:35
I am working on a navigation app and tracking user's current movement on an already drawn GMSPolyline. It works good when the user is going straight. Now if, suppose there is right / left turn or a u-turn on the GMSPolyline, now as per my GPS location I get one update around 20 meters before taking a turn and another after 30 meters. My GPS fails to collect the points that will exist just at the turning point. In this case my GMSMarker jumps from point x to y and if I apply animation then it moves diagonally and does not move along the GMSPolyline arcs or curves. Please suggest me how can I

Geting Speed From GPS on Android Calculating Distance And Time

我的梦境 提交于 2019-12-01 21:16:38
I have been trying to get speed by the help of GPS. I would like to get Gps datas(latitude-longitude-speed) when my telephone fell down. When telephone fell down, gps datas are obtained and sent to my server. For this aim, I used threads. Each thread get gps datas and send to server them. My problem is speed value. I got speed calculating distance between two location and time (speed = distance / time) Thread makes : @Override public void run() { Looper.prepare(); float distance = 0.0f; float[] results = new float[1]; Long longValue = new Long(11); double firstLatitude; double firstLongitude;

How to find my current location (latitude + longitude) on click of a button in android?

痞子三分冷 提交于 2019-12-01 21:13:43
问题 I have seen various code snippets which find outs co-ordinates from various methods like onlocationupdate() or onstatusChanged().... what i want is a simple code that fetches my current GPS co-ordinates on click of a button... 回答1: LocationManager mLocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); LocationListener mLocListener = new MyLocationListener(); mLocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mLocListener); public class

GPS to calculate distance between two points on windows phone 7

ⅰ亾dé卋堺 提交于 2019-12-01 20:56:23
i am using GPS to calculate distance between two points i.e. i am using windows phone as a tape measure but when i start i dont get the correct value infact even if i am standing still it gives me hundreds of meter here is my code myWatcher.StatusChanged += new EventHandler<GeoPositionStatusChangedEventArgs>(myWatcher_StatusChanged); myWatcher.PositionChanged += new EventHandler<GeoPositionChangedEventArgs<GeoCoordinate>>(myWatcher_PositionChanged); myWatcher.MovementThreshold = 1; void myWatcher_PositionChanged(object sender, GeoPositionChangedEventArgs<GeoCoordinate> e) { double tempf = e

How to read GPS Coordinates from JPG EXIF using CCR.EXIF in Delphi?

此生再无相见时 提交于 2019-12-01 20:54:22
It's quite easy setting the GPS coordinates using the GPSLatitude and GPSLatitude properties Assign method, but reading the coords has me stumped. I've trying to access the TGPSLongitude class, but none of the properties or methods would render me a real / float or even DMS of the coordinates. Sample image: http://www.cde.co.za/share/IMG_5889.JPG My current code that's not compiling: imgJpg: TJpegImageEx; GPS_D: Real; try imgJpg.LoadFromFile(FolderName+'\'+SR.Name); GPS_D:= imgJpg.ExifData.GPSLatitude.Degrees; except GPS_D:= 0; end; The compiler stops at where I try to assign GPS_D with the

find next postion knowing lat/lon/heading/speed

强颜欢笑 提交于 2019-12-01 20:19:05
knowing a decimal latitude , decimal longitude , speed (km/h) , heading how to find the next position of a car after 60 seconds? is there any algorithm to do that? This might help: distance_traveled = speed * time Then, calculate x and y components of speed using heading as angle (trigonometry): speed_x=distance_traveled * Math.Cos(heading/180*Math.PI) speed_y=distance_traveled * Math.Sin(heading/180*Math.PI) Next, see how to map lat/long into some form of x/y coordinates, add speed_x and speed_y, and convert to lat/long again. This last one is a tricky one, look here: http://www.movable-type

How to find my current location (latitude + longitude) on click of a button in android?

和自甴很熟 提交于 2019-12-01 19:43:29
I have seen various code snippets which find outs co-ordinates from various methods like onlocationupdate() or onstatusChanged().... what i want is a simple code that fetches my current GPS co-ordinates on click of a button... yogsma LocationManager mLocManager = (LocationManager)getSystemService(Context.LOCATION_SERVICE); LocationListener mLocListener = new MyLocationListener(); mLocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mLocListener); public class MyLocationListener implements LocationListener{ public void onLocationChanged(Location loc) { String message = String

Switch off GPS programmatically

橙三吉。 提交于 2019-12-01 19:02:28
What i have: Currently my app is giving location through gps. what i want: Gps to turn off automatically after i exit from the application. Because it keeps on telling me the location time and again that looks odd and also gps consume a lot battery. Looking at above comment thread it seems its possible to turn OFF GPS programatically (But seeing only 12 Upvotes) But if you switch OFF GPS from your application programatically, what if other applications use GPS Service ? The solution would be like Open Settings of android and then tell user to turn OFF GPS when he exits from the application...