Added parameter for abs value of elevator, rudder, and aileron positions
This commit is contained in:
parent
5607753935
commit
ee9a81fd56
2 changed files with 12 additions and 0 deletions
|
@ -114,8 +114,11 @@ enum eParam {
|
|||
FG_BI2VEL,
|
||||
FG_CI2VEL,
|
||||
FG_ELEVATOR_POS,
|
||||
FG_AELEVATOR_POS,
|
||||
FG_AILERON_POS,
|
||||
FG_AAILERON_POS,
|
||||
FG_RUDDER_POS,
|
||||
FG_ARUDDER_POS,
|
||||
FG_SPDBRAKE_POS,
|
||||
FG_SPOILERS_POS,
|
||||
FG_FLAPS_POS,
|
||||
|
|
|
@ -118,8 +118,11 @@ FGState::FGState(FGFDMExec* fdex)
|
|||
RegisterVariable(FG_BI2VEL, " BI2Vel " );
|
||||
RegisterVariable(FG_CI2VEL, " CI2Vel " );
|
||||
RegisterVariable(FG_ELEVATOR_POS, " elevator_pos " );
|
||||
RegisterVariable(FG_AELEVATOR_POS, " |elevator_pos| " );
|
||||
RegisterVariable(FG_AILERON_POS, " aileron_pos " );
|
||||
RegisterVariable(FG_AAILERON_POS, " |aileron_pos| " );
|
||||
RegisterVariable(FG_RUDDER_POS, " rudder_pos " );
|
||||
RegisterVariable(FG_ARUDDER_POS, " |rudder_pos| " );
|
||||
RegisterVariable(FG_SPDBRAKE_POS, " speedbrake_pos " );
|
||||
RegisterVariable(FG_SPOILERS_POS, " spoiler_pos " );
|
||||
RegisterVariable(FG_FLAPS_POS, " flaps_pos " );
|
||||
|
@ -231,10 +234,16 @@ double FGState::GetParameter(eParam val_idx) {
|
|||
return scratch*scratch;
|
||||
case FG_ELEVATOR_POS:
|
||||
return FCS->GetDePos();
|
||||
case FG_AELEVATOR_POS:
|
||||
return fabs(FCS->GetDePos());
|
||||
case FG_AILERON_POS:
|
||||
return FCS->GetDaPos();
|
||||
case FG_AAILERON_POS:
|
||||
return fabs(FCS->GetDaPos());
|
||||
case FG_RUDDER_POS:
|
||||
return FCS->GetDrPos();
|
||||
case FG_ARUDDER_POS:
|
||||
return fabs(FCS->GetDrPos());
|
||||
case FG_SPDBRAKE_POS:
|
||||
return FCS->GetDsbPos();
|
||||
case FG_SPOILERS_POS:
|
||||
|
|
Loading…
Reference in a new issue