Initial Parameters Calculator Plugin

@Eosbandi, @xfacta, this is why AP is such a great project, the evolution of ideas and implementation of new ideas is amazing.

1 Like

@xfacta once I sort out the process for doing the Loiter tuning and pilot speed up/down inclusive of fail safe descents maybe adding a table for that could be handy for the future. I know there is correlation between weight of the aircraft, prop size and air mass displacement which can cause unsteady decent. So if we go down that path to give basic loiter braking and acceleration rates and decent speeds may help with an initial setup. < will discuss later :slight_smile:

This is really great! After reading this post and looking at your example I am now also playing with making custom C# plugins. Sometimes I make stupid C# syntax errors which causes the plugin not to load/start. Is there a way that I can see more details about the reasons a plugin failed to load?

You can see compiler errors in the console (enable console window on the help screen) and they also logged to MissionPlanner.log which resides in c:\ProgramData\Mission Planner directory. (note that the ProgramData directory is hidden by default).
I recommend to delete MissionPlanner log, start MP then press CTRL+P to check if your plugin is loaded. If not, close MP and check log, you will find plugin loading at the bottom of the latest log.

But you can use visual studio (community edition is free) to develop your plugin, you can use MissionPlanner.stats plugin as a template project. Once it compiles and runs then you can take the .cs code and put in the plugin directory (so no need to compile and create a dll…)


Thanks for sharing this! Enabled the console and now it’s much easier to debug!
These plugins are really powerful stuff! Spent less than half a day (mostly reading the MP code) on it and so far I could add another tab page to the Data window where I can now add all my custom experimental features :slight_smile:


Now also getting curious to try out the dll plugins…


@Jan_Swanepoel I would love to see some of these plugins a main feature of MP. The amount of amazing stuff that can come out of a little bit of time and someone that knows what they are doing is invaluable to projects like these.

1 Like

If one (me), with moderate python knowledge would like to learn the basics of c# to start playing with .cs plugin, what would be your advice? Where should i start reading and learning?

The best book IMHO is : There is a new book coming out soon for C# 8.0, but you can start with the 7.0 and once you grab the understanding of c# code, you have to browse the MP source code…

1 Like

I don’t understand the missionplanner.stat part, would you mind elaborate a bit?

Any progress getting this integrated upstream?

It is already in the master since end of Jun. If you update to latest beta you will get it.

Hey Andras
Where do yo find it in Mission Planner.
I have the beta…but not sure how to find it.

If the plugin is loaded, press ALT+A
To check the loaded plugins press CTRL+P

A minor issue. If you close the dialog box showing the old and new values as you would if you didn’t want to save them in fact they are not saved (good) but the next dialog box says they are.

1 Like

Thanks for checking it out.

Yes, it is a known issue, but cannot fixed without modifying MP basecode. (The parameter compare dialog does not give return value, so no way to know if you pressed save or cancel.)
I think I will either remove a success dialog box, or add a remark.

1 Like

OK, got it. It’s fine, I’m paranoid about writing the parameter file anyway. I would use it to compare and manually do it :slight_smile:

1 Like

Hi @Eosbandi I was updating my spreadsheet to include the different battery types as you have in the MissionPlanner plugin. I noticed this line in the .cs

batt_arm_volt = (batt_cells - 1) * 0.1 + 3.6 * batt_cells;
Could probably be changed to
batt_arm_volt = (batt_cells - 1) * 0.1 + (batt_cell_min_voltage + 0.3) * batt_cells;

and I’ve set it that way in an updated version of my sheet

New link since I had to change it to a new Excel version

1 Like

Hi @xfacta, @dkemxr,
Should I use this Initial parameter spreadsheet (or plugin) for my Quadplane Vtol (4+1 config) with big quad prop.(17-20 inch)??
What is your advice?

Without having actually tested it myself, I would say the multirotor initial params should apply to the equivalent “Q_” parameters.
I’ve seen a few VTOL logs and almost without fail they have all default multirotor params in the Q_ params, so I’d say they can only be improved. This also means they are probably not as critical, and everyone just wants to get through the take-off phase, into transition and forward flight - and of course return to earth in a controlled manner.

The caveat will be that INS_GYRO_FILTER applies to all modes, so modifying it to suit multirotor params will also have some equivalent (or detrimental) affect to all flying.
Maybe leave INS_GYRO_FILTER,20 and stick to changing Q PIDs manually after applying other values from the initial values spreadsheet into their equivalent Q_ params

Hi @xfacta ,
Thank you for your quick response. I have built several small Quadplane (around 3-4 kg) and so far they flew well using Default parameter. But to be honest I did not check in details the log to see performance in detail. But for this bigger Vtol Quadplane I really expect smooth flight, with Optimized Parameter, that will result the Best performance that it should be.