Originally created by: i...@beware.dropbear.id.au
I have created a model of an ultra micro electric powered model plane in YASim. I started by using a gasoline engine model but it is not a good fit.
Both the turbine engine model and the piston engine model consume fuel which changes the mass and balance of the aircraft. While a battery powered plane's "fuel" does run out, it doesn't weigh anything. Also the piston engine and turbine engines are poor models for an electric engine in other respects such as altitude effects, torque/speed characteristic and response time.
I have created a simple electric engine model which uses no fuel and has a torque/speed characteristic of a DC electric motor. The parameters are easily found: Kv, Rm and V.
It would be nice to have an electric current fuel type and a "tank" which holds amp-hours, but the fuel consumption model in YASim seems to presume that fuel is measured and consumed by mass, so I didn't go that far. Also, I have only done one kind of electric motor, and the characteristics can be greatly affected by the electronic speed control. Still, I think it is a better model than a piston engine or a turbine engine!
Patch attached.
View and moderate all "codetickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: bcoco...@gmail.com
(No comment was entered for this change.)
Labels: YASIM
Hi, is there some chance the patch will be merged in upstream code or is there something that needs to be done for that?
The ticket is 8 years old, so no, we cannot merge the patch without some
due diligence first. I don't know the history of why it was not merged
eight years ago, but I'll assume it wasn't officially rejected.
If someone takes the time to test the patch against the current code,
and potentially make edits to ensure it works properly with the current
code base, then it can be resubmitted as a new merge request.
Scott
On 12/27/19 12:58 PM, "Jakub Kákona" wrote:
Related
Tickets:
#595Hi, I've forwarded it to te developer's mailing list - for check and give explanation for the quality of the patch itself. Jakub, do you use this patch for your work and can you give more information is it correctly implemented and what issues/missing functions it may have yet ?
I will have a look...
There are some issues with formating and "coding style" (latter are my personal view of cource and may be due to the age of the patch). What I am missing is some more documentation (e.g. verbose variable names or comments that explain things). Kv, Rm, omega0 are not self-explaining.
As I did not work with the engine code in detail yet, I cannot even tell, if this patch will create a working engine, this would need more time.
Maybe Jakub can extend it and elaborate needs expressed by Henning (work needed on the patch) ? Jakub please, if you want to move it forward, work on the new version of the patch. If not, the ticket (I suppose) will be left as closed.
Ok, I will try to make a new merge request, containing the patch and possible improvements mentioned by Henning.
Hi again,
please find attached modified patch file for illustration. I added some iniitializers in the .hpp
getTorque0 is defined but does not seem to be used anywhere so my best guess is we can calcuclate a _torque0 once in the constructor and use that in calc.
As already said, verbose parameters / variables would make the code much easier to read and understand.
Ok, did you make modifications in patch file itself or in patched files? Because I have troubles with the new patch usage with git apply.
ups :/ I hacked in the patch file. maybe that was not a good idea - I was not working on my development box.
no need to use my patch, but it may illustrate some ideas maybe.
Hello, I made the following merge request to resolve this ticket: https://sourceforge.net/p/flightgear/flightgear/merge-requests/197/