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

xtf can't be read correctly #5

Closed
hanhaixingxing opened this issue Apr 8, 2019 · 3 comments
Closed

xtf can't be read correctly #5

hanhaixingxing opened this issue Apr 8, 2019 · 3 comments

Comments

@hanhaixingxing
Copy link

The XTF file that write by your own can't be read by plot_sonar_bathy

@oysstu
Copy link
Owner

oysstu commented Apr 8, 2019

Fixed e86b8a7

@oysstu oysstu closed this as completed Apr 8, 2019
@Thomas-Mccabe
Copy link

The plotter won't read anything that you make that has n_samp being anything other than 20.

It produces an error:
RuntimeError: XTF packet does not start with the correct identifier (0xFACE).

@oysstu oysstu reopened this Aug 2, 2022
@oysstu
Copy link
Owner

oysstu commented Sep 16, 2022

This happened because an index was automatically created when read was called, this was stored next to the xtf-file and used automatically if present. I originally did it this way to parse huge xtf files, in order to speed up selective reading of a subset of datagrams. The index didn't contain any hash or other checks, and would assume that a file of the same base name was the same file as had been indexed.

The write example creates an example output with the same name repeatedly, and pyxtf would try to read it using the index for a previous file version.

I have disabled indexing by default in 861a5f5. This should resolve the issue for normal use.

@oysstu oysstu closed this as completed Sep 16, 2022
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

3 participants