diff --git a/src/FDM/JSBSim/initialization/FGSimplexTrim.cpp b/src/FDM/JSBSim/initialization/FGSimplexTrim.cpp old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/input_output/FGPropertyManager.cpp b/src/FDM/JSBSim/input_output/FGPropertyManager.cpp old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/math/FGFunction.cpp b/src/FDM/JSBSim/math/FGFunction.cpp old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/math/FGModelFunctions.cpp b/src/FDM/JSBSim/math/FGModelFunctions.cpp old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/math/FGNelderMead.cpp b/src/FDM/JSBSim/math/FGNelderMead.cpp old mode 100755 new mode 100644 index 12e9860a0..6ac5db110 --- a/src/FDM/JSBSim/math/FGNelderMead.cpp +++ b/src/FDM/JSBSim/math/FGNelderMead.cpp @@ -79,7 +79,7 @@ void FGNelderMead::update() } // find vertex costs - for (int vertex=0;vertex m_cost[m_iMax] ) { @@ -128,10 +128,10 @@ void FGNelderMead::update() } // compute element sum of simplex vertices - for (int dim=0;dim tryVertex(m_nDim); - for (int dim=0;dim & guess, const std::vector & stepSize) { - for (int vertex=0;vertex & guess, if (showSimplex) { std::cout << "simplex: " << std::endl;; - for (int j=0;j & vertex, const std::vector & lowerBound, const std::vector & upperBound) { - for (int dim=0;dim upperBound[dim]) vertex[dim] = upperBound[dim]; else if (vertex[dim] < lowerBound[dim]) vertex[dim] = lowerBound[dim]; diff --git a/src/FDM/JSBSim/math/FGNelderMead.h b/src/FDM/JSBSim/math/FGNelderMead.h old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/math/FGStateSpace.cpp b/src/FDM/JSBSim/math/FGStateSpace.cpp old mode 100755 new mode 100644 index 844601fb8..a4ef60cdd --- a/src/FDM/JSBSim/math/FGStateSpace.cpp +++ b/src/FDM/JSBSim/math/FGStateSpace.cpp @@ -54,10 +54,10 @@ void FGStateSpace::numericalJacobian(std::vector< std::vector > & J, Co size_t nY = y.getSize(); double f1 = 0, f2 = 0, fn1 = 0, fn2 = 0; J.resize(nY); - for (int iY=0;iY &vec ) std::streamsize width = out.width(); size_t nI = vec.size(); out << std::left << std::setw(1) << "[" << std::right; - for (int i=0;i get() const { std::vector val; - for (int i=0;iget()); + for (unsigned int i=0;iget()); return val; } void get(double * array) const { - for (int i=0;iget(); + for (unsigned int i=0;iget(); } double getDeriv(int i) { @@ -165,21 +165,21 @@ public: std::vector getDeriv() const { std::vector val; - for (int i=0;igetDeriv()); + for (unsigned int i=0;igetDeriv()); return val; } void getDeriv(double * array) const { - for (int i=0;igetDeriv(); + for (unsigned int i=0;igetDeriv(); } void set(std::vector vals) { - for (int i=0;iset(vals[i]); + for (unsigned int i=0;iset(vals[i]); m_stateSpace->run(); } void set(double * array) { - for (int i=0;iset(array[i]); + for (unsigned int i=0;iset(array[i]); m_stateSpace->run(); } std::string getName(int i) const @@ -189,7 +189,7 @@ public: std::vector getName() const { std::vector name; - for (int i=0;igetName()); + for (unsigned int i=0;igetName()); return name; } std::string getUnit(int i) const @@ -199,7 +199,7 @@ public: std::vector getUnit() const { std::vector unit; - for (int i=0;igetUnit()); + for (unsigned int i=0;igetUnit()); return unit; } void clear() { @@ -260,7 +260,7 @@ public: double stateSum() { double sum = 0; - for (int i=0;iForceJacobian, vdot) +DotProduct(multipliers[i]->MomentJacobian, wdot))*d; - for (int j=0; j < n; j++) + for (unsigned int j=0; j < n; j++) a[i*n+j] *= d; } @@ -307,11 +307,11 @@ void FGAccelerations::ResolveFrictionForces(double dt) for (int iter=0; iter < 50; iter++) { double norm = 0.; - for (int i=0; i < n; i++) { + for (unsigned int i=0; i < n; i++) { double lambda0 = multipliers[i]->value; double dlambda = rhs[i]; - for (int j=0; j < n; j++) + for (unsigned int j=0; j < n; j++) dlambda -= a[i*n+j]*multipliers[j]->value; multipliers[i]->value = Constrain(multipliers[i]->Min, lambda0+dlambda, multipliers[i]->Max); @@ -325,7 +325,7 @@ void FGAccelerations::ResolveFrictionForces(double dt) // Calculate the total friction forces and moments - for (int i=0; i< n; i++) { + for (unsigned int i=0; i< n; i++) { double lambda = multipliers[i]->value; vFrictionForces += lambda * multipliers[i]->ForceJacobian; vFrictionMoments += lambda * multipliers[i]->MomentJacobian; diff --git a/src/FDM/JSBSim/models/FGAuxiliary.cpp b/src/FDM/JSBSim/models/FGAuxiliary.cpp old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/models/FGExternalForce.cpp b/src/FDM/JSBSim/models/FGExternalForce.cpp old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/models/FGExternalForce.h b/src/FDM/JSBSim/models/FGExternalForce.h old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/models/FGExternalReactions.cpp b/src/FDM/JSBSim/models/FGExternalReactions.cpp old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/models/FGExternalReactions.h b/src/FDM/JSBSim/models/FGExternalReactions.h old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/models/FGFCSChannel.h b/src/FDM/JSBSim/models/FGFCSChannel.h old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/models/FGInput.cpp b/src/FDM/JSBSim/models/FGInput.cpp old mode 100755 new mode 100644 index 799424067..be6284200 --- a/src/FDM/JSBSim/models/FGInput.cpp +++ b/src/FDM/JSBSim/models/FGInput.cpp @@ -50,7 +50,7 @@ using namespace std; namespace JSBSim { -IDENT(IdSrc,"$Id: FGInput.cpp,v 1.32 2015/04/02 02:20:50 dpculp Exp $"); +IDENT(IdSrc,"$Id: FGInput.cpp,v 1.33 2015/04/08 19:35:00 bcoconni Exp $"); IDENT(IdHdr,ID_INPUT); /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -104,7 +104,8 @@ bool FGInput::Load(Element* el) } else if (type == "QTJSBSIM") { Input = new FGUDPInputSocket(FDMExec); } else if (type != string("NONE")) { - cerr << "Unknown type of input specified in config file" << endl; + cerr << element->ReadFrom() + << "Unknown type of input specified in config file" << endl; } if (!Input) return false; diff --git a/src/FDM/JSBSim/models/FGInput.h b/src/FDM/JSBSim/models/FGInput.h old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/models/flight_control/FGAccelerometer.h b/src/FDM/JSBSim/models/flight_control/FGAccelerometer.h old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/models/flight_control/FGDistributor.cpp b/src/FDM/JSBSim/models/flight_control/FGDistributor.cpp old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/models/flight_control/FGDistributor.h b/src/FDM/JSBSim/models/flight_control/FGDistributor.h old mode 100755 new mode 100644 diff --git a/src/FDM/JSBSim/models/flight_control/FGKinemat.cpp b/src/FDM/JSBSim/models/flight_control/FGKinemat.cpp index 56bdecd24..bd1270e8d 100644 --- a/src/FDM/JSBSim/models/flight_control/FGKinemat.cpp +++ b/src/FDM/JSBSim/models/flight_control/FGKinemat.cpp @@ -46,7 +46,7 @@ using namespace std; namespace JSBSim { -IDENT(IdSrc,"$Id: FGKinemat.cpp,v 1.14 2014/01/13 10:46:09 ehofman Exp $"); +IDENT(IdSrc,"$Id: FGKinemat.cpp,v 1.15 2015/04/02 17:39:28 bcoconni Exp $"); IDENT(IdHdr,ID_FLAPS); /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -119,7 +119,7 @@ bool FGKinemat::Run(void ) while ( dt0 > 0.0 && !EqualToRoundoff(Input, Output) ) { // Find the area where Output is in - int ind; + unsigned int ind; for (ind = 1; (Input < Output) ? Detents[ind] < Output : Detents[ind] <= Output ; ++ind) if (NumDetents <= ind) break; @@ -190,7 +190,7 @@ void FGKinemat::Debug(int from) if (from == 0) { // Constructor cout << " INPUT: " << InputNodes[0]->GetName() << endl; cout << " DETENTS: " << NumDetents << endl; - for (int i=0;i