Skip to content

Commit 85a042a

Browse files
Indicate depth in tooltips and add markers for camera trace in auv_path
1 parent 24c67ef commit 85a042a

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/auv_nav/plot/plot_process_data.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
"""
3-
Copyright (c) 2022, University of Southampton
3+
Copyright (c) 2022-2025, University of Southampton
44
All rights reserved.
55
Licensed under the BSD 3-Clause License.
66
See LICENSE.md file in the project root for full license information.
@@ -83,8 +83,6 @@ def make_data(
8383
hovertext="",
8484
opacity=1,
8585
):
86-
if "usbl" in name:
87-
mode = "lines+markers"
8886
data_dict = {
8987
"x": eastings,
9088
"y": northings,
@@ -1476,12 +1474,17 @@ def plot_2d_deadreckoning(
14761474

14771475
for i in plotly_list_static:
14781476
Console.info(f"Processing {i[0]} ({len(i[1])} entries)")
1477+
if ("usbl" in i[0]) or ("camera" in i[0]):
1478+
mode = "lines+markers"
1479+
else:
1480+
mode = "lines"
14791481
try:
14801482
make_data(
14811483
figure,
14821484
i[0],
14831485
[float(j.eastings) for j in i[1]],
14841486
[float(j.northings) for j in i[1]],
1487+
mode=mode,
14851488
visibility=i[2],
14861489
hoverinfo="x+y+text",
14871490
hovertext=[
@@ -1491,6 +1494,7 @@ def plot_2d_deadreckoning(
14911494
"%Y/%m/%d %H:%M:%S.%f", time.gmtime(j.epoch_timestamp)
14921495
)[:-3]
14931496
+ " (UTC)"
1497+
+ f"<br>depth: {j.depth} m"
14941498
+ (f"<br>filename: {j.filename}" if hasattr(j, "filename") else "")
14951499
for j in i[1]
14961500
]

0 commit comments

Comments
 (0)