views:

31

answers:

2

I am writing a program that should take several GPS coordinations and do some processing on them. I assume the server on which the app is going to be installed should be equipped with a gps receiver. I am quite new to GPS things. 1) One of my question is that does the GPS receiver store the gps coordinations temporarily to be used in application (better say can this receiver hands several gps coordinatinos at the same time) ? I also read about GPS intermediate driver in .net. My other question is : 3) Is there similar thing(i.e. GPS intermediate driver) available for java? If yes, which is more powerful?

A: 

First of all, keep in mind that a GPS receiver will most likely not work indoors, so I presume that by "server" you are referring to some mobile machine or a mobile phone.

As to your first question, I do not know what GPS receiver you are using, however, I think that most devices work as follows:

You query the GPS receiver, you wait, and the GPS receiver then gives you the coordinates. If you want to store them as a list, then, you will have to build up the logic yourself.

(better say can this receiver hands several gps coordinatinos at the same time)

Each receiver will give you one set of co-ordinates, and these represent the location in which the receiver is at the moment you have requested to co-ordinates.

With regards to your last question, I have never used the GPS Intermediate Driver, however, I have used the Location API provided by Java. Regarding to which is more powerful, I think that you have to consider what you need to do. I presume that they offer the same functionalities.

npinti
A: 

Hi,

I was new to GPS aswell. Only last week i was thrown into the deep end to write a virtual serial port driver for our GPS device, and i am a recent graduate for applications programming. I did get it done, so you can to :)

I assume the server on which the app is going to be installed should be equipped with a gps receiver.equipped with a gps receiver.

Your application has to get the GPS data from somewhere, be it from a COM port or a nice method call in a framework. If you are working directly with the GPS output you will need to know about NMEA strings in order to translate them to a location. For read up on them i recommend the following to websites - http://teletype.com/pages/support/Documentation/RMC_log_info.htm and only 1 link allowed

1) One of my question is that does the GPS receiver store the gps coordinations temporarily to be used in application

As above, if your talking about direct communication with the GPS it will depend on the driver. Generally speaking the GPS device should create a set of NMEA strings and then blast these out of the device into the PC, these will then be stored in a buffer in the driver. When you request data from the driver it will delete that data from the buffer so it is not read again. i.e. GPS sends NMEA string to PC that is 960 characters long. The buffer on the driver will store those characters. You do a read and take 512 of those characters, the buffer now contains 448. If a new NMEA string is pushed out by the GPS device (960 characters again) then the buffer will be 960 characters long again. One would assume the GPS device should be kicking out new NMEA strings atleast every 5 seconds.

Here is an example of the buffer data i got from on call to my driver. There is no signal as i was inside but it is valid data.

GPRMC,100637.410,V,,,,,,,300908,,,N*49

$GPGGA,100638.410,,,,,0,00,,,M,0.0,M,,0000*5F

$GPGSA,A,1,,,,,,,,,,,,,,,*1E

$GPGSV,3,1,12,28,89,179,,20,49,092,,08,46,237,,07,31,193,*7A

$GPGSV,3,2,12,32,31,069,,11,27,035,,17,27,316,,04,26,239,*7B

$GPGSV,3,3,12,23,12,118,,05,06,207,,19,05,072,,13,03,168,*70

$GPRMC,100638.410,V,,,,,,,300908,,,N*46

$GPGGA,100639.410,,,,,0,00,,,M,0.0,M,,000,*7C

$GPGSV,3,2,12,19,00,000,,29,00,000,,04,00,000,,11,00,000,*7C

$GPGSV,3,3,12,16,00,000,,28,00,000,,ü 0,000,,15,00,000,*77

$GPRMC,100728.628,V,,,,,,,300908,,,N*4F

$GPGGA,100729.617,,,,,0,00,,,M,0.0,M,,0000*5B

$GPGSA,A,1,,,,,,,,,,,,,,,*1E

$GPGSV,3,1,12,20,00,000,,10,00,000,,31,00,000,,27,00,000,*7C

$GPGSV,3,2,12,19,00,000,,29,00,000,,04,00,000,,11,00,000,*7C

$GPGSV,3,3,12,16,00,000,,28,00,000,,26,00,000,,15,00,000,*77

$GPRMC,100729.617,V,,,,,,,300908,,,N*42

$GPGGA,100730.618,,,,,0,00,,,M,0.0,M,,0000*5C

$GPGSA,A,1,,,,,,,,,,,,,,,*1E

$GPGSV,3,1,12,20,00,000

So from the above, it gives several coordinates but they are all from the same time, the next time the GPS is refreshed the old data is gone. If you want to store it you need to keep polling the device for data and then store it yourself, either in memory or in a file.

The GPS driver by Microsoft merely is a 3rd party. It connects to a com port on your behalf and gives the GPS data to anyone asking for it. The reason for this is only one app could ask for GPS data as it would be deleted on each read. If you want to keep it simple this driver is the way to go, but you still need to store the data yourself.

My other question is : 3) Is there similar thing(i.e. GPS intermediate driver) available for java? If yes, which is more powerful?

I have to say, i have no idea about this one

JonWillis
is there any way to distinguish which coordinates is for which car(if we assume that we have a list of vehicles that would send their coordinates to the systems )?
JonWillis
which set of coordinates belong to which car.That is how I would do it, and is actually probably something ill be building over the next 2 years as a small part of a larger solution.
JonWillis