LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

interpolation of GPS data

Description

I’m sampling two asynchronous signals, one from a Reader and another from a GPS receiver.  I when I sample a Reader signal, I need a corresponding GPS signal for that exact moment in time.  Since the two signals have different sampling rates, it is rare that the two will capture a signal at the same time.  I’ve shown in the attached vi what sort of averaging method I’m currently using.  However, this method seems far too complicated and takes too much processing time.

 

I’ve had a few ideas of interpolating the (Lat/Long) so they could match with the system clock, but I’m not entirely sure how to go about this, since the sampling periods between each GPS sample vary.  Possible solutions include a linear or 5th order interpolation.

 

So far I’ve been thinking of post processing solutions that would take place after all the data has been captured, but if anyone has an idea of a real-time or a post data acquisition solution to this problem, I’d be more than happy to listen to a few ideas.  Thanks in advance.

0 Kudos
Message 1 of 9
(6,049 Views)
How often are you taking readings?  Which GPS unit are you using?  What is a Reader and how often does it sample?  Let's start there and maybe we can find a good solution for you.
0 Kudos
Message 2 of 9
(6,048 Views)
I'm taking continuous readings from each unit.  It should be assumed that the sampling will be able to last for an extended period of time.
 
The GPS unit is a Magellan - Meridian Color, which samples at a rate of approximately 1002ms.
The second device is a receiver which reads a packet from a tag roughly every 998ms.
My system clock is running every 1ms.
 
My program starts with both the system clock and the GPS recevier running.  An activate signal must be pressed in order to begin sampling with the Reader.
0 Kudos
Message 3 of 9
(6,043 Views)
How fast is the system moving?
0 Kudos
Message 4 of 9
(6,039 Views)
I would like to put this system in a car in a neighborhood setting.  So anywhere in the range between (10-20 MPH).
0 Kudos
Message 5 of 9
(6,034 Views)
Just an observation.  You appear to be trying to get ms timing, but the updates from your instruments are only once per second.  You can poll the GPS faster than that, but it will still spit out the same position until its clock tells it to update position.  Do I have that right?  Keep in mind that the accuracy of GPS is probably 3 meters or so.  If you want to give us the bigger picture, maybe there is another way.
0 Kudos
Message 6 of 9
(6,030 Views)
I realize that the sampling rates of each of the devices is near a second, when it appears I'm trying to sample every 1ms.  The only reason why I am doing this, is so I can get a precise GPS sample.  Before I tried averaging these points, I had a GPS buffer that the Reader was pulling from.  So every time I read a tag, the Reader would look to see what the current GPS location was.  This method would give the opportunity for the Reader to obtian a unique GPS signal, or simply use one that was recently acquired.  So I think this is a solution you might be thinking of... in terms of your comment about 3m accuracy and polling the clock.  I'm not sure if I have access to control the output of the GPS device, but I think my buffer would immitate what you are describing anyways.  I think.
 
In reference to the bigger picture, accuracy holds some degree of relevancy here, because with this collected data, I'm trying to visually generate a map with respect to the tranmitting tag.  This might not make sense why I'm trying to do this, but in any case having a data that is more accurate than my GPS buffer method has some importance.
0 Kudos
Message 7 of 9
(6,026 Views)
Of course the easiest solution would be to get a better GPS.  Garmin has in inexpensive one that puts out position information at 4Hz, but only one of those is true position, the other 3 are predicted.  If you want to use yours, and don't mind post-processing, I would poll the GPS in one loop at a fast rate and put it in a shift register.  When the position data from the GPS is different than the previous loop, you know that is when the GPS updated its position.  Take that reading and the system clock reading and put them into an array.  Have a separate loop that takes your Reader data, when it is available, and stores it in an array with the system time.  You can then match up the Reader time with the GPS time.  Most of the time the Reader time will be between 2 of the GPS time markers.  You can then interpolate between those 2 points to get an approximate position.  The attached VI's will help if you want to go that route.
Message 8 of 9
(6,011 Views)
Thanks for all the help.  I've decided that I was going to do separate captures of both my Reader and GPS receiver, while time stamping both of the packages with the system clock as they are read.  Then interpolate the GPS read data so that there is a 1ms accuracy.  Then use the interpolated GPS data to match up with my Reader data.  Hopefully this doesn't put too much stress on my computer; this should all be post processing.  I have most of it coded, I just need place where I can get some GPS reception now.  Thanks again.
Message 9 of 9
(5,983 Views)