-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Add get_roll_deg, get_pitch_deg and get_yaw_deg to AHRS interface, start using them #28010
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
base: master
Are you sure you want to change the base?
Conversation
08df142
to
d006f5c
Compare
I've simplified this PR to simply add the new methods to the interface, not touching the existing creation of the yaw_sensor variables etc. I'm also not renaming (eg.) |
d006f5c
to
cc335b3
Compare
... there's still a bit of low-hanging fruit, too. |
cc335b3
to
b7b4723
Compare
@@ -7390,7 +7388,7 @@ void GCS_MAVLINK::send_high_latency2() const | |||
global_position_current.lng, // [degE7] Longitude | |||
global_position_current.alt * 0.01f, // [m] Altitude above mean sea level | |||
high_latency_target_altitude(), // [m] Altitude setpoint | |||
(((uint16_t)ahrs.yaw_sensor / 100) % 360) / 2, // [deg/2] Heading | |||
uint16_t(ahrs.get_yaw_deg()) / 2, // [deg/2] Heading |
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.
This should probably be changed to do floating-point division and rounding? Pre-existing problem.
.... there's a bug in toy_mode.cpp line 294 which we should fix once this is in. |
b7b4723
to
9f69da7
Compare
to take the place of yaw_sensor etc
9f69da7
to
416bf32
Compare
Replace withget_roll_rad
and get_roll_deg`, both floats.Now just adds get_roll_deg() etc.; renaming
get_roll_rad
(etc.) costs over 400 bytes on CubeOrange!