Link to home
Start Free TrialLog in
Avatar of sidwelle
sidwelleFlag for United States of America

asked on

Retrieving GPS coordinates with phone and/or laptop

Can I use my phone to retrieve my GPS coordinates ?  I have found some kludgy ways of retrieving coordinates through the map apps, but what I wanted to do was just plug-in my phone to my to my laptop and have it query the phone for coordinates and return it to my application.

Anyone have any ideas on how this could be done ?
Thanks

ASKER CERTIFIED SOLUTION
Avatar of noci
noci

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Kimputer
Kimputer

If you pass through adb commands, your app should be able to get all the info:

adb shell dumpsys location
Avatar of sidwelle

ASKER

Can it pull orientation [compass] data/info as well ?


Phone track will only log gps locations.  Orientation on a mobile device is somewhat arbitrary.  (Not all phones have a compass) often orientation is derived from GPS sampling. (even if a phone has a compass).
Is there a simple way to determine if my phone has a compass module/hardware device ?

Okay, it does.  Found some nice articles how how to down load compass apps and use them.

Q: If those apps gather magnetic North and longitude and latitude, does the compass image point to True North or Magnetic North ?  Didn't find any info on that.

Thanks

A Compass will only get Magnetic North...  no lat/long.
GPS provides an aproximate location (with about 10m of resolution).   Triangulation data on GSM cell towers can provide an aproximation based on those.
Nearby Bluetooth trackers can provide location data, as well as Wifi AP's  (receipt of those means you are within x m [ 10-100m ] of such an AP, tracker, ...).

A magnetic compass will always get Magnetic North..,  as location is not known no correction is possible.
A GPS derived direction should be true North oriented. It Might get "modified/worsened" to magnetic north based on translation tables.
If you have magnetic North you need more info on your surrounding to obtain "true north"..  
On ships you need deviation tables (unique for the ship, depends on direction of travel) and variance, depends on exact location on earth AND varies over time.
Thank you for that and I get it, a compass points to magnetic north, but if magnetic north (direction) is know from a compass and you know the coordinates of the magnetic north pole and you know your locations coordinates , True north could be easily calculated (direction and location)  Right ?
My question(s) are/is:
  • Do the simple compass apps that you find on you phone and on-line do this for you ? Or is it an option ?
  • Does the phone's magnetometer do this for you ? or can it (via API or some other means) ?

Does the pole move ? Yes, I found the following snip on Wikipedia:
In 2009, while still situated within the Canadian Arctic at 84°54′N 131°00′W,[5] it was moving toward Russia at between 55 and 60 km (34 and 37 mi) per year.[6] As of 2019, the pole is projected to have moved beyond the Canadian Arctic to 86°26′52.8″N 175°20′45.06″E.[7][5]

Thanks
Sid. 
Thanks for the help.

Every navigation chart has a compass-rose and a release date printed on it.
The compass rose points to magnetic north + it shows the variance so you can calculate the ACTUAL variance based on release date and time elapsed.

Compass data is rather limited (just a direction).  and is subject to distortion in the magnetic fields by f.e  iron in the neightbourhood.
(A ship that sails on the same route will get a large magnet and influence compass readings)
That's why most ships depend on a gyro-compass that will point to true north, from  24 hours after startup.