$search
00001 """autogenerated by genmsg_py from GAMS.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import applanix_msgs.msg 00006 00007 class GAMS(roslib.message.Message): 00008 _md5sum = "018cc2b2b8ae19d409c9e0d80bd8927e" 00009 _type = "applanix_msgs/GAMS" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """TimeDistance td 00012 00013 uint8 num_satellites 00014 float32 a_priori_pdop 00015 float32 antenna_separation 00016 00017 uint8 STATUS_FIXED_INTEGER=0 00018 uint8 STATUS_FIXED_INTEGER_TEST_INSTALL_DATA=1 00019 uint8 STATUS_DEGRADED_FIXED_INTEGER=2 00020 uint8 STATUS_FLOATED_AMBIGUITY=3 00021 uint8 STATUS_DEGRADED_FLOATED_AMBIGUITY=4 00022 uint8 STATUS_SOLUTION_WITHOUT_INSTALL_DATA=5 00023 uint8 STATUS_SOLUTION_FROM_ATTITUDE_AND_INSTALL_DATA=6 00024 uint8 STATUS_NO_SOLUTION=7 00025 uint8 status 00026 00027 uint8 PRN_UNASSIGNED=0 00028 uint8[12] prn_assignment 00029 00030 uint16 cycle_slip_flag 00031 00032 float64 gams_heading 00033 float64 gams_heading_rms_err 00034 00035 ================================================================================ 00036 MSG: applanix_msgs/TimeDistance 00037 float64 time1 00038 float64 time2 00039 float64 distance 00040 uint8 time_types 00041 uint8 distance_type 00042 00043 """ 00044 # Pseudo-constants 00045 STATUS_FIXED_INTEGER = 0 00046 STATUS_FIXED_INTEGER_TEST_INSTALL_DATA = 1 00047 STATUS_DEGRADED_FIXED_INTEGER = 2 00048 STATUS_FLOATED_AMBIGUITY = 3 00049 STATUS_DEGRADED_FLOATED_AMBIGUITY = 4 00050 STATUS_SOLUTION_WITHOUT_INSTALL_DATA = 5 00051 STATUS_SOLUTION_FROM_ATTITUDE_AND_INSTALL_DATA = 6 00052 STATUS_NO_SOLUTION = 7 00053 PRN_UNASSIGNED = 0 00054 00055 __slots__ = ['td','num_satellites','a_priori_pdop','antenna_separation','status','prn_assignment','cycle_slip_flag','gams_heading','gams_heading_rms_err'] 00056 _slot_types = ['applanix_msgs/TimeDistance','uint8','float32','float32','uint8','uint8[12]','uint16','float64','float64'] 00057 00058 def __init__(self, *args, **kwds): 00059 """ 00060 Constructor. Any message fields that are implicitly/explicitly 00061 set to None will be assigned a default value. The recommend 00062 use is keyword arguments as this is more robust to future message 00063 changes. You cannot mix in-order arguments and keyword arguments. 00064 00065 The available fields are: 00066 td,num_satellites,a_priori_pdop,antenna_separation,status,prn_assignment,cycle_slip_flag,gams_heading,gams_heading_rms_err 00067 00068 @param args: complete set of field values, in .msg order 00069 @param kwds: use keyword arguments corresponding to message field names 00070 to set specific fields. 00071 """ 00072 if args or kwds: 00073 super(GAMS, self).__init__(*args, **kwds) 00074 #message fields cannot be None, assign default values for those that are 00075 if self.td is None: 00076 self.td = applanix_msgs.msg.TimeDistance() 00077 if self.num_satellites is None: 00078 self.num_satellites = 0 00079 if self.a_priori_pdop is None: 00080 self.a_priori_pdop = 0. 00081 if self.antenna_separation is None: 00082 self.antenna_separation = 0. 00083 if self.status is None: 00084 self.status = 0 00085 if self.prn_assignment is None: 00086 self.prn_assignment = chr(0)*12 00087 if self.cycle_slip_flag is None: 00088 self.cycle_slip_flag = 0 00089 if self.gams_heading is None: 00090 self.gams_heading = 0. 00091 if self.gams_heading_rms_err is None: 00092 self.gams_heading_rms_err = 0. 00093 else: 00094 self.td = applanix_msgs.msg.TimeDistance() 00095 self.num_satellites = 0 00096 self.a_priori_pdop = 0. 00097 self.antenna_separation = 0. 00098 self.status = 0 00099 self.prn_assignment = chr(0)*12 00100 self.cycle_slip_flag = 0 00101 self.gams_heading = 0. 00102 self.gams_heading_rms_err = 0. 00103 00104 def _get_types(self): 00105 """ 00106 internal API method 00107 """ 00108 return self._slot_types 00109 00110 def serialize(self, buff): 00111 """ 00112 serialize message into buffer 00113 @param buff: buffer 00114 @type buff: StringIO 00115 """ 00116 try: 00117 _x = self 00118 buff.write(_struct_3d3B2fB.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.num_satellites, _x.a_priori_pdop, _x.antenna_separation, _x.status)) 00119 _x = self.prn_assignment 00120 # - if encoded as a list instead, serialize as bytes instead of string 00121 if type(_x) in [list, tuple]: 00122 buff.write(_struct_12B.pack(*_x)) 00123 else: 00124 buff.write(_struct_12s.pack(_x)) 00125 _x = self 00126 buff.write(_struct_H2d.pack(_x.cycle_slip_flag, _x.gams_heading, _x.gams_heading_rms_err)) 00127 except struct.error as se: self._check_types(se) 00128 except TypeError as te: self._check_types(te) 00129 00130 def deserialize(self, str): 00131 """ 00132 unpack serialized message in str into this message instance 00133 @param str: byte array of serialized message 00134 @type str: str 00135 """ 00136 try: 00137 if self.td is None: 00138 self.td = applanix_msgs.msg.TimeDistance() 00139 end = 0 00140 _x = self 00141 start = end 00142 end += 36 00143 (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.num_satellites, _x.a_priori_pdop, _x.antenna_separation, _x.status,) = _struct_3d3B2fB.unpack(str[start:end]) 00144 start = end 00145 end += 12 00146 self.prn_assignment = str[start:end] 00147 _x = self 00148 start = end 00149 end += 18 00150 (_x.cycle_slip_flag, _x.gams_heading, _x.gams_heading_rms_err,) = _struct_H2d.unpack(str[start:end]) 00151 return self 00152 except struct.error as e: 00153 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00154 00155 00156 def serialize_numpy(self, buff, numpy): 00157 """ 00158 serialize message with numpy array types into buffer 00159 @param buff: buffer 00160 @type buff: StringIO 00161 @param numpy: numpy python module 00162 @type numpy module 00163 """ 00164 try: 00165 _x = self 00166 buff.write(_struct_3d3B2fB.pack(_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.num_satellites, _x.a_priori_pdop, _x.antenna_separation, _x.status)) 00167 _x = self.prn_assignment 00168 # - if encoded as a list instead, serialize as bytes instead of string 00169 if type(_x) in [list, tuple]: 00170 buff.write(_struct_12B.pack(*_x)) 00171 else: 00172 buff.write(_struct_12s.pack(_x)) 00173 _x = self 00174 buff.write(_struct_H2d.pack(_x.cycle_slip_flag, _x.gams_heading, _x.gams_heading_rms_err)) 00175 except struct.error as se: self._check_types(se) 00176 except TypeError as te: self._check_types(te) 00177 00178 def deserialize_numpy(self, str, numpy): 00179 """ 00180 unpack serialized message in str into this message instance using numpy for array types 00181 @param str: byte array of serialized message 00182 @type str: str 00183 @param numpy: numpy python module 00184 @type numpy: module 00185 """ 00186 try: 00187 if self.td is None: 00188 self.td = applanix_msgs.msg.TimeDistance() 00189 end = 0 00190 _x = self 00191 start = end 00192 end += 36 00193 (_x.td.time1, _x.td.time2, _x.td.distance, _x.td.time_types, _x.td.distance_type, _x.num_satellites, _x.a_priori_pdop, _x.antenna_separation, _x.status,) = _struct_3d3B2fB.unpack(str[start:end]) 00194 start = end 00195 end += 12 00196 self.prn_assignment = str[start:end] 00197 _x = self 00198 start = end 00199 end += 18 00200 (_x.cycle_slip_flag, _x.gams_heading, _x.gams_heading_rms_err,) = _struct_H2d.unpack(str[start:end]) 00201 return self 00202 except struct.error as e: 00203 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00204 00205 _struct_I = roslib.message.struct_I 00206 _struct_H2d = struct.Struct("<H2d") 00207 _struct_12B = struct.Struct("<12B") 00208 _struct_12s = struct.Struct("<12s") 00209 _struct_3d3B2fB = struct.Struct("<3d3B2fB")