From 7fc30e17f8943255ded706d7a789ecead4aa96fb Mon Sep 17 00:00:00 2001 From: Adrian Bodenmann Date: Wed, 22 Nov 2023 14:07:52 +0000 Subject: [PATCH] Update CLI for converting oplab formatted data to acfr and where files are taken from --- src/auv_nav/auv_nav.py | 4 ---- src/auv_nav/convert.py | 9 +++++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/auv_nav/auv_nav.py b/src/auv_nav/auv_nav.py index 5081a75b..a2147c7e 100644 --- a/src/auv_nav/auv_nav.py +++ b/src/auv_nav/auv_nav.py @@ -166,14 +166,10 @@ def main(args=None): help="Converts an already processed dive to ACFR format", ) subparser_oplab_to_acfr.add_argument( - "-d", - "--dive-folder", dest="dive_folder", help="Input dive path.", ) subparser_oplab_to_acfr.add_argument( - "-o", - "--output-folder", dest="output_folder", help="Path where results will be written.", ) diff --git a/src/auv_nav/convert.py b/src/auv_nav/convert.py index 05e9674f..86c507f2 100644 --- a/src/auv_nav/convert.py +++ b/src/auv_nav/convert.py @@ -29,7 +29,7 @@ epoch_to_datetime, string_to_epoch, ) -from oplab import Console, Mission, Vehicle, get_processed_folder +from oplab import Console, Mission, Vehicle, get_raw_folder, get_processed_folder # fmt: on @@ -221,16 +221,17 @@ def oplab_to_acfr(args): Console.quit("Default behaviour: not to overwrite results") Console.info("Loading mission.yaml") - path_processed = get_processed_folder(args.dive_folder) - mission_file = path_processed / "mission.yaml" + path_raw = get_raw_folder(args.dive_folder) + mission_file = path_raw / "mission.yaml" mission = Mission(mission_file) - vehicle_file = path_processed / "vehicle.yaml" + vehicle_file = path_raw / "vehicle.yaml" vehicle = Vehicle(vehicle_file) origin_lat = mission.origin.latitude origin_lon = mission.origin.longitude + path_processed = get_processed_folder(args.dive_folder) json_list = list(path_processed.glob("json_*")) if len(json_list) == 0: Console.quit(