Skip to content

Unify handling of losses and gains #14

@JuergHuber

Description

@JuergHuber

Gain and loss terms are handled differently for RAD and PCL. This should be unified in order to be consistent.

Active Radar

if math.isnan(prop_loss):
if (los_ok == 1) and (
fresnel_free == 1
): # here we use the free space model as always
snr = (
pt
+ lambda_sq
+ 2 * antenna_gain
+ t_bw_gain
+ dop_gain
+ rcs_start
- four_pi
- ktb
- 40 * np.log10(rng)
- noise_figure
- rf_loss
)
else:
return 0.0
else:
snr_old = (
pt
+ lambda_sq
+ 2 * antenna_gain
+ t_bw_gain
+ dop_gain
+ rcs_start
- four_pi
- ktb
- 40 * np.log10(rng)
- noise_figure
- rf_loss
)
snr = snr_old - 2 * (
prop_loss - free_space_loss
) # we simply remove the extra loss found by the propagation mode

PCL

snr_const = (
erp
+ 2.15
+ g_proc
+ Rx.gain
- abs(Rx.losses)
+ 10
* math.log10(
(c / (Tx.freq * 1e6)) ** 2
/ ((4.0 * math.pi) ** 3 * k * Rx.temp_sys * Rx.bandwidth * 1000)
)
)

snr_extra = (
snr_const
- snr_thresh
- atten_db_km * ((r_t + r_r) / 1000.0)
- 1 * rx_horiz_att
- 1 * tx_horiz_att
- 1 * tx_vert_att
- 1 * rx_vert_att
- 20 * math.log10(r_t * r_r)
) # "20 * log10( r_t*r_r ) " is the same as "10 * log10(r_t*r_t * r_r*r_r)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions