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

BLOCKETTE 1001 Micro_sec: is it used? #3

Open
luca-s opened this issue Oct 23, 2023 · 2 comments
Open

BLOCKETTE 1001 Micro_sec: is it used? #3

luca-s opened this issue Oct 23, 2023 · 2 comments

Comments

@luca-s
Copy link

luca-s commented Oct 23, 2023

Dear developers,

I had a quick look at the source code and I can see the blockette 1001 is properly read and the field Micro_sec populated.

However the Micro_sec value doesn't seem to be used to correct the record start time. Is this intended? Is this a feature not implemented yet?

Thank you for your help and for this code.

@beaudu
Copy link
Member

beaudu commented Oct 24, 2023

Dear @luca-s,
Thanks for your feedback. Actually the blockette is read but not used for correction. The reason is that datenum format is limited to ~10 µsec precision for present dates (due to coding strategy which is the number of days from year zero as double precision) so calculating the correction in the present script will have no effect below 10 µsec, leading to corrupted/rounded times.
The best solution to address this issue is certainly to move to the new datetime object introduced in 2014b. But for previous versions of Matlab, a manual workaround is to work with relative dates, for example by removing 2000 years before applying the microsecond correction block by block, using the blockette value in the returned structure.
Any other advice or idea are welcome !

@luca-s
Copy link
Author

luca-s commented Oct 24, 2023

Thank you @beaudu for your detailed reply. Now I understand what the problem is. I will see if I manage to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants