How to calculate the formula for solar power generation