randybeard / mavsim_template_files

Template files for mavsim, the simulator developed in Small Unmanned Aircraft: Theory and Practice
MIT License
65 stars 38 forks source link

Chap6 Simulink #6

Open AdvanceXplorer opened 4 years ago

AdvanceXplorer commented 4 years ago

Hi, i was trying to do the project for the chapter 6 but i couldn't find the mdl files (roll_model.mdl etc.) to tüne the values, are they missing or ?

spyros96 commented 4 years ago

Look at the book supplement and the pdf presentation at the book website. It says they are not needed and you can tune directly on the full Simulink model

AdvanceXplorer commented 4 years ago

No you can't, the tuned values themselves are used in the matlab code that is embedded into the simulink model. I have done the Project anyways.

spyros96 commented 4 years ago

What do you mean exaclty by that? Also did you implement the autopilot with the presence of wind or not?

AdvanceXplorer commented 4 years ago

Already tuned values that are calculated by the writer of the code is used as constant values in the matlab code which is used in the autopilot.m file inside the simulink file.

AdvanceXplorer commented 4 years ago

You can calculate the a values from chapter 5 then prepare the mdl files for the successive loop closure modelling

AdvanceXplorer commented 4 years ago

Also did you implement the autopilot with the presence of wind or not?

Yea of course.

spyros96 commented 4 years ago

Already tuned values that are calculated by the writer of the code is used as constant values in the matlab code which is used in the autopilot.m file inside the simulink file.

And where is the problem with that? I am putting some values, see the response and if i dont like it, change them and run again the autopilot to see what happening. There should be constant, its not adaptive PID or something

AdvanceXplorer commented 4 years ago

Dude using different models means different a values thus different models, you should first create your own simulink model then work on it till it Works decently and then finally implement it with other modules. You can do whatever you want sure but that is not the proper way to do it.

AdvanceXplorer commented 4 years ago

I did the Project as i said before, there is nothing to discuss about lol. Good luck.