Fix order of applying NAV_OFS
This commit is contained in:
parent
6226ebb74f
commit
ec4c9c7947
1 changed files with 3 additions and 2 deletions
|
|
@ -223,8 +223,9 @@ float MarshConnector::get_parameter(const String &id) {
|
|||
Transform3D MarshConnector::get_aircraft() {
|
||||
float heading_rad = parameters[NAV_OFS_HDG] * Math_PI / 180.0;
|
||||
Quaternion heading_offset = Quaternion(Vector3(0, 1, 0), heading_rad);
|
||||
Quaternion rotation = heading_offset * last_rotation;
|
||||
return Transform3D{Basis{rotation}, last_location + Vector3{-parameters[NAV_OFS_Y], 0.0, parameters[NAV_OFS_X]}};
|
||||
Transform3D offset{Basis{heading_offset}, Vector3{-parameters[NAV_OFS_Y], 0.0, parameters[NAV_OFS_X]}};
|
||||
Transform3D marsh{Basis{last_rotation}, last_location};
|
||||
return offset * marsh;
|
||||
}
|
||||
|
||||
Vector2 MarshConnector::get_cyclic() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue