You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gimbal attitude is reported in a weird "hypothetical earth-frame quaternion if you pointed the aircraft north", which I'm guessing is important for some historical compatibility reason. The gimbal attitude status message at least has a flag indicating if it's using this. The camera FOV status message does not have such a flag, as such I believe the quaternion should be the proper Earth-frame quaternion. You could check the gimbal attitude message, to see if the gimbal is using the "yaw is body-frame", but I think the FOV message should contain all the information needed by a GCS to turn pixel coordinates into a 3D ray vector.
In my testing during Mission Planner development, I'm using this dirty hack as a workaround:
// getting corresponding mount instance for camera
AP_Mount* mount = AP::mount();
if (mount == nullptr) {
return;
}
Quaternion quat;
Location loc;
Location poi_loc;
if (!mount->get_poi(get_mount_instance(), quat, loc, poi_loc)) {
return;
}
float roll, pitch, yaw;
mount->get_attitude_euler(get_mount_instance(), roll, pitch, yaw);
quat.from_euler(radians(roll), radians(pitch), radians(yaw) + AP::ahrs().get_yaw());
Platform
[ x ] All
The text was updated successfully, but these errors were encountered:
Gimbal attitude is reported in a weird "hypothetical earth-frame quaternion if you pointed the aircraft north", which I'm guessing is important for some historical compatibility reason. The gimbal attitude status message at least has a flag indicating if it's using this. The camera FOV status message does not have such a flag, as such I believe the quaternion should be the proper Earth-frame quaternion. You could check the gimbal attitude message, to see if the gimbal is using the "yaw is body-frame", but I think the FOV message should contain all the information needed by a GCS to turn pixel coordinates into a 3D ray vector.
In my testing during Mission Planner development, I'm using this dirty hack as a workaround:
Platform
[ x ] All
The text was updated successfully, but these errors were encountered: