1

I am currently working on a .NET application which requires tracking location of our position . I use an external GPS device connects to my latop through COM port as a location tracker. I have my device working, however i couldn't find a way to fake the GPS signal. I don't know if there is a GPS emulator which is able to feed GPS signal through a COM port.

If there is anyone has experiences in this field, please give me some guidance. I would be very appreciated. Thanks

0

4 Answers 4

2

Here's the link for how to create test cases to achieve what you are trying to do. http://geoloqal.com/support/geotargeting-geolocation-documentation/apis/test-cases/createtestcase/

It doesn't do it over the COM port but is REST APIs based..

1
1

If you are using a custom SDK/API came with the device, it would be hard to send fake signals via the com port and get them interpreted correctly.

If you could justify a bit of extra code, you can aim for a cleaner approach by considering to decouple your application code from the GPS device specific code by creating an interface like

public interface ILocationInformationServices {
    LocationInfo GetLocationInfromation { get; }
}

Then you can have two implementations of the above interface one which would call the GPS module via the com port and the other which will return some random values (the fake GPS module)

Once you have the two implementations, in your application you can code against ILocationInformationServices.

When you want to use the actual GPS module, you would instanciate the class that calls the com port

ILocationInformationServices locationInfoSvc = new MyGPSModule(“com1”);

And when you want to test, you will use the fake

ILocationInformationServices locationInfoSvc = new MyFakeGPSModule();

Hope this helps you

1

Chintanas solution is fine, should be sufficient. if you still want an external gps simulation:
write a simple peogramm that reads the pre recorded NMEA files, that can parse 2-3 important NMEA messages (GPRMC, GPGGA), set up a timer (1s) and write out the 2-3 sentences with new time stamps, (and new checksum), to a specific COM port.

from that port your app reads the nmea as usual.

1

While working on GPS applications in the past, I have often used this as an excuse to go out into the middle of the woods with my laptop, and write the code there where I had a good GPS signal.

If you are unable to do this, or you have a large mosquito population in your area, I recommend Franson GPSGate. It can simulate a GPS over a virtual COM port, and can also do handy things like split a GPS signal to multiple ports, or playback recorded GPS logs.

http://gpsgate.com/products/gpsgate_client

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.