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

integer overflow when calculating azimuth in FURUNO scn files #137

Closed
giacant opened this issue Oct 24, 2023 · 1 comment · Fixed by #138
Closed

integer overflow when calculating azimuth in FURUNO scn files #137

giacant opened this issue Oct 24, 2023 · 1 comment · Fixed by #138
Labels
bug Something isn't working

Comments

@giacant
Copy link

giacant commented Oct 24, 2023

  • xradar version: 0.4.0
  • Python version: 3.11
  • Operating System: Ubuntu 22.0.4

Description

Problem with calculation of the azimuth values in a specific file at these lines:

self._data["azimuth"] = np.fmod(
angles[:, 1] + self.header["azimuth_offset"], 36000

1010_radar.scn[22020].gz

What I Did

If you look this post, you can see what i did

https://openradar.discourse.group/t/problem-with-snc-file/335/3

@kmuehlbauer
Copy link
Collaborator

OMG, what a terrible bug. Here we have a nice example of integer overflow.

My guess why this did not surface earlier is, that the azimuth_offset was always less than 29526 (65536 - 36000).

@kmuehlbauer kmuehlbauer changed the title calculation of the azimuth values in a specific file integer overflow when calculating azimuth in FURUNO scn files Oct 25, 2023
@kmuehlbauer kmuehlbauer added the bug Something isn't working label Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants