-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Clarification: Home Position Q #1839
Comments
Hi @flybrianfly Yes, q is a quaternion, but I don't know how it should work "for certain". HOME_POSITION used to be set SET_HOME_POSITION which would allow you to set The implementation in PX4 is here: https://github.com/PX4/PX4-Autopilot/blob/master/src/modules/mavlink/streams/HOME_POSITION.hpp matrix::Quatf q(matrix::Eulerf(0.f, 0.f, home.yaw));
q.copyTo(msg.q);
msg.approach_x = 0.f;
msg.approach_y = 0.f;
msg.approach_z = 0.f; ArduPilot sets it to [1,0,0,0] here: https://github.com/ArduPilot/ardupilot/blob/master/libraries/GCS_MAVLink/GCS_Common.cpp#L2495
I don't understand quaternions. To me that means the value is unreliable and should probably be deprecated. I'll see if I can get a better answer. @auturgy @julianoes If you have any thoughts on this, I'd appreciate them! |
Discussed in the MAV call. First shot at addressing it: #1843 |
I'm writing code for my MAVLink library for my company's flight stack to send the home position when the vehicle is armed. This is actually to facilitate a companion path planning computer to know the origin of the NED frame to convert mission items from a global to a local NED frame.
The home position message specifies q as a normal vector perpendicular to the surface and aligned with the heading. This makes sense and I assume that q is a quaternion. Is there more information or an example for how q should be computed? Of course quaternions can come in multiple orders (i.e. rotation first, rotation last, etc), so I think a little more clarity would help with general applicability of this message across flight stacks.
Also the approach_x, approach_y, and approach_z variables are a little confusing and seem to imply that for a fixed-wing aircraft, takeoff and landing should happen in opposite directions? Which doesn't make sense to me.
The text was updated successfully, but these errors were encountered: