Use NAV_OFS parameters
This commit is contained in:
parent
2b147e4479
commit
6226ebb74f
2 changed files with 5 additions and 2 deletions
|
|
@ -221,7 +221,10 @@ float MarshConnector::get_parameter(const String &id) {
|
|||
}
|
||||
|
||||
Transform3D MarshConnector::get_aircraft() {
|
||||
return Transform3D{Basis{last_rotation}, last_location};
|
||||
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]}};
|
||||
}
|
||||
|
||||
Vector2 MarshConnector::get_cyclic() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue