Make parameter "roll-factor" settable in scenario files
Signed-off-by: Vivian Meazza <vivian.meazza@lineone.net>
This commit is contained in:
parent
f7cd808f23
commit
6b1391e404
2 changed files with 8 additions and 0 deletions
|
@ -101,6 +101,7 @@ void FGAIShip::readFromScenario(SGPropertyNode* scFileNode) {
|
|||
setFixedTurnRadius(scFileNode->getDoubleValue("fixed-turn-radius-ft", 500));
|
||||
setSpeedConstant(scFileNode->getDoubleValue("speed-constant", 0.5));
|
||||
setSMPath(scFileNode->getStringValue("submodel-path", ""));
|
||||
setRollFactor(scFileNode->getDoubleValue("roll-factor", 1));
|
||||
|
||||
if (!flightplan.empty()) {
|
||||
SG_LOG(SG_AI, SG_ALERT, "getting flightplan: " << _name );
|
||||
|
@ -560,6 +561,10 @@ void FGAIShip::setFixedTurnRadius(double ftr) {
|
|||
_fixed_turn_radius = ftr;
|
||||
}
|
||||
|
||||
void FGAIShip::setRollFactor(double rf) {
|
||||
_roll_factor = rf * -0.0083335;
|
||||
}
|
||||
|
||||
void FGAIShip::setInitialTunnel(bool t) {
|
||||
_initial_tunnel = t;
|
||||
setTunnel(_initial_tunnel);
|
||||
|
|
|
@ -61,11 +61,14 @@ public:
|
|||
void setRudderConstant(double rc);
|
||||
void setSpeedConstant(double sc);
|
||||
void setFixedTurnRadius(double ft);
|
||||
void setRollFactor(double rf);
|
||||
|
||||
void setTunnel(bool t);
|
||||
void setInitialTunnel(bool t);
|
||||
|
||||
void setWPNames();
|
||||
void setWPPos();
|
||||
|
||||
double sign(double x);
|
||||
|
||||
bool _hdg_lock;
|
||||
|
|
Loading…
Add table
Reference in a new issue