I have an SBET (Smoothed Best Estimate of Trajectory) file that I would like to read in python. I found these links that discuss options for reading/writing SBET files, but I was wondering if our community could offer some advice for handling SBET files in python?
I think your research is consistent with what I saw the one type I needed to read this format in Python. It's relatively simple to parse as a binary file and there are code examples of how to do so, but it's not part of any commonly used library you'll be able to grab with setup tools.
I think stuff like this:
is perhaps a little convoluted in implementation. You might run into J2000GPS time conversion issues which there are good resources online for.
I think opening the file with: with open(filename) as file:
would make the implementation a little more Pythonic. Also, reading the entire file with struct.unpack into a list then writing a filter function to remove bad entries using the builtin filter function:
Would be a good idea to clean up the convoluted if/then/try/except block structure, too. I've mostly worked with proprietary formats that have similar issues, though, rather than this format directly.