Skip to content

Fix: correct longitude distance calculation for snapping radius#79

Merged
jjokella merged 1 commit into
tsmp-pdaf-patchedfrom
tsmp-pdaf-patched-ang-dist
May 4, 2026
Merged

Fix: correct longitude distance calculation for snapping radius#79
jjokella merged 1 commit into
tsmp-pdaf-patchedfrom
tsmp-pdaf-patched-ang-dist

Conversation

@jjokella
Copy link
Copy Markdown
Collaborator

@jjokella jjokella commented May 4, 2026

The previous logic in obs_SM_pdafomi produced a wrong deltax whenever both model and observation longitudes exceeded 180 deg.

Replaced with shortest-arc formula from obs_LST_pdafomi: compute the absolute difference and wrap it by subtracting from 360 if it exceeds 180.

Found by: @visakhraja

The previous logic produced a wrong `deltax` whenever both model and
observation longitudes exceeded 180 deg.

Replaced with shortest-arc formula from LSTDA: compute the absolute
difference and wrap it by subtracting from 360 if it exceeds 180.
@jjokella jjokella merged commit fca3bd5 into tsmp-pdaf-patched May 4, 2026
1 check passed
@jjokella jjokella deleted the tsmp-pdaf-patched-ang-dist branch May 4, 2026 08:56
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

Successfully merging this pull request may close these issues.

1 participant