Arduino Solar MPPT battery charger

Ive made a number of MPPT solar chargers, and you have the right idea with the various voltages and charge currents.
The practical problem that arises is that the input power to the charger varies over the course of the day and may vary
rapidly as clouds move over the solar panels so the tracker will be trying to maximise the power into the battery all the time.
Its quite possible that there simply wont be enough power available to provide the bulk charging and equalizing currents
when you want them, so you have to keep track of how much power was available to provide the required charging when you wanted it.
Is the battery that is being charged also being drained by some load, or is the Solar Charger just to keep a battery fully charged by trickle charging it.