diff --git a/README.md b/README.md index 53315d3..73357b5 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ solXpect is an app that forecasts the output of your solar power plant by using direct and diffuse radiation data from Open-Meteo.com, calculating the position of the sun, and projecting the radiation on your solar panel. It shows the estimated energy production for the next 16 days, with hourly values calculated for the preceding hour. As an example, if there are 150 Wh shown at 11:00 this means you can expect 150 Wh between 10:00 and 11:00. +The values starting with $\sum$ show the cumulated energy since midnight of the first day. To use solXpect, you simply enter your latitude and longitude coordinates, as well as the azimuth and tilt of your solar panel. You also enter information about the peak power, efficiency, temperature coefficient, and area of your solar panel, as well as the maximum power and efficiency of your inverter. Additionally, solXpect allows you to define shading on your solar panels by specifying the minimum elevation of the sun necessary for the sun to hit the solar panels, as well as the percentage of shading for elevations below this value. diff --git a/app/src/main/assets/help/help-de.html b/app/src/main/assets/help/help-de.html index 5a472a6..75f55bb 100644 --- a/app/src/main/assets/help/help-de.html +++ b/app/src/main/assets/help/help-de.html @@ -4,6 +4,7 @@ Diese App prognostiziert die Leistung Ihrer Solaranlage unter Verwendung von Direkt- und Diffusstrahlungsdaten von Open-Meteo.com, berechnet die Position der Sonne und projiziert die Strahlung auf Ihr Solarpanel. Es zeigt die geschätzte Energieproduktion für die nächsten 16 Tage an, wobei stündliche Werte für die vorherige Stunde berechnet werden. Wenn zum Beispiel um 11:00 Uhr 150 Wh angezeigt werden, bedeutet dies, dass Sie zwischen 10:00 und 11:00 Uhr 150 Wh erwarten können. +Die mit ∑ beginnenden Werte zeigen die kumulierte Energie seit Mitternacht des ersten Tages. Um solXpect zu verwenden, geben Sie einfach Ihre Breiten- und Längenkoordinaten sowie den Azimut und die Neigung Ihres Solarpanels ein. Sie geben auch Informationen über die Spitzenleistung, Effizienz, Temperaturkoeffizienten und Fläche Ihres Solarpanels sowie die maximale Leistung und Effizienz Ihres Wechselrichters an. solXpect ermöglicht es Ihnen auch, Verschattungen auf Ihren Solarzellen zu definieren, indem Sie die minimale Sonnenhöhe angeben, die erforderlich ist, damit die Sonne auf die Solarzellen trifft, sowie den prozentualen Schatten für Höhen unter diesem Wert. diff --git a/app/src/main/assets/help/help-en.html b/app/src/main/assets/help/help-en.html index 1ec54e9..e041851 100644 --- a/app/src/main/assets/help/help-en.html +++ b/app/src/main/assets/help/help-en.html @@ -4,6 +4,7 @@ This app forecasts the output of your solar power plant by using direct and diffuse radiation data from Open-Meteo.com, calculating the position of the sun, and projecting the radiation on your solar panel. It shows the estimated energy production for the next 16 days, with hourly values calculated for the preceding hour. As an example, if there are 150 Wh shown at 11:00 this means you can expect 150 Wh between 10:00 and 11:00. +The values starting with ∑ show the cumulated energy since midnight of the first day. To use solXpect, you simply enter your latitude and longitude coordinates, as well as the azimuth and tilt of your solar panel. You also enter information about the peak power, efficiency, temperature coefficient, and area of your solar panel, as well as the maximum power and efficiency of your inverter. Additionally, solXpect allows you to define shading on your solar panels by specifying the minimum elevation of the sun necessary for the sun to hit the solar panels, as well as the percentage of shading for elevations below this value. diff --git a/app/src/main/java/org/woheller69/weather/database/HourlyForecast.java b/app/src/main/java/org/woheller69/weather/database/HourlyForecast.java index 737f131..b00f7c9 100644 --- a/app/src/main/java/org/woheller69/weather/database/HourlyForecast.java +++ b/app/src/main/java/org/woheller69/weather/database/HourlyForecast.java @@ -17,6 +17,7 @@ public class HourlyForecast { private float diffuseRadiation; private float shortwaveRadiation; private float power; + private float energyCum; private String city_name; @@ -109,4 +110,8 @@ public class HourlyForecast { public void setShortwaveRadiation(float shortwaveRadiation) { this.shortwaveRadiation = shortwaveRadiation; } public float getShortwaveRadiation() { return this.shortwaveRadiation; } + + public float getEnergyCum() { return this.energyCum; } + + public void setEnergyCum(float energy_cum) { this.energyCum = energy_cum;} } diff --git a/app/src/main/java/org/woheller69/weather/ui/Help/StringFormatUtils.java b/app/src/main/java/org/woheller69/weather/ui/Help/StringFormatUtils.java index 802b534..e969df8 100644 --- a/app/src/main/java/org/woheller69/weather/ui/Help/StringFormatUtils.java +++ b/app/src/main/java/org/woheller69/weather/ui/Help/StringFormatUtils.java @@ -28,6 +28,12 @@ public final class StringFormatUtils { return removeMinusIfZerosOnly(decimalFormat.format(decimal)); } + public static String formatEnergyCum(Context context, float energyCum) { + if (energyCum < 10000.0f) return formatInt(energyCum, context.getString(R.string.units_Wh)); + else if (energyCum < 100000.0f) return formatDecimal(energyCum/1000,context.getString(R.string.units_kWh)); + else return formatInt(energyCum/1000,context.getString(R.string.units_kWh)); + } + public static String formatInt(float decimal) { intFormat.setRoundingMode(RoundingMode.HALF_UP); return removeMinusIfZerosOnly(intFormat.format(decimal)); diff --git a/app/src/main/java/org/woheller69/weather/ui/RecycleList/CityWeatherAdapter.java b/app/src/main/java/org/woheller69/weather/ui/RecycleList/CityWeatherAdapter.java index 2d10f71..a2126e5 100644 --- a/app/src/main/java/org/woheller69/weather/ui/RecycleList/CityWeatherAdapter.java +++ b/app/src/main/java/org/woheller69/weather/ui/RecycleList/CityWeatherAdapter.java @@ -100,7 +100,10 @@ public class CityWeatherAdapter extends RecyclerView.Adapter(); + float energyCumulated=0; for (HourlyForecast f : hourlyForecasts) { + energyCumulated+=f.getPower(); + f.setEnergyCum(energyCumulated); if (sp.getBoolean("pref_debug",false)) { courseDayList.add(f); } else { diff --git a/app/src/main/java/org/woheller69/weather/ui/RecycleList/CourseOfDayAdapter.java b/app/src/main/java/org/woheller69/weather/ui/RecycleList/CourseOfDayAdapter.java index 269cd0d..b94e9bc 100644 --- a/app/src/main/java/org/woheller69/weather/ui/RecycleList/CourseOfDayAdapter.java +++ b/app/src/main/java/org/woheller69/weather/ui/RecycleList/CourseOfDayAdapter.java @@ -98,21 +98,16 @@ public class CourseOfDayAdapter extends RecyclerView.Adapter