Skip to content

Commit

Permalink
regenerate all
Browse files Browse the repository at this point in the history
  • Loading branch information
woodfell committed Nov 21, 2023
1 parent d83ea21 commit 17c20c9
Show file tree
Hide file tree
Showing 134 changed files with 59,144 additions and 1,341 deletions.
Binary file modified docs/sbp.pdf
Binary file not shown.
65 changes: 65 additions & 0 deletions java/test/auto_check_sbp_acquisition_MsgAcqResultTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/* Copyright (C) 2015-2022 Swift Navigation Inc.
* Contact: https://support.swiftnav.com
*
* 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.
*/
package com.swiftnav.sbp.test;

// This file was auto-generated from spec/tests/yaml/swiftnav/sbp/acquisition/test_MsgAcqResult.yaml
// by generate.py. Do not modify by hand!


import com.swiftnav.sbp.SBPMessage;
import com.swiftnav.sbp.acquisition.MsgAcqResult;
import java.math.BigInteger;
import org.json.JSONObject;
import org.junit.Test;

public class auto_check_sbp_acquisition_MsgAcqResultTest {

public static boolean debug = false;
private static final double DELTA = 1e-15;

@Test
public void test1() throws Throwable {
if (debug) System.out.format("%n%s%n", "auto_check_sbp_acquisition_MsgAcqResultTest.test1");
byte[] payload =
new byte[] {
(byte) 0, (byte) 0, (byte) 104, (byte) 65, (byte) 102, (byte) 102, (byte) 144,
(byte) 66, (byte) 205, (byte) 196, (byte) 0, (byte) 70, (byte) 8, (byte) 0,
};
SBPMessage sbp = new SBPMessage(0x04c3, 0x2f, payload);
MsgAcqResult msg = new MsgAcqResult(sbp);
JSONObject json = msg.toJSON();
Number value;
Number expected;
org.junit.Assert.assertEquals(msg.cf, 8.24120019531250000e+03, DELTA);
org.junit.Assert.assertEquals(msg.cn0, 1.45000000000000000e+01, DELTA);
org.junit.Assert.assertEquals(msg.cp, 7.21999969482421875e+01, DELTA);
value = msg.sid.code;
if (value instanceof BigInteger) {
org.junit.Assert.assertTrue(
"'" + msg.sid.code + "' != '" + 0 + "'", value.equals(BigInteger.valueOf(0L)));
} else {
value = value.longValue();
expected = 0L;
org.junit.Assert.assertEquals(value, expected);
}
value = msg.sid.sat;
if (value instanceof BigInteger) {
org.junit.Assert.assertTrue(
"'" + msg.sid.sat + "' != '" + 8 + "'", value.equals(BigInteger.valueOf(8L)));
} else {
value = value.longValue();
expected = 8L;
org.junit.Assert.assertEquals(value, expected);
}

org.junit.Assert.assertNotEquals("", msg.getFriendlyName());
}
}
Loading

0 comments on commit 17c20c9

Please sign in to comment.