diff --git a/src/pybathy_maps/src/pymap_draper.cpp b/src/pybathy_maps/src/pymap_draper.cpp index c478d110..64415116 100644 --- a/src/pybathy_maps/src/pymap_draper.cpp +++ b/src/pybathy_maps/src/pymap_draper.cpp @@ -60,6 +60,7 @@ PYBIND11_MODULE(map_draper, m) { const xtf_sss_ping::PingsT&, const MapImageDraper::BoundsT&, const csv_asvp_sound_speed::EntriesT&>()) .def("set_sidescan_yaw", &MapImageDraper::set_sidescan_yaw, "Set yaw correction of sidescan with respect to nav frame") + .def("set_tracing_map_size", &MapImageDraper::set_tracing_map_size, "Set size of slice of map where we do ray tracing. Smaller makes it faster but you might cut off valid sidescan angles") .def("set_ray_tracing_enabled", &MapImageDraper::set_ray_tracing_enabled, "Set if ray tracing through water layers should be enabled. Takes more time but is recommended if there are large speed differences") .def("set_vehicle_mesh", &MapImageDraper::set_vehicle_mesh, "Provide the viewer with a vehicle model, purely for visualization") .def("show", &MapImageDraper::show, "Start the draping, and show the visualizer") @@ -75,6 +76,7 @@ PYBIND11_MODULE(map_draper, m) { const xtf_sss_ping::PingsT&, const MeasDataDraper::BoundsT&, const csv_asvp_sound_speed::EntriesT&>()) .def("set_sidescan_yaw", &MeasDataDraper::set_sidescan_yaw, "Set yaw correction of sidescan with respect to nav frame") + .def("set_tracing_map_size", &MeasDataDraper::set_tracing_map_size, "Set size of slice of map where we do ray tracing. Smaller makes it faster but you might cut off valid sidescan angles") .def("set_ray_tracing_enabled", &MeasDataDraper::set_ray_tracing_enabled, "Set if ray tracing through water layers should be enabled. Takes more time but is recommended if there are large speed differences") .def("set_vehicle_mesh", &MeasDataDraper::set_vehicle_mesh, "Provide the viewer with a vehicle model, purely for visualization") .def("show", &MeasDataDraper::show, "Start the draping, and show the visualizer") diff --git a/src/pybathy_maps/src/pypatch_draper.cpp b/src/pybathy_maps/src/pypatch_draper.cpp index b8b321b4..f5791811 100644 --- a/src/pybathy_maps/src/pypatch_draper.cpp +++ b/src/pybathy_maps/src/pypatch_draper.cpp @@ -50,6 +50,7 @@ PYBIND11_MODULE(patch_draper, m) { const xtf_sss_ping::PingsT&, const PatchDraper::BoundsT&, const csv_asvp_sound_speed::EntriesT&>()) .def("set_sidescan_yaw", &PatchDraper::set_sidescan_yaw, "Set yaw correction of sidescan with respect to nav frame") + .def("set_tracing_map_size", &PatchDraper::set_tracing_map_size, "Set size of slice of map where we do ray tracing. Smaller makes it faster but you might cut off valid sidescan angles") .def("set_ray_tracing_enabled", &PatchDraper::set_ray_tracing_enabled, "Set if ray tracing through water layers should be enabled. Takes more time but is recommended if there are large speed differences") .def("set_vehicle_mesh", &PatchDraper::set_vehicle_mesh, "Provide the viewer with a vehicle model, purely for visualization") .def("show", &PatchDraper::show, "Start the draping, and show the visualizer") diff --git a/src/pydata_tools/src/pyall_data.cpp b/src/pydata_tools/src/pyall_data.cpp index 4c3579c7..02ecb1d3 100644 --- a/src/pydata_tools/src/pyall_data.cpp +++ b/src/pydata_tools/src/pyall_data.cpp @@ -104,4 +104,5 @@ PYBIND11_MODULE(all_data, m) { m.def("convert_matched_entries", &convert_matched_entries, "Matches xtf_sss_ping::PingsT and csv_nav_entry::EntriesT and assign pos data to pings"); m.def("match_attitude", &match_attitude, "Match mbes_ping::PingsT and all_nav_attitude::EntriesT and assign attitude data to pings"); m.def("convert_sound_speeds", &convert_sound_speeds, "Convert all_mbes_ping::PingsT to csv_asvp_sound_speed::EntriesT"); + m.def("convert_attitudes", &convert_attitudes, "Convert all_nav_attitude::EntriesT to std_data::attitude_entry::EntriesT"); } diff --git a/src/pydata_tools/src/pystd_data.cpp b/src/pydata_tools/src/pystd_data.cpp index 3eff82f3..464988a1 100644 --- a/src/pydata_tools/src/pystd_data.cpp +++ b/src/pydata_tools/src/pystd_data.cpp @@ -49,7 +49,19 @@ PYBIND11_MODULE(std_data, m) { .def_static("parse_folder", &parse_folder_from_str, "Parse nav_entry from folder of ASCII files exported from NaviEdit") .def_static("read_data", &read_data_from_str, "Read nav_entry::Entries from .cereal file"); + py::class_(m, "attitude_entry", "Standard class interface for working with attitude data") + .def(py::init<>()) + .def_readwrite("time_string_", &attitude_entry::time_string_, "Member") + .def_readwrite("time_stamp_", &attitude_entry::time_stamp_, "Member") + .def_readwrite("first_in_file_", &attitude_entry::first_in_file_, "Member") + .def_readwrite("roll", &attitude_entry::roll, "Member") + .def_readwrite("pitch", &attitude_entry::pitch, "Member") + .def_readwrite("yaw", &attitude_entry::yaw, "Member") + .def_readwrite("heave", &attitude_entry::heave, "Member") + .def_static("read_data", &read_data_from_str, "Read attitude_entry::Entries from .cereal file"); + m.def("write_data", &write_data_from_str, "Write mbes_ping::PingsT to .cereal file"); m.def("write_data", &write_data_from_str, "Write nav_entry::EntriesT to .cereal file"); + m.def("write_data", &write_data_from_str, "Write attitude_entry::EntriesT to .cereal file"); } diff --git a/src/pydata_tools/src/pyxtf_data.cpp b/src/pydata_tools/src/pyxtf_data.cpp index 34bf2749..6b5dae3f 100644 --- a/src/pydata_tools/src/pyxtf_data.cpp +++ b/src/pydata_tools/src/pyxtf_data.cpp @@ -53,4 +53,5 @@ PYBIND11_MODULE(xtf_data, m) { m.def("make_waterfall_image", &make_eigen_waterfall_image, "Create a cv2 waterfall image from xtf_sss_ping::PingsT"); m.def("show_waterfall_image", &show_waterfall_image, "Show a waterfall image created from xtf_sss_ping::PingsT"); m.def("correct_sensor_offset", &correct_sensor_offset, "Move the sensor onboard the vehicle with a given translation"); + m.def("match_attitudes", &match_attitudes, "Get roll and pitch from std_data::attitude_entry by matching timestamps"); }