Skip to content
Snippets Groups Projects
Commit 3b2327c8 authored by rink's avatar rink
Browse files

fix problems when incoming lon,lat off grid

parent 04314509
No related branches found
No related tags found
No related merge requests found
......@@ -117,8 +117,8 @@ class GEOSNavigation:
lamda_sat = np.arcsin(-r_2/np.sqrt(r_1*r_1 + r_2*r_2 + r_3*r_3))
theta_sat = np.arctan(r_3/r_1)
np.where(r_1 > self.h, lamda_sat == np.nan, lamda_sat)
np.where(r_1 > self.h, theta_sat == np.nan, theta_sat)
lamda_sat = np.where(r_1 > self.h, np.nan, lamda_sat)
theta_sat = np.where(r_1 > self.h, np.nan, theta_sat)
return lamda_sat, theta_sat
......@@ -149,8 +149,8 @@ class GEOSNavigation:
def earth_to_lc_s(self, lons, lats):
lamda, theta = self.earth_to_sat_s(lons, lats)
cc, ll = self.sat_to_lc(lamda, theta)
np.where(np.isnan(cc), cc == -1, cc)
np.where(np.isnan(ll), ll == -1, ll)
cc = np.where(np.isnan(lamda), -1, cc)
ll = np.where(np.isnan(theta), -1, ll)
return cc, ll
def earth_to_indexs(self, lons, lats, len_x):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment