_NavPOSLLH.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ublox_msgs/NavPOSLLH.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 NavPOSLLH(genpy.Message):
00009   _md5sum = "01aab2c75cd9f8c402a0689e82f04f01"
00010   _type = "ublox_msgs/NavPOSLLH"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# NAV-POSLLH (0x01 0x02)
00013 # Geodetic Position Solution
00014 #
00015 # See important comments concerning validity of position given in section
00016 # Navigation Output Filters.
00017 # This message outputs the Geodetic position in the currently selected Ellipsoid. The default is
00018 # the WGS84 Ellipsoid, but can be changed with the message CFG-DAT.
00019 #
00020 
00021 uint8 CLASS_ID = 1
00022 uint8 MESSAGE_ID = 2
00023 
00024 uint32 iTOW             # GPS Millisecond Time of Week [ms]
00025 
00026 int32 lon               # Longitude [deg/1e-7]
00027 int32 lat               # Latitude [deg/1e-7]
00028 int32 height            # Height above Ellipsoid [mm]
00029 int32 hMSL              # Height above mean sea level [mm]
00030 uint32 hAcc             # Horizontal Accuracy Estimate [mm]
00031 uint32 vAcc             # Vertical Accuracy Estimate [mm]
00032 
00033 """
00034   # Pseudo-constants
00035   CLASS_ID = 1
00036   MESSAGE_ID = 2
00037 
00038   __slots__ = ['iTOW','lon','lat','height','hMSL','hAcc','vAcc']
00039   _slot_types = ['uint32','int32','int32','int32','int32','uint32','uint32']
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,lon,lat,height,hMSL,hAcc,vAcc
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(NavPOSLLH, 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.lon is None:
00061         self.lon = 0
00062       if self.lat is None:
00063         self.lat = 0
00064       if self.height is None:
00065         self.height = 0
00066       if self.hMSL is None:
00067         self.hMSL = 0
00068       if self.hAcc is None:
00069         self.hAcc = 0
00070       if self.vAcc is None:
00071         self.vAcc = 0
00072     else:
00073       self.iTOW = 0
00074       self.lon = 0
00075       self.lat = 0
00076       self.height = 0
00077       self.hMSL = 0
00078       self.hAcc = 0
00079       self.vAcc = 0
00080 
00081   def _get_types(self):
00082     """
00083     internal API method
00084     """
00085     return self._slot_types
00086 
00087   def serialize(self, buff):
00088     """
00089     serialize message into buffer
00090     :param buff: buffer, ``StringIO``
00091     """
00092     try:
00093       _x = self
00094       buff.write(_struct_I4i2I.pack(_x.iTOW, _x.lon, _x.lat, _x.height, _x.hMSL, _x.hAcc, _x.vAcc))
00095     except struct.error as se: self._check_types(se)
00096     except TypeError as te: self._check_types(te)
00097 
00098   def deserialize(self, str):
00099     """
00100     unpack serialized message in str into this message instance
00101     :param str: byte array of serialized message, ``str``
00102     """
00103     try:
00104       end = 0
00105       _x = self
00106       start = end
00107       end += 28
00108       (_x.iTOW, _x.lon, _x.lat, _x.height, _x.hMSL, _x.hAcc, _x.vAcc,) = _struct_I4i2I.unpack(str[start:end])
00109       return self
00110     except struct.error as e:
00111       raise genpy.DeserializationError(e) #most likely buffer underfill
00112 
00113 
00114   def serialize_numpy(self, buff, numpy):
00115     """
00116     serialize message with numpy array types into buffer
00117     :param buff: buffer, ``StringIO``
00118     :param numpy: numpy python module
00119     """
00120     try:
00121       _x = self
00122       buff.write(_struct_I4i2I.pack(_x.iTOW, _x.lon, _x.lat, _x.height, _x.hMSL, _x.hAcc, _x.vAcc))
00123     except struct.error as se: self._check_types(se)
00124     except TypeError as te: self._check_types(te)
00125 
00126   def deserialize_numpy(self, str, numpy):
00127     """
00128     unpack serialized message in str into this message instance using numpy for array types
00129     :param str: byte array of serialized message, ``str``
00130     :param numpy: numpy python module
00131     """
00132     try:
00133       end = 0
00134       _x = self
00135       start = end
00136       end += 28
00137       (_x.iTOW, _x.lon, _x.lat, _x.height, _x.hMSL, _x.hAcc, _x.vAcc,) = _struct_I4i2I.unpack(str[start:end])
00138       return self
00139     except struct.error as e:
00140       raise genpy.DeserializationError(e) #most likely buffer underfill
00141 
00142 _struct_I = genpy.struct_I
00143 _struct_I4i2I = struct.Struct("<I4i2I")
 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