From 36d8f1cdcce93d676d63bee2cb91d183f9b99571 Mon Sep 17 00:00:00 2001
From: Dan <daniel2.lorych@live.uwe.ac.uk>
Date: Wed, 27 Apr 2022 19:11:17 +0100
Subject: [PATCH] Add BatterChargeModule class

---
 Helios/Source/BatteryChargeModule.cs | 41 ++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Helios/Source/BatteryChargeModule.cs

diff --git a/Helios/Source/BatteryChargeModule.cs b/Helios/Source/BatteryChargeModule.cs
new file mode 100644
index 0000000..198882a
--- /dev/null
+++ b/Helios/Source/BatteryChargeModule.cs
@@ -0,0 +1,41 @@
+using System;
+namespace Helios.Source
+{
+	public class BatteryChargeModule
+	{
+
+        public double Efficiency { get; set; }
+        public double TotalOutput { get; set; }
+        public double PowerBalence { get; set; }
+
+        public BatteryChargeModule() { }
+
+		public BatteryChargeModule(double efficiency)
+        {
+            this.Efficiency = efficiency;
+        }
+
+        public double GetTotalOutput(double solarPanelEfficiency, double solarEnergy, double roofArea, double sunAngle)
+        {
+            double totalOutput;
+
+            totalOutput = solarPanelEfficiency * solarEnergy * roofArea * this.Efficiency * Math.Sin(sunAngle);
+
+            this.TotalOutput = totalOutput;
+
+            return totalOutput;
+        }
+
+        public double GetPowerBalence(double powerConsumption)
+        {
+            double powerBalence;
+
+            powerBalence = this.Efficiency * powerConsumption;
+
+            this.PowerBalence = powerBalence;
+
+            return powerBalence;
+        }
+	}
+}
+
-- 
GitLab