[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Paparazzi-devel] motor current calculation ?
From: |
Chris |
Subject: |
[Paparazzi-devel] motor current calculation ? |
Date: |
Tue, 26 Oct 2010 14:01:40 +0300 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.14) Gecko/20101006 Thunderbird/3.0.9 |
Hi.
I was watching my plane's current draw at various throttle levels and
it looks like the calculation is a bit off.
When the throttle is at 50% the current draw is ~25% of the:
<define name="MILLIAMP_AT_FULL_THROTTLE" value="40000"/>
It is logical since at 50% rpm the propeller only produces 25% of it's
full rpm power.
Here is what i used instead in main_fbw.c file (broken down for clarity):
#if ((! defined ADC_CHANNEL_CURRENT) && defined MILLIAMP_AT_FULL_THROTTLE)
#ifdef COMMAND_THROTTLE
float percent_throttle =
(float)commands[COMMAND_THROTTLE]/(float)MAX_PPRZ;
percent_throttle *= percent_throttle;
fbw_current_milliamp = Min((percent_throttle *
(float)MILLIAMP_AT_FULL_THROTTLE), 65000);
// fbw_current_milliamp = Min(((float)commands[COMMAND_THROTTLE]) *
((float)MILLIAMP_AT_FULL_THROTTLE) / ((float)MAX_PPRZ), 65000);
#endif
# endif
Is this correct or i am doing something wrong?
- [Paparazzi-devel] motor current calculation ?,
Chris <=