Log data of battery for a flight cycle

As per the link, the units suggested are standard, so we have considered the CurrTot as Ah while calculating the data, our answers are not matching with the data we took to find the equation. If this unit is in mAh, then estimated answers will match, else the data might go wrong. Also, the battery capacity unit mentioned in parameters list is mAh. So, what unit must be considered to obtain our results accurately to match the data?
https://ardupilot.org/copter/docs/logmessages.html

CurrTot is in mAh
and Curr is in Amps

For anything battery voltage and current related

  1. manually calibrate your voltage sensor at a low voltage for your battery, no need to calibrate it at the battery full level
  2. Use the Initial Parameters calculator in MissionPlanner to correctly set the failsafe levels for you particular cell count and chemistry, and set the failsafe actions!!
  3. use the procedure below to check and adjust the current sensor calibration, Amps per Volt
  • Plug in a fresh battery and do a hover flight for 5 minutes or until you’ve used a significant amount of battery capacity
  • Immediately unplug the battery and charge it, note how many mah’s it took to charge. Let’s say that was 1,500 mah
  • Download your log and look at maximum CurrTot. Let’s say it was 1,300 mah
  • Get your existing BATT_AMP_PERVOLT setting from Mission Planner
  • NEW_AMPS_PER_VOLT = OLD_AMPS_PER_VOLT x CHARGED_MAH / LOGGED_MAH
    With my example numbers, you’d get
    NEW_AMPS_PER_VOLT = 17 x 1,500 / 1,300 = 19.61
  • Set the new value in the BATT_AMP_PERVOLT parameter and save to your copter
  • Fly to check, repeat until you’re happy the new value gives consistent readings

That’s great idea! Thank you.