00001 """autogenerated by genmsg_py from GPSData.msg. Do not edit."""
00002 import roslib.message
00003 import struct
00004
00005 import std_msgs.msg
00006
00007 class GPSData(roslib.message.Message):
00008 _md5sum = "b71de9435ba6759a86f427d436c58ccb"
00009 _type = "asctec_msgs/GPSData"
00010 _has_header = True
00011 _full_text = """# Software License Agreement (BSD License)
00012 #
00013 # Copyright (c) 2010
00014 # William Morris <morris@ee.ccny.cuny.edu>
00015 # Ivan Dryanovski <ivan.dryanovski@gmail.com>
00016 # All rights reserved.
00017 #
00018 # Redistribution and use in source and binary forms, with or without
00019 # modification, are permitted provided that the following conditions
00020 # are met:
00021 #
00022 # * Redistributions of source code must retain the above copyright
00023 # notice, this list of conditions and the following disclaimer.
00024 # * Redistributions in binary form must reproduce the above
00025 # copyright notice, this list of conditions and the following
00026 # disclaimer in the documentation and/or other materials provided
00027 # with the distribution.
00028 # * Neither the name of CCNY Robotics Lab nor the names of its
00029 # contributors may be used to endorse or promote products derived
00030 # from this software without specific prior written permission.
00031 #
00032 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00033 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00034 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
00035 # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
00036 # COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
00037 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
00038 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
00039 # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00040 # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
00041 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
00042 # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00043 # POSSIBILITY OF SUCH DAMAGE.
00044
00045 Header header
00046 # latitude/longitude in deg * 10^7
00047 int32 latitude
00048 int32 longitude
00049
00050 #GPS height in mm
00051 int32 height
00052
00053 #speed in x (E/W) and y(N/S) in mm/s
00054 int32 speed_x
00055 int32 speed_y
00056
00057 #GPS heading in deg * 100
00058 int32 heading
00059
00060 #accuracy estimates in mm and mm/s
00061 int32 horizontal_accuracy
00062 int32 vertical_accuracy
00063 int32 speed_accuracy
00064
00065 #number of satellite vehicles used in NAV solution
00066 int32 numSV
00067
00068 #GPS status information; 0x03 = valid GPS fix
00069 int32 status
00070
00071 ================================================================================
00072 MSG: std_msgs/Header
00073 # Standard metadata for higher-level stamped data types.
00074 # This is generally used to communicate timestamped data
00075 # in a particular coordinate frame.
00076 #
00077 # sequence ID: consecutively increasing ID
00078 uint32 seq
00079 #Two-integer timestamp that is expressed as:
00080 # * stamp.secs: seconds (stamp_secs) since epoch
00081 # * stamp.nsecs: nanoseconds since stamp_secs
00082 # time-handling sugar is provided by the client library
00083 time stamp
00084 #Frame this data is associated with
00085 # 0: no frame
00086 # 1: global frame
00087 string frame_id
00088
00089 """
00090 __slots__ = ['header','latitude','longitude','height','speed_x','speed_y','heading','horizontal_accuracy','vertical_accuracy','speed_accuracy','numSV','status']
00091 _slot_types = ['Header','int32','int32','int32','int32','int32','int32','int32','int32','int32','int32','int32']
00092
00093 def __init__(self, *args, **kwds):
00094 """
00095 Constructor. Any message fields that are implicitly/explicitly
00096 set to None will be assigned a default value. The recommend
00097 use is keyword arguments as this is more robust to future message
00098 changes. You cannot mix in-order arguments and keyword arguments.
00099
00100 The available fields are:
00101 header,latitude,longitude,height,speed_x,speed_y,heading,horizontal_accuracy,vertical_accuracy,speed_accuracy,numSV,status
00102
00103 @param args: complete set of field values, in .msg order
00104 @param kwds: use keyword arguments corresponding to message field names
00105 to set specific fields.
00106 """
00107 if args or kwds:
00108 super(GPSData, self).__init__(*args, **kwds)
00109
00110 if self.header is None:
00111 self.header = std_msgs.msg._Header.Header()
00112 if self.latitude is None:
00113 self.latitude = 0
00114 if self.longitude is None:
00115 self.longitude = 0
00116 if self.height is None:
00117 self.height = 0
00118 if self.speed_x is None:
00119 self.speed_x = 0
00120 if self.speed_y is None:
00121 self.speed_y = 0
00122 if self.heading is None:
00123 self.heading = 0
00124 if self.horizontal_accuracy is None:
00125 self.horizontal_accuracy = 0
00126 if self.vertical_accuracy is None:
00127 self.vertical_accuracy = 0
00128 if self.speed_accuracy is None:
00129 self.speed_accuracy = 0
00130 if self.numSV is None:
00131 self.numSV = 0
00132 if self.status is None:
00133 self.status = 0
00134 else:
00135 self.header = std_msgs.msg._Header.Header()
00136 self.latitude = 0
00137 self.longitude = 0
00138 self.height = 0
00139 self.speed_x = 0
00140 self.speed_y = 0
00141 self.heading = 0
00142 self.horizontal_accuracy = 0
00143 self.vertical_accuracy = 0
00144 self.speed_accuracy = 0
00145 self.numSV = 0
00146 self.status = 0
00147
00148 def _get_types(self):
00149 """
00150 internal API method
00151 """
00152 return self._slot_types
00153
00154 def serialize(self, buff):
00155 """
00156 serialize message into buffer
00157 @param buff: buffer
00158 @type buff: StringIO
00159 """
00160 try:
00161 _x = self
00162 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00163 _x = self.header.frame_id
00164 length = len(_x)
00165 buff.write(struct.pack('<I%ss'%length, length, _x))
00166 _x = self
00167 buff.write(_struct_11i.pack(_x.latitude, _x.longitude, _x.height, _x.speed_x, _x.speed_y, _x.heading, _x.horizontal_accuracy, _x.vertical_accuracy, _x.speed_accuracy, _x.numSV, _x.status))
00168 except struct.error, se: self._check_types(se)
00169 except TypeError, te: self._check_types(te)
00170
00171 def deserialize(self, str):
00172 """
00173 unpack serialized message in str into this message instance
00174 @param str: byte array of serialized message
00175 @type str: str
00176 """
00177 try:
00178 if self.header is None:
00179 self.header = std_msgs.msg._Header.Header()
00180 end = 0
00181 _x = self
00182 start = end
00183 end += 12
00184 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00185 start = end
00186 end += 4
00187 (length,) = _struct_I.unpack(str[start:end])
00188 start = end
00189 end += length
00190 self.header.frame_id = str[start:end]
00191 _x = self
00192 start = end
00193 end += 44
00194 (_x.latitude, _x.longitude, _x.height, _x.speed_x, _x.speed_y, _x.heading, _x.horizontal_accuracy, _x.vertical_accuracy, _x.speed_accuracy, _x.numSV, _x.status,) = _struct_11i.unpack(str[start:end])
00195 return self
00196 except struct.error, e:
00197 raise roslib.message.DeserializationError(e)
00198
00199
00200 def serialize_numpy(self, buff, numpy):
00201 """
00202 serialize message with numpy array types into buffer
00203 @param buff: buffer
00204 @type buff: StringIO
00205 @param numpy: numpy python module
00206 @type numpy module
00207 """
00208 try:
00209 _x = self
00210 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00211 _x = self.header.frame_id
00212 length = len(_x)
00213 buff.write(struct.pack('<I%ss'%length, length, _x))
00214 _x = self
00215 buff.write(_struct_11i.pack(_x.latitude, _x.longitude, _x.height, _x.speed_x, _x.speed_y, _x.heading, _x.horizontal_accuracy, _x.vertical_accuracy, _x.speed_accuracy, _x.numSV, _x.status))
00216 except struct.error, se: self._check_types(se)
00217 except TypeError, te: self._check_types(te)
00218
00219 def deserialize_numpy(self, str, numpy):
00220 """
00221 unpack serialized message in str into this message instance using numpy for array types
00222 @param str: byte array of serialized message
00223 @type str: str
00224 @param numpy: numpy python module
00225 @type numpy: module
00226 """
00227 try:
00228 if self.header is None:
00229 self.header = std_msgs.msg._Header.Header()
00230 end = 0
00231 _x = self
00232 start = end
00233 end += 12
00234 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00235 start = end
00236 end += 4
00237 (length,) = _struct_I.unpack(str[start:end])
00238 start = end
00239 end += length
00240 self.header.frame_id = str[start:end]
00241 _x = self
00242 start = end
00243 end += 44
00244 (_x.latitude, _x.longitude, _x.height, _x.speed_x, _x.speed_y, _x.heading, _x.horizontal_accuracy, _x.vertical_accuracy, _x.speed_accuracy, _x.numSV, _x.status,) = _struct_11i.unpack(str[start:end])
00245 return self
00246 except struct.error, e:
00247 raise roslib.message.DeserializationError(e)
00248
00249 _struct_I = roslib.message.struct_I
00250 _struct_3I = struct.Struct("<3I")
00251 _struct_11i = struct.Struct("<11i")