Tudat / tudat

NOTE: This Tudat version is no longer supported. See https://docs.tudat.space/en/stable/ and https://github.com/tudat-team/tudat-bundle for the new version
BSD 3-Clause "New" or "Revised" License
87 stars 142 forks source link

terminate called after throwing an instance of 'std::out_of_range' #564

Closed Phantom-Observer closed 4 years ago

Phantom-Observer commented 4 years ago

25_09_1949.txt Error log The code gave some warning(s) about overriding the aerodynamic angle calculator and not finding the thrust rate model, albeit continuing to run the code before throwing the "out of range " error . The full log can be found in the file above.

The link to my code is https://github.com/RajathPai95/MDAOThesis

DominicDirkx commented 4 years ago

Hi Rajath,

For us to be able to answer this, please provide more detail.

Best,

Dominic

Phantom-Observer commented 4 years ago

Hey Dominic,

The error shows it to be thrown at "_Map_base::at" I understand it as something being referenced, does nto exist within the Mapped region(vector)?.

The code is crashing while running simulation.cpp. I've isolated it to be within " VehicleAndTrajectory::setSimulation " setup inside simulator.cpp

I've not tried to fix the code, as I'm unable to process the error. I've tried to isolate where it could be occuring by checking where the code throws the error, and it's occuring during the setup of mass propagation settings, I think.

I'm trying to understand the error, hence I put up an issue.

OS: Windows 10 64 bit.

If any other information is needed, please let me know. I hope to have answered all the details you needed(?). Thank you,

Regards, Dominic

DominicDirkx commented 4 years ago

Hi Rajath,

Please provide a link to the file, and lines in the file, where the VehicleAndTrajectory::setSimulation function is implemented, and I'll have a look. Since you've already narrowed it down to a single function, I hope this will be fairly straightforward. My guess is that you're accessing an entry of a map/vector that does not exist.

You can indicate specific lines by modifying the URL as:

https://github.com/Tudat/tudat/blob/master/Tudat/Astrodynamics/Aerodynamics/aerodynamicAcceleration.h#L59-L62

Best,

Dominic

Phantom-Observer commented 4 years ago

hey Dominic,

https://github.com/RajathPai95/MDAOThesis/blob/master/Simulator/simulator.cpp#L590-L608

I'm assuming that the termination might be occurring here. Do check and let me know

Do you think the Warnings of aerodynamic angle calculator being overridden are also from the same source? If not, what could be the cause? Thank you,

Regards, Rajath

Phantom-Observer commented 4 years ago

I had assigned Stages and Vehicles separately, and was calling the reference to stage instead of Vehicle. I could understand it better when you mentioned that I'm accesing an entry that doesnt exist. Thanks for everything Dominic,

Regards, Rajath