BAT_CAPACITY should be set to nominal battery capacity in mAh (e.g. 3300 for 3300mAh) or a bit lower. Actual capacity for new batteries is more then nominal, but for old - it can be less than nominal. Note, that full discharging of LiPo batteries significantly reduces battery life and actual capacity. So it's better (and safer) to land with 20% of charge.