gps xinwen fu. bis@dsu by dr. xinwen fu2 outline deluo usb gps pro+ sirfstariii introduction to...

14
GPS Xinwen Fu

Upload: hilary-mcgee

Post on 22-Dec-2015

223 views

Category:

Documents


0 download

TRANSCRIPT

GPS

Xinwen Fu

BIS@DSUBy Dr. Xinwen Fu 2

Outline Deluo USB GPS Pro+ SiRFstarIII Introduction to gpsd Installation Collect Position Data sirfmon Convert latitude/longitude kismet+gpsmap

BIS@DSUBy Dr. Xinwen Fu 3

Deluo USB GPS Pro+ SiRFstarIII

Receiver Up to 20 simultaneously tracking channels. L1, 1575.42MHz, C/A code Accuracy < 2.5m (Autonomous)

< 2.0m (WAAS)<0.01 m/s (speed)

Acquisition Hot Start: 1 sec. (Min.)Warm Start: 35 sec. (Average)Cold Start: 42 sec. (Average)

Dynamics Altitude: 18,000m (Max.)Velocity: 500m/sec (Max.)Acceleration: 4G (Max.)

Sensitivity Acquisition: -142 dBmTracking: -159 dBm

Navigation update rate Once per second Protocol NMEA 0183 Ver.3.0 NMEA Messages GGA, GSA, GSV, RMC, VTG Coordinate Datum WGS-84 Power consumption 45mA (Average) Waterproof Yes Baud Rate: 4800bps Operating Temperature -40ºC ~ +80ºC Storage Temperature -20ºC ~ +60ºC Operating Humidity 5% ~ 95% Cable Length 5ft

BIS@DSUBy Dr. Xinwen Fu 4

gpsd Is a service daemon that monitors one or more GPSes

attached to a host computer through serial or USB ports

Makes all data on the location/course/velocity of the sensors available to be queried on TCP port 2947 of the host computer

Responds to queries with a format that is substantially easier to parse than the NMEA 0183 emitted by most GPSes

Includes a linkable C service library, a C++ wrapper class, and a Python module that developers of gpsd-aware applications can use to encapsulate all communication with gpsd

BIS@DSUBy Dr. Xinwen Fu 5

gpsd Auxiliary Tools Diagnostic monitoring Profiling of GPSes Feeding GPS-aware applications specified

track data for diagnostic purposes

BIS@DSUBy Dr. Xinwen Fu 6

Installation1. Plug Deluo USB GPS Pro+ SiRFstarIII into the usb port2. Download the source of version 2.37 3. Compile it

tar zxvf gpsd-2.37.tar.gz cd gpsd-2.37 ./configure make make install (Note: I cannot compile xgps and a few other tools; needs

dbus installed and configured)4. Start gpsd: the GPS device is nased ttyUSB0

gpsd /dev/ttyUSB0 gpsd /dev/ttyS0

5. Test gpsd cgps

BIS@DSUBy Dr. Xinwen Fu 7

Collect Position Data Log the position data into a file

cgpxlogger > position-data-file.xml ctrl-c to stop the data collection

Load the xml data into excel Open the xml file with excel Ok the default choices

BIS@DSUBy Dr. Xinwen Fu 8

Sample Imported Data in Excel

BIS@DSU

sirfmon Monitor and control a SiRF GPS in binary mode Start sirfmon via the serial port in the binary

mode sirfmon /dev/ttyUSB0

When the GPS is in the binary mode, it outputs all the messages except those poll/response message We can program to send a poll message Under sirfmon, we can use the “s” command to send a

poll command. Note: there is no space between a sirfmon command and the payload

By Dr. Xinwen Fu 9

BIS@DSU

Sirmon (Continued) The function that decode the binary output messages

static void decode_sirf(unsigned char buf[], int len) /* buf has the whole binary data */

Code is changed by Fu to process Messages 7, 28 (0x1C), 30 (0x1E). Search XINWENFU for the changed code

Added functions to convert the data to be properly interpreted on a PC static double getdbl(unsigned char *buf, int off) /* this function is for converting

double-precision value and may need to be changed if another GPS product is used. Refer to sirf binary protocol manual p. 3-33*/

static float getsgl(unsigned char *buf, int off) /* this function is for converting single-precision value */

Example to send a poll to the device /* probe for version */ putbyte(buf, 0, 0x84); putbyte(buf, 1, 0x0); /*@ -compdef @*/ (void)sendpkt(buf, 2, device); /*@ +compdef @*/

By Dr. Xinwen Fu 10

BIS@DSUBy Dr. Xinwen Fu 11

Converting Addresses to/from

Latitude/Longitude in One Step Convert

http://www.worldatlas.com/aatlas/imageg.htm

BIS@DSUBy Dr. Xinwen Fu 12

Wardriving by kismet+gpsmap

BIS@DSUBy Dr. Xinwen Fu 13

Use gpsmap Installation

yum install ImageMagick yum install ImageMagick-devel yum update dbus Download, compile, and install kismet

Run gpsmap gpsmap –S 3 –t –p –o test.jpg –e Kismet-Oct-

Oct-15-2007-1.gps

BIS@DSUBy Dr. Xinwen Fu 14

References Deluo USB GPS Pro+ SiRFstarIII, 2007 gpsd, 2007 Stephen P. Morse,

Converting Addresses to/from Latitude/Longitude in One Step, 2004

Mike Shannon, Linux Wireless, 2007 Kismet Installation, 2006 FC6 Wireless Auditing Laptop: HOWTO, February 07 Kismet - Google Maps, 2007 PRODUCING WIRELESS MAPPING WITH KISMET, 2006 Kismet, 2007