$search
00001 """autogenerated by genmsg_py from GNSSAuxStatus.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import applanix_msgs.msg 00006 00007 class GNSSAuxStatus(roslib.message.Message): 00008 _md5sum = "7aa22394742b953a48015e9d1c3d090f" 00009 _type = "applanix_msgs/GNSSAuxStatus" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """TimeDistance td 00012 00013 uint8 SOLUTION_UNKNOWN=255 00014 uint8 SOLUTION_NO_DATA=0 00015 uint8 SOLUTION_HORIZONTAL_CA=1 00016 uint8 SOLUTION_3D_CA=2 00017 uint8 SOLUTION_HORIZONTAL_DGPS=3 00018 uint8 SOLUTION_3D_DGPS=4 00019 uint8 SOLUTION_FLOAT_RTK=5 00020 uint8 SOLUTION_WIDE_LANE_RTK=6 00021 uint8 SOLUTION_NARROW_LANE_RTK=7 00022 uint8 SOLUTION_P_CODE=8 00023 uint8 SOLUTION_OMNISTAR_HP=9 00024 uint8 SOLUTION_OMNISTAR_XP=10 00025 uint8 SOLUTION_OMNISTAR_VBS=11 00026 uint8 solution_status 00027 00028 uint8 channels_count 00029 uint16 reserved 00030 GNSSChannelStatus[] channels 00031 00032 float32 hdop 00033 float32 vdop 00034 float32 dgps_latency 00035 uint16 dgps_reference_id 00036 00037 uint32 gps_week 00038 float64 gps_time_offset 00039 00040 float32 gnss_latency 00041 float32 geoidal_separation 00042 00043 #TODO: enum 00044 uint16 nmea_messages_received 00045 uint8 in_use 00046 00047 ================================================================================ 00048 MSG: applanix_msgs/TimeDistance 00049 float64 time1 00050 float64 time2 00051 float64 distance 00052 uint8 time_types 00053 uint8 distance_type 00054 00055 ================================================================================ 00056 MSG: applanix_msgs/GNSSChannelStatus 00057 uint16 sv_prn 00058 00059 uint16 STATUS_L1_IDLE=0 00060 uint16 STATUS_L1_ACQUISITION=1 00061 uint16 STATUS_L1_CODE_LOCK=3 00062 uint16 STATUS_L1_PHASE_LOCK=5 00063 uint16 STATUS_L2_IDLE=6 00064 uint16 STATUS_L2_ACQUISITION=8 00065 uint16 STATUS_L2_CODE_LOCK=9 00066 uint16 STATUS_L2_PHASE_LOCK=11 00067 uint16 status 00068 00069 float32 sv_azimuth 00070 float32 sv_elevation 00071 float32 sv_l1_snr 00072 float32 sv_l2_snr 00073 00074 """ 00075 # Pseudo-constants 00076 SOLUTION_UNKNOWN = 255 00077 SOLUTION_NO_DATA = 0 00078 SOLUTION_HORIZONTAL_CA = 1 00079 SOLUTION_3D_CA = 2 00080 SOLUTION_HORIZONTAL_DGPS = 3 00081 SOLUTION_3D_DGPS = 4 00082 SOLUTION_FLOAT_RTK = 5 00083 SOLUTION_WIDE_LANE_RTK = 6 00084 SOLUTION_NARROW_LANE_RTK = 7 00085 SOLUTION_P_CODE = 8 00086 SOLUTION_OMNISTAR_HP = 9 00087 SOLUTION_OMNISTAR_XP = 10 00088 SOLUTION_OMNISTAR_VBS = 11 00089 00090 __slots__ = ['td','solution_status','channels_count','reserved','channels','hdop','vdop','dgps_latency','dgps_reference_id','gps_week','gps_time_offset','gnss_latency','geoidal_separation','nmea_messages_received','in_use'] 00091 _slot_types = ['applanix_msgs/TimeDistance','uint8','uint8','uint16','applanix_msgs/GNSSChannelStatus[]','float32','float32','float32','uint16','uint32','float64','float32','float32','uint16','uint8'] 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 td,solution_status,channels_count,reserved,channels,hdop,vdop,dgps_latency,dgps_reference_id,gps_week,gps_time_offset,gnss_latency,geoidal_separation,nmea_messages_received,in_use 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(GNSSAuxStatus, self).__init__(*args, **kwds) 00109 #message fields cannot be None, assign default values for those that are 00110 if self.td is None: 00111 self.td = applanix_msgs.msg.TimeDistance() 00112 if self.solution_status is None: 00113 self.solution_status = 0 00114 if self.channels_count is None: 00115 self.channels_count = 0 00116 if self.reserved is None: 00117 self.reserved = 0 00118 if self.channels is None: 00119 self.channels = [] 00120 if self.hdop is None: 00121 self.hdop = 0. 00122 if self.vdop is None: 00123 self.vdop = 0. 00124 if self.dgps_latency is None: 00125 self.dgps_latency = 0. 00126 if self.dgps_reference_id is None: 00127 self.dgps_reference_id = 0 00128 if self.gps_week is None: 00129 self.gps_week = 0 00130 if self.gps_time_offset is None: 00131 self.gps_time_offset = 0. 00132 if self.gnss_latency is None: 00133 self.gnss_latency = 0. 00134 if self.geoidal_separation is None: 00135 self.geoidal_separation = 0. 00136 if self.nmea_messages_received is None: 00137 self.nmea_messages_received = 0 00138 if self.in_use is None: 00139 self.in_use = 0 00140 else: 00141 self.td = applanix_msgs.msg.TimeDistance() 00142 self.solution_status = 0 00143 self.channels_count = 0 00144 self.reserved = 0 00145 self.channels = [] 00146 self.hdop = 0. 00147 self.vdop = 0. 00148 self.dgps_latency = 0. 00149 self.dgps_reference_id = 0 00150 self.gps_week = 0 00151 self.gps_time_offset = 0. 00152 self.gnss_latency = 0. 00153 self.geoidal_separation = 0. 00154 self.nmea_messages_received = 0 00155 self.in_use = 0 00156 00157 def _get_types(self): 00158 """ 00159 internal API method 00160 """ 00161 return self._slot_types 00162 00163 def serialize(self, buff): 00164 """ 00165 serialize message into buffer 00166 @param buff: buffer 00167 @type buff: StringIO 00168 """ 00169 try: 00170 _x = self 00171 buff.write(_struct_3d4BH.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.solution_status, _x.channels_count, _x.reserved)) 00172 length = len(self.channels) 00173 buff.write(_struct_I.pack(length)) 00174 for val1 in self.channels: 00175 _x = val1 00176 buff.write(_struct_2H4f.pack(_x.sv_prn, _x.status, _x.sv_azimuth, _x.sv_elevation, _x.sv_l1_snr, _x.sv_l2_snr)) 00177 _x = self 00178 buff.write(_struct_3fHId2fHB.pack(_x.hdop, _x.vdop, _x.dgps_latency, _x.dgps_reference_id, _x.gps_week, _x.gps_time_offset, _x.gnss_latency, _x.geoidal_separation, _x.nmea_messages_received, _x.in_use)) 00179 except struct.error as se: self._check_types(se) 00180 except TypeError as te: self._check_types(te) 00181 00182 def deserialize(self, str): 00183 """ 00184 unpack serialized message in str into this message instance 00185 @param str: byte array of serialized message 00186 @type str: str 00187 """ 00188 try: 00189 if self.td is None: 00190 self.td = applanix_msgs.msg.TimeDistance() 00191 end = 0 00192 _x = self 00193 start = end 00194 end += 30 00195 (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.solution_status, _x.channels_count, _x.reserved,) = _struct_3d4BH.unpack(str[start:end]) 00196 start = end 00197 end += 4 00198 (length,) = _struct_I.unpack(str[start:end]) 00199 self.channels = [] 00200 for i in range(0, length): 00201 val1 = applanix_msgs.msg.GNSSChannelStatus() 00202 _x = val1 00203 start = end 00204 end += 20 00205 (_x.sv_prn, _x.status, _x.sv_azimuth, _x.sv_elevation, _x.sv_l1_snr, _x.sv_l2_snr,) = _struct_2H4f.unpack(str[start:end]) 00206 self.channels.append(val1) 00207 _x = self 00208 start = end 00209 end += 37 00210 (_x.hdop, _x.vdop, _x.dgps_latency, _x.dgps_reference_id, _x.gps_week, _x.gps_time_offset, _x.gnss_latency, _x.geoidal_separation, _x.nmea_messages_received, _x.in_use,) = _struct_3fHId2fHB.unpack(str[start:end]) 00211 return self 00212 except struct.error as e: 00213 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00214 00215 00216 def serialize_numpy(self, buff, numpy): 00217 """ 00218 serialize message with numpy array types into buffer 00219 @param buff: buffer 00220 @type buff: StringIO 00221 @param numpy: numpy python module 00222 @type numpy module 00223 """ 00224 try: 00225 _x = self 00226 buff.write(_struct_3d4BH.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.solution_status, _x.channels_count, _x.reserved)) 00227 length = len(self.channels) 00228 buff.write(_struct_I.pack(length)) 00229 for val1 in self.channels: 00230 _x = val1 00231 buff.write(_struct_2H4f.pack(_x.sv_prn, _x.status, _x.sv_azimuth, _x.sv_elevation, _x.sv_l1_snr, _x.sv_l2_snr)) 00232 _x = self 00233 buff.write(_struct_3fHId2fHB.pack(_x.hdop, _x.vdop, _x.dgps_latency, _x.dgps_reference_id, _x.gps_week, _x.gps_time_offset, _x.gnss_latency, _x.geoidal_separation, _x.nmea_messages_received, _x.in_use)) 00234 except struct.error as se: self._check_types(se) 00235 except TypeError as te: self._check_types(te) 00236 00237 def deserialize_numpy(self, str, numpy): 00238 """ 00239 unpack serialized message in str into this message instance using numpy for array types 00240 @param str: byte array of serialized message 00241 @type str: str 00242 @param numpy: numpy python module 00243 @type numpy: module 00244 """ 00245 try: 00246 if self.td is None: 00247 self.td = applanix_msgs.msg.TimeDistance() 00248 end = 0 00249 _x = self 00250 start = end 00251 end += 30 00252 (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.solution_status, _x.channels_count, _x.reserved,) = _struct_3d4BH.unpack(str[start:end]) 00253 start = end 00254 end += 4 00255 (length,) = _struct_I.unpack(str[start:end]) 00256 self.channels = [] 00257 for i in range(0, length): 00258 val1 = applanix_msgs.msg.GNSSChannelStatus() 00259 _x = val1 00260 start = end 00261 end += 20 00262 (_x.sv_prn, _x.status, _x.sv_azimuth, _x.sv_elevation, _x.sv_l1_snr, _x.sv_l2_snr,) = _struct_2H4f.unpack(str[start:end]) 00263 self.channels.append(val1) 00264 _x = self 00265 start = end 00266 end += 37 00267 (_x.hdop, _x.vdop, _x.dgps_latency, _x.dgps_reference_id, _x.gps_week, _x.gps_time_offset, _x.gnss_latency, _x.geoidal_separation, _x.nmea_messages_received, _x.in_use,) = _struct_3fHId2fHB.unpack(str[start:end]) 00268 return self 00269 except struct.error as e: 00270 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00271 00272 _struct_I = roslib.message.struct_I 00273 _struct_2H4f = struct.Struct("<2H4f") 00274 _struct_3d4BH = struct.Struct("<3d4BH") 00275 _struct_3fHId2fHB = struct.Struct("<3fHId2fHB")