mirror of
https://github.com/woheller69/solxpect.git
synced 2025-09-22 00:40:46 +02:00
add cumulated energy to course of day
This commit is contained in:
parent
428d59a2a5
commit
28aed88cea
9 changed files with 21 additions and 9 deletions
|
@ -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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
||||||
|
|
|
@ -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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
||||||
|
|
|
@ -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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
||||||
|
|
|
@ -17,6 +17,7 @@ public class HourlyForecast {
|
||||||
private float diffuseRadiation;
|
private float diffuseRadiation;
|
||||||
private float shortwaveRadiation;
|
private float shortwaveRadiation;
|
||||||
private float power;
|
private float power;
|
||||||
|
private float energyCum;
|
||||||
private String city_name;
|
private String city_name;
|
||||||
|
|
||||||
|
|
||||||
|
@ -109,4 +110,8 @@ public class HourlyForecast {
|
||||||
public void setShortwaveRadiation(float shortwaveRadiation) { this.shortwaveRadiation = shortwaveRadiation; }
|
public void setShortwaveRadiation(float shortwaveRadiation) { this.shortwaveRadiation = shortwaveRadiation; }
|
||||||
|
|
||||||
public float getShortwaveRadiation() { return this.shortwaveRadiation; }
|
public float getShortwaveRadiation() { return this.shortwaveRadiation; }
|
||||||
|
|
||||||
|
public float getEnergyCum() { return this.energyCum; }
|
||||||
|
|
||||||
|
public void setEnergyCum(float energy_cum) { this.energyCum = energy_cum;}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,12 @@ public final class StringFormatUtils {
|
||||||
return removeMinusIfZerosOnly(decimalFormat.format(decimal));
|
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) {
|
public static String formatInt(float decimal) {
|
||||||
intFormat.setRoundingMode(RoundingMode.HALF_UP);
|
intFormat.setRoundingMode(RoundingMode.HALF_UP);
|
||||||
return removeMinusIfZerosOnly(intFormat.format(decimal));
|
return removeMinusIfZerosOnly(intFormat.format(decimal));
|
||||||
|
|
|
@ -100,7 +100,10 @@ public class CityWeatherAdapter extends RecyclerView.Adapter<CityWeatherAdapter.
|
||||||
|
|
||||||
courseDayList = new ArrayList<>();
|
courseDayList = new ArrayList<>();
|
||||||
|
|
||||||
|
float energyCumulated=0;
|
||||||
for (HourlyForecast f : hourlyForecasts) {
|
for (HourlyForecast f : hourlyForecasts) {
|
||||||
|
energyCumulated+=f.getPower();
|
||||||
|
f.setEnergyCum(energyCumulated);
|
||||||
if (sp.getBoolean("pref_debug",false)) {
|
if (sp.getBoolean("pref_debug",false)) {
|
||||||
courseDayList.add(f);
|
courseDayList.add(f);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -98,21 +98,16 @@ public class CourseOfDayAdapter extends RecyclerView.Adapter<CourseOfDayAdapter.
|
||||||
if (sp.getBoolean("pref_debug",false)) {
|
if (sp.getBoolean("pref_debug",false)) {
|
||||||
holder.diffuseRadiation.setVisibility(View.VISIBLE);
|
holder.diffuseRadiation.setVisibility(View.VISIBLE);
|
||||||
holder.directRadiationNormal.setVisibility(View.VISIBLE);
|
holder.directRadiationNormal.setVisibility(View.VISIBLE);
|
||||||
holder.energyCum.setVisibility(View.VISIBLE);
|
|
||||||
} else {
|
} else {
|
||||||
holder.diffuseRadiation.setVisibility(View.GONE);
|
holder.diffuseRadiation.setVisibility(View.GONE);
|
||||||
holder.directRadiationNormal.setVisibility(View.GONE);
|
holder.directRadiationNormal.setVisibility(View.GONE);
|
||||||
holder.energyCum.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.time.setText(StringFormatUtils.formatTimeWithoutZone(context, courseOfDayList.get(position).getLocalForecastTime(context)));
|
holder.time.setText(StringFormatUtils.formatTimeWithoutZone(context, courseOfDayList.get(position).getLocalForecastTime(context)));
|
||||||
holder.directRadiationNormal.setText(StringFormatUtils.formatInt(courseOfDayList.get(position).getDirectRadiationNormal()," W/qm"));
|
holder.directRadiationNormal.setText(StringFormatUtils.formatInt(courseOfDayList.get(position).getDirectRadiationNormal()," W/qm"));
|
||||||
holder.diffuseRadiation.setText(StringFormatUtils.formatInt(courseOfDayList.get(position).getDiffuseRadiation()," W/qm"));
|
holder.diffuseRadiation.setText(StringFormatUtils.formatInt(courseOfDayList.get(position).getDiffuseRadiation()," W/qm"));
|
||||||
holder.power.setText(StringFormatUtils.formatInt(courseOfDayList.get(position).getPower()," "+ context.getString(R.string.units_Wh)));
|
holder.power.setText(StringFormatUtils.formatInt(courseOfDayList.get(position).getPower()," "+ context.getString(R.string.units_Wh)));
|
||||||
float energyCumulated=0;
|
holder.energyCum.setText("\u03a3\u2009"+StringFormatUtils.formatEnergyCum(context, courseOfDayList.get(position).getEnergyCum()));
|
||||||
for (int i=0; i<=position;i++)
|
|
||||||
energyCumulated+=courseOfDayList.get(i).getPower();
|
|
||||||
holder.energyCum.setText(StringFormatUtils.formatInt(energyCumulated," "+ context.getString(R.string.units_Wh)));
|
|
||||||
|
|
||||||
updateRecyclerViewHeader(); //update header according to date in first visible item on the left
|
updateRecyclerViewHeader(); //update header according to date in first visible item on the left
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class WeekWeatherAdapter extends RecyclerView.Adapter<WeekWeatherAdapter.
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.cityID = cityID;
|
this.cityID = cityID;
|
||||||
this.weekForecastList = weekForecastList;
|
this.weekForecastList = weekForecastList;
|
||||||
if (!weekForecastList.isEmpty()) {
|
if (weekForecastList!=null && !weekForecastList.isEmpty()) {
|
||||||
this.courseOfDayHeaderDate = new Date(weekForecastList.get(0).getLocalForecastTime(context)); //init with date of first weekday
|
this.courseOfDayHeaderDate = new Date(weekForecastList.get(0).getLocalForecastTime(context)); //init with date of first weekday
|
||||||
} else this.courseOfDayHeaderDate = new Date(); //fallback if no data available
|
} else this.courseOfDayHeaderDate = new Date(); //fallback if no data available
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ public class WeekWeatherAdapter extends RecyclerView.Adapter<WeekWeatherAdapter.
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemCount() {
|
public int getItemCount() {
|
||||||
if (!weekForecastList.isEmpty())
|
if (weekForecastList!=null && !weekForecastList.isEmpty())
|
||||||
return weekForecastList.size();
|
return weekForecastList.size();
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="3dp"
|
android:layout_marginBottom="3dp"
|
||||||
android:text="xy Wh"
|
android:text="\u03a3\u2009xy Wh"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:textColor="@color/colorPrimaryDark" />
|
android:textColor="@color/colorPrimaryDark" />
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue