00001 """autogenerated by genpy from applanix_msgs/GNSSAuxStatus.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 GNSSAuxStatus(genpy.Message):
00010 _md5sum = "7aa22394742b953a48015e9d1c3d090f"
00011 _type = "applanix_msgs/GNSSAuxStatus"
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 #TODO: enum
00046 uint16 nmea_messages_received
00047 uint8 in_use
00048
00049 ================================================================================
00050 MSG: applanix_msgs/TimeDistance
00051 float64 time1
00052 float64 time2
00053 float64 distance
00054 uint8 time_types
00055 uint8 distance_type
00056
00057 ================================================================================
00058 MSG: applanix_msgs/GNSSChannelStatus
00059 uint16 sv_prn
00060
00061 uint16 STATUS_L1_IDLE=0
00062 uint16 STATUS_L1_ACQUISITION=1
00063 uint16 STATUS_L1_CODE_LOCK=3
00064 uint16 STATUS_L1_PHASE_LOCK=5
00065 uint16 STATUS_L2_IDLE=6
00066 uint16 STATUS_L2_ACQUISITION=8
00067 uint16 STATUS_L2_CODE_LOCK=9
00068 uint16 STATUS_L2_PHASE_LOCK=11
00069 uint16 status
00070
00071 float32 sv_azimuth
00072 float32 sv_elevation
00073 float32 sv_l1_snr
00074 float32 sv_l2_snr
00075
00076 """
00077
00078 SOLUTION_UNKNOWN = 255
00079 SOLUTION_NO_DATA = 0
00080 SOLUTION_HORIZONTAL_CA = 1
00081 SOLUTION_3D_CA = 2
00082 SOLUTION_HORIZONTAL_DGPS = 3
00083 SOLUTION_3D_DGPS = 4
00084 SOLUTION_FLOAT_RTK = 5
00085 SOLUTION_WIDE_LANE_RTK = 6
00086 SOLUTION_NARROW_LANE_RTK = 7
00087 SOLUTION_P_CODE = 8
00088 SOLUTION_OMNISTAR_HP = 9
00089 SOLUTION_OMNISTAR_XP = 10
00090 SOLUTION_OMNISTAR_VBS = 11
00091
00092 __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']
00093 _slot_types = ['applanix_msgs/TimeDistance','uint8','uint8','uint16','applanix_msgs/GNSSChannelStatus[]','float32','float32','float32','uint16','uint32','float64','float32','float32','uint16','uint8']
00094
00095 def __init__(self, *args, **kwds):
00096 """
00097 Constructor. Any message fields that are implicitly/explicitly
00098 set to None will be assigned a default value. The recommend
00099 use is keyword arguments as this is more robust to future message
00100 changes. You cannot mix in-order arguments and keyword arguments.
00101
00102 The available fields are:
00103 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
00104
00105 :param args: complete set of field values, in .msg order
00106 :param kwds: use keyword arguments corresponding to message field names
00107 to set specific fields.
00108 """
00109 if args or kwds:
00110 super(GNSSAuxStatus, self).__init__(*args, **kwds)
00111
00112 if self.td is None:
00113 self.td = applanix_msgs.msg.TimeDistance()
00114 if self.solution_status is None:
00115 self.solution_status = 0
00116 if self.channels_count is None:
00117 self.channels_count = 0
00118 if self.reserved is None:
00119 self.reserved = 0
00120 if self.channels is None:
00121 self.channels = []
00122 if self.hdop is None:
00123 self.hdop = 0.
00124 if self.vdop is None:
00125 self.vdop = 0.
00126 if self.dgps_latency is None:
00127 self.dgps_latency = 0.
00128 if self.dgps_reference_id is None:
00129 self.dgps_reference_id = 0
00130 if self.gps_week is None:
00131 self.gps_week = 0
00132 if self.gps_time_offset is None:
00133 self.gps_time_offset = 0.
00134 if self.gnss_latency is None:
00135 self.gnss_latency = 0.
00136 if self.geoidal_separation is None:
00137 self.geoidal_separation = 0.
00138 if self.nmea_messages_received is None:
00139 self.nmea_messages_received = 0
00140 if self.in_use is None:
00141 self.in_use = 0
00142 else:
00143 self.td = applanix_msgs.msg.TimeDistance()
00144 self.solution_status = 0
00145 self.channels_count = 0
00146 self.reserved = 0
00147 self.channels = []
00148 self.hdop = 0.
00149 self.vdop = 0.
00150 self.dgps_latency = 0.
00151 self.dgps_reference_id = 0
00152 self.gps_week = 0
00153 self.gps_time_offset = 0.
00154 self.gnss_latency = 0.
00155 self.geoidal_separation = 0.
00156 self.nmea_messages_received = 0
00157 self.in_use = 0
00158
00159 def _get_types(self):
00160 """
00161 internal API method
00162 """
00163 return self._slot_types
00164
00165 def serialize(self, buff):
00166 """
00167 serialize message into buffer
00168 :param buff: buffer, ``StringIO``
00169 """
00170 try:
00171 _x = self
00172 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))
00173 length = len(self.channels)
00174 buff.write(_struct_I.pack(length))
00175 for val1 in self.channels:
00176 _x = val1
00177 buff.write(_struct_2H4f.pack(_x.sv_prn, _x.status, _x.sv_azimuth, _x.sv_elevation, _x.sv_l1_snr, _x.sv_l2_snr))
00178 _x = self
00179 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))
00180 except struct.error as se: self._check_types(se)
00181 except TypeError as te: self._check_types(te)
00182
00183 def deserialize(self, str):
00184 """
00185 unpack serialized message in str into this message instance
00186 :param str: byte array of serialized message, ``str``
00187 """
00188 try:
00189 if self.td is None:
00190 self.td = applanix_msgs.msg.TimeDistance()
00191 if self.channels is None:
00192 self.channels = None
00193 end = 0
00194 _x = self
00195 start = end
00196 end += 30
00197 (_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])
00198 start = end
00199 end += 4
00200 (length,) = _struct_I.unpack(str[start:end])
00201 self.channels = []
00202 for i in range(0, length):
00203 val1 = applanix_msgs.msg.GNSSChannelStatus()
00204 _x = val1
00205 start = end
00206 end += 20
00207 (_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])
00208 self.channels.append(val1)
00209 _x = self
00210 start = end
00211 end += 37
00212 (_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])
00213 return self
00214 except struct.error as e:
00215 raise genpy.DeserializationError(e)
00216
00217
00218 def serialize_numpy(self, buff, numpy):
00219 """
00220 serialize message with numpy array types into buffer
00221 :param buff: buffer, ``StringIO``
00222 :param numpy: numpy python 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, ``str``
00241 :param numpy: numpy python module
00242 """
00243 try:
00244 if self.td is None:
00245 self.td = applanix_msgs.msg.TimeDistance()
00246 if self.channels is None:
00247 self.channels = None
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 genpy.DeserializationError(e)
00271
00272 _struct_I = genpy.struct_I
00273 _struct_2H4f = struct.Struct("<2H4f")
00274 _struct_3d4BH = struct.Struct("<3d4BH")
00275 _struct_3fHId2fHB = struct.Struct("<3fHId2fHB")