问题
I'm wondering how difficult it is to read positioning data from an USB GPS Receiver (also known as "USB Mouse"). Is there some kind of ready-to-use API in .NET (like it is in mobile platforms like Android/WP7 etc.) which works because the GPS device's driver integrates much into Windows or is this some annyoing pinvoke stuff that depends on the GPS device?
Any experience?
回答1:
Typically a GPS device shows up as a virtual com port. You should see it listed in com ports in the device manager. Nearly every GPS sends data to the computer using standard NMEA 0183 messages, you just need a library to read them. One really nice full featured one is DotSpatial, the DotSpatial.Positioning library should automatically find your gps and report data from it.
回答2:
You may have to and your equipment supplier contact, and obtain recognition equipment driver, and call the API for communication equipment. If you can get from a GPS device on bytes, closer to success is just around the corner, and the rest is packaging and analytical data packets. PS: if is serial communication, realizing in DONET is more easily.
来源:https://stackoverflow.com/questions/9542473/read-data-from-an-usb-gps-receiver