paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] battery energy consumed too fast in simulation.


From: Chris
Subject: Re: [Paparazzi-devel] battery energy consumed too fast in simulation.
Date: Mon, 13 Jun 2016 09:03:20 +0300
User-agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

Hi Gautier
No i don't mind about those parameters, what i found is that the energy reading is too high for the
current set by the  <define name="MILLIAMP_AT_FULL_THROTTLE"        value="40000"/>
ie. the module adds the mah too fast and i had to alter the code like that:

#ifndef SITL
  electrical.energy += ((float)electrical.current) / 3600.0f / ELECTRICAL_PERIODIC_FREQ;
#else
  electrical.energy += ((float)electrical.current) / 3600.0f / 60; // for the simulator only
#endif

for 5 minutes at 8.5A the energy consumed was calculated at 4Ah !
Chris

On 06/12/2016 11:37 PM, Gautier Hattenberger wrote:
Hi,

Are you talking about the fixed-wing sim ? The battery model doesn't use these parameters. If you enable the 'auto' battery mode in the simulation box, the bat level will decrease as a function of the throttle and a fixed gain... well, the comment (from 2005) speaks by himself: https://github.com/paparazzi/paparazzi/blob/master/sw/simulator/sitl.ml#L73

Gautier

Le 11/06/2016 20:51, hendrixgr . a écrit :
Hi.
I am simulating some long flights i will do next month and i noticed something strange.
Although i have set the maximum current correctly and the simulated current draw is spot on (as measured with a watt meter) the reported mah consumption is way too much.
For 5 minutes at 8.5 Amps@ 32% throttle the energy reported was about 4Ah when it should be at about 0.7 Ah !!!
Something is wrong or i am doing something wrong....
Here is my relevant airframe file
<section name="BAT">
    <define name="VOLTAGE_ADC_A" value="0.009422237"/>
        <define name="VOLTAGE_ADC_B" value="0.0"/>
        <define name="VoltageOfAdc(adc)" value ="(VOLTAGE_ADC_A * adc + VOLTAGE_ADC_B)"/>
    <define name="MILLIAMP_AT_FULL_THROTTLE"        value="40000"/>
    <define name="BAT_CAPACITY"                value="18000."/>
    <define name="CATASTROPHIC_BAT_LEVEL"            value="10" unit="V"/>
    <define name="CRITIC_BAT_LEVEL"                value="12.8" unit="V"/>
    <define name="LOW_BAT_LEVEL"                value="13.5" unit="V"/>
    <define name="MAX_BAT_LEVEL"                value="16.8" unit="V"/>
</section>

Chris


_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel



_______________________________________________
Paparazzi-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]