Commit f799e686 authored by Andreas Theodosiou's avatar Andreas Theodosiou 🐧

Merge branch 'line_of_sight_bistatic-fix' into 'develop'

Line of sight bistatic fix

See merge request !3
parents 98d31245 3aec2c9b
......@@ -19,7 +19,16 @@ __email__ = "F.LopezDekker@tudeft.nl"
Swath = namedtuple(
"Swath",
["lat", "lon", "incident", "Northing", "GP_mask", "LoS_satcoord", "R", "xyz",],
[
"lat",
"lon",
"incident",
"Northing",
"GP_mask",
"LoS_satcoord",
"R",
"xyz",
],
)
Swaths = namedtuple("Swaths", ["master_swath", "slave_swath"])
......@@ -181,11 +190,12 @@ class SingleSwath(keplerian.SingleOrbit):
squint=0,
companion_delay=0,
):
"""Initialise SingleSwath
"""
"""Initialise SingleSwath"""
# Call SingleOrbit initialization
super().__init__(
orb_type=orb_type, conffile=par_file, companion_delay=companion_delay,
orb_type=orb_type,
conffile=par_file,
companion_delay=companion_delay,
)
cfgdata = cfg.ConfigFile(drtls.get_par_file(par_file))
# create look angle vector
......@@ -223,14 +233,6 @@ class SingleSwath(keplerian.SingleOrbit):
master_orb_data = drorb.SingleOrbit(conffile=par_file)
self.asc_idx = master_orb_data.asc_idx
self.desc_idx = master_orb_data.desc_idx
# swath_master, swath_data = line_of_sight_bistatic(
# la_vector,
# master_orb_data.r_ecef,
# self.r_ecef,
# master_orb_data.v_ecef,
# self.v_ecef,
# look=look,
# )
swath_master, swath_data = line_of_sight(
(la_vector, master_orb_data.r_ecef, master_orb_data.v_ecef),
(la_vector, self.r_ecef, self.v_ecef),
......@@ -507,7 +509,11 @@ class SingleSwath(keplerian.SingleOrbit):
# Interpolation
interpol_results = [
interpolate.griddata(
(lon, lat), x, (lon_i_asc, lat_i_asc), method="linear", fill_value=999,
(lon, lat),
x,
(lon_i_asc, lat_i_asc),
method="linear",
fill_value=999,
)
for x in (
inc_angle,
......@@ -667,12 +673,9 @@ class SingleSwathBistatic(object):
# Get lat, lon, incident & Northing information for both satellite when
# look at the same points on the ground
swath_master, swath_comp = line_of_sight_bistatic(
la_vector,
self.master_orbit.r_ecef,
self.slave_orbit.r_ecef,
self.master_orbit.v_ecef,
self.slave_orbit.v_ecef,
swath_master, swath_comp = line_of_sight(
(la_vector, self.master_orbit.r_ecef, self.master_orbit.v_ecef),
(la_vector, self.slave_orbit.r_ecef, self.slave_orbit.v_ecef),
look=look,
)
self.results = Swaths(swath_master, swath_comp)
......@@ -728,7 +731,8 @@ class SingleSwathBistatic(object):
# Look for
mid_range = int(self.lats.shape[1] / 2)
asclats = self.lats[
self.master_orbit.asc_idx[0] : self.master_orbit.asc_idx[1], mid_range,
self.master_orbit.asc_idx[0] : self.master_orbit.asc_idx[1],
mid_range,
]
dsclats = self.lats[self.master_orbit.asc_idx[1] :, mid_range]
self.__asc_latind = (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment