Bug fix for JSBSim
Tables CORNERING_COEFF could not be used for BOGEY contact points. No longer throw an exception when the `internal` keyword of a table is ignored. The location where errors have been found are now reported.
This commit is contained in:
parent
c99ea20883
commit
4c7402fb23
3 changed files with 13 additions and 6 deletions
|
@ -142,12 +142,16 @@ FGTable::FGTable(FGPropertyManager* propMan, Element* el,
|
|||
internal = true;
|
||||
} else {
|
||||
// internal table is a child element of a restricted type
|
||||
throw(" An internal table cannot be nested within another type,"
|
||||
" such as a function. The 'internal' keyword is ignored.");
|
||||
std::cerr << el->ReadFrom()
|
||||
<< " An internal table cannot be nested within another type,"
|
||||
<< " such as a function. The 'internal' keyword of table "
|
||||
<< Name << "is ignored." << endl;
|
||||
}
|
||||
} else if (!call_type.empty()) {
|
||||
throw(" An unknown table type attribute is listed: "
|
||||
". Execution cannot continue.");
|
||||
std::cerr << el->ReadFrom()
|
||||
<<" An unknown table type attribute is listed: " << call_type
|
||||
<< endl;
|
||||
throw("Execution cannot continue.");
|
||||
}
|
||||
|
||||
// Determine and store the lookup properties for this table unless this table
|
||||
|
|
|
@ -170,7 +170,7 @@ FGLGear::FGLGear(Element* el, FGFDMExec* fdmex, int number, const struct Inputs&
|
|||
ForceY_Table = 0;
|
||||
Element* force_table = el->FindElement("table");
|
||||
while (force_table) {
|
||||
string force_type = force_table->GetAttributeValue("type");
|
||||
string force_type = force_table->GetAttributeValue("name");
|
||||
if (force_type == "CORNERING_COEFF") {
|
||||
ForceY_Table = new FGTable(PropertyManager, force_table);
|
||||
break;
|
||||
|
|
|
@ -167,7 +167,10 @@ CLASS DOCUMENTATION
|
|||
<max_steer unit="DEG"> {number | 0 | 360} </max_steer>
|
||||
<brake_group> {NONE | LEFT | RIGHT | CENTER | NOSE | TAIL} </brake_group>
|
||||
<retractable>{0 | 1}</retractable>
|
||||
<table type="{CORNERING_COEFF}">
|
||||
<table name="{CORNERING_COEFF}" type="internal">
|
||||
<tableData>
|
||||
...
|
||||
</tableData>
|
||||
</table>
|
||||
</contact>
|
||||
@endcode
|
||||
|
|
Loading…
Add table
Reference in a new issue