_NavDOP.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ublox_msgs/NavDOP.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 
00008 class NavDOP(genpy.Message):
00009   _md5sum = "19fe2210fc48e52c1c14b7d2c567407f"
00010   _type = "ublox_msgs/NavDOP"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# NAV-DOP (0x01 0x04)
00013 # Dilution of precision
00014 #
00015 # - DOP values are dimensionless.
00016 # - All DOP values are scaled by a factor of 100. If the unit transmits a value of e.g. 156, the
00017 #   DOP value is 1.56.
00018 #
00019 
00020 uint8 CLASS_ID = 1
00021 uint8 MESSAGE_ID = 4
00022 
00023 uint32 iTOW             # GPS Millisecond Time of Week [ms]
00024 
00025 uint16 gDOP             # Geometric DOP
00026 uint16 pDOP             # Position DOP
00027 uint16 tDOP             # Time DOP
00028 uint16 vDOP             # Vertical DOP
00029 uint16 hDOP             # Horizontal DOP
00030 uint16 nDOP             # Northing DOP
00031 uint16 eDOP             # Easting DOP
00032 
00033 """
00034   # Pseudo-constants
00035   CLASS_ID = 1
00036   MESSAGE_ID = 4
00037 
00038   __slots__ = ['iTOW','gDOP','pDOP','tDOP','vDOP','hDOP','nDOP','eDOP']
00039   _slot_types = ['uint32','uint16','uint16','uint16','uint16','uint16','uint16','uint16']
00040 
00041   def __init__(self, *args, **kwds):
00042     """
00043     Constructor. Any message fields that are implicitly/explicitly
00044     set to None will be assigned a default value. The recommend
00045     use is keyword arguments as this is more robust to future message
00046     changes.  You cannot mix in-order arguments and keyword arguments.
00047 
00048     The available fields are:
00049        iTOW,gDOP,pDOP,tDOP,vDOP,hDOP,nDOP,eDOP
00050 
00051     :param args: complete set of field values, in .msg order
00052     :param kwds: use keyword arguments corresponding to message field names
00053     to set specific fields.
00054     """
00055     if args or kwds:
00056       super(NavDOP, self).__init__(*args, **kwds)
00057       #message fields cannot be None, assign default values for those that are
00058       if self.iTOW is None:
00059         self.iTOW = 0
00060       if self.gDOP is None:
00061         self.gDOP = 0
00062       if self.pDOP is None:
00063         self.pDOP = 0
00064       if self.tDOP is None:
00065         self.tDOP = 0
00066       if self.vDOP is None:
00067         self.vDOP = 0
00068       if self.hDOP is None:
00069         self.hDOP = 0
00070       if self.nDOP is None:
00071         self.nDOP = 0
00072       if self.eDOP is None:
00073         self.eDOP = 0
00074     else:
00075       self.iTOW = 0
00076       self.gDOP = 0
00077       self.pDOP = 0
00078       self.tDOP = 0
00079       self.vDOP = 0
00080       self.hDOP = 0
00081       self.nDOP = 0
00082       self.eDOP = 0
00083 
00084   def _get_types(self):
00085     """
00086     internal API method
00087     """
00088     return self._slot_types
00089 
00090   def serialize(self, buff):
00091     """
00092     serialize message into buffer
00093     :param buff: buffer, ``StringIO``
00094     """
00095     try:
00096       _x = self
00097       buff.write(_struct_I7H.pack(_x.iTOW, _x.gDOP, _x.pDOP, _x.tDOP, _x.vDOP, _x.hDOP, _x.nDOP, _x.eDOP))
00098     except struct.error as se: self._check_types(se)
00099     except TypeError as te: self._check_types(te)
00100 
00101   def deserialize(self, str):
00102     """
00103     unpack serialized message in str into this message instance
00104     :param str: byte array of serialized message, ``str``
00105     """
00106     try:
00107       end = 0
00108       _x = self
00109       start = end
00110       end += 18
00111       (_x.iTOW, _x.gDOP, _x.pDOP, _x.tDOP, _x.vDOP, _x.hDOP, _x.nDOP, _x.eDOP,) = _struct_I7H.unpack(str[start:end])
00112       return self
00113     except struct.error as e:
00114       raise genpy.DeserializationError(e) #most likely buffer underfill
00115 
00116 
00117   def serialize_numpy(self, buff, numpy):
00118     """
00119     serialize message with numpy array types into buffer
00120     :param buff: buffer, ``StringIO``
00121     :param numpy: numpy python module
00122     """
00123     try:
00124       _x = self
00125       buff.write(_struct_I7H.pack(_x.iTOW, _x.gDOP, _x.pDOP, _x.tDOP, _x.vDOP, _x.hDOP, _x.nDOP, _x.eDOP))
00126     except struct.error as se: self._check_types(se)
00127     except TypeError as te: self._check_types(te)
00128 
00129   def deserialize_numpy(self, str, numpy):
00130     """
00131     unpack serialized message in str into this message instance using numpy for array types
00132     :param str: byte array of serialized message, ``str``
00133     :param numpy: numpy python module
00134     """
00135     try:
00136       end = 0
00137       _x = self
00138       start = end
00139       end += 18
00140       (_x.iTOW, _x.gDOP, _x.pDOP, _x.tDOP, _x.vDOP, _x.hDOP, _x.nDOP, _x.eDOP,) = _struct_I7H.unpack(str[start:end])
00141       return self
00142     except struct.error as e:
00143       raise genpy.DeserializationError(e) #most likely buffer underfill
00144 
00145 _struct_I = genpy.struct_I
00146 _struct_I7H = struct.Struct("<I7H")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


ublox_msgs
Author(s): Johannes Meyer
autogenerated on Mon Jul 15 2013 16:55:23