diff --git a/python/README.md b/python/README.md index 44a5da0b3c..a0c2548216 100644 --- a/python/README.md +++ b/python/README.md @@ -20,17 +20,12 @@ sudo pip install sbp Usage ----- -```shell -# To run the tests and check for coverage: -py.test -v --cov sbp tests/ -``` - ## Examples ### Simple example -Receives SBP messages over a serial port, decodes `MSG_BASELINE` messages and -prints them out. +Receives SBP messages over a serial port, decodes `MSG_BASELINE` +messages and prints them out. See the [`source code`](sbp/client/examples/simple.py). @@ -42,8 +37,8 @@ $ python -m sbp.client.examples.simple -p /path/to/serial/port ### Sending SBP messages over UDP -Receives SBP messages over a serial port and sends all incoming messages to a -UDP socket. +Receives SBP messages over a serial port and sends all incoming +messages to a UDP socket. See the [`source code`](sbp/client/examples/udp.py). @@ -53,6 +48,13 @@ Run this example with: $ python -m sbp.client.examples.udp -s /path/to/serial/port ``` +## Testing + +```shell +# To run the tests and check for coverage: +py.test -v --cov sbp tests/ +``` + License ------- diff --git a/python/sbp/__init__.py b/python/sbp/__init__.py index 75ba70850d..b04b78e3e7 100755 --- a/python/sbp/__init__.py +++ b/python/sbp/__init__.py @@ -9,6 +9,7 @@ # EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. +from construct import * import base64 import struct @@ -63,6 +64,14 @@ class SBP(object): """ + _parser = Struct("SBP", + ULInt8('preamble'), + ULInt16('msg_type'), + ULInt16('sender'), + ULInt8('length'), + Bytes("payload", lambda ctx: ctx.length), + ULInt16('crc'),) + def __init__(self, msg_type=None, sender=None, length=None, payload=None, crc=None): self.preamble = SBP_PREAMBLE @@ -89,6 +98,15 @@ def pack(self): framed_msg += struct.pack(' +# +# This source is subject to the license found in the file 'LICENSE' which must +# be be distributed together with this source. All other rights reserved. +# +# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. + +""" +Command line utility for reading an SBP log and generating +YAML-formatted unit test data. This largely samples a set messages +from a existing log, gathers them by module, formats them to YAML, and +writes them out to files. + +Running this command from the top level, + + python tests/sbp/build_test_data.py --log_file , + +produces test_.yaml files in directory the command is +written. The produced file looks like: + +description: Unit tests for swiftnav.sbp.acquisition v0.23. +generated_on: 2015-03-22 17:40:06.567183 +package: sbp.acquisition +tests: +- msg: + fields: + cf: -7742.43212890625 + cp: 272.0 + prn: 24 + snr: 18.77777862548828 + module: sbp.acquisition + name: MsgAcqResult + msg_type: '0x15' + raw_packet: VRUAzAQN5DiWQQAAiEN18/HFGLWs + sbp: + crc: '0xacb5' + length: 13 + msg_type: '0x15' + payload: 5DiWQQAAiEN18/HFGA== + preamble: '0x55' + sender: '0x4cc' + +For the sake of readability, some of the fields that are typically +displayed as hex, such as SBP message type, crc, and preamble are cast +into hex strings. + +""" + +from sbp.table import _SBP_TABLE +from sbp.client.loggers.pickle_logger import PickleLogIterator +import base64 +import datetime +import sbp +import warnings +import yaml + +def _to_readable_dict(msg): + """ + Format an SBP message's attributes for a preferred YAML output. + + Parameters + ---------- + msg : :class: `SBP` + A parsed SBP message. + + Returns + ---------- + dict + + """ + return {'preamble': hex(msg.preamble), + 'msg_type': hex(msg.msg_type), + 'sender': hex(msg.sender), + 'length': msg.length, + 'payload': base64.standard_b64encode(msg.payload), + 'crc': hex(msg.crc)} + +def walk_json_dict(coll): + """ + Flatten a parsed SBP object into a dicts and lists, which are + compatible for YAML output. + + Parameters + ---------- + test_map : dict + + """ + if isinstance(coll, dict): + return dict((k, walk_json_dict(v)) for (k, v) in coll.iteritems()) + elif hasattr(coll, '__iter__'): + return [walk_json_dict(dict(seq.items())) for seq in coll] + else: + return coll + +def dump_modules_to_yaml(test_map): + """ + Take unit test data data from test, format as YAML, and write to + local files. + + Parameters + ---------- + test_map : dict + Dictionary mapping SBP message type to instances of SBP object to be used + for making unit test cases. + + """ + for k, v in test_map.iteritems(): + item = {'package': k, + 'description': "Unit tests for swiftnav.%s v%s." \ + % (k, sbp.__version__), + 'generated_on': datetime.datetime.now(), + 'version': sbp.__version__, + 'tests': v} + d = yaml.dump(item, explicit_start=True, + default_flow_style=False, + explicit_end=True) + filename = "test_"+k.split(".")[-1]+".yaml" + with open(filename, 'w') as f: + f.write(d.replace('\n- ', '\n\n- ')) + +def gather_by_module(test_table): + """ + Join accumulated unit test data by module. + + Parameters + ---------- + test_table : dict + A dict mapping an SBP message type to a list of parsed SBP + objects. + + Returns + ---------- + A dict mapping an SBP module to a list of parsed SBP objects. + + """ + output = {} + for k, v in test_table.iteritems(): + if not v: + continue + module = v[0]['msg']['module'] + if output.get(module, None): + output[module] += v + else: + output[module] = v + return output + +_TO_REMOVE=['preamble', 'msg_type', 'sender', 'length', 'payload', 'crc'] + +def mk_readable_msg(msg, keys=_TO_REMOVE): + """ + Produces a unit test case from a parsed SBP message. The case + includes the raw output, the SBP message with unparsed payload, and + the parsed SBP message + + Parameters + ---------- + msg : Subclass of :class: `SBP`. + Parsed SBP message. + keys : list + List of keys to remove from the rendered + + Returns + ---------- + A dict formatted for a unit test case. + + """ + f = walk_json_dict(msg.__dict__) + # Message includes fields from the SBP message it inherits from, so + # remove those. + for k in keys: + del f[k] + i = {'raw_packet' : base64.standard_b64encode(msg.pack()), + 'msg_type' : hex(msg.msg_type), + 'sbp' : _to_readable_dict(msg), + 'msg' : { 'module' : msg.__class__.__module__, + 'name' : msg.__class__.__name__, + 'fields' : f if f else None}} + return i + +def get_args(): + """ + Get and parse command line arguments. + """ + import argparse + parser = argparse.ArgumentParser(description="Swift Navigation SBP Client.") + parser.add_argument("-l", "--log_file", + default=[None], nargs=1, + help="use input file to read SBP messages from.") + parser.add_argument("-j", "--json", + action="store_true", + help="JSON serialize SBP messages.") + parser.add_argument("-v", "--verbose", + action="store_true", + help="print extra debugging information.") + return parser.parse_args() + +def main(): + """ + Get command line configuration, read log data, and write out + YAML-formatted unit test data. + + """ + args = get_args() + log_datafile = args.log_file[0] + json = args.json + verbose = args.verbose + if json: + assert False, "JSON formatted log input not implemented yet." + if verbose: + assert False, "Verbose output not implemented yet." + # Build + num_test_cases = 5 + message_table = _SBP_TABLE + test_table = dict((k, []) for (k, v) in message_table.copy().iteritems()) + with open(log_datafile, 'r+') as f: + with PickleLogIterator(f) as log: + for delta, timestamp, msg in log.next(): + try: + i = mk_readable_msg(msg) + except TypeError as ex_info: + # Note data errors as they come up, but don't crash the test + # generation. + out = "Warning! %s for message 0x00%x." % (ex_info.message, msg.msg_type) + warnings.warn(out, RuntimeWarning) + continue + # For a given SBP message type, sample only num_test_cases + # hopefully unique cases. Assume that messages that are likely + # to be identical are consecutive, so coompare any new message + # with the most recent one. + if len(test_table[msg.msg_type]) <= num_test_cases: + if len(test_table[msg.msg_type]) == 0: + test_table[msg.msg_type].append(i) + elif test_table[msg.msg_type][-1] != i: + test_table[msg.msg_type].append(i) + dump_modules_to_yaml(gather_by_module(test_table)) + +if __name__ == "__main__": + main() diff --git a/python/tests/sbp/test_navigation.py b/python/tests/sbp/test_navigation.py new file mode 100755 index 0000000000..e2384ba687 --- /dev/null +++ b/python/tests/sbp/test_navigation.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# Copyright (C) 2015 Swift Navigation Inc. +# Contact: Bhaskar Mookerji +# +# This source is subject to the license found in the file 'LICENSE' which must +# be be distributed together with this source. All other rights reserved. +# +# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. + +from utils import assert_package + +def test_package(): + FILEPATH = "../spec/tests/yaml/swiftnav/sbp/test_navigation.yaml" + MODULE_NAME = "sbp.navigation" + assert_package(FILEPATH, MODULE_NAME) diff --git a/python/tests/sbp/test_observation.py b/python/tests/sbp/test_observation.py new file mode 100755 index 0000000000..6b1cfd8307 --- /dev/null +++ b/python/tests/sbp/test_observation.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# Copyright (C) 2015 Swift Navigation Inc. +# Contact: Bhaskar Mookerji +# +# This source is subject to the license found in the file 'LICENSE' which must +# be be distributed together with this source. All other rights reserved. +# +# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. + +from utils import assert_package + +def test_package(): + FILEPATH = "../spec/tests/yaml/swiftnav/sbp/test_observation.yaml" + MODULE_NAME = "sbp.observation" + assert_package(FILEPATH, MODULE_NAME) diff --git a/python/tests/sbp/test_piksi.py b/python/tests/sbp/test_piksi.py new file mode 100755 index 0000000000..0bc7d1c003 --- /dev/null +++ b/python/tests/sbp/test_piksi.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# Copyright (C) 2015 Swift Navigation Inc. +# Contact: Bhaskar Mookerji +# +# This source is subject to the license found in the file 'LICENSE' which must +# be be distributed together with this source. All other rights reserved. +# +# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. + +from utils import assert_package + +def test_package(): + FILEPATH = "../spec/tests/yaml/swiftnav/sbp/test_piksi.yaml" + MODULE_NAME = "sbp.piksi" + assert_package(FILEPATH, MODULE_NAME) diff --git a/python/tests/sbp/test_standard.py b/python/tests/sbp/test_standard.py new file mode 100755 index 0000000000..c7d1465e6b --- /dev/null +++ b/python/tests/sbp/test_standard.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# Copyright (C) 2015 Swift Navigation Inc. +# Contact: Bhaskar Mookerji +# +# This source is subject to the license found in the file 'LICENSE' which must +# be be distributed together with this source. All other rights reserved. +# +# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. + +from utils import assert_package + +def test_package(): + FILEPATH = "../spec/tests/yaml/swiftnav/sbp/test_standard.yaml" + MODULE_NAME = "sbp.standard" + assert_package(FILEPATH, MODULE_NAME) diff --git a/python/tests/sbp/test_tracking.py b/python/tests/sbp/test_tracking.py new file mode 100755 index 0000000000..c2010da6b2 --- /dev/null +++ b/python/tests/sbp/test_tracking.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python +# Copyright (C) 2015 Swift Navigation Inc. +# Contact: Bhaskar Mookerji +# +# This source is subject to the license found in the file 'LICENSE' which must +# be be distributed together with this source. All other rights reserved. +# +# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. + +from utils import assert_package + +def test_package(): + FILEPATH = "../spec/tests/yaml/swiftnav/sbp/test_tracking.yaml" + MODULE_NAME = "sbp.tracking" + assert_package(FILEPATH, MODULE_NAME) diff --git a/python/tests/sbp/utils.py b/python/tests/sbp/utils.py new file mode 100755 index 0000000000..9ef479dfb0 --- /dev/null +++ b/python/tests/sbp/utils.py @@ -0,0 +1,126 @@ +#!/usr/bin/env python +# Copyright (C) 2015 Swift Navigation Inc. +# Contact: Bhaskar Mookerji +# +# This source is subject to the license found in the file 'LICENSE' which must +# be be distributed together with this source. All other rights reserved. +# +# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, +# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. + +""" +Utilities for running YAML-defined unit tests. +""" + +from sbp import SBP +from sbp.table import dispatch +import base64 +import yaml + +def _assert_sbp(sbp, test_case): + """ + Assert that a proper SBP parsing from a raw package of data. + + Parameters + ---------- + sbp : :class: `SBP` + SBP message parsed from unit test's raw packet. + test_case : dict + Unit test case parsed from YAML. + + """ + assert sbp.crc == int(test_case['crc'], 0), "Invalid crc." + assert sbp.msg_type == int(test_case['msg_type'], 0), "Invalid msg_type." + assert sbp.sender == int(test_case['sender'], 0), "Invalid sender." + assert sbp.length == test_case['length'], "Invalid length." + assert base64.standard_b64encode(sbp.payload) == test_case['payload'], \ + "Invalid payload." + +def field_eq(p, e): + """ + Checks the field values of a parsed message for equality against + some ground truth value. + + Parameters + ---------- + p : object with dict-like attributed access + Parsed field contents. + e : object with dict-like attributed access + Expected field contents. + + Returns + ---------- + True if fields are equal, else False. + + """ + if isinstance(e, dict): + k = e.keys()[0] + if isinstance(e[k], list): + return k == p.keys()[0] and all(field_eq(i, j) for (i, j) in zip(p[k], e[k])) + elif isinstance(e[k], dict): + return k == p.keys()[0] and all(field_eq(p[k][i], j) for (i, j) in e[k].iteritems()) + else: + return k == p.keys()[0] and all(field_eq(p[i], j) for (i, j) in e.iteritems()) + else: + return p == e + +def _assert_msg(msg, test_case): + """ + Asserts that the parsed payload of an SBP message has the expected + field values. + + Parameters + ---------- + msg : Parsed SBP message. + Parsed SBP message. + test_case : dict + Unit test case for this message. + + """ + assert msg.__class__.__name__ == test_case['name'] + if test_case['fields']: + for field_name, field_value in test_case['fields'].iteritems(): + assert field_eq(msg.__dict__[field_name], field_value), \ + "Unequal field values: got %s, but expected %s!" \ + % (msg.__dict__[field_name], field_value) + +def _assert_sane_package(pkg_name, pkg): + """ + Sanity check the package collection of tests before actually + running the tests. + + Parameters + ---------- + pkg_name : str + Name of package to test + pkg : dict + Parsed contents of YAML file. + + """ + assert pkg_name in pkg['description'], "Not the right package!" + assert pkg_name in pkg['package'], "Not the right package!" + assert len(pkg['tests']) > 0, "Package has no tests!" + +def assert_package(test_filename, pkg_name): + """ + Runs unit tests for message bindings by reading a YAML unit test + specification, parsing a raw packet for each test, and then + asserting that SBP messages and parsed payloads have their intended + values. + + Parameters + ---------- + test_filename : str + Filepath to unit test specifications + pkg_name : str + Name of package to test + + """ + with open(test_filename, 'r+') as f: + pkg = yaml.load(f.read()) + _assert_sane_package(pkg_name, pkg) + for test_case in pkg['tests']: + sbp = SBP.unpack(base64.standard_b64decode(test_case['raw_packet'])) + _assert_sbp(sbp, test_case['sbp']) + _assert_msg(dispatch(sbp), test_case['msg']) diff --git a/spec/tests/yaml/swiftnav/sbp/test_acquisition.yaml b/spec/tests/yaml/swiftnav/sbp/test_acquisition.yaml new file mode 100644 index 0000000000..0a799f3faf --- /dev/null +++ b/spec/tests/yaml/swiftnav/sbp/test_acquisition.yaml @@ -0,0 +1,115 @@ +--- +description: Unit tests for swiftnav.sbp.acquisition v0.23. +generated_on: 2015-03-24 11:31:59.657065 +package: sbp.acquisition +tests: + +- msg: + fields: + cf: -7742.43212890625 + cp: 272.0 + prn: 24 + snr: 18.77777862548828 + module: sbp.acquisition + name: MsgAcqResult + msg_type: '0x15' + raw_packet: VRUAzAQN5DiWQQAAiEN18/HFGLWs + sbp: + crc: '0xacb5' + length: 13 + msg_type: '0x15' + payload: 5DiWQQAAiEN18/HFGA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + cf: -1998.0469970703125 + cp: 493.0 + prn: 25 + snr: 14.44444465637207 + module: sbp.acquisition + name: MsgAcqResult + msg_type: '0x15' + raw_packet: VRUAzAQNchxnQQCA9kOBwfnEGce/ + sbp: + crc: '0xbfc7' + length: 13 + msg_type: '0x15' + payload: chxnQQCA9kOBwfnEGQ== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + cf: 4245.849609375 + cp: 759.5 + prn: 26 + snr: 15.11111068725586 + module: sbp.acquisition + name: MsgAcqResult + msg_type: '0x15' + raw_packet: VRUAzAQNHMdxQQDgPUTMroRFGn/x + sbp: + crc: '0xf17f' + length: 13 + msg_type: '0x15' + payload: HMdxQQDgPUTMroRFGg== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + cf: -749.2676391601562 + cp: 209.0 + prn: 28 + snr: 17.44444465637207 + module: sbp.acquisition + name: MsgAcqResult + msg_type: '0x15' + raw_packet: VRUAzAQNOY6LQQAAUUMhUTvEHDz7 + sbp: + crc: '0xfb3c' + length: 13 + msg_type: '0x15' + payload: OY6LQQAAUUMhUTvEHA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + cf: 249.75587463378906 + cp: 928.5 + prn: 29 + snr: 16.55555534362793 + module: sbp.acquisition + name: MsgAcqResult + msg_type: '0x15' + raw_packet: VRUAzAQNx3GEQQAgaESBwXlDHRDR + sbp: + crc: '0xd110' + length: 13 + msg_type: '0x15' + payload: x3GEQQAgaESBwXlDHQ== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + cf: -2997.070556640625 + cp: 188.0 + prn: 0 + snr: 53.125 + module: sbp.acquisition + name: MsgAcqResult + msg_type: '0x15' + raw_packet: VRUAzAQNAIBUQgAAPEMhUTvFAG2F + sbp: + crc: '0x856d' + length: 13 + msg_type: '0x15' + payload: AIBUQgAAPEMhUTvFAA== + preamble: '0x55' + sender: '0x4cc' +version: '0.23' +... diff --git a/spec/tests/yaml/swiftnav/sbp/test_navigation.yaml b/spec/tests/yaml/swiftnav/sbp/test_navigation.yaml new file mode 100644 index 0000000000..e8e8915510 --- /dev/null +++ b/spec/tests/yaml/swiftnav/sbp/test_navigation.yaml @@ -0,0 +1,1009 @@ +--- +description: Unit tests for swiftnav.sbp.navigation v0.23. +generated_on: 2015-03-24 11:31:59.478763 +package: sbp.navigation +tests: + +- msg: + fields: + flags: 0 + ns: 130676 + tow: 416205300 + wn: 1836 + module: sbp.navigation + name: MsgGPSTime + msg_type: '0x100' + raw_packet: VQABzAQLLAf0yc4YdP4BAAACjQ== + sbp: + crc: '0x8d02' + length: 11 + msg_type: '0x100' + payload: LAf0yc4YdP4BAAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + flags: 0 + ns: -130616 + tow: 416205400 + wn: 1836 + module: sbp.navigation + name: MsgGPSTime + msg_type: '0x100' + raw_packet: VQABzAQLLAdYys4YyAH+/wADyg== + sbp: + crc: '0xca03' + length: 11 + msg_type: '0x100' + payload: LAdYys4YyAH+/wA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + flags: 0 + ns: 107849 + tow: 416205500 + wn: 1836 + module: sbp.navigation + name: MsgGPSTime + msg_type: '0x100' + raw_packet: VQABzAQLLAe8ys4YSaUBAADhdQ== + sbp: + crc: '0x75e1' + length: 11 + msg_type: '0x100' + payload: LAe8ys4YSaUBAAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + flags: 0 + ns: -107738 + tow: 416205600 + wn: 1836 + module: sbp.navigation + name: MsgGPSTime + msg_type: '0x100' + raw_packet: VQABzAQLLAcgy84YJlv+/wDA5g== + sbp: + crc: '0xe6c0' + length: 11 + msg_type: '0x100' + payload: LAcgy84YJlv+/wA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + flags: 0 + ns: 107941 + tow: 416205700 + wn: 1836 + module: sbp.navigation + name: MsgGPSTime + msg_type: '0x100' + raw_packet: VQABzAQLLAeEy84YpaUBAADoXw== + sbp: + crc: '0x5fe8' + length: 11 + msg_type: '0x100' + payload: LAeEy84YpaUBAAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + flags: 0 + ns: -376443 + tow: 416271985 + wn: 1836 + module: sbp.navigation + name: MsgGPSTime + msg_type: '0x100' + raw_packet: VQABzAQLLAdxzs8YhUH6/wBhmg== + sbp: + crc: '0x9a61' + length: 11 + msg_type: '0x100' + payload: LAdxzs8YhUH6/wA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 8 + tow: 416205300 + x: -2704370.23071671 + y: -4263209.768852571 + z: 3884632.160476233 + module: sbp.navigation + name: MsgPosECEF + msg_type: '0x200' + raw_packet: VQACzAQg9MnOGAogiB35oUTBauE0cUpDUME2fIoULKNNQQAACACt5Q== + sbp: + crc: '0xe5ad' + length: 32 + msg_type: '0x200' + payload: 9MnOGAogiB35oUTBauE0cUpDUME2fIoULKNNQQAACAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 8 + tow: 416205400 + x: -2704370.231990972 + y: -4263209.238942821 + z: 3884632.515552627 + module: sbp.navigation + name: MsgPosECEF + msg_type: '0x200' + raw_packet: VQACzAQgWMrOGFPhsR35oUTB1NZKT0pDUMHkoP1BLKNNQQAACAAiMA== + sbp: + crc: '0x3022' + length: 32 + msg_type: '0x200' + payload: WMrOGFPhsR35oUTB1NZKT0pDUMHkoP1BLKNNQQAACAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 8 + tow: 416205500 + x: -2704370.798992603 + y: -4263208.685579704 + z: 3884631.6499627293 + module: sbp.navigation + name: MsgPosECEF + msg_type: '0x200' + raw_packet: VQACzAQgvMrOGL5jRWb5oUTBsongK0pDUMGN+jHTK6NNQQAACACEnw== + sbp: + crc: '0x9f84' + length: 32 + msg_type: '0x200' + payload: vMrOGL5jRWb5oUTBsongK0pDUMGN+jHTK6NNQQAACAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 8 + tow: 416205600 + x: -2704368.695420795 + y: -4263206.244835725 + z: 3884630.888898498 + module: sbp.navigation + name: MsgPosECEF + msg_type: '0x200' + raw_packet: VQACzAQgIMvOGHKMA1n4oUTBdmOrj0lDUMENbcdxK6NNQQAACADcEA== + sbp: + crc: '0x10dc' + length: 32 + msg_type: '0x200' + payload: IMvOGHKMA1n4oUTBdmOrj0lDUMENbcdxK6NNQQAACAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 8 + tow: 416205700 + x: -2704368.2897845428 + y: -4263205.365082516 + z: 3884630.2962536444 + module: sbp.navigation + name: MsgPosECEF + msg_type: '0x200' + raw_packet: VQACzAQghMvOGO+oFyX4oUTBD4NdV0lDUMGxo+slK6NNQQAACAACyg== + sbp: + crc: '0xca02' + length: 32 + msg_type: '0x200' + payload: hMvOGO+oFyX4oUTBD4NdV0lDUMGxo+slK6NNQQAACAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 6 + tow: 416271985 + x: -2704373.5406212616 + y: -4263208.295121756 + z: 3884631.5700485427 + module: sbp.navigation + name: MsgPosECEF + msg_type: '0x200' + raw_packet: VQACzAQgcc7PGNcTM8X6oUTBXUbjEkpDUMHEWffIK6NNQQAABgAnbA== + sbp: + crc: '0x6c27' + length: 32 + msg_type: '0x200' + payload: cc7PGNcTM8X6oUTBXUbjEkpDUMHEWffIK6NNQQAABgA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 5 + tow: 416300100 + x: -3180 + y: -5284 + z: 5345 + module: sbp.navigation + name: MsgBaselineECEF + msg_type: '0x202' + raw_packet: VQICzAQURDzQGJTz//9c6///4RQAAAAABQDKIw== + sbp: + crc: '0x23ca' + length: 20 + msg_type: '0x202' + payload: RDzQGJTz//9c6///4RQAAAAABQA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 5 + tow: 416300200 + x: -3182 + y: -5286 + z: 5355 + module: sbp.navigation + name: MsgBaselineECEF + msg_type: '0x202' + raw_packet: VQICzAQUqDzQGJLz//9a6///6xQAAAAABQB2Ew== + sbp: + crc: '0x1376' + length: 20 + msg_type: '0x202' + payload: qDzQGJLz//9a6///6xQAAAAABQA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 5 + tow: 416300300 + x: -4147 + y: -5905 + z: 6375 + module: sbp.navigation + name: MsgBaselineECEF + msg_type: '0x202' + raw_packet: VQICzAQUDD3QGM3v///v6P//5xgAAAAABQBrRQ== + sbp: + crc: '0x456b' + length: 20 + msg_type: '0x202' + payload: DD3QGM3v///v6P//5xgAAAAABQA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 5 + tow: 416300400 + x: -4145 + y: -5905 + z: 6384 + module: sbp.navigation + name: MsgBaselineECEF + msg_type: '0x202' + raw_packet: VQICzAQUcD3QGM/v///v6P//8BgAAAAABQBDlA== + sbp: + crc: '0x9443' + length: 20 + msg_type: '0x202' + payload: cD3QGM/v///v6P//8BgAAAAABQA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 5 + tow: 416300500 + x: 2500 + y: -6211 + z: 9117 + module: sbp.navigation + name: MsgBaselineECEF + msg_type: '0x202' + raw_packet: VQICzAQU1D3QGMQJAAC95///nSMAAAAABQCjNQ== + sbp: + crc: '0x35a3' + length: 20 + msg_type: '0x202' + payload: 1D3QGMQJAAC95///nSMAAAAABQA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 5 + tow: 416300600 + x: 2498 + y: -6215 + z: 9130 + module: sbp.navigation + name: MsgBaselineECEF + msg_type: '0x202' + raw_packet: VQICzAQUOD7QGMIJAAC55///qiMAAAAABQBNYQ== + sbp: + crc: '0x614d' + length: 20 + msg_type: '0x202' + payload: OD7QGMIJAAC55///qiMAAAAABQA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + d: -8146 + e: 145 + flags: 0 + h_accuracy: 0 + n: 477 + n_sats: 5 + tow: 416300100 + v_accuracy: 0 + module: sbp.navigation + name: MsgBaselineNED + msg_type: '0x203' + raw_packet: VQMCzAQWRDzQGN0BAACRAAAALuD//wAAAAAFACRG + sbp: + crc: '0x4624' + length: 22 + msg_type: '0x203' + payload: RDzQGN0BAACRAAAALuD//wAAAAAFAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + d: -8154 + e: 145 + flags: 0 + h_accuracy: 0 + n: 482 + n_sats: 5 + tow: 416300200 + v_accuracy: 0 + module: sbp.navigation + name: MsgBaselineNED + msg_type: '0x203' + raw_packet: VQMCzAQWqDzQGOIBAACRAAAAJuD//wAAAAAFAHX2 + sbp: + crc: '0xf675' + length: 22 + msg_type: '0x203' + payload: qDzQGOIBAACRAAAAJuD//wAAAAAFAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + d: -9600 + e: -338 + flags: 0 + h_accuracy: 0 + n: 657 + n_sats: 5 + tow: 416300300 + v_accuracy: 0 + module: sbp.navigation + name: MsgBaselineNED + msg_type: '0x203' + raw_packet: VQMCzAQWDD3QGJECAACu/v//gNr//wAAAAAFADw4 + sbp: + crc: '0x383c' + length: 22 + msg_type: '0x203' + payload: DD3QGJECAACu/v//gNr//wAAAAAFAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + d: -9604 + e: -337 + flags: 0 + h_accuracy: 0 + n: 665 + n_sats: 5 + tow: 416300400 + v_accuracy: 0 + module: sbp.navigation + name: MsgBaselineNED + msg_type: '0x203' + raw_packet: VQMCzAQWcD3QGJkCAACv/v//fNr//wAAAAAFAKqV + sbp: + crc: '0x95aa' + length: 22 + msg_type: '0x203' + payload: cD3QGJkCAACv/v//fNr//wAAAAAFAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + d: -8655 + e: 5438 + flags: 0 + h_accuracy: 0 + n: 4844 + n_sats: 5 + tow: 416300500 + v_accuracy: 0 + module: sbp.navigation + name: MsgBaselineNED + msg_type: '0x203' + raw_packet: VQMCzAQW1D3QGOwSAAA+FQAAMd7//wAAAAAFAMMO + sbp: + crc: '0xec3' + length: 22 + msg_type: '0x203' + payload: 1D3QGOwSAAA+FQAAMd7//wAAAAAFAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + d: -8667 + e: 5438 + flags: 0 + h_accuracy: 0 + n: 4852 + n_sats: 5 + tow: 416300600 + v_accuracy: 0 + module: sbp.navigation + name: MsgBaselineNED + msg_type: '0x203' + raw_packet: VQMCzAQWOD7QGPQSAAA+FQAAJd7//wAAAAAFAEum + sbp: + crc: '0xa64b' + length: 22 + msg_type: '0x203' + payload: OD7QGPQSAAA+FQAAJd7//wAAAAAFAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 8 + tow: 416205300 + x: 4 + y: -43 + z: 12 + module: sbp.navigation + name: MsgVelECEF + msg_type: '0x204' + raw_packet: VQQCzAQU9MnOGAQAAADV////DAAAAAAACAB4Mw== + sbp: + crc: '0x3378' + length: 20 + msg_type: '0x204' + payload: 9MnOGAQAAADV////DAAAAAAACAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 8 + tow: 416205400 + x: 20 + y: 37 + z: 12 + module: sbp.navigation + name: MsgVelECEF + msg_type: '0x204' + raw_packet: VQQCzAQUWMrOGBQAAAAlAAAADAAAAAAACAB5ww== + sbp: + crc: '0xc379' + length: 20 + msg_type: '0x204' + payload: WMrOGBQAAAAlAAAADAAAAAAACAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 8 + tow: 416205500 + x: -21 + y: -6 + z: -50 + module: sbp.navigation + name: MsgVelECEF + msg_type: '0x204' + raw_packet: VQQCzAQUvMrOGOv////6////zv///wAACAAT8w== + sbp: + crc: '0xf313' + length: 20 + msg_type: '0x204' + payload: vMrOGOv////6////zv///wAACAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 8 + tow: 416205600 + x: 2 + y: 4 + z: 19 + module: sbp.navigation + name: MsgVelECEF + msg_type: '0x204' + raw_packet: VQQCzAQUIMvOGAIAAAAEAAAAEwAAAAAACABVyg== + sbp: + crc: '0xca55' + length: 20 + msg_type: '0x204' + payload: IMvOGAIAAAAEAAAAEwAAAAAACAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 8 + tow: 416205700 + x: -16 + y: -61 + z: 30 + module: sbp.navigation + name: MsgVelECEF + msg_type: '0x204' + raw_packet: VQQCzAQUhMvOGPD////D////HgAAAAAACAArKw== + sbp: + crc: '0x2b2b' + length: 20 + msg_type: '0x204' + payload: hMvOGPD////D////HgAAAAAACAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + accuracy: 0 + flags: 0 + n_sats: 6 + tow: 416271985 + x: 16 + y: 19 + z: -21 + module: sbp.navigation + name: MsgVelECEF + msg_type: '0x204' + raw_packet: VQQCzAQUcc7PGBAAAAATAAAA6////wAABgCoyA== + sbp: + crc: '0xc8a8' + length: 20 + msg_type: '0x204' + payload: cc7PGBAAAAATAAAA6////wAABgA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + d: -34 + e: 26 + flags: 0 + h_accuracy: 0 + n: -11 + n_sats: 8 + tow: 416205300 + v_accuracy: 0 + module: sbp.navigation + name: MsgVelNED + msg_type: '0x205' + raw_packet: VQUCzAQW9MnOGPX///8aAAAA3v///wAAAAAIAPO1 + sbp: + crc: '0xb5f3' + length: 22 + msg_type: '0x205' + payload: 9MnOGPX///8aAAAA3v///wAAAAAIAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + d: 26 + e: -3 + flags: 0 + h_accuracy: 0 + n: 34 + n_sats: 8 + tow: 416205400 + v_accuracy: 0 + module: sbp.navigation + name: MsgVelNED + msg_type: '0x205' + raw_packet: VQUCzAQWWMrOGCIAAAD9////GgAAAAAAAAAIABRf + sbp: + crc: '0x5f14' + length: 22 + msg_type: '0x205' + payload: WMrOGCIAAAD9////GgAAAAAAAAAIAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + d: 18 + e: -15 + flags: 0 + h_accuracy: 0 + n: -49 + n_sats: 8 + tow: 416205500 + v_accuracy: 0 + module: sbp.navigation + name: MsgVelNED + msg_type: '0x205' + raw_packet: VQUCzAQWvMrOGM/////x////EgAAAAAAAAAIAK+M + sbp: + crc: '0x8caf' + length: 22 + msg_type: '0x205' + payload: vMrOGM/////x////EgAAAAAAAAAIAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + d: -8 + e: -1 + flags: 0 + h_accuracy: 0 + n: 18 + n_sats: 8 + tow: 416205600 + v_accuracy: 0 + module: sbp.navigation + name: MsgVelNED + msg_type: '0x205' + raw_packet: VQUCzAQWIMvOGBIAAAD/////+P///wAAAAAIALjr + sbp: + crc: '0xebb8' + length: 22 + msg_type: '0x205' + payload: IMvOGBIAAAD/////+P///wAAAAAIAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + d: -66 + e: 19 + flags: 0 + h_accuracy: 0 + n: -13 + n_sats: 8 + tow: 416205700 + v_accuracy: 0 + module: sbp.navigation + name: MsgVelNED + msg_type: '0x205' + raw_packet: VQUCzAQWhMvOGPP///8TAAAAvv///wAAAAAIAHbX + sbp: + crc: '0xd776' + length: 22 + msg_type: '0x205' + payload: hMvOGPP///8TAAAAvv///wAAAAAIAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + d: 32 + e: 3 + flags: 0 + h_accuracy: 0 + n: -1 + n_sats: 6 + tow: 416271985 + v_accuracy: 0 + module: sbp.navigation + name: MsgVelNED + msg_type: '0x205' + raw_packet: VQUCzAQWcc7PGP////8DAAAAIAAAAAAAAAAGAFAy + sbp: + crc: '0x3250' + length: 22 + msg_type: '0x205' + payload: cc7PGP////8DAAAAIAAAAAAAAAAGAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + gdop: 65535 + hdop: 0 + pdop: 65535 + tdop: 64519 + tow: 4294967292 + vdop: 0 + module: sbp.navigation + name: MsgDops + msg_type: '0x206' + raw_packet: VQYCzAQO/P////////8H/AAAAAAgJQ== + sbp: + crc: '0x2520' + length: 14 + msg_type: '0x206' + payload: /P////////8H/AAAAAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + gdop: 269 + hdop: 340 + pdop: 243 + tdop: 114 + tow: 416272900 + vdop: 73 + module: sbp.navigation + name: MsgDops + msg_type: '0x206' + raw_packet: VQYCzAQOBNLPGA0B8wByAFQBSQCvIw== + sbp: + crc: '0x23af' + length: 14 + msg_type: '0x206' + payload: BNLPGA0B8wByAFQBSQA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + gdop: 269 + hdop: 340 + pdop: 243 + tdop: 114 + tow: 416273900 + vdop: 73 + module: sbp.navigation + name: MsgDops + msg_type: '0x206' + raw_packet: VQYCzAQO7NXPGA0B8wByAFQBSQDC4w== + sbp: + crc: '0xe3c2' + length: 14 + msg_type: '0x206' + payload: 7NXPGA0B8wByAFQBSQA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + gdop: 269 + hdop: 340 + pdop: 243 + tdop: 114 + tow: 416274900 + vdop: 73 + module: sbp.navigation + name: MsgDops + msg_type: '0x206' + raw_packet: VQYCzAQO1NnPGA0B8wByAFQBSQBmXQ== + sbp: + crc: '0x5d66' + length: 14 + msg_type: '0x206' + payload: 1NnPGA0B8wByAFQBSQA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + gdop: 269 + hdop: 339 + pdop: 243 + tdop: 114 + tow: 416275900 + vdop: 73 + module: sbp.navigation + name: MsgDops + msg_type: '0x206' + raw_packet: VQYCzAQOvN3PGA0B8wByAFMBSQD9VA== + sbp: + crc: '0x54fd' + length: 14 + msg_type: '0x206' + payload: vN3PGA0B8wByAFMBSQA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + gdop: 269 + hdop: 339 + pdop: 243 + tdop: 114 + tow: 416276900 + vdop: 73 + module: sbp.navigation + name: MsgDops + msg_type: '0x206' + raw_packet: VQYCzAQOpOHPGA0B8wByAFMBSQBKTA== + sbp: + crc: '0x4c4a' + length: 14 + msg_type: '0x206' + payload: pOHPGA0B8wByAFMBSQA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + flags: 0 + h_accuracy: 0 + height: 1.0012943775156375 + lat: 37.76243173344967 + lon: -122.38902888953618 + n_sats: 8 + tow: 416205300 + v_accuracy: 0 + module: sbp.navigation + name: MsgPosLLH + msg_type: '0x201' + raw_packet: VQECzAQi9MnOGKlM8FyX4UJAdHBt2eWYXsDOktFATQXwPwAAAAAIAFSJ + sbp: + crc: '0x8954' + length: 34 + msg_type: '0x201' + payload: 9MnOGKlM8FyX4UJAdHBt2eWYXsDOktFATQXwPwAAAAAIAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + flags: 0 + h_accuracy: 0 + height: 0.8655268744638001 + lat: 37.76243672765506 + lon: -122.3890321231515 + n_sats: 8 + tow: 416205400 + v_accuracy: 0 + module: sbp.navigation + name: MsgPosLLH + msg_type: '0x201' + raw_packet: VQECzAQiWMrOGBxG1YaX4UJA3YH95uWYXsAgMnRqZbLrPwAAAAAIADHn + sbp: + crc: '0xe731' + length: 34 + msg_type: '0x201' + payload: WMrOGBxG1YaX4UJA3YH95uWYXsAgMnRqZbLrPwAAAAAIAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + flags: 0 + h_accuracy: 0 + height: 0.20615086902140606 + lat: 37.76243146475766 + lon: -122.38904092086298 + n_sats: 8 + tow: 416205500 + v_accuracy: 0 + module: sbp.navigation + name: MsgPosLLH + msg_type: '0x201' + raw_packet: VQECzAQivMrOGKtJr1qX4UJAYvrjC+aYXsDilD7UJmPKPwAAAAAIAErr + sbp: + crc: '0xeb4a' + length: 34 + msg_type: '0x201' + payload: vMrOGKtJr1qX4UJAYvrjC+aYXsDilD7UJmPKPwAAAAAIAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + flags: 0 + h_accuracy: 0 + height: -2.7800915061277087 + lat: 37.762443632655156 + lon: -122.38903559942881 + n_sats: 8 + tow: 416205600 + v_accuracy: 0 + module: sbp.navigation + name: MsgPosLLH + msg_type: '0x201' + raw_packet: VQECzAQiIMvOGA+mwcCX4UJAsiGS9eWYXsCrpZWdoD0GwAAAAAAIAJG3 + sbp: + crc: '0xb791' + length: 34 + msg_type: '0x201' + payload: IMvOGA+mwcCX4UJAsiGS9eWYXsCrpZWdoD0GwAAAAAAIAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + flags: 0 + h_accuracy: 0 + height: -3.9020938562345213 + lat: 37.76244470914511 + lon: -122.38903706026538 + n_sats: 8 + tow: 416205700 + v_accuracy: 0 + module: sbp.navigation + name: MsgPosLLH + msg_type: '0x201' + raw_packet: VQECzAQihMvOGKtkycmX4UJAZbGy++WYXsAumdP7fDcPwAAAAAAIAIa8 + sbp: + crc: '0xbc86' + length: 34 + msg_type: '0x201' + payload: hMvOGKtkycmX4UJAZbGy++WYXsAumdP7fDcPwAAAAAAIAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + flags: 0 + h_accuracy: 0 + height: 1.057562688832796 + lat: 37.76242461187733 + lon: -122.3890695682817 + n_sats: 6 + tow: 416271985 + v_accuracy: 0 + module: sbp.navigation + name: MsgPosLLH + msg_type: '0x201' + raw_packet: VQECzAQicc7PGN3WMiGX4UJA4egLhOaYXsBgG6DaxuvwPwAAAAAGAK4U + sbp: + crc: '0x14ae' + length: 34 + msg_type: '0x201' + payload: cc7PGN3WMiGX4UJA4egLhOaYXsBgG6DaxuvwPwAAAAAGAA== + preamble: '0x55' + sender: '0x4cc' +version: '0.23' +... diff --git a/spec/tests/yaml/swiftnav/sbp/test_observation.yaml b/spec/tests/yaml/swiftnav/sbp/test_observation.yaml new file mode 100644 index 0000000000..ea5aa74e11 --- /dev/null +++ b/spec/tests/yaml/swiftnav/sbp/test_observation.yaml @@ -0,0 +1,369 @@ +--- +description: Unit tests for swiftnav.sbp.observation v0.23. +generated_on: 2015-03-24 11:31:59.766910 +package: sbp.observation +tests: + +- msg: + fields: + header: + ObservationHeader: + n_obs: 32 + t: + ObsGPSTime: + tow: 416205400 + wn: 1836 + obs: + PackedObsContent: + - L: + CarrierPhase: + f: 174 + i: -235696 + P: 2231495077 + cn0: 21 + lock: 38768 + prn: 0 + - L: + CarrierPhase: + f: 19 + i: 13563 + P: 1869850003 + cn0: 25 + lock: 21056 + prn: 2 + - L: + CarrierPhase: + f: 103 + i: 106804 + P: 2298000000 + cn0: 17 + lock: 54429 + prn: 5 + - L: + CarrierPhase: + f: 117 + i: 129163 + P: 2179721960 + cn0: 26 + lock: 37300 + prn: 8 + - L: + CarrierPhase: + f: 121 + i: 224769 + P: 2082264686 + cn0: 26 + lock: 7258 + prn: 15 + - L: + CarrierPhase: + f: 26 + i: 131900 + P: 1993973655 + cn0: 46 + lock: 54534 + prn: 22 + - L: + CarrierPhase: + f: 219 + i: -235729 + P: 2194259129 + cn0: 27 + lock: 64155 + prn: 30 + module: sbp.observation + name: MsgObs + msg_type: '0x45' + raw_packet: VUUAzARiWMrOGCwHIKXpAYVQZ/z/rhVwlwCTpXNv+zQAABMZQFICgLL4iDShAQBnEZ3UBejq64GL+AEAdRq0kQhu1hx8AW4DAHkaWhwPl5/ZdjwDAgAaLgbVFrm8yYIvZ/z/2xub+h4ucA== + sbp: + crc: '0x702e' + length: 98 + msg_type: '0x45' + payload: WMrOGCwHIKXpAYVQZ/z/rhVwlwCTpXNv+zQAABMZQFICgLL4iDShAQBnEZ3UBejq64GL+AEAdRq0kQhu1hx8AW4DAHkaWhwPl5/ZdjwDAgAaLgbVFrm8yYIvZ/z/2xub+h4= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + header: + ObservationHeader: + n_obs: 33 + t: + ObsGPSTime: + tow: 416205400 + wn: 1836 + obs: + PackedObsContent: + - L: + CarrierPhase: + f: 156 + i: -183560 + P: 2074245293 + cn0: 29 + lock: 53285 + prn: 31 + module: sbp.observation + name: MsgObs + msg_type: '0x45' + raw_packet: VUUAzAQUWMrOGCwHIa14onv4Mv3/nB0l0B/KDw== + sbp: + crc: '0xfca' + length: 20 + msg_type: '0x45' + payload: WMrOGCwHIa14onv4Mv3/nB0l0B8= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + header: + ObservationHeader: + n_obs: 32 + t: + ObsGPSTime: + tow: 416205600 + wn: 1836 + obs: + PackedObsContent: + - L: + CarrierPhase: + f: 242 + i: -236295 + P: 2231513016 + cn0: 20 + lock: 38768 + prn: 0 + - L: + CarrierPhase: + f: 210 + i: 13594 + P: 1869856131 + cn0: 26 + lock: 21056 + prn: 2 + - L: + CarrierPhase: + f: 183 + i: 107132 + P: 2298000000 + cn0: 19 + lock: 54429 + prn: 5 + - L: + CarrierPhase: + f: 215 + i: 129687 + P: 2179718442 + cn0: 26 + lock: 37300 + prn: 8 + - L: + CarrierPhase: + f: 132 + i: 225342 + P: 2082260424 + cn0: 27 + lock: 7258 + prn: 15 + - L: + CarrierPhase: + f: 3 + i: 132239 + P: 1993973752 + cn0: 49 + lock: 54534 + prn: 22 + - L: + CarrierPhase: + f: 225 + i: -236348 + P: 2194277408 + cn0: 26 + lock: 64155 + prn: 30 + module: sbp.observation + name: MsgObs + msg_type: '0x45' + raw_packet: VUUAzARiIMvOGCwHILgvAoX5ZPz/8hRwlwCDvXNvGjUAANIaQFICgLL4iHyiAQC3E53UBSrd64GX+gEA1xq0kQjIxRx8PnADAIQbWhwP+J/Zdo8EAgADMQbVFiAEyoLEZPz/4Rqb+h6sFg== + sbp: + crc: '0x16ac' + length: 98 + msg_type: '0x45' + payload: IMvOGCwHILgvAoX5ZPz/8hRwlwCDvXNvGjUAANIaQFICgLL4iHyiAQC3E53UBSrd64GX+gEA1xq0kQjIxRx8PnADAIQbWhwP+J/Zdo8EAgADMQbVFiAEyoLEZPz/4Rqb+h4= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + header: + ObservationHeader: + n_obs: 33 + t: + ObsGPSTime: + tow: 416205600 + wn: 1836 + obs: + PackedObsContent: + - L: + CarrierPhase: + f: 211 + i: -184045 + P: 2074260983 + cn0: 28 + lock: 53285 + prn: 31 + module: sbp.observation + name: MsgObs + msg_type: '0x45' + raw_packet: VUUAzAQUIMvOGCwHIfe1onsTMf3/0xwl0B+YSg== + sbp: + crc: '0x4a98' + length: 20 + msg_type: '0x45' + payload: IMvOGCwHIfe1onsTMf3/0xwl0B8= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + header: + ObservationHeader: + n_obs: 16 + t: + ObsGPSTime: + tow: 416271000 + wn: 1836 + obs: + PackedObsContent: + - L: + CarrierPhase: + f: 92 + i: 8209 + P: 1871702242 + cn0: 45 + lock: 20410 + prn: 2 + - L: + CarrierPhase: + f: 171 + i: 49927 + P: 2298000000 + cn0: 12 + lock: 63838 + prn: 5 + - L: + CarrierPhase: + f: 126 + i: 134157 + P: 2178477396 + cn0: 19 + lock: 44760 + prn: 8 + - L: + CarrierPhase: + f: 7 + i: 143721 + P: 2080732352 + cn0: 27 + lock: 5189 + prn: 15 + - L: + CarrierPhase: + f: 70 + i: -142917 + P: 2200152385 + cn0: 19 + lock: 16647 + prn: 30 + - L: + CarrierPhase: + f: 109 + i: -111250 + P: 2079310706 + cn0: 43 + lock: 51160 + prn: 31 + module: sbp.observation + name: MsgObs + msg_type: '0x45' + raw_packet: VUUAAABVmMrPGCwHEOLoj28RIAAAXC26TwKAsviIB8MAAKsMXvkFVO3YgQ0MAgB+E9iuCMB0BXxpMQIABxtFFA9BqSODu9H9/0YTB0EecsPve25N/v9tK9jHH4zE + sbp: + crc: '0xc48c' + length: 85 + msg_type: '0x45' + payload: mMrPGCwHEOLoj28RIAAAXC26TwKAsviIB8MAAKsMXvkFVO3YgQ0MAgB+E9iuCMB0BXxpMQIABxtFFA9BqSODu9H9/0YTB0EecsPve25N/v9tK9jHHw== + preamble: '0x55' + sender: '0x0' + +- msg: + fields: + header: + ObservationHeader: + n_obs: 16 + t: + ObsGPSTime: + tow: 416271200 + wn: 1836 + obs: + PackedObsContent: + - L: + CarrierPhase: + f: 154 + i: 8251 + P: 1871707673 + cn0: 45 + lock: 20410 + prn: 2 + - L: + CarrierPhase: + f: 243 + i: 50266 + P: 2298000000 + cn0: 14 + lock: 63838 + prn: 5 + - L: + CarrierPhase: + f: 32 + i: 134699 + P: 2178473393 + cn0: 21 + lock: 44760 + prn: 8 + - L: + CarrierPhase: + f: 174 + i: 144306 + P: 2080727580 + cn0: 28 + lock: 5189 + prn: 15 + - L: + CarrierPhase: + f: 72 + i: -143519 + P: 2200170036 + cn0: 19 + lock: 16647 + prn: 30 + - L: + CarrierPhase: + f: 144 + i: -111721 + P: 2079326011 + cn0: 43 + lock: 51160 + prn: 31 + module: sbp.observation + name: MsgObs + msg_type: '0x45' + raw_packet: VUUAAABVYMvPGCwHEBn+j287IAAAmi26TwKAsviIWsQAAPMOXvkFsd3YgSsOAgAgFdiuCBxiBXyyMwIArhxFFA807iODYc/9/0gTB0EeO//ve5dL/v+QK9jHH/cy + sbp: + crc: '0x32f7' + length: 85 + msg_type: '0x45' + payload: YMvPGCwHEBn+j287IAAAmi26TwKAsviIWsQAAPMOXvkFsd3YgSsOAgAgFdiuCBxiBXyyMwIArhxFFA807iODYc/9/0gTB0EeO//ve5dL/v+QK9jHHw== + preamble: '0x55' + sender: '0x0' +version: '0.23' +... diff --git a/spec/tests/yaml/swiftnav/sbp/test_piksi.yaml b/spec/tests/yaml/swiftnav/sbp/test_piksi.yaml new file mode 100644 index 0000000000..251635a01c --- /dev/null +++ b/spec/tests/yaml/swiftnav/sbp/test_piksi.yaml @@ -0,0 +1,561 @@ +--- +description: Unit tests for swiftnav.sbp.piksi v0.23. +generated_on: 2015-03-24 11:31:59.676598 +package: sbp.piksi +tests: + +- msg: + fields: null + module: sbp.piksi + name: MsgPrint + msg_type: '0x10' + raw_packet: VRAAzAQhSU5GTzogYWNxOiByZXN0YXJ0aW5nIFBSTiBzZWFyY2gKJEs= + sbp: + crc: '0x4b24' + length: 33 + msg_type: '0x10' + payload: SU5GTzogYWNxOiByZXN0YXJ0aW5nIFBSTiBzZWFyY2gK + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: null + module: sbp.piksi + name: MsgPrint + msg_type: '0x10' + raw_packet: VRAAzAQYSU5GTzogUGlrc2kgU3RhcnRpbmcuLi4KvEU= + sbp: + crc: '0x45bc' + length: 24 + msg_type: '0x10' + payload: SU5GTzogUGlrc2kgU3RhcnRpbmcuLi4K + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: null + module: sbp.piksi + name: MsgPrint + msg_type: '0x10' + raw_packet: VRAAzAQqSU5GTzogRmlybXdhcmUgVmVyc2lvbjogdjAuMTQtMzktZzViZjNmZWEK0R0= + sbp: + crc: '0x1dd1' + length: 42 + msg_type: '0x10' + payload: SU5GTzogRmlybXdhcmUgVmVyc2lvbjogdjAuMTQtMzktZzViZjNmZWEK + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: null + module: sbp.piksi + name: MsgPrint + msg_type: '0x10' + raw_packet: VRAAzAQiSU5GTzogQnVpbHQ6IE1hciAxOSAyMDE1IDE5OjA3OjAxCuQh + sbp: + crc: '0x21e4' + length: 34 + msg_type: '0x10' + payload: SU5GTzogQnVpbHQ6IE1hciAxOSAyMDE1IDE5OjA3OjAxCg== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: null + module: sbp.piksi + name: MsgPrint + msg_type: '0x10' + raw_packet: VRAAzARBSU5GTzogTm8gdGVsZW1ldHJ5IHJhZGlvIGZvdW5kIG9uIFVBUlRBLCBza2lwcGluZyBjb25maWd1cmF0aW9uLgpSUA== + sbp: + crc: '0x5052' + length: 65 + msg_type: '0x10' + payload: SU5GTzogTm8gdGVsZW1ldHJ5IHJhZGlvIGZvdW5kIG9uIFVBUlRBLCBza2lwcGluZyBjb25maWd1cmF0aW9uLgo= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: null + module: sbp.piksi + name: MsgPrint + msg_type: '0x10' + raw_packet: VRAAzARBSU5GTzogTm8gdGVsZW1ldHJ5IHJhZGlvIGZvdW5kIG9uIFVBUlRCLCBza2lwcGluZyBjb25maWd1cmF0aW9uLgr4bw== + sbp: + crc: '0x6ff8' + length: 65 + msg_type: '0x10' + payload: SU5GTzogTm8gdGVsZW1ldHJ5IHJhZGlvIGZvdW5kIG9uIFVBUlRCLCBza2lwcGluZyBjb25maWd1cmF0aW9uLgo= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + cpu: 0 + name: "main\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + stack_free: 2452 + module: sbp.piksi + name: MsgThreadState + msg_type: '0x17' + raw_packet: VRcAzAQabWFpbgAAAAAAAAAAAAAAAAAAAAAAAJQJAADk0Q== + sbp: + crc: '0xd1e4' + length: 26 + msg_type: '0x17' + payload: bWFpbgAAAAAAAAAAAAAAAAAAAAAAAJQJAAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + cpu: 512 + name: "idle\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + stack_free: 36 + module: sbp.piksi + name: MsgThreadState + msg_type: '0x17' + raw_packet: VRcAzAQaaWRsZQAAAAAAAAAAAAAAAAAAAAAAAiQAAACNdA== + sbp: + crc: '0x748d' + length: 26 + msg_type: '0x17' + payload: aWRsZQAAAAAAAAAAAAAAAAAAAAAAAiQAAAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + cpu: 371 + name: "NAP ISR\0\0\0\0\0\0\0\0\0\0\0\0\0" + stack_free: 1884 + module: sbp.piksi + name: MsgThreadState + msg_type: '0x17' + raw_packet: VRcAzAQaTkFQIElTUgAAAAAAAAAAAAAAAABzAVwHAADfqA== + sbp: + crc: '0xa8df' + length: 26 + msg_type: '0x17' + payload: TkFQIElTUgAAAAAAAAAAAAAAAABzAVwHAAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + cpu: 1 + name: "SBP\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + stack_free: 3052 + module: sbp.piksi + name: MsgThreadState + msg_type: '0x17' + raw_packet: VRcAzAQaU0JQAAAAAAAAAAAAAAAAAAAAAAABAOwLAAB7Lw== + sbp: + crc: '0x2f7b' + length: 26 + msg_type: '0x17' + payload: U0JQAAAAAAAAAAAAAAAAAAAAAAABAOwLAAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + cpu: 10 + name: "manage acq\0\0\0\0\0\0\0\0\0\0" + stack_free: 2428 + module: sbp.piksi + name: MsgThreadState + msg_type: '0x17' + raw_packet: VRcAzAQabWFuYWdlIGFjcQAAAAAAAAAAAAAKAHwJAAATBw== + sbp: + crc: '0x713' + length: 26 + msg_type: '0x17' + payload: bWFuYWdlIGFjcQAAAAAAAAAAAAAKAHwJAAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + cpu: 0 + name: "manage track\0\0\0\0\0\0\0\0" + stack_free: 2332 + module: sbp.piksi + name: MsgThreadState + msg_type: '0x17' + raw_packet: VRcAzAQabWFuYWdlIHRyYWNrAAAAAAAAAAAAABwJAABdMw== + sbp: + crc: '0x335d' + length: 26 + msg_type: '0x17' + payload: bWFuYWdlIHRyYWNrAAAAAAAAAAAAABwJAAA= + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + latency: + Latency: + avg: -1 + current: -1 + lmax: 0 + lmin: 0 + uart_a: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 0 + tx_throughput: 0.0 + uart_b: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 0 + tx_throughput: 0.0 + uart_ftdi: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 16 + tx_throughput: 12.40000057220459 + module: sbp.piksi + name: MsgUartState + msg_type: '0x18' + raw_packet: VRgAzAQ6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGdmRkEAAAAAAAAAABAA/////wAAAAAAAAAA/////3h7 + sbp: + crc: '0x7b78' + length: 58 + msg_type: '0x18' + payload: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGdmRkEAAAAAAAAAABAA/////wAAAAAAAAAA/////w== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + latency: + Latency: + avg: -1 + current: -1 + lmax: 0 + lmin: 0 + uart_a: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 0 + tx_throughput: 0.0 + uart_b: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 0 + tx_throughput: 0.0 + uart_ftdi: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 0 + tx_throughput: 0.06599999964237213 + module: sbp.piksi + name: MsgUartState + msg_type: '0x18' + raw_packet: VRgAzAQ6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIrhz0AAAAAAAAAAAAA/////wAAAAAAAAAA/////7If + sbp: + crc: '0x1fb2' + length: 58 + msg_type: '0x18' + payload: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIrhz0AAAAAAAAAAAAA/////wAAAAAAAAAA/////w== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + latency: + Latency: + avg: -1 + current: -1 + lmax: 0 + lmin: 0 + uart_a: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 0 + tx_throughput: 0.0 + uart_b: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 0 + tx_throughput: 0.0 + uart_ftdi: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 10 + tx_throughput: 0.13899999856948853 + module: sbp.piksi + name: MsgUartState + msg_type: '0x18' + raw_packet: VRgAzAQ6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARWDj4AAAAAAAAAAAoA/////wAAAAAAAAAA/////zVV + sbp: + crc: '0x5535' + length: 58 + msg_type: '0x18' + payload: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARWDj4AAAAAAAAAAAoA/////wAAAAAAAAAA/////w== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + latency: + Latency: + avg: -1 + current: -1 + lmax: 0 + lmin: 0 + uart_a: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 0 + tx_throughput: 0.0 + uart_b: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 0 + tx_throughput: 0.0 + uart_ftdi: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 0 + tx_throughput: 0.06599999964237213 + module: sbp.piksi + name: MsgUartState + msg_type: '0x18' + raw_packet: VRgAzAQ6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIrhz0AAAAAAAAAAAAA/////wAAAAAAAAAA/////7If + sbp: + crc: '0x1fb2' + length: 58 + msg_type: '0x18' + payload: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIrhz0AAAAAAAAAAAAA/////wAAAAAAAAAA/////w== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + latency: + Latency: + avg: -1 + current: -1 + lmax: 0 + lmin: 0 + uart_a: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0051282052882015705 + tx_buffer_level: 0 + tx_throughput: 0.0 + uart_b: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 2 + tx_throughput: 0.061538465321063995 + uart_ftdi: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 38 + tx_throughput: 0.5139999985694885 + module: sbp.piksi + name: MsgUartState + msg_type: '0x18' + raw_packet: VRgAzAQ6AAAAAIEKqDsAAAAAAADCD3w9AAAAAAAAAAACAIGVAz8AAAAAAAAAACYA/////wAAAAAAAAAA/////+Gy + sbp: + crc: '0xb2e1' + length: 58 + msg_type: '0x18' + payload: AAAAAIEKqDsAAAAAAADCD3w9AAAAAAAAAAACAIGVAz8AAAAAAAAAACYA/////wAAAAAAAAAA/////w== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + latency: + Latency: + avg: -1 + current: -1 + lmax: 0 + lmin: 0 + uart_a: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 2 + tx_throughput: 0.012000000104308128 + uart_b: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 2 + tx_throughput: 0.012000000104308128 + uart_ftdi: + UARTChannel: + crc_error_count: 0 + io_error_count: 0 + rx_buffer_level: 0 + rx_throughput: 0.0 + tx_buffer_level: 50 + tx_throughput: 1.2130000591278076 + module: sbp.piksi + name: MsgUartState + msg_type: '0x18' + raw_packet: VRgAzAQ6pptEPAAAAAAAAAAAAgCmm0Q8AAAAAAAAAAACAJZDmz8AAAAAAAAAADIA/////wAAAAAAAAAA/////0h+ + sbp: + crc: '0x7e48' + length: 58 + msg_type: '0x18' + payload: pptEPAAAAAAAAAAAAgCmm0Q8AAAAAAAAAAACAJZDmz8AAAAAAAAAADIA/////wAAAAAAAAAA/////w== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + num_hyps: 0 + module: sbp.piksi + name: MsgIarState + msg_type: '0x19' + raw_packet: VRkAzAQEAAAAAPs6 + sbp: + crc: '0x3afb' + length: 4 + msg_type: '0x19' + payload: AAAAAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + num_hyps: 1 + module: sbp.piksi + name: MsgIarState + msg_type: '0x19' + raw_packet: VRkAzAQEAQAAAE9M + sbp: + crc: '0x4c4f' + length: 4 + msg_type: '0x19' + payload: AQAAAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + num_hyps: 972 + module: sbp.piksi + name: MsgIarState + msg_type: '0x19' + raw_packet: VRkAzAQEzAMAAD2f + sbp: + crc: '0x9f3d' + length: 4 + msg_type: '0x19' + payload: zAMAAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + num_hyps: 971 + module: sbp.piksi + name: MsgIarState + msg_type: '0x19' + raw_packet: VRkAzAQEywMAABDO + sbp: + crc: '0xce10' + length: 4 + msg_type: '0x19' + payload: ywMAAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + num_hyps: 967 + module: sbp.piksi + name: MsgIarState + msg_type: '0x19' + raw_packet: VRkAzAQExwMAACKB + sbp: + crc: '0x8122' + length: 4 + msg_type: '0x19' + payload: xwMAAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + num_hyps: 957 + module: sbp.piksi + name: MsgIarState + msg_type: '0x19' + raw_packet: VRkAzAQEvQMAAPyr + sbp: + crc: '0xabfc' + length: 4 + msg_type: '0x19' + payload: vQMAAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: null + module: sbp.piksi + name: MsgBootloaderHandshake + msg_type: '0xb0' + raw_packet: VbAAzAQEdjEuMuhE + sbp: + crc: '0x44e8' + length: 4 + msg_type: '0xb0' + payload: djEuMg== + preamble: '0x55' + sender: '0x4cc' +version: '0.23' +... diff --git a/spec/tests/yaml/swiftnav/sbp/test_standard.yaml b/spec/tests/yaml/swiftnav/sbp/test_standard.yaml new file mode 100644 index 0000000000..71512b5c36 --- /dev/null +++ b/spec/tests/yaml/swiftnav/sbp/test_standard.yaml @@ -0,0 +1,37 @@ +--- +description: Unit tests for swiftnav.sbp.standard v0.23. +generated_on: 2015-03-24 11:31:59.831529 +package: sbp.standard +tests: + +- msg: + fields: + reserved: 0 + module: sbp.standard + name: MsgStartup + msg_type: '0xff00' + raw_packet: VQD/zAQEAAAAAJY/ + sbp: + crc: '0x3f96' + length: 4 + msg_type: '0xff00' + payload: AAAAAA== + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + flags: 0 + module: sbp.standard + name: MsgHeartbeat + msg_type: '0xffff' + raw_packet: Vf//zAQEAAAAAKuz + sbp: + crc: '0xb3ab' + length: 4 + msg_type: '0xffff' + payload: AAAAAA== + preamble: '0x55' + sender: '0x4cc' +version: '0.23' +... diff --git a/spec/tests/yaml/swiftnav/sbp/test_tracking.yaml b/spec/tests/yaml/swiftnav/sbp/test_tracking.yaml new file mode 100644 index 0000000000..42f6c26c7d --- /dev/null +++ b/spec/tests/yaml/swiftnav/sbp/test_tracking.yaml @@ -0,0 +1,301 @@ +--- +description: Unit tests for swiftnav.sbp.tracking v0.23. +generated_on: 2015-03-24 11:31:59.432050 +package: sbp.tracking +tests: + +- msg: + fields: + states: + TrackingChannelState: + - cn0: 5.2681565284729 + prn: 0 + state: 1 + - cn0: 1.2068965435028076 + prn: 27 + state: 1 + - cn0: 6.305882453918457 + prn: 2 + state: 1 + - cn0: 11.842391014099121 + prn: 7 + state: 1 + - cn0: 6.406779766082764 + prn: 8 + state: 1 + - cn0: 7.05142879486084 + prn: 15 + state: 1 + - cn0: 11.536842346191406 + prn: 22 + state: 1 + - cn0: 6.736263751983643 + prn: 30 + state: 1 + - cn0: 7.245614051818848 + prn: 31 + state: 1 + - cn0: 4.375722408294678 + prn: 5 + state: 1 + - cn0: -1.0 + prn: 14 + state: 0 + module: sbp.tracking + name: MsgTrackingState + msg_type: '0x16' + raw_packet: VRYAzARCAQC9lKhAARuWe5o/AQLKyclAAQdvej1BAQhXBM1AAQ9OpeFAARboljhBAR55j9dAAR8S3OdAAQXrBYxAAA4AAIC/Oek= + sbp: + crc: '0xe939' + length: 66 + msg_type: '0x16' + payload: AQC9lKhAARuWe5o/AQLKyclAAQdvej1BAQhXBM1AAQ9OpeFAARboljhBAR55j9dAAR8S3OdAAQXrBYxAAA4AAIC/ + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + states: + TrackingChannelState: + - cn0: 5.247252941131592 + prn: 0 + state: 1 + - cn0: 0.9884393215179443 + prn: 27 + state: 1 + - cn0: 6.298121929168701 + prn: 2 + state: 1 + - cn0: 12.005524635314941 + prn: 7 + state: 1 + - cn0: 6.464088439941406 + prn: 8 + state: 1 + - cn0: 6.468208312988281 + prn: 15 + state: 1 + - cn0: 11.792552947998047 + prn: 22 + state: 1 + - cn0: 6.596590995788574 + prn: 30 + state: 1 + - cn0: 7.169590473175049 + prn: 31 + state: 1 + - cn0: 5.035502910614014 + prn: 5 + state: 1 + - cn0: -1.0 + prn: 14 + state: 0 + module: sbp.tracking + name: MsgTrackingState + msg_type: '0x16' + raw_packet: VRYAzARCAQB/6adAARtcCn0/AQI3islAAQehFkBBAQjQ2c5AAQ+Q+85AARZMrjxBAR5GF9NAAR9JbeVAAQXXIqFAAA4AAIC/tIc= + sbp: + crc: '0x87b4' + length: 66 + msg_type: '0x16' + payload: AQB/6adAARtcCn0/AQI3islAAQehFkBBAQjQ2c5AAQ+Q+85AARZMrjxBAR5GF9NAAR9JbeVAAQXXIqFAAA4AAIC/ + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + states: + TrackingChannelState: + - cn0: 4.796703338623047 + prn: 0 + state: 1 + - cn0: 0.9127907156944275 + prn: 27 + state: 1 + - cn0: 6.24178409576416 + prn: 2 + state: 1 + - cn0: 12.573033332824707 + prn: 7 + state: 1 + - cn0: 6.131868362426758 + prn: 8 + state: 1 + - cn0: 6.693181991577148 + prn: 15 + state: 1 + - cn0: 11.875675201416016 + prn: 22 + state: 1 + - cn0: 6.856321811676025 + prn: 30 + state: 1 + - cn0: 7.206896781921387 + prn: 31 + state: 1 + - cn0: 4.526627063751221 + prn: 5 + state: 1 + - cn0: -1.0 + prn: 14 + state: 0 + module: sbp.tracking + name: MsgTrackingState + msg_type: '0x16' + raw_packet: VRYAzARCAQCYfplAARunrGk/AQKyvMdAAQclK0lBAQhEOMRAAQ+MLtZAARbEAj5BAR79ZttAAR/mnuZAAQUh2pBAAA4AAIC/5Rg= + sbp: + crc: '0x18e5' + length: 66 + msg_type: '0x16' + payload: AQCYfplAARunrGk/AQKyvMdAAQclK0lBAQhEOMRAAQ+MLtZAARbEAj5BAR79ZttAAR/mnuZAAQUh2pBAAA4AAIC/ + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + states: + TrackingChannelState: + - cn0: 11.941176414489746 + prn: 0 + state: 1 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + module: sbp.tracking + name: MsgTrackingState + msg_type: '0x16' + raw_packet: VRYAzARCAQAPDz9BAAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/z2Q= + sbp: + crc: '0x64cf' + length: 66 + msg_type: '0x16' + payload: AQAPDz9BAAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/ + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + states: + TrackingChannelState: + - cn0: 4.888888835906982 + prn: 0 + state: 1 + - cn0: 7.107142925262451 + prn: 2 + state: 1 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + module: sbp.tracking + name: MsgTrackingState + msg_type: '0x16' + raw_packet: VRYAzARCAQDHcZxAAQK3beNAAAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC//pI= + sbp: + crc: '0x92fe' + length: 66 + msg_type: '0x16' + payload: AQDHcZxAAQK3beNAAAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/ + preamble: '0x55' + sender: '0x4cc' + +- msg: + fields: + states: + TrackingChannelState: + - cn0: 2.6417911052703857 + prn: 0 + state: 1 + - cn0: 3.7407407760620117 + prn: 2 + state: 1 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + - cn0: -1.0 + prn: 0 + state: 0 + module: sbp.tracking + name: MsgTrackingState + msg_type: '0x16' + raw_packet: VRYAzARCAQAbEylAAQJMaG9AAAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/nbQ= + sbp: + crc: '0xb49d' + length: 66 + msg_type: '0x16' + payload: AQAbEylAAQJMaG9AAAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/AAAAAIC/ + preamble: '0x55' + sender: '0x4cc' +version: '0.23' +...