Ok, so this is NO WHERE near ready but, more to the point, I don't plan on making it ready because it works for my needs. If you want a "polished one" that uses the simple motor model, use .15. Otherwise, use .16.
So, what does this one do different? It uses inductance modeling, adds in motor pole and inductance boxes, I've added a motor current limit, and switching from a hub motor to custom doesn't delete the values. Also, the erroneous inefficiency code has been deleted. The inductance modeling code was shamelessly
STOLEN from ebikes.ca. Actually, I'm just giving them the credit for it because I did basically copy and paste their javascript code and adapted it (If they email me and ask me to remove it or something, I'll have no problem with that, but I will publicize that request.) - I did make a feeble attempt at understanding the math and coming up with my own code, but it became clear to me that would take at least a week and no success was guaranteed. For some reason, the formulas give a NaN at some low speed for some reason (And messes up the graph below 7-10 mph) but since I don't particularly care about low motor speed performance, I don't really care. The simple model is a pretty good model of low speed performance anyhow.
I make no guarantees over accuracy. The only thing I can say is that the graphs are pretty close to the CA graphs, but not really exact. Like, there's will say 17 NM at 30 mph while mine will say 15 NM at that speed. So it's not exact, but close. It'll give me a more realistic idea of 9C performance which is all I'm really looking for.
There's a lot of errors with this one. Just about the only thing that works is the graphs, and that's only above 5-10 mph. So, if you need to predict your speed, you better start learning how to interpret graphs.
View attachment EbikeCalc.16.zip
Edit: Actually, after playing around with this, it still seems better to just eyeball ebikes.ca's graphs. I guess I'll go back to the tired methods. I guess the point of this release is that it includes the source code (It's always available on the SVN repository, but it's actually distributed with the main program) so maybe someone could help make it better.
