Bugfix: correct calculation of range and realtive bearing when parent is not the main model.
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
This commit is contained in:
parent
b838691f50
commit
bbea07e8b1
1 changed files with 2 additions and 2 deletions
|
@ -243,6 +243,7 @@ void FGAIWingman::formateToAC(double dt){
|
|||
double p_hdg, p_pch, p_rll, p_agl, p_ht, p_wow = 0;
|
||||
|
||||
setTgtOffsets(dt, 25);
|
||||
_setUserPos();
|
||||
|
||||
if (_pnode != 0) {
|
||||
setParentPos();
|
||||
|
@ -253,7 +254,6 @@ void FGAIWingman::formateToAC(double dt){
|
|||
setOffsetPos(_parentpos, p_hdg, p_pch, p_rll);
|
||||
setSpeed(_p_spd_node->getDoubleValue());
|
||||
}else {
|
||||
_setUserPos();
|
||||
p_hdg = manager->get_user_heading();
|
||||
p_pch = manager->get_user_pitch();
|
||||
p_rll = manager->get_user_roll();
|
||||
|
@ -341,6 +341,7 @@ void FGAIWingman::Join(double dt) {
|
|||
double p_hdg, p_pch, p_rll = 0;
|
||||
|
||||
setTgtOffsets(dt, 25);
|
||||
_setUserPos();
|
||||
|
||||
if (_pnode != 0) {
|
||||
setParentPos();
|
||||
|
@ -351,7 +352,6 @@ void FGAIWingman::Join(double dt) {
|
|||
parent_hdg = _p_hdg_node->getDoubleValue();
|
||||
parent_spd = _p_spd_node->getDoubleValue();
|
||||
}else {
|
||||
_setUserPos();
|
||||
p_hdg = manager->get_user_heading();
|
||||
p_pch = manager->get_user_pitch();
|
||||
p_rll = manager->get_user_roll();
|
||||
|
|
Loading…
Reference in a new issue