Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

Thanks in advance

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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