Skip to content
Snippets Groups Projects
Commit 3263cffe authored by tomrink's avatar tomrink
Browse files

slight mod to visibility test

parent 32c3b684
No related branches found
No related tags found
No related merge requests found
......@@ -95,8 +95,9 @@ class GEOSNavigation:
r_1 = self.h - r_earth * np.cos(geocentric_lat) * np.cos(geographic_lon - self.sub_lon)
r_2 = -r_earth * np.cos(geocentric_lat) * np.sin(geographic_lon - self.sub_lon)
r_3 = r_earth * np.sin(geocentric_lat)
r = np.sqrt(r_1*r_1 + r_2*r_2 + r_3*r_3)
if r_1 > self.h:
if r >= self.h:
return np.nan, np.nan
if self.scan_geom == 'GEOS':
......@@ -120,6 +121,7 @@ class GEOSNavigation:
r_1 = self.h - r_earth * np.cos(geocentric_lat) * np.cos(geographic_lon - self.sub_lon)
r_2 = -r_earth * np.cos(geocentric_lat) * np.sin(geographic_lon - self.sub_lon)
r_3 = r_earth * np.sin(geocentric_lat)
r = np.sqrt(r_1*r_1 + r_2*r_2 + r_3*r_3)
if self.scan_geom == 'GEOS':
lamda_sat = np.arctan(-r_2/r_1)
......@@ -128,8 +130,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)
lamda_sat = np.where(r_1 > self.h, np.nan, lamda_sat)
theta_sat = np.where(r_1 > self.h, np.nan, theta_sat)
lamda_sat = np.where(r > self.h, np.nan, lamda_sat)
theta_sat = np.where(r > self.h, np.nan, theta_sat)
return lamda_sat, theta_sat
......
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