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() {
|
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() {
|
Vector2 MarshConnector::get_cyclic() {
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ private:
|
||||||
LOCAL_FRAME_LON,
|
LOCAL_FRAME_LON,
|
||||||
PARAM_COUNT,
|
PARAM_COUNT,
|
||||||
};
|
};
|
||||||
float parameters[PARAM_COUNT] = {0.0, 0.0, 0.0, 0.0, 0.0};
|
float parameters[PARAM_COUNT] = {90.0, -100.0, 300.0, 0.0, 0.0};
|
||||||
const String parameter_names[PARAM_COUNT] = {
|
const String parameter_names[PARAM_COUNT] = {
|
||||||
// "FOG_DENSITY",
|
// "FOG_DENSITY",
|
||||||
"NAV_OFS_HDG", "NAV_OFS_X", "NAV_OFS_Y",
|
"NAV_OFS_HDG", "NAV_OFS_X", "NAV_OFS_Y",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue