diff --git a/localization_log_gamma_model.py b/localization_log_gamma_model.py index 6d464cf..f5ea354 100644 --- a/localization_log_gamma_model.py +++ b/localization_log_gamma_model.py @@ -31,11 +31,15 @@ def fittingSingle(filepath, args): if data is None: print("err: failed to load file {}".format(filepath)) return + location_gt_tmp = None location_gt = [float('nan'), float('nan')] if len(data) is 2: data, location_gt_tmp = data if location_gt_tmp is not None: 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 rx_locs, rx_rsses = convert_mat_to_vector(data, block_size=0.1) @@ -173,6 +177,13 @@ if __name__ == '__main__': default=None, 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: args = p.parse_args() except BaseException as e: