Overclock.net › Forums › Mobile Computing Forum › Phones › GPS Coordinate / Andriod. api
New Posts  All Forums:Forum Nav:

GPS Coordinate / Andriod. api

post #1 of 3
Thread Starter 
My 1st question is how do I convert

40°44′55″N, 73 59 11W

to

40.7486, -73.9864

And 2nd, I'm programming the server side for a android route tracker program, how will the gps data be returned from the android API Im guessing it will be the (40.7486, -73.9864)?
^3
(11 items)
 
   
CPUMotherboardGraphicsRAM
Intel Core i7 5930K  EVGA x99 Micro EVGA GTX 980 SC ACX 16GB Corsair DDR4 Vengeance LPX Black PC4-21300 
Hard DriveCoolingOSMonitor
500GB Samsung 840 EVO H105 Win 10 ASUS ROG PG279 
KeyboardPowerCase
Ducky Shine 1 MX-Red Corsair AX 860i  Fractal Design Node 804 Black 
CPUGraphicsRAMHard Drive
Core i7 @ 2.6  GT650 16GB of 1600 MHz DDR3L SDRAM 256GB SSD 
OSMonitorKeyboard
Mac OSX Lion Retina Display US layout 
  hide details  
Reply
^3
(11 items)
 
   
CPUMotherboardGraphicsRAM
Intel Core i7 5930K  EVGA x99 Micro EVGA GTX 980 SC ACX 16GB Corsair DDR4 Vengeance LPX Black PC4-21300 
Hard DriveCoolingOSMonitor
500GB Samsung 840 EVO H105 Win 10 ASUS ROG PG279 
KeyboardPowerCase
Ducky Shine 1 MX-Red Corsair AX 860i  Fractal Design Node 804 Black 
CPUGraphicsRAMHard Drive
Core i7 @ 2.6  GT650 16GB of 1600 MHz DDR3L SDRAM 256GB SSD 
OSMonitorKeyboard
Mac OSX Lion Retina Display US layout 
  hide details  
Reply
post #2 of 3
I'd look into this pages source code.
http://www.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html
For example

Code:

      if(form11.lonDecimal.value < 0)  { signlon = -1; }

      lonAbs = Math.abs(Math.round(form11.lonDecimal.value * 1000000.));

     //Math.round is used to eliminate the small error caused by rounding in the computer:
     //e.g. 0.2 is not the same as 0.20000000000284

     //Error checks
     if(lonAbs > (180 * 1000000)) {  alert(' Degrees Longitude must be in the range of -180 to 180. '); form11.lonDecimal.value='';  lonAbs=0; } 
post #3 of 3
Thread Starter 
Quote:
Originally Posted by mbudden View Post
I'd look into this pages source code.
http://www.fcc.gov/mb/audio/bickel/DDDMMSS-decimal.html
For example

Code:

      if(form11.lonDecimal.value < 0)  { signlon = -1; }
      lonAbs = Math.abs(Math.round(form11.lonDecimal.value * 1000000.));

     //Math.round is used to eliminate the small error caused by rounding in the computer:
     //e.g. 0.2 is not the same as 0.20000000000284

     //Error checks
     if(lonAbs > (180 * 1000000)) {  alert(' Degrees Longitude must be in the range of -180 to 180. '); form11.lonDecimal.value='';  lonAbs=0; } 
Thanks mate I'm on the iPhone in bed ATM but I will try that out! Great find +1(can't do it on iPhone, but it's coming)
^3
(11 items)
 
   
CPUMotherboardGraphicsRAM
Intel Core i7 5930K  EVGA x99 Micro EVGA GTX 980 SC ACX 16GB Corsair DDR4 Vengeance LPX Black PC4-21300 
Hard DriveCoolingOSMonitor
500GB Samsung 840 EVO H105 Win 10 ASUS ROG PG279 
KeyboardPowerCase
Ducky Shine 1 MX-Red Corsair AX 860i  Fractal Design Node 804 Black 
CPUGraphicsRAMHard Drive
Core i7 @ 2.6  GT650 16GB of 1600 MHz DDR3L SDRAM 256GB SSD 
OSMonitorKeyboard
Mac OSX Lion Retina Display US layout 
  hide details  
Reply
^3
(11 items)
 
   
CPUMotherboardGraphicsRAM
Intel Core i7 5930K  EVGA x99 Micro EVGA GTX 980 SC ACX 16GB Corsair DDR4 Vengeance LPX Black PC4-21300 
Hard DriveCoolingOSMonitor
500GB Samsung 840 EVO H105 Win 10 ASUS ROG PG279 
KeyboardPowerCase
Ducky Shine 1 MX-Red Corsair AX 860i  Fractal Design Node 804 Black 
CPUGraphicsRAMHard Drive
Core i7 @ 2.6  GT650 16GB of 1600 MHz DDR3L SDRAM 256GB SSD 
OSMonitorKeyboard
Mac OSX Lion Retina Display US layout 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Phones
Overclock.net › Forums › Mobile Computing Forum › Phones › GPS Coordinate / Andriod. api