$search
00001 """autogenerated by genmsg_py from GPSDataAdvanced.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import std_msgs.msg 00006 00007 class GPSDataAdvanced(roslib.message.Message): 00008 _md5sum = "9ab56d8a7fca6e53fe5619fec119323d" 00009 _type = "asctec_msgs/GPSDataAdvanced" 00010 _has_header = True #flag to mark the presence of a Header object 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 #coordinates of current origin in deg * 10^7 00072 int32 latitude_best_estimate 00073 int32 longitude_best_estimate 00074 00075 #velocities in X (E/W) and Y (N/S) after data fusion 00076 int32 speed_x_best_estimate 00077 int32 speed_y_best_estimate 00078 00079 ================================================================================ 00080 MSG: std_msgs/Header 00081 # Standard metadata for higher-level stamped data types. 00082 # This is generally used to communicate timestamped data 00083 # in a particular coordinate frame. 00084 # 00085 # sequence ID: consecutively increasing ID 00086 uint32 seq 00087 #Two-integer timestamp that is expressed as: 00088 # * stamp.secs: seconds (stamp_secs) since epoch 00089 # * stamp.nsecs: nanoseconds since stamp_secs 00090 # time-handling sugar is provided by the client library 00091 time stamp 00092 #Frame this data is associated with 00093 # 0: no frame 00094 # 1: global frame 00095 string frame_id 00096 00097 """ 00098 __slots__ = ['header','latitude','longitude','height','speed_x','speed_y','heading','horizontal_accuracy','vertical_accuracy','speed_accuracy','numSV','status','latitude_best_estimate','longitude_best_estimate','speed_x_best_estimate','speed_y_best_estimate'] 00099 _slot_types = ['Header','int32','int32','int32','int32','int32','int32','int32','int32','int32','int32','int32','int32','int32','int32','int32'] 00100 00101 def __init__(self, *args, **kwds): 00102 """ 00103 Constructor. Any message fields that are implicitly/explicitly 00104 set to None will be assigned a default value. The recommend 00105 use is keyword arguments as this is more robust to future message 00106 changes. You cannot mix in-order arguments and keyword arguments. 00107 00108 The available fields are: 00109 header,latitude,longitude,height,speed_x,speed_y,heading,horizontal_accuracy,vertical_accuracy,speed_accuracy,numSV,status,latitude_best_estimate,longitude_best_estimate,speed_x_best_estimate,speed_y_best_estimate 00110 00111 @param args: complete set of field values, in .msg order 00112 @param kwds: use keyword arguments corresponding to message field names 00113 to set specific fields. 00114 """ 00115 if args or kwds: 00116 super(GPSDataAdvanced, self).__init__(*args, **kwds) 00117 #message fields cannot be None, assign default values for those that are 00118 if self.header is None: 00119 self.header = std_msgs.msg._Header.Header() 00120 if self.latitude is None: 00121 self.latitude = 0 00122 if self.longitude is None: 00123 self.longitude = 0 00124 if self.height is None: 00125 self.height = 0 00126 if self.speed_x is None: 00127 self.speed_x = 0 00128 if self.speed_y is None: 00129 self.speed_y = 0 00130 if self.heading is None: 00131 self.heading = 0 00132 if self.horizontal_accuracy is None: 00133 self.horizontal_accuracy = 0 00134 if self.vertical_accuracy is None: 00135 self.vertical_accuracy = 0 00136 if self.speed_accuracy is None: 00137 self.speed_accuracy = 0 00138 if self.numSV is None: 00139 self.numSV = 0 00140 if self.status is None: 00141 self.status = 0 00142 if self.latitude_best_estimate is None: 00143 self.latitude_best_estimate = 0 00144 if self.longitude_best_estimate is None: 00145 self.longitude_best_estimate = 0 00146 if self.speed_x_best_estimate is None: 00147 self.speed_x_best_estimate = 0 00148 if self.speed_y_best_estimate is None: 00149 self.speed_y_best_estimate = 0 00150 else: 00151 self.header = std_msgs.msg._Header.Header() 00152 self.latitude = 0 00153 self.longitude = 0 00154 self.height = 0 00155 self.speed_x = 0 00156 self.speed_y = 0 00157 self.heading = 0 00158 self.horizontal_accuracy = 0 00159 self.vertical_accuracy = 0 00160 self.speed_accuracy = 0 00161 self.numSV = 0 00162 self.status = 0 00163 self.latitude_best_estimate = 0 00164 self.longitude_best_estimate = 0 00165 self.speed_x_best_estimate = 0 00166 self.speed_y_best_estimate = 0 00167 00168 def _get_types(self): 00169 """ 00170 internal API method 00171 """ 00172 return self._slot_types 00173 00174 def serialize(self, buff): 00175 """ 00176 serialize message into buffer 00177 @param buff: buffer 00178 @type buff: StringIO 00179 """ 00180 try: 00181 _x = self 00182 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00183 _x = self.header.frame_id 00184 length = len(_x) 00185 buff.write(struct.pack('<I%ss'%length, length, _x)) 00186 _x = self 00187 buff.write(_struct_15i.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, _x.latitude_best_estimate, _x.longitude_best_estimate, _x.speed_x_best_estimate, _x.speed_y_best_estimate)) 00188 except struct.error as se: self._check_types(se) 00189 except TypeError as te: self._check_types(te) 00190 00191 def deserialize(self, str): 00192 """ 00193 unpack serialized message in str into this message instance 00194 @param str: byte array of serialized message 00195 @type str: str 00196 """ 00197 try: 00198 if self.header is None: 00199 self.header = std_msgs.msg._Header.Header() 00200 end = 0 00201 _x = self 00202 start = end 00203 end += 12 00204 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00205 start = end 00206 end += 4 00207 (length,) = _struct_I.unpack(str[start:end]) 00208 start = end 00209 end += length 00210 self.header.frame_id = str[start:end] 00211 _x = self 00212 start = end 00213 end += 60 00214 (_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, _x.latitude_best_estimate, _x.longitude_best_estimate, _x.speed_x_best_estimate, _x.speed_y_best_estimate,) = _struct_15i.unpack(str[start:end]) 00215 return self 00216 except struct.error as e: 00217 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00218 00219 00220 def serialize_numpy(self, buff, numpy): 00221 """ 00222 serialize message with numpy array types into buffer 00223 @param buff: buffer 00224 @type buff: StringIO 00225 @param numpy: numpy python module 00226 @type numpy module 00227 """ 00228 try: 00229 _x = self 00230 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00231 _x = self.header.frame_id 00232 length = len(_x) 00233 buff.write(struct.pack('<I%ss'%length, length, _x)) 00234 _x = self 00235 buff.write(_struct_15i.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, _x.latitude_best_estimate, _x.longitude_best_estimate, _x.speed_x_best_estimate, _x.speed_y_best_estimate)) 00236 except struct.error as se: self._check_types(se) 00237 except TypeError as te: self._check_types(te) 00238 00239 def deserialize_numpy(self, str, numpy): 00240 """ 00241 unpack serialized message in str into this message instance using numpy for array types 00242 @param str: byte array of serialized message 00243 @type str: str 00244 @param numpy: numpy python module 00245 @type numpy: module 00246 """ 00247 try: 00248 if self.header is None: 00249 self.header = std_msgs.msg._Header.Header() 00250 end = 0 00251 _x = self 00252 start = end 00253 end += 12 00254 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00255 start = end 00256 end += 4 00257 (length,) = _struct_I.unpack(str[start:end]) 00258 start = end 00259 end += length 00260 self.header.frame_id = str[start:end] 00261 _x = self 00262 start = end 00263 end += 60 00264 (_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, _x.latitude_best_estimate, _x.longitude_best_estimate, _x.speed_x_best_estimate, _x.speed_y_best_estimate,) = _struct_15i.unpack(str[start:end]) 00265 return self 00266 except struct.error as e: 00267 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00268 00269 _struct_I = roslib.message.struct_I 00270 _struct_15i = struct.Struct("<15i") 00271 _struct_3I = struct.Struct("<3I")