From: Bertrand <bco...@us...> - 2016-09-11 11:26:07
|
Update of /cvsroot/jsbsim/JSBSim/src/input_output In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6365/src/input_output Modified Files: FGXMLElement.cpp Log Message: Give more details in error messages that report angles out of range. Index: FGXMLElement.cpp =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/src/input_output/FGXMLElement.cpp,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -r1.55 -r1.56 *** FGXMLElement.cpp 2 Jan 2016 15:23:50 -0000 1.55 --- FGXMLElement.cpp 11 Sep 2016 11:26:04 -0000 1.56 *************** *** 468,477 **** // Sanity check for angular values if ((supplied_units == "RAD") && (fabs(value) > 2 * M_PI)) { ! cerr << element->ReadFrom() << "The value " << value ! << " RAD is outside the range [ -2*M_PI RAD ; +2*M_PI RAD ]" << endl; } if ((supplied_units == "DEG") && (fabs(value) > 360.0)) { ! cerr << element->ReadFrom() << "The value " << value ! << " DEG is outside the range [ -360 DEG ; +360 DEG ]" << endl; } --- 468,479 ---- // Sanity check for angular values if ((supplied_units == "RAD") && (fabs(value) > 2 * M_PI)) { ! cerr << element->ReadFrom() << element->GetName() << " value " ! << value << " RAD is outside the range [ -2*M_PI RAD ; +2*M_PI RAD ]" ! << endl; } if ((supplied_units == "DEG") && (fabs(value) > 360.0)) { ! cerr << element->ReadFrom() << element->GetName() << " value " ! << value << " DEG is outside the range [ -360 DEG ; +360 DEG ]" ! << endl; } *************** *** 482,491 **** if ((target_units == "RAD") && (fabs(value) > 2 * M_PI)) { ! cerr << element->ReadFrom() << "The value " << value ! << " RAD is outside the range [ -2*M_PI RAD ; +2*M_PI RAD ]" << endl; } if ((target_units == "DEG") && (fabs(value) > 360.0)) { ! cerr << element->ReadFrom() << "The value " << value ! << " DEG is outside the range [ -360 DEG ; +360 DEG ]" << endl; } --- 484,495 ---- if ((target_units == "RAD") && (fabs(value) > 2 * M_PI)) { ! cerr << element->ReadFrom() << element->GetName() << " value " ! << value << " RAD is outside the range [ -2*M_PI RAD ; +2*M_PI RAD ]" ! << endl; } if ((target_units == "DEG") && (fabs(value) > 360.0)) { ! cerr << element->ReadFrom() << element->GetName() << " value " ! << value << " DEG is outside the range [ -360 DEG ; +360 DEG ]" ! << endl; } |