HomeSoftware


Software interface to get location
adelash
Hi,
I am looking for laptop gps software that would allow the application I will create to retrieve the current location every few milliseconds. I know that garmin navigation systems shows speed which is very accurate.

This question might pertain to the hardware section but I will ask just in case: How accurate are the locations? Is it software dependent? Are we talking 1-2 feet? or more like 30 feet?

Thanks in advance
Ken in Regina
More like 15 to 30 feet for consumer-grade GPS receivers. You would need a survey quality product to get consistently as good as 1 or 2 feet.

Sampling every few milliseconds is a waste of time with consumer receivers. The majority only send fresh location information once per second (1Hz). Some can be set to send updates as often as 5Hz and I think I've even seen one or two that can do up to 10Hz.

Do you need the data in real time? If not, there are a number of applications that can capture the GPS data and save it to a log file that you can process after the fact.

The GPS receivers send data as streams of text in "sentences". The sentences are defined by the NMEA standard. If you want near realtime you can just write your application to read the specific NMEA sentences you want. The simplest would be to use serial port communication. Most devices come with a driver that creates a virtual COM port you can attach to. If not, you can use a program like Xport or GPSGate to create the virtual COM port for you.

...ken...
adelash
First of all, thank you for the reply Ken. It was very informative. Perhaps, I can explain the purpose behind my question. Since you guys are experts there might be a better way of doing it.

I am a computer engineer and currently working on an amatuer project (so I do not have insane funding, my budget is limited and time is not an issue). Part of my project is to collect data points every 5 meters. The data point should be the gps coordinates. I will be driving my car and will have a laptop and a power source. Of course this would be incredibly easy if I drove at a constant speed (that way, I can poll the coordinates every Y seconds where Y= 5 meters / fixed car's speed in meters per second).

How would I, using the apropriate software and hardware, get a reading of coordinates every X meters? The coordinates will be saved in a log file and assume the driving direction is not predictable.

How expensive are accurate gps (~1-2 feet). I currently have a garmin 255W.
adelash
I just spent a couple of hours roaming around this website. I saw your post on GPS accuracy in the hardware section. It seems like I will not be able to get an accurate reading unless I spend thousands of dollars on a GPS surveying gadget. Is there any way to know when I traveled X meters? I will have to interface it with my laptop (which should not be a problem). I thought of adding a sensor to the tire and calculating the rotation then deriving the distance traveled. However that is outside the scope of this forum. Any ideas? My traveling speed would be anywhere between 0-100 km/hr
t1d
Do you need to know the coordinates every five meters, or do you just need to take a sample every 5 meters?
adelash
Quote:
Originally Posted by t1dunn
Do you need to know the coordinates every five meters, or do you just need to take a sample every 5 meters?
Hi t1dunn,
I figured out that some software (listed in the sticky note) can save routes with times/coordinates. So essentially, now I just want to sample every 5 meters regardless of location.
MrUmbra
I think you're asking for too much from a single frequency GPS. I'm not aware of any nonmilitary receivers that can provide sub-meter accuracy real time.

Military receivers use two frequencies to remove timing delay effects of the earth atmosphere. Air Force data indicates military accuracy of about 1.5 meters for 95% of the fixes is routinely achieved. These signals are currently encrypted.

That kind of performance might eventually be available to us civil users when enough modernized satellites that will transmit on multiple open frequencies become available many-many years from now.

Survey receivers also use the two frequencies but in a different manner. I'm not aware of any that work while moving.

--- CHAS
adelash
I think I will use Garmin Mobile PC to save my route and figure out a way to get an accurate reading of the distance traveled. This could be a sensor on the tire or using the OBD-II interface provided on almost all cars. This is out of the scope of the forum I think.

Thanks for all the help/advice so far!
t1d
I have seen TV shows with a single wheeled measuring device pulled behind the car. I think a higher end touring bicycle could be adapted for the purpose. It is likely that it might not last forever at highway speeds, but that type of bike is not likely to fall apart on the first run. Give a local cycle club a call to see if they can help you find a good, used one.

I think the adaptation is as easy as removing the front wheel and attaching the front fork to the car's trailer hitch receiver. For measuring, you might consider a bicycle computer. They are pretty cheap and measure mileage and speed, amoung other things. Some higher end models may have a computer interface. It reads a magnet attached to the wheel as it spins past the sensor. If the bike computer doesn't have a computer interface that can be adapted, a feed could be taken directly from the sensor.

I think a bike club would be a good resource, in general. A few computer feeds with some basic math and your in business.

And, before someone says it, I am not advocating that someone ride the bike during testing.
adelash
Thanks a lot t1dunn! I will explore your suggestion, I am just worried it might die when going 100km/hr.
Ken in Regina
Hi adelash,

It would be helpful if you could provide a little more about what you are trying to accomplish. If you have Mobile PC and a receiver, switch to the trip computer and see if that tells you anything useful.

What's magic about the 5 metre distance?

Do you need audible notification? Visual notification? Just capture the fact that it happened?

Will a log file do the trick so you can review it after the fact? Or do you need to know something at the instant you pass each 5 metre point (at 100kph that's almost continuous!)?

There are applications that will log location data at user-specified intervals, usually time-based.

Terminology tip: I don't think you want to record "routes". Routes are something you plan and calculate in advance and then follow in order to get to a destination. I think you want to record a "track". That's something that gets recorded as you travel and you can save and review after the fact.

Mobile PC maintains a track log and you can view tracks on the map. If you go TOOLS > Manage My Data > Tracks you can save the active track, clear the active track so you can start fresh, view any saved tracks and set track options. In the track options you can set the recording interval and a couple of other options.

...ken...
adelash
Hi Ken,
You are right, I meant record a track and not a route. Well essentially I want an event notification every X meters (direction and speed is not constant).

So every say 5 meters my laptop receives a notification and does something (for simplicity assume saves elevation to a log file and that I have an easy way to get elevation) then wait for the next 5 meters and so on...


This is why I initially wanted a super accurate gps system since I could easily compare point A and point B until difference is 5 meters.
Ken in Regina
Regarding the "accuracy" issue, please read this:

http://www.laptopgpsworld.com/777-what-gps-accuracy-anyway

The point is that there are a variety of answers to the question of GPS accuracy. We've been talking about the accuracy of a consumer GPS receiver at fixing the location of a specific point on the planet. Not really great unless you let it sit a long time and average the readings.

But you don't want absolute accuracy, it doesn't sound like. It sounds like you want accurate measurement of distance between two points. That's a horse of a very different colour.

Do you really need realtime notification to you? If you are travelling at speeds of up to 100kph, what on earth are you going to do about it anyway? As I mentioned in a previous post, at 100kph or anything close to it, any sort of audible or visual notification will be on continuously if it's happening every 5 metres.

Or do you just need the necessary information captured in a file to analyze after the fact.

I've attached an image of a sample track log that was captured on my Garmin handheld from a bicycle ride in my neighborhood. As you can see, it has the lat/lon for each point in the list as well as the time that point was passed, the elevation at that point, the distance travelled since the last point and the speed of that leg.

In the program that is displaying this list I can display the track overlaid on any of a number road and topographic maps. I can also display the elevation profile. I've also attached an image of a sample elevation profile of a short trail ride in the Rockies.

Is that anything close to what you're after?

...ken...
Attached Images
track-log-sample.gif   track-profile-sample.gif  
adelash
Hi Ken,
Thank you for an amazing detailed reply! That might be close to what I am looking for, does Garmin Mobile PC provide the same level of accuracy FOR DISTANCES? It seems your handheld device is getting the length down to meters. This might be really helpful.

So what am I really going to do with this? I did not want to answer this question to avoid confusing people, but I am working on an amateur project to recreate a Google street view car on a LOW BUDGET. So every 5 meters I will snap a picture (I have the necessary software, logic, and circuitry to do this efficiently I just need a notification for every 5 meters).
Ken in Regina
Okay, for that application you are concerned with two aspects of accuracy.

If you use the GPS readings to trigger the camera you need a reasonable degree of accuracy of the distance measurement.

If you are going to geocode the images so they can be matched to specific locations on a map, you also need a reasonable degree of accuracy for the absolute position, at least relative to the accuracy of the calibration of the map(s) you plan to use them with.

Here are some options that spring immediately to mind. (Caveat: this is just thinking out loud with no actual analysis of practicality in your particular case.)

----------------------

Option 1.

Use a video camera so it's running continuously. Make sure that it's a camera that timestamps either the frames or at least the first frame.

Use a GPS to record the track as you drive it.

At the start of a shooting session, sync the time in the camera with the time in the GPS.

Use post-processing to match individual frames with the relevant times in the GPS track log, pull them out as single images and geocode them.

----------------------

Option 2.

Don't do the shooting based on position; do it based on speed. Write a simple application for the laptop to notify your trigger software based on your speed. At any speed it's trivial to compute how much time it takes to travel 5 metres.

Connect the GPS and camera to the laptop. Use the GPS to provide the realtime speed to the camera control program and to capture a track log.

Use post-processing to match images based on their timestamps with the relevant locations in the track log and geocode them.

----------------------

Option 3.

Don't do the shooting based on position; do it based on speed. Write a simple application for the laptop to notify your trigger software based on your speed. At any speed it's trivial to compute how much time it takes to travel 5 metres.

Use a camera that can have an external GPS connected to it so the images will be geocoded on the fly.

Use an ODBII cable and software for the laptop to get your speed from the car's computer to feed the camera control program.

----------------------

The "camera control" program I mention in options 2 and 3 would simply sample the speed, calculate how much time it takes to travel 5 metres and send notification to the stuff you already have. In the case of GPS input to it, you just need to know the applicable sentence for speed:

Quote:
VTG - Velocity made good.

GPVTG,054.7,T,034.4,M,005.5,N,010.2,K*48




where:
  • VTG Track made good and ground speed
  • 054.7,T True track made good (degrees)
  • 034.4,M Magnetic track made good
  • 005.5,N Ground speed, knots
  • 010.2,K Ground speed, Kilometers per hour
  • *48 Checksum
I have no clue how you would do the equivalent with ODBII but it shouldn't be any more difficult.

Those are just off the top of my head. I'm sure there are more possibilities that someone more creative than I can think up.

The limiting factor underlying all of these or any others is how accurate do the actual locations have to be? What maps are you planning to use the images with and how accurately are they calibrated with respect to reality? (Tip: Google's maps are not terribly accurate nor all that consistent from place to place.)

...ken...
laptopgpsworld.com About