$search
00001 """autogenerated by genmsg_py from GNSSStatus.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import applanix_msgs.msg 00006 00007 class GNSSStatus(roslib.message.Message): 00008 _md5sum = "025a8154ac59effa20d8e6dc5c1ba784" 00009 _type = "applanix_msgs/GNSSStatus" 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 uint16 TYPE_NONE=0 00044 uint16 TYPE_TRIMBLE_BD960=16 00045 uint16 gnss_type 00046 00047 # Receiver-dependent. 00048 uint32 gnss_status 00049 00050 ================================================================================ 00051 MSG: applanix_msgs/TimeDistance 00052 float64 time1 00053 float64 time2 00054 float64 distance 00055 uint8 time_types 00056 uint8 distance_type 00057 00058 ================================================================================ 00059 MSG: applanix_msgs/GNSSChannelStatus 00060 uint16 sv_prn 00061 00062 uint16 STATUS_L1_IDLE=0 00063 uint16 STATUS_L1_ACQUISITION=1 00064 uint16 STATUS_L1_CODE_LOCK=3 00065 uint16 STATUS_L1_PHASE_LOCK=5 00066 uint16 STATUS_L2_IDLE=6 00067 uint16 STATUS_L2_ACQUISITION=8 00068 uint16 STATUS_L2_CODE_LOCK=9 00069 uint16 STATUS_L2_PHASE_LOCK=11 00070 uint16 status 00071 00072 float32 sv_azimuth 00073 float32 sv_elevation 00074 float32 sv_l1_snr 00075 float32 sv_l2_snr 00076 00077 """ 00078 # Pseudo-constants 00079 SOLUTION_UNKNOWN = 255 00080 SOLUTION_NO_DATA = 0 00081 SOLUTION_HORIZONTAL_CA = 1 00082 SOLUTION_3D_CA = 2 00083 SOLUTION_HORIZONTAL_DGPS = 3 00084 SOLUTION_3D_DGPS = 4 00085 SOLUTION_FLOAT_RTK = 5 00086 SOLUTION_WIDE_LANE_RTK = 6 00087 SOLUTION_NARROW_LANE_RTK = 7 00088 SOLUTION_P_CODE = 8 00089 SOLUTION_OMNISTAR_HP = 9 00090 SOLUTION_OMNISTAR_XP = 10 00091 SOLUTION_OMNISTAR_VBS = 11 00092 TYPE_NONE = 0 00093 TYPE_TRIMBLE_BD960 = 16 00094 00095 __slots__ = ['td','solution_status','channels_count','reserved','channels','hdop','vdop','dgps_latency','dgps_reference_id','gps_week','gps_time_offset','gnss_latency','geoidal_separation','gnss_type','gnss_status'] 00096 _slot_types = ['applanix_msgs/TimeDistance','uint8','uint8','uint16','applanix_msgs/GNSSChannelStatus[]','float32','float32','float32','uint16','uint32','float64','float32','float32','uint16','uint32'] 00097 00098 def __init__(self, *args, **kwds): 00099 """ 00100 Constructor. Any message fields that are implicitly/explicitly 00101 set to None will be assigned a default value. The recommend 00102 use is keyword arguments as this is more robust to future message 00103 changes. You cannot mix in-order arguments and keyword arguments. 00104 00105 The available fields are: 00106 td,solution_status,channels_count,reserved,channels,hdop,vdop,dgps_latency,dgps_reference_id,gps_week,gps_time_offset,gnss_latency,geoidal_separation,gnss_type,gnss_status 00107 00108 @param args: complete set of field values, in .msg order 00109 @param kwds: use keyword arguments corresponding to message field names 00110 to set specific fields. 00111 """ 00112 if args or kwds: 00113 super(GNSSStatus, self).__init__(*args, **kwds) 00114 #message fields cannot be None, assign default values for those that are 00115 if self.td is None: 00116 self.td = applanix_msgs.msg.TimeDistance() 00117 if self.solution_status is None: 00118 self.solution_status = 0 00119 if self.channels_count is None: 00120 self.channels_count = 0 00121 if self.reserved is None: 00122 self.reserved = 0 00123 if self.channels is None: 00124 self.channels = [] 00125 if self.hdop is None: 00126 self.hdop = 0. 00127 if self.vdop is None: 00128 self.vdop = 0. 00129 if self.dgps_latency is None: 00130 self.dgps_latency = 0. 00131 if self.dgps_reference_id is None: 00132 self.dgps_reference_id = 0 00133 if self.gps_week is None: 00134 self.gps_week = 0 00135 if self.gps_time_offset is None: 00136 self.gps_time_offset = 0. 00137 if self.gnss_latency is None: 00138 self.gnss_latency = 0. 00139 if self.geoidal_separation is None: 00140 self.geoidal_separation = 0. 00141 if self.gnss_type is None: 00142 self.gnss_type = 0 00143 if self.gnss_status is None: 00144 self.gnss_status = 0 00145 else: 00146 self.td = applanix_msgs.msg.TimeDistance() 00147 self.solution_status = 0 00148 self.channels_count = 0 00149 self.reserved = 0 00150 self.channels = [] 00151 self.hdop = 0. 00152 self.vdop = 0. 00153 self.dgps_latency = 0. 00154 self.dgps_reference_id = 0 00155 self.gps_week = 0 00156 self.gps_time_offset = 0. 00157 self.gnss_latency = 0. 00158 self.geoidal_separation = 0. 00159 self.gnss_type = 0 00160 self.gnss_status = 0 00161 00162 def _get_types(self): 00163 """ 00164 internal API method 00165 """ 00166 return self._slot_types 00167 00168 def serialize(self, buff): 00169 """ 00170 serialize message into buffer 00171 @param buff: buffer 00172 @type buff: StringIO 00173 """ 00174 try: 00175 _x = self 00176 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)) 00177 length = len(self.channels) 00178 buff.write(_struct_I.pack(length)) 00179 for val1 in self.channels: 00180 _x = val1 00181 buff.write(_struct_2H4f.pack(_x.sv_prn, _x.status, _x.sv_azimuth, _x.sv_elevation, _x.sv_l1_snr, _x.sv_l2_snr)) 00182 _x = self 00183 buff.write(_struct_3fHId2fHI.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.gnss_type, _x.gnss_status)) 00184 except struct.error as se: self._check_types(se) 00185 except TypeError as te: self._check_types(te) 00186 00187 def deserialize(self, str): 00188 """ 00189 unpack serialized message in str into this message instance 00190 @param str: byte array of serialized message 00191 @type str: str 00192 """ 00193 try: 00194 if self.td is None: 00195 self.td = applanix_msgs.msg.TimeDistance() 00196 end = 0 00197 _x = self 00198 start = end 00199 end += 30 00200 (_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]) 00201 start = end 00202 end += 4 00203 (length,) = _struct_I.unpack(str[start:end]) 00204 self.channels = [] 00205 for i in range(0, length): 00206 val1 = applanix_msgs.msg.GNSSChannelStatus() 00207 _x = val1 00208 start = end 00209 end += 20 00210 (_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]) 00211 self.channels.append(val1) 00212 _x = self 00213 start = end 00214 end += 40 00215 (_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.gnss_type, _x.gnss_status,) = _struct_3fHId2fHI.unpack(str[start:end]) 00216 return self 00217 except struct.error as e: 00218 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00219 00220 00221 def serialize_numpy(self, buff, numpy): 00222 """ 00223 serialize message with numpy array types into buffer 00224 @param buff: buffer 00225 @type buff: StringIO 00226 @param numpy: numpy python module 00227 @type numpy module 00228 """ 00229 try: 00230 _x = self 00231 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)) 00232 length = len(self.channels) 00233 buff.write(_struct_I.pack(length)) 00234 for val1 in self.channels: 00235 _x = val1 00236 buff.write(_struct_2H4f.pack(_x.sv_prn, _x.status, _x.sv_azimuth, _x.sv_elevation, _x.sv_l1_snr, _x.sv_l2_snr)) 00237 _x = self 00238 buff.write(_struct_3fHId2fHI.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.gnss_type, _x.gnss_status)) 00239 except struct.error as se: self._check_types(se) 00240 except TypeError as te: self._check_types(te) 00241 00242 def deserialize_numpy(self, str, numpy): 00243 """ 00244 unpack serialized message in str into this message instance using numpy for array types 00245 @param str: byte array of serialized message 00246 @type str: str 00247 @param numpy: numpy python module 00248 @type numpy: module 00249 """ 00250 try: 00251 if self.td is None: 00252 self.td = applanix_msgs.msg.TimeDistance() 00253 end = 0 00254 _x = self 00255 start = end 00256 end += 30 00257 (_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]) 00258 start = end 00259 end += 4 00260 (length,) = _struct_I.unpack(str[start:end]) 00261 self.channels = [] 00262 for i in range(0, length): 00263 val1 = applanix_msgs.msg.GNSSChannelStatus() 00264 _x = val1 00265 start = end 00266 end += 20 00267 (_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]) 00268 self.channels.append(val1) 00269 _x = self 00270 start = end 00271 end += 40 00272 (_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.gnss_type, _x.gnss_status,) = _struct_3fHId2fHI.unpack(str[start:end]) 00273 return self 00274 except struct.error as e: 00275 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00276 00277 _struct_I = roslib.message.struct_I 00278 _struct_2H4f = struct.Struct("<2H4f") 00279 _struct_3d4BH = struct.Struct("<3d4BH") 00280 _struct_3fHId2fHI = struct.Struct("<3fHId2fHI")