-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
389fdd3
to
6e295cc
Compare
and make some improvements in the code.
6e295cc
to
ae7baa6
Compare
use std::string instead of constexpr char and fix tests
and log the message directly instead of saving it to a variable
and fix wrong documentation about it
and avoid using null values in converter
5f9fc60
to
9d1e750
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix those ... there's quite a few.
floating point types are already implicitly converted into double, if necessary
pass utm_converter as const& and write const& instead of const <TYPE>&, for consistency. Pass position as std::optional
because they're expected behaviors, we shouldn't treat them as errors
@wvmcastro agreed. I'm complaining about this regularly on reviews too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All agreed with Wellington. I think you're good after that and that having both me, jhonas and wellington is a bit too much. I'm accepting the PR to get myself out of the loop.
062f045
to
926f3f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, write a test that assures the applyPositionCorrection
output time field is equal to the one of position
parameter
Having "_gps" as a suffix for the sensor and vessel positions in GPS coordinates was intended to distinguish GPS coordinates from UTM ones. That was a confusing nomenclature, but as I had no better idea, I just went on with it. After discussing the matter, I agreed naming these variables simply "sensor_pos" and "vessel_pos" were a satisfactory way to make this distinction, as the type "ais_base::Position" is known to have coordinates in the GPS system. So this solved the nomenclature problem. Part of the transformation to get the vessel position in the world frame was left inside the "convertUTMToGPS" function. This was fixed by moving it to the now called "computeVesselPositionInWorldFrame".
and rename vessel2world_gps to vessel_pos, as is done in the code
09e37e3
to
899444b
Compare
Approving it since it does not have nothing actually wrong, just some minor enhancements |
Depends on:
What is this PR for
[sc-67374]
This PR moves the position correction code here
How I did it
Moved the code that was previously in
drivers/orogen/nmea0183
and made some improvements in the code.Results, How I tested
Unit tests
Checklist