enable to show the MAC frame data rate.
parent
efbaf237e5
commit
a0b6f4484f
|
@ -33,16 +33,21 @@ The default value is aligned to LoRaWAN AS923.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
% python lorawan_toa.py -v 12 64
|
with the -v option, it shows the ToA as well as the related information.
|
||||||
|
|
||||||
|
% python lorawan_toa.py 12 64 -v
|
||||||
PHY payload size : 64 Bytes
|
PHY payload size : 64 Bytes
|
||||||
MAC payload size : 59 Bytes
|
MAC payload size : 59 Bytes
|
||||||
Spreading Factor : 12
|
Spreading Factor : 12
|
||||||
Band width : 125 kHz
|
Band width : 125 kHz
|
||||||
Low data rate opt.: enable
|
Low data rate opt. : enable
|
||||||
Explicit header : enable
|
Explicit header : enable
|
||||||
CR (coding rate) : 1 (4/5)
|
CR (coding rate) : 1 (4/5)
|
||||||
Preamble size : 8 symbols
|
Preamble size : 8 symbols
|
||||||
Time on Air : 2793.472 msec
|
Time on Air : 2793.472 msec
|
||||||
|
MAC frame data rate : 63.998 bps
|
||||||
|
|
||||||
|
without the -v option, it simply shows the ToA.
|
||||||
|
|
||||||
% python lorawan_toa.py --band-width=500 7 128
|
% python lorawan_toa.py --band-width=500 7 128
|
||||||
71.744
|
71.744
|
||||||
|
|
|
@ -99,10 +99,11 @@ if __name__ == "__main__" :
|
||||||
print "MAC payload size : %d Bytes" % (opt.n_size-5)
|
print "MAC payload size : %d Bytes" % (opt.n_size-5)
|
||||||
print "Spreading Factor : %d" % opt.n_sf
|
print "Spreading Factor : %d" % opt.n_sf
|
||||||
print "Band width : %d kHz" % opt.n_bw
|
print "Band width : %d kHz" % opt.n_bw
|
||||||
print "Low data rate opt.: %s" % ("enable" if opt.v_de else "disable")
|
print "Low data rate opt. : %s" % ("enable" if opt.v_de else "disable")
|
||||||
print "Explicit header : %s" % ("disable" if opt.v_h else "enable")
|
print "Explicit header : %s" % ("disable" if opt.v_h else "enable")
|
||||||
print "CR (coding rate) : %d (4/%d)" % (opt.n_cr, 4+opt.n_cr)
|
print "CR (coding rate) : %d (4/%d)" % (opt.n_cr, 4+opt.n_cr)
|
||||||
print "Preamble size : %d symbols" % opt.n_preamble
|
print "Preamble size : %d symbols" % opt.n_preamble
|
||||||
print "Time on Air : %.3f msec" % t_frame
|
print "Time on Air : %.3f msec" % t_frame
|
||||||
|
print "MAC frame data rate : %.3f bps" % (opt.n_size-5 / t_frame)
|
||||||
else:
|
else:
|
||||||
print "%.3f" % t_frame
|
print "%.3f" % t_frame
|
||||||
|
|
Loading…
Reference in New Issue