Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgTrackingState._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgTrackingState, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_MEASUREMENT_STATE = 0x0061
class MsgMeasurementState(SBP):
"""SBP class for message MSG_MEASUREMENT_STATE (0x0061).
You can have MSG_MEASUREMENT_STATE inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
The tracking message returns a variable-length array of tracking
channel states. It reports status and carrier-to-noise density
measurements for all tracked satellites.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgTrackingStateDetailedDepA(sbp, **d)
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgVelECEFCovGnss._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgVelECEFCovGnss, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_VEL_NED_GNSS = 0x022E
class MsgVelNEDGnss(SBP):
"""SBP class for message MSG_VEL_NED_GNSS (0x022E).
You can have MSG_VEL_NED_GNSS inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
This message reports the velocity in local North East Down (NED)
coordinates. The NED coordinate system is defined as the local WGS84
tangent plane centered at the current position. The full GPS time is
given by the preceding MSG_GPS_TIME with the matching time-of-week (tow).
Parameters
----------
sbp : SBP
"""
import json
import construct
from sbp.msg import SBP, SENDER_ID
from sbp.utils import fmt_repr, exclude_fields, walk_json_dict, containerize
# Automatically generated from piksi/yaml/swiftnav/sbp/bootload.yaml with generate.py.
# Please do not hand edit!
SBP_MSG_BOOTLOADER_HANDSHAKE_REQ = 0x00B3
class MsgBootloaderHandshakeReq(SBP):
"""SBP class for message MSG_BOOTLOADER_HANDSHAKE_REQ (0x00B3).
You can have MSG_BOOTLOADER_HANDSHAKE_REQ inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
The handshake message request from the host establishes a
handshake between the device bootloader and the host. The
response from the device is MSG_BOOTLOADER_HANDSHAKE_RESP.
"""
__slots__ = []
def __init__(self, sbp=None, **kwargs):
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgVelECEF._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgVelECEF, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_VEL_ECEF_COV = 0x0215
class MsgVelECEFCov(SBP):
"""SBP class for message MSG_VEL_ECEF_COV (0x0215).
You can have MSG_VEL_ECEF_COV inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
This message reports the velocity in Earth Centered Earth Fixed
(ECEF) coordinates. The full GPS time is given by the preceding
MSG_GPS_TIME with the matching time-of-week (tow).
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgAcqResultDepB._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgAcqResultDepB, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_ACQ_RESULT_DEP_A = 0x0015
class MsgAcqResultDepA(SBP):
"""SBP class for message MSG_ACQ_RESULT_DEP_A (0x0015).
You can have MSG_ACQ_RESULT_DEP_A inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
Deprecated.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
snr : float
SNR of best point. Currently dimensonless, but will have
units of dB Hz in the revision of this message.
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgGroupDelayDepB(sbp, **d)
"""
Spectrum analyzer and related interference messages
"""
from construct import *
import json
from sbp.msg import SBP, SENDER_ID
from sbp.utils import fmt_repr, exclude_fields, walk_json_dict, containerize, greedy_string
from sbp.gnss import *
# Automatically generated from piksi/yaml/swiftnav/sbp/specan.yaml with generate.py.
# Please do not hand edit!
SBP_MSG_SPECAN = 0x0050
class MsgSpecan(SBP):
"""SBP class for message MSG_SPECAN (0x0050).
You can have MSG_SPECAN inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
Spectrum analyzer packet.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
t : GPSTime
Receiver time of this observation
"""
self.payload = containerize(exclude_fields(self))
self.parser = MsgNetworkBandwidthUsage._parser
self.stream_payload.reset(buf, offset)
return self.pack_into(buf, offset, self._build_payload)
def to_json_dict(self):
self.to_binary()
d = super( MsgNetworkBandwidthUsage, self).to_json_dict()
j = walk_json_dict(exclude_fields(self))
d.update(j)
return d
SBP_MSG_CELL_MODEM_STATUS = 0x00BE
class MsgCellModemStatus(SBP):
"""SBP class for message MSG_CELL_MODEM_STATUS (0x00BE).
You can have MSG_CELL_MODEM_STATUS inherit its fields directly
from an inherited SBP object, or construct it inline using a dict
of its fields.
If a cell modem is present on a piksi device, this message
will be send periodically to update the host on the status
of the modem and its various parameters.
Parameters
----------
sbp : SBP
SBP parent object to inherit from.
def from_json_dict(d):
sbp = SBP.from_json_dict(d)
return MsgBootloaderHandshakeReq(sbp, **d)