-
Notifications
You must be signed in to change notification settings - Fork 170
Open
Labels
Description
Describe the bug
itur.models.itu530.multipath_loss returns wrong results for A in the shallow fading region. This is due to a missing bracket in step 3b. Here's how to fix it:
def step_3b(p_0, At, A):
...
q_t = ((qa_p - 2) /
- (1 + 0.3 * 10 ** (-At / 20) * 10 ** (-0.016 * At)) -
+ ((1 + 0.3 * 10 ** (-At / 20)) * 10 ** (-0.016 * At)) -
4.3 * (10**(-At / 20) + At / 800))
...And here's the relevant fragment of the recommendation:

To Reproduce
With the original code, plot of p_W vs fade depth contains a discontinuity, which probably shouldn't happen (the curves in figure 3 of the recommendation are smooth):
import numpy as np
import matplotlib.pyplot as plt
from itur.models import itu530
A = np.linspace(0,30,100)
p = itu530.multipath_loss(lat=22.443907, lon=-74.220397, h_e=40, h_r=40, d=20, f=18, A=A)
plt.plot(A,p)
plt.xlabel("fade depth [dB]")
plt.ylabel("% avg worst month")
plt.yscale("log")
plt.show()Expected behavior
After applying the suggested change, the discontinuity becomes negligibly small (still, shouldn't it be perfectly smooth???)

Reactions are currently unavailable
