-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
145 changed files
with
59,155 additions
and
1,352 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
65 changes: 65 additions & 0 deletions
65
java/test/auto_check_sbp_acquisition_MsgAcqResultTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()); | ||
} | ||
} |
Oops, something went wrong.