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