Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SBF Parser Unit Test for SBF Block Detection #9

Open
surajRathi opened this issue Jul 3, 2021 · 0 comments
Open

SBF Parser Unit Test for SBF Block Detection #9

surajRathi opened this issue Jul 3, 2021 · 0 comments
Assignees

Comments

@surajRathi
Copy link
Member

We want to make sure, that we are detecting all of the SBF blocks in a given pcap file.
We can do this with the following process and then comparing the output with files in the test/data/sbf directory.

As in test/data/sbf/scripts/README.md,
First add the option MOSAIC_SBF_PRINT_ID using a compile time flag or adding add_compile_options(-DMOSAIC_SBF_PRINT_ID) to CMakeLists.txt.

When you run now, e,g.

suraj@ubuntu20 ~/ws_mel/src/mosaic_gnss_driver (git)-[clang-tidy-workflow] % rosrun mosaic_gnss_driver mosaic_gnss_driver_node _connection:="pcap" _stream:="sbf" _sbf_pvt_type="geodetic" _device:="test/data/sbf/003.pcap"
[ INFO] [1625292748.157543512]: Opening pcap file: /home/suraj/ws_mel/src/mosaic_gnss_driver/test/data/sbf/003.pcap
5914
5922
5914
5922
5914
5922
5914
5922
...

Pipe the output to | sort -r | uniq -c | sort -r | test/data/sbf/scripts/id_to_name.py

130 suraj@ubuntu20 ~/ws_mel/src/mosaic_gnss_driver (git)-[clang-tidy-workflow] % rosrun mosaic_gnss_driver mosaic_gnss_driver_node _connection:="pcap" _stream:="sbf" _sbf_pvt_type="geodetic" _device:="test/data/sbf/003.pcap"  | sort -r | uniq -c | sort -r | ./test/data/sbf/scripts/id_to_name.py
286967	4023	GALRawINAV	Galileo I/NAV navigation page
156904	4026	GLORawCA	GLONASS CA navigation string
126025	4047	BDSRaw	BeiDou navigation page
73998	5922	EndOfMeas	Measurement epoch marker
73998	5914	ReceiverTime	Current receiver and UTC time
73823	5921	EndOfPVT	PVT epoch marker
73823	5907	VelCovCartesian	Velocity covariance matrix (X, Y, Z)
73823	5906	PosCovGeodetic	Position covariance matrix (Lat, Lon, Alt)
73823	5905	PosCovCartesian	Position covariance matrix (X,Y, Z)
73823	4044	PosCart	Position, variance and baseline in Cartesian coordinates
...

and compare the output to test/data/sbf/003_blocks.txt.

You may want to disable/set to zero MOSAIC_GNSS_FAKE_SLEEP_TIME.

Originally posted by @surajRathi in #7 (comment)

@winwinashwin winwinashwin self-assigned this Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants