Created optimum angle calculation functions, issues with tilted angle.

The power is still going negative due to the introduction of the tilted
irradiance factor (see line 278). Recommend that it be removed for the
time being.

However, smaller panel angles seem to make it not go negative.
Physically this could be due to the sun passing over the panel,
resulting in no irradiance at all.