How GPS sends messages

If everything is OK, we will see a topic named /fix in the topic list by typing this:

    $ rostopic list
  

To know which kind of data we will use, we typed the rostopic command. The NMEA GPS driver uses the sensor_msgs/NavSatFix message to send the GPS status information:

    $ rostopic type /fix
    sensor_msgs/NavSatFix
  

The /fix topic is sensor_msg/NavSatFix. The fields are used to indicate the latitude, longitude, altitude, status, quality of the service, and the covariance matrix. In our example, we will use the latitude and the longitude to project them to a 2D Cartesian coordinate system namedUniversal Transverse Mercator (UTM).

Check a message to see a real example of the data sent. You can do it with the following command:

    $ rostopic echo /fix
  

You will see something that looks similar to the following output:

    ---
    header:
    seq: 3
    stamp:
    secs: 1404993925
    nsecs: 255094051
    frame_id: /gps
    status:
    status: 0
    service: 1
    latitude: 28.0800916667
    longitude: -15.451595
    altitude: 315.3
    position_covariance: [3.24, 0.0, 0.0, 0.0, 3.24, 0.0, 0.0, 0.0, 12.96]
    position_covariance_type: 1
    ---
  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.27.251