Skip to main content
. 2021 Jan 20;21(3):695. doi: 10.3390/s21030695
Algorithm 1: NS ADR Algorithm for a given ED.
Input: SF, PT, SFmin=7, Margin = 10 dB
SNRmax=max{last20uplinkpacketsreceived},
SNRmin given in Table 3 by setting SF,
SNRmargin=SNRmaxSNRminMargin,
Nstep=SNRmargin3
Output: SF, PT
1 if Nstep>0 then(
2  while Nstep>0 & SF>SFmin do
3   (SF=SF1
4   Nstep=Nstep1
5  while Nstep>0 & PT>PTmin do
6   (PT=PT3dB
7   Nstep=Nstep1
8 else(
9  while Nstep<0 & PTtemp<PTmax do
10   (PT=PT+3dB
11   Nstep=Nstep+1
12 return SF, PT