Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move position correction code to lib #8

Merged
merged 20 commits into from
Feb 13, 2025
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
87d41c1
chore: set cpp17 version in CMakeLists
eduardacoppo Jan 23, 2025
ae7baa6
chore: move position correction code to lib
eduardacoppo Jan 23, 2025
f7a3fde
chore: make speed threshold configurable
eduardacoppo Jan 23, 2025
f770128
test: add tests and LOG_ERROR messages
eduardacoppo Jan 23, 2025
cbf14f3
fix: do not throw error if no correction
eduardacoppo Jan 27, 2025
defb0b6
chore: use getRad() when checking for nan
eduardacoppo Jan 28, 2025
4c8e3b4
chore: change variable name to match convention
eduardacoppo Jan 28, 2025
9d1e750
fix: ref position relative to the vessel's center
eduardacoppo Jan 28, 2025
8752944
chore: give speed thresh a clearer name
eduardacoppo Jan 29, 2025
abb2680
fix: remove static_cast for ref pos elements
eduardacoppo Jan 29, 2025
22bb4d3
fix: fix passing arguments,
eduardacoppo Jan 29, 2025
aa9795f
chore: change log type to debug instead of error
eduardacoppo Jan 29, 2025
d33ceec
chore: remove unnecessary suffix in sensor2vessel_pos
eduardacoppo Jan 30, 2025
bb37d99
fix/chore: fix passing arguments and refactor code
eduardacoppo Jan 30, 2025
926f3f7
fix: write more robust tests and add tests
eduardacoppo Feb 4, 2025
6bfcd04
chore: use snake_case for variables
eduardacoppo Feb 5, 2025
dd6fb6d
chore: propagate status
eduardacoppo Feb 5, 2025
c144c10
fix/chore: fix nomenclature and move transform code
eduardacoppo Feb 5, 2025
899444b
test: add checks for timestamp in the tests
eduardacoppo Feb 5, 2025
3541563
chore: minor fixes
eduardacoppo Feb 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: give speed thresh a clearer name
eduardacoppo committed Jan 29, 2025
commit 8752944fa8488443e20b54019e35d14ab609e7e7
4 changes: 2 additions & 2 deletions src/AIS.cpp
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ using namespace marnav;
using namespace nmea0183;

double constexpr KNOTS_TO_MS = 0.514444;
double constexpr MIN_SPEED_THRESHOLD = 0.2;
double constexpr MIN_SPEED_FOR_VALID_COURSE = 0.2;

AIS::AIS(Driver& driver)
: mDriver(driver)
@@ -150,7 +150,7 @@ std::pair<Eigen::Quaterniond, ais_base::PositionCorrectionStatus> vesselToWorldO
}
else if (course_over_ground.has_value() &&
!std::isnan(course_over_ground.value().getRad()) &&
speed_over_ground >= MIN_SPEED_THRESHOLD) {
speed_over_ground >= MIN_SPEED_FOR_VALID_COURSE) {
return {Eigen::Quaterniond(Eigen::AngleAxisd(course_over_ground.value().getRad(),
Eigen::Vector3d::UnitZ())),
ais_base::PositionCorrectionStatus::POSITION_CENTERED_USING_COURSE};