Skip to content
Snippets Groups Projects
Commit 4e4f9c4a authored by Daniel Lorych's avatar Daniel Lorych :cookie:
Browse files

Update Solar panel to accept solar energy variable

parent ffcb6c46
No related branches found
No related tags found
No related merge requests found
......@@ -35,8 +35,8 @@ namespace Helios.Source
result.RoofAngle = roof.Elevation;
result.PanelEfficiency = panel.Efficiency * 100;
result.InstallationCost = panel.GetInstallationCost(roof.Area);
result.PowerGeneratedSummer = Math.Round(panel.GetPowerOutput(roof.Area, summerElevationAngle), 2);
result.PowerGeneratedWinter = Math.Round(panel.GetPowerOutput(roof.Area, winterElevationAngle), 2);
result.PowerGeneratedSummer = Math.Round(panel.GetPowerOutput(1000, roof.Area, summerElevationAngle), 2);
result.PowerGeneratedWinter = Math.Round(panel.GetPowerOutput(1000, roof.Area, winterElevationAngle), 2);
result.GeneratesRequiredPower = GeneratesRequiredPower(input.PowerRequired, result.PowerGeneratedWinter);
result.ExceedsMaximumPower = ExceedsPowerLimit(input.MaximumPower, result.PowerGeneratedWinter);
result.WithinBudget = WithinBudget(input.Budget, result.InstallationCost);
......
......@@ -31,11 +31,12 @@ namespace Helios.Source
return installationCost;
}
public double GetPowerOutput(double roofArea, int roofElevation)
public double GetPowerOutput(int solarEnergy, double roofArea, int roofElevation)
{
double powerOutput;
powerOutput = Efficiency * 1000 * roofArea * Math.Sin(roofElevation);
powerOutput = Efficiency * solarEnergy * roofArea * Math.Sin(roofElevation);
this.PowerOutput = powerOutput;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment