steo85it / pyxover

Altimetry Analysis Tools For Planetary Geodesy
GNU General Public License v3.0
3 stars 3 forks source link

Double xovers found - No xovers found #8

Closed wdesprats closed 5 months ago

wdesprats commented 1 year ago

Using the altimetry data available in: https://www.dropbox.com/s/iptb3j6sncibcyu/xov_test.tar?dl=0

One can find in total 4 xovers between the 4 ground tracks (e.g., in the northern hemisphere), but these 4 xovers should results in 2 unique xovers. Moreover, one xover is missing (see double-and-missing-xovers

steo85it commented 1 year ago

Thanks for the working example, will work on it and let you know!

steo85it commented 1 year ago

My initial check got the code finding 4 rough xovers:

   xOvID        LON        LAT        orbA        orbB  mla_idA  mla_idB
0      0  40.991457  65.504032  3105010813  3105090518   313919  1086232
1      1  42.127041  69.837094  3105010813  3105090233   315113   986369
2      2  39.648267  70.141551  3105011057  3105090518   413847  1084965
3      3  40.766980  73.106953  3105011057  3105090233   414666   985603

and 3 fine xovers (the one at lat~73N is excluded, not exactly sure why yet). However, I couldn't find those double xovers you have been mentioning...

steo85it commented 1 year ago

About that missing xover ~73N, there seems to be some issue in either reprojecting between rough and fine xov search, or something else causing a difference of 20km between the 2 tracks: intersect_3105011057_3105090233_ as opposed to a more typical configuration like this one: intersect_3105010813_3105090233_ This causes the xover not to be detected, but I'm not yet sure why. All other xovs look fine for me.

wdesprats commented 1 year ago

I checked again, more thoroughly this time, and there are indeed no double xovers ...I actually plotted the xover on each ground tracks. The differences between the two points were coming from the numerical differences when computing the lat/long from the time of the first ground track, and the time on the second ground track. But the two points actually comes the same xover. Sorry for this unnecessary check...

steo85it commented 1 year ago

Ok, thanks for confirming and no problem, there is anyway an issue with the missing xover that it would be good to solve.

steo85it commented 6 months ago

is this still an active issue?

wdesprats commented 5 months ago

I found out some crossovers were excluded because during the rough search, at least two intersections were found. In the image below, one can see an intersection is clearly off. image

I'm not sure what is the reason why the intersection function is finding wrong intersection, but in a future update, in case more than one intersection is found, a safety check would be added to remove wrong intersection, in case their distance from each ground tracks is more an 10x the mean sampling distance.

In case more than one intersection is found, a warning message will be displayed, and the associated ground track combination will be excluded.

wdesprats commented 5 months ago

The variable checked for the find of a rough xover was not reinitialized at the proper location. The previously found xover was appended to the list of found xovers until a new xover was found, leading to duplicates in the final list of rough xovers.