GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
GPS data  XML
Forum Index -> General
Author Message
bitstream



Joined: 11/01/2007 15:45:23
Messages: 4
Location: Romania
Offline

Hello
First, this is not related with geonames but it's a problem with lat long data, maybe someone has an answer.
If my post is against this forum rules please ignore it.

I'm working on a fleet management project and I intend to use your data.
My problem is that I don't know in what format the GPS reports it's position.
In database i have this format.
GPS data:
xco: 2114.3756
yco: 4546.2270
What I managed to discover is those values that are aproximate to Timisoara, Romania

Geonames data:
latitude: 45.80986
longitude: 21.33786

If I apply a php function on GPS data I get this:
21.2395933333
45.77045

Here is the function:
Code:
 function WGSMinutes($value){
 	
 	$degrees = substr(strval($value), 0, 2);
 	$minutes = substr(strval($value), 2);
 	
 	$return = $degrees + $minutes/60;
 	
 	return $return;
 }
 
 and I call it like this:
 WGSMinutes(ltrim("2114.3756","0"))
 


If someone know how to reverse this function or how to convert geonames data into GPS format like tell me please.
bitstream



Joined: 11/01/2007 15:45:23
Messages: 4
Location: Romania
Offline

I figured out how to do a reverse from that function.
Problem solved. Thread closed.
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team