fix simTime restart to 0.0
This commit is contained in:
parent
5d2becd2b4
commit
fc57b00ec4
@ -20,7 +20,6 @@ SimOptionsWindow::SimOptionsWindow(QWidget *parent) :
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
// populate the combo boxes
|
// populate the combo boxes
|
||||||
QtRocket* qtrocket = QtRocket::getInstance();
|
|
||||||
|
|
||||||
std::shared_ptr<sim::SimulationOptions> options(new sim::SimulationOptions);
|
std::shared_ptr<sim::SimulationOptions> options(new sim::SimulationOptions);
|
||||||
std::vector<std::string> atmosphereModels = options->getAvailableAtmosphereModels();
|
std::vector<std::string> atmosphereModels = options->getAvailableAtmosphereModels();
|
||||||
|
@ -10,6 +10,7 @@ void Rocket::launch()
|
|||||||
{
|
{
|
||||||
propagator.setTimeStep(QtRocket::getInstance()->getTimeStep());
|
propagator.setTimeStep(QtRocket::getInstance()->getTimeStep());
|
||||||
propagator.clearStates();
|
propagator.clearStates();
|
||||||
|
propagator.setCurrentTime(0.0);
|
||||||
mm.startMotor(0.0);
|
mm.startMotor(0.0);
|
||||||
propagator.runUntilTerminate();
|
propagator.runUntilTerminate();
|
||||||
}
|
}
|
||||||
|
@ -52,6 +52,7 @@ public:
|
|||||||
const std::vector<std::pair<double, std::vector<double>>>& getStates() const { return states; }
|
const std::vector<std::pair<double, std::vector<double>>>& getStates() const { return states; }
|
||||||
|
|
||||||
void clearStates() { states.clear(); }
|
void clearStates() { states.clear(); }
|
||||||
|
void setCurrentTime(double t) { currentTime = t; }
|
||||||
|
|
||||||
void setTimeStep(double ts) { timeStep = ts; }
|
void setTimeStep(double ts) { timeStep = ts; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user