Update localization_log_gamma_model.py
This commit is contained in:
parent
acb197ef95
commit
b6d31f5366
|
|
@ -31,11 +31,15 @@ def fittingSingle(filepath, args):
|
||||||
if data is None:
|
if data is None:
|
||||||
print("err: failed to load file {}".format(filepath))
|
print("err: failed to load file {}".format(filepath))
|
||||||
return
|
return
|
||||||
|
location_gt_tmp = None
|
||||||
location_gt = [float('nan'), float('nan')]
|
location_gt = [float('nan'), float('nan')]
|
||||||
if len(data) is 2:
|
if len(data) is 2:
|
||||||
data, location_gt_tmp = data
|
data, location_gt_tmp = data
|
||||||
if location_gt_tmp is not None:
|
if location_gt_tmp is not None:
|
||||||
location_gt = location_gt_tmp * 0.1
|
location_gt = location_gt_tmp * 0.1
|
||||||
|
if args.only_true_loc and location_gt_tmp is None:
|
||||||
|
print("skipped as no groundtruth")
|
||||||
|
return
|
||||||
|
|
||||||
# convert data matrix to vectors
|
# convert data matrix to vectors
|
||||||
rx_locs, rx_rsses = convert_mat_to_vector(data, block_size=0.1)
|
rx_locs, rx_rsses = convert_mat_to_vector(data, block_size=0.1)
|
||||||
|
|
@ -173,6 +177,13 @@ if __name__ == '__main__':
|
||||||
default=None,
|
default=None,
|
||||||
help='output results to filepath'
|
help='output results to filepath'
|
||||||
)
|
)
|
||||||
|
p.add_argument(
|
||||||
|
'--with-true-loc-only', '--trueloc-only',
|
||||||
|
dest='only_true_loc',
|
||||||
|
action='store_true',
|
||||||
|
default=False,
|
||||||
|
help='only parse known location ones'
|
||||||
|
)
|
||||||
try:
|
try:
|
||||||
args = p.parse_args()
|
args = p.parse_args()
|
||||||
except BaseException as e:
|
except BaseException as e:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue