2

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?

0

1 Answer 1

3

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:

http://arsf-dan.nerc.ac.uk/trac/attachment/wiki/Processing/SyntheticDataset/sbet_handler.py

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:

http://docs.python.org/3.2/library/functions.html#filter

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.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.