Commit fca3bd5
authored
Fix: correct longitude distance calculation for snapping radius (#79)
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.
Found by: @visakhraja1 parent f9a560a commit fca3bd5
1 file changed
Lines changed: 9 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
431 | 430 | | |
432 | 431 | | |
433 | 432 | | |
| |||
611 | 610 | | |
612 | 611 | | |
613 | 612 | | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
618 | 616 | | |
619 | 617 | | |
620 | 618 | | |
| |||
704 | 702 | | |
705 | 703 | | |
706 | 704 | | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
711 | 708 | | |
712 | 709 | | |
713 | 710 | | |
| |||
0 commit comments