Estimate panel temperature from ambient temperature and radiation

Additional parameter: temperature coefficient
Adapt efficiency according to these values
Bugfix input filter
Prepare V1.2
This commit is contained in:
woheller69 2023-04-13 08:52:54 +02:00
parent ab477f2cab
commit a1f14681fd
23 changed files with 139 additions and 145 deletions

View file

@ -12,8 +12,8 @@ android {
applicationId "org.woheller69.solxpect"
minSdkVersion 26
targetSdkVersion 31
versionCode 11
versionName "1.1"
versionCode 12
versionName "1.2"
buildConfigField "String", "BASE_URL", "\"https://api.open-meteo.com/v1/\""
buildConfigField "String", "GITHUB_URL","\"https://github.com/woheller69/solxpect/\""

View file

@ -28,8 +28,11 @@ Maximale Leistung, die Ihre Solarzellen liefern können.
<h3>Zelleneffizienz [%]</h3>
Energieanteil in Form von Sonnenlicht, der von der Solarzelle in Strom umgewandelt werden kann.
<h3>Temperaturkoeffizient [%/K]</h3>
Abhängigkeit der Leistung der Solarmodule von der Temperatur (normalerweise im Bereich von -0.4%/K).
<h3>Zellenfläche [m<sup>2</sup>]</h3>
Größe der aktiven Fläche Ihres Solarpanels.
Fläche Ihres Solarpanels.
<h3>Diffuse Strahlungseffizienz [%]</h3>
Wirkungsgrad Ihres Solarkraftwerks bei diffuser Strahlung. Bei der Ausrichtung nach oben sollte er etwa 100 % betragen, bei der Ausrichtung zum Horizont etwa 50 %.

View file

@ -28,8 +28,11 @@ Maximum power your solar cells can deliver.
<h3>Cells efficiency [%]</h3>
Portion of energy in the form of sunlight that can be converted into electricity by the solar cell.
<h3>Temperature coefficient [%/K]</h3>
Dependence of the cell power on temperature (usually in the range of -0.4%/K).
<h3>Cell area [m<sup>2</sup>]</h3>
Size of the active area your solar panel.
Size of your solar panel.
<h3>Diffuse radiation efficiency [%]</h3>
Efficiency of your solar power plant for diffuse radiation. When pointing up it should be around 100%, when pointing to the horizon it may be around 50%.

View file

@ -14,6 +14,7 @@ public class SolarPowerPlant {
double cellsMaxPower;
double cellsArea;
double cellsEfficiency;
double cellsTempCoeff;
double diffuseEfficiency;
double inverterPowerLimit;
double inverterEfficiency;
@ -22,7 +23,7 @@ public class SolarPowerPlant {
private int[] shadingElevation;
private int[] shadingOpacity;
public SolarPowerPlant(double latitude, double longitude, double cellsMaxPower, double cellsArea, double cellsEfficiency, double diffuseEfficiency, double inverterPowerLimit, double inverterEfficiency, double azimuthAngle, double tiltAngle, int[] shadingElevation, int[] shadingOpacity ) {
public SolarPowerPlant(double latitude, double longitude, double cellsMaxPower, double cellsArea, double cellsEfficiency, double cellsTempCoeff, double diffuseEfficiency, double inverterPowerLimit, double inverterEfficiency, double azimuthAngle, double tiltAngle, int[] shadingElevation, int[] shadingOpacity ) {
this.latitude = latitude;
this.longitude = longitude;
this.cellsMaxPower = cellsMaxPower;
@ -35,10 +36,11 @@ public class SolarPowerPlant {
this.tiltAngle = tiltAngle;
this.shadingElevation = shadingElevation;
this.shadingOpacity = shadingOpacity;
this.cellsTempCoeff = cellsTempCoeff / 100;
}
public float getPower(double solarPowerNormal, double solarPowerDiffuse, long epochTimeSeconds) {
public float getPower(double solarPowerNormal, double solarPowerDiffuse, long epochTimeSeconds, float ambientTemperature) {
Instant i = Instant.ofEpochSecond(epochTimeSeconds); //currentTimeMillis is in GMT
ZonedDateTime dateTime = ZonedDateTime.ofInstant(i, ZoneId.of("GMT"));
@ -70,10 +72,23 @@ public class SolarPowerPlant {
}
}
}
double dcPower = (solarPowerNormal * efficiency + solarPowerDiffuse * diffuseEfficiency )* cellsEfficiency * cellsArea;
float totalRadiationOnCell = (float) (solarPowerNormal * efficiency + solarPowerDiffuse * diffuseEfficiency); //flat plate equivalent of the solar irradiance
float cellTemperature = calcCellTemperature(ambientTemperature,totalRadiationOnCell);
double dcPower = totalRadiationOnCell * cellsEfficiency * (1+(cellTemperature - 25)*cellsTempCoeff) * cellsArea;
double acPower = Math.min(dcPower * inverterEfficiency, inverterPowerLimit);
return (float) acPower;
}
public static float calcCellTemperature(float ambientTemperature, float totalIrradiance){
//models from here: https://www.scielo.br/j/babt/a/FBq5Pmm4gSFqsfh3V8MxfGN/ Photovoltaic Cell Temperature Estimation for a Grid-Connect Photovoltaic Systems in Curitiba
//float cellTemperature = 30.006f + 0.0175f*(totalIrradiance-300f)+1.14f*(ambientTemperature-25f); //Lasnier and Ang Lasnier, F.; Ang, T. G. Photovoltaic engineering handbook, 1st ed.; IOP Publishing LTD: Lasnier, France, 1990; pp. 258.
//float cellTemperature = ambientTemperature + 0.028f*totalIrradiance-1f; //Schott Schott, T. Operation temperatures of PV modules. Photovoltaic solar energy conference 1985, pp. 392-396.
float cellTemperature = ambientTemperature + 0.0342f*totalIrradiance; //Ross model: https://www.researchgate.net/publication/275438802_Thermal_effects_of_the_extended_holographic_regions_for_holographic_planar_concentrator
//assuming "not so well cooled" : 0.0342
return cellTemperature;
}
}

View file

@ -187,6 +187,7 @@ public class ManageLocationsActivity extends NavigationActivity {
EditText editCellsMaxPower = (EditText) dialogView.findViewById(R.id.EditLocation_Cell_Max_Power);
EditText editCellsArea = (EditText) dialogView.findViewById(R.id.EditLocation_Cells_Area);
EditText editCellsEfficiency = (EditText) dialogView.findViewById(R.id.EditLocation_Cell_Efficiency);
EditText editCellsTempCoeff = (EditText) dialogView.findViewById(R.id.EditLocation_Cell_Temp_Coeff);
EditText editDiffuseEfficiency = (EditText) dialogView.findViewById(R.id.EditLocation_Diffuse_Efficiency);
EditText editInverterPowerLimit = (EditText) dialogView.findViewById(R.id.EditLocation_Inverter_Power_Limit);
EditText editInverterEfficiency = (EditText) dialogView.findViewById(R.id.EditLocation_Inverter_Efficiency);
@ -204,6 +205,8 @@ public class ManageLocationsActivity extends NavigationActivity {
editCellsArea.setText(Float.toString(city.getCellsArea()));
editCellsEfficiency.setText(Float.toString(city.getCellsEfficiency()));
editCellsEfficiency.setFilters(new InputFilter[]{ new InputFilterMinMax(0, 100)});
editCellsTempCoeff.setText(Float.toString(city.getCellsTempCoeff()));
editCellsTempCoeff.setFilters(new InputFilter[]{ new InputFilterMinMax(-100, 100)});
editDiffuseEfficiency.setText(Float.toString(city.getDiffuseEfficiency()));
editDiffuseEfficiency.setFilters(new InputFilter[]{ new InputFilterMinMax(0, 100)});
editInverterPowerLimit.setText(Float.toString(city.getInverterPowerLimit()));
@ -237,6 +240,7 @@ public class ManageLocationsActivity extends NavigationActivity {
Float.parseFloat(editCellsMaxPower.getText().toString().isEmpty() ? "0" : editCellsMaxPower.getText().toString()),
Float.parseFloat(editCellsArea.getText().toString().isEmpty() ? "0" : editCellsArea.getText().toString()),
Float.parseFloat(editCellsEfficiency.getText().toString().isEmpty() ? "0" : editCellsEfficiency.getText().toString()),
Float.parseFloat(editCellsTempCoeff.getText().toString().isEmpty() ? "0" : editCellsTempCoeff.getText().toString()),
Float.parseFloat(editDiffuseEfficiency.getText().toString().isEmpty() ? "0" : editDiffuseEfficiency.getText().toString()),
Float.parseFloat(editInverterPowerLimit.getText().toString().isEmpty() ? "0" : editInverterPowerLimit.getText().toString()),
Float.parseFloat(editInverterEfficiency.getText().toString().isEmpty() ? "0" : editInverterEfficiency.getText().toString()),

View file

@ -17,6 +17,7 @@ public class CityToWatch {
private float cellsMaxPower;
private float cellsArea;
private float cellsEfficiency;
private float cellsTempCoeff;
private float diffuseEfficiency;
private float inverterPowerLimit;
private float inverterEfficiency;
@ -39,6 +40,7 @@ public class CityToWatch {
this.cellsMaxPower = 650;
this.cellsArea = 3.18f;
this.cellsEfficiency = 19.3f;
this.cellsTempCoeff = -0.4f;
this.diffuseEfficiency = 40;
this.inverterPowerLimit = 600;
this.inverterEfficiency = 95;
@ -182,4 +184,12 @@ public class CityToWatch {
public String getShadingOpacityString() {
return Arrays.toString(shadingOpacity).replaceAll("\\[|\\]|\\s", "");
}
public float getCellsTempCoeff() {
return cellsTempCoeff;
}
public void setCellsTempCoeff(float cellsTempCoeff) {
this.cellsTempCoeff = cellsTempCoeff;
}
}

View file

@ -20,7 +20,7 @@ import static androidx.core.app.JobIntentService.enqueueWork;
*/
public class SQLiteHelper extends SQLiteOpenHelper {
private static final int DATABASE_VERSION = 1;
private static final int DATABASE_VERSION = 2;
private Context context;
private List<City> allCities = new ArrayList<>();
@ -53,6 +53,7 @@ public class SQLiteHelper extends SQLiteOpenHelper {
private static final String CITIES_TO_WATCH_TILT_ANGLE = "tilt_angle";
private static final String CITIES_TO_WATCH_SHADING_ELEVATION = "shading_elevation";
private static final String CITIES_TO_WATCH_SHADING_OPACITY = "shading_opacity";
private static final String CITIES_TO_WATCH_CELLS_TEMP_COEFF = "cells_temp_coeff";
//Names of columns in TABLE_FORECAST
private static final String FORECAST_ID = "forecast_id";
@ -135,7 +136,8 @@ public class SQLiteHelper extends SQLiteOpenHelper {
CITIES_TO_WATCH_AZIMUTH_ANGLE + " REAL NOT NULL," +
CITIES_TO_WATCH_TILT_ANGLE + " REAL NOT NULL," +
CITIES_TO_WATCH_SHADING_ELEVATION + " VARCHAR(255) NOT NULL," +
CITIES_TO_WATCH_SHADING_OPACITY + " VARCHAR(255) NOT NULL)";
CITIES_TO_WATCH_SHADING_OPACITY + " VARCHAR(255) NOT NULL," +
CITIES_TO_WATCH_CELLS_TEMP_COEFF + " REAL NOT NULL)";
public static SQLiteHelper getInstance(Context context) {
if (instance == null && context != null) {
@ -160,6 +162,12 @@ public class SQLiteHelper extends SQLiteOpenHelper {
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
switch(oldVersion) {
case 1:
db.execSQL("ALTER TABLE "+TABLE_CITIES_TO_WATCH+" ADD COLUMN "+CITIES_TO_WATCH_CELLS_TEMP_COEFF+" REAL DEFAULT 0");
// we want both updates, so no break statement here...
}
}
@ -185,6 +193,7 @@ public class SQLiteHelper extends SQLiteOpenHelper {
values.put(CITIES_TO_WATCH_TILT_ANGLE,city.getTiltAngle());
values.put(CITIES_TO_WATCH_SHADING_ELEVATION,city.getShadingElevationString());
values.put(CITIES_TO_WATCH_SHADING_OPACITY,city.getShadingOpacityString());
values.put(CITIES_TO_WATCH_CELLS_TEMP_COEFF,city.getCellsTempCoeff());
long id=database.insert(TABLE_CITIES_TO_WATCH, null, values);
@ -218,6 +227,7 @@ public class SQLiteHelper extends SQLiteOpenHelper {
", " + CITIES_TO_WATCH_TILT_ANGLE +
", " + CITIES_TO_WATCH_SHADING_ELEVATION +
", " + CITIES_TO_WATCH_SHADING_OPACITY +
", " + CITIES_TO_WATCH_CELLS_TEMP_COEFF +
", " + CITIES_TO_WATCH_COLUMN_RANK +
" FROM " + TABLE_CITIES_TO_WATCH +
" WHERE " + CITIES_TO_WATCH_CITY_ID + " = ?", arguments);
@ -240,7 +250,8 @@ public class SQLiteHelper extends SQLiteOpenHelper {
cityToWatch.setTiltAngle(Float.parseFloat(cursor.getString(12)));
cityToWatch.setShadingElevation(cursor.getString(13));
cityToWatch.setShadingOpacity(cursor.getString(14));
cityToWatch.setRank(Integer.parseInt(cursor.getString(15)));
cityToWatch.setCellsTempCoeff(Float.parseFloat(cursor.getString(15)));
cityToWatch.setRank(Integer.parseInt(cursor.getString(16)));
cursor.close();
}
@ -271,6 +282,7 @@ public class SQLiteHelper extends SQLiteOpenHelper {
", " + CITIES_TO_WATCH_TILT_ANGLE +
", " + CITIES_TO_WATCH_SHADING_ELEVATION +
", " + CITIES_TO_WATCH_SHADING_OPACITY +
", " + CITIES_TO_WATCH_CELLS_TEMP_COEFF +
", " + CITIES_TO_WATCH_COLUMN_RANK +
" FROM " + TABLE_CITIES_TO_WATCH
, new String[]{});
@ -295,7 +307,8 @@ public class SQLiteHelper extends SQLiteOpenHelper {
cityToWatch.setTiltAngle(Float.parseFloat(cursor.getString(12)));
cityToWatch.setShadingElevation(cursor.getString(13));
cityToWatch.setShadingOpacity(cursor.getString(14));
cityToWatch.setRank(Integer.parseInt(cursor.getString(15)));
cityToWatch.setCellsTempCoeff(Float.parseFloat(cursor.getString(15)));
cityToWatch.setRank(Integer.parseInt(cursor.getString(16)));
cityToWatchList.add(cityToWatch);
} while (cursor.moveToNext());
@ -325,6 +338,7 @@ public class SQLiteHelper extends SQLiteOpenHelper {
values.put(CITIES_TO_WATCH_TILT_ANGLE,cityToWatch.getTiltAngle());
values.put(CITIES_TO_WATCH_SHADING_ELEVATION,cityToWatch.getShadingElevationString());
values.put(CITIES_TO_WATCH_SHADING_OPACITY,cityToWatch.getShadingOpacityString());
values.put(CITIES_TO_WATCH_CELLS_TEMP_COEFF,cityToWatch.getCellsTempCoeff());
database.update(TABLE_CITIES_TO_WATCH, values, CITIES_TO_WATCH_ID + " = ?",
new String[]{String.valueOf(cityToWatch.getId())});

View file

@ -5,9 +5,9 @@ import android.text.Spanned;
public class InputFilterMinMax implements InputFilter {
private int min, max;
private float min, max;
public InputFilterMinMax(int min, int max) {
public InputFilterMinMax(float min, float max) {
this.min = min;
this.max = max;
}
@ -15,17 +15,30 @@ public class InputFilterMinMax implements InputFilter {
@Override
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
try {
String oldString = dest.toString();
String insertString = source.toString();
String newString = new StringBuilder(oldString).insert(dstart,insertString).toString();
String newString = oldString.substring(0, dstart) + oldString.substring(dend);
newString = newString.substring(0, dstart) + insertString + newString.substring(dstart);
float input = Float.parseFloat(newString);
if (isInRange(min, max, input))
if (isInRange(min, max, input)) {
return null;
else
} else {
if (source.equals("") && dest.toString().length() != 1) {
//backspace was clicked, do not accept that change, unless user is deleting the last char
return dest.subSequence(dstart, dend);
} else {
return "";
}
}
} catch (NumberFormatException e) {
e.printStackTrace();
}
return "";
}
private boolean isInRange(int a, int b, float c) {
private boolean isInRange(float a, float b, float c) {
return b > a ? c >= a && c <= b : c >= b && c <= a;
}

View file

@ -23,6 +23,7 @@ public class ItemViewHolder extends RecyclerView.ViewHolder {
public TextView cellsMaxPower;
public TextView cellsArea;
public TextView cellsEfficiency;
public TextView cellsTempCoeff;
public TextView diffuseEfficiency;
public TextView inverterPowerLimit;
public TextView inverterEfficiency;
@ -41,6 +42,7 @@ public class ItemViewHolder extends RecyclerView.ViewHolder {
this.cellsMaxPower = (TextView) itemView.findViewById(R.id.city_cells_max_power);
this.cellsArea = (TextView) itemView.findViewById(R.id.city_cells_area);
this.cellsEfficiency = (TextView) itemView.findViewById(R.id.city_cells_efficiency);
this.cellsTempCoeff = (TextView) itemView.findViewById(R.id.city_cells_temp_coeff);
this.diffuseEfficiency = (TextView) itemView.findViewById(R.id.city_diffuse_efficiency);
this.inverterPowerLimit = (TextView) itemView.findViewById(R.id.city_inverter_power_limit);
this.inverterEfficiency = (TextView) itemView.findViewById(R.id.city_inverter_efficiency);

View file

@ -63,6 +63,7 @@ public class RecyclerOverviewListAdapter extends RecyclerView.Adapter<ItemViewHo
holder.tiltAngle.setText(context.getString(R.string.edit_location_hint_tilt) +": "+ cities.get(position).getTiltAngle());
holder.cellsMaxPower.setText(context.getString(R.string.edit_location_hint_cells_max_power) +": "+ cities.get(position).getCellsMaxPower());
holder.cellsEfficiency.setText(context.getString(R.string.edit_location_hint_cells_efficiency) +": "+ cities.get(position).getCellsEfficiency());
holder.cellsTempCoeff.setText(context.getString(R.string.edit_location_hint_cells_temp_coeff) +": "+ cities.get(position).getCellsTempCoeff());
holder.cellsArea.setText(context.getString(R.string.edit_location_hint_cells_area) +": "+ cities.get(position).getCellsArea());
holder.diffuseEfficiency.setText(context.getString(R.string.edit_location_hint_diffuse_efficiency) +": "+ cities.get(position).getDiffuseEfficiency());
holder.inverterPowerLimit.setText(context.getString(R.string.edit_location_hint_inverter_power_limit) +": "+ cities.get(position).getInverterPowerLimit());
@ -114,7 +115,7 @@ public class RecyclerOverviewListAdapter extends RecyclerView.Adapter<ItemViewHo
public CityToWatch getCitytoWatch(int position){
return cities.get(position);
}
public void updateCity(CityToWatch cityToWatch, String cityName, float latitude, float longitude, float azimuth, float tilt, float cellsMaxPower, float cellsArea, float cellsEfficiency, float diffuseEfficiency, float inverterPowerLimit, float inverterEfficiency, int[] shadingElevation, int[] shadingOpacity) {
public void updateCity(CityToWatch cityToWatch, String cityName, float latitude, float longitude, float azimuth, float tilt, float cellsMaxPower, float cellsArea, float cellsEfficiency, float cellsTempCoeff, float diffuseEfficiency, float inverterPowerLimit, float inverterEfficiency, int[] shadingElevation, int[] shadingOpacity) {
cityToWatch.setCityName(cityName);
cityToWatch.setLatitude(latitude);
cityToWatch.setLongitude(longitude);
@ -123,6 +124,7 @@ public class RecyclerOverviewListAdapter extends RecyclerView.Adapter<ItemViewHo
cityToWatch.setCellsMaxPower(cellsMaxPower);
cityToWatch.setCellsArea(cellsArea);
cityToWatch.setCellsEfficiency(cellsEfficiency);
cityToWatch.setCellsTempCoeff(cellsTempCoeff);
cityToWatch.setDiffuseEfficiency(diffuseEfficiency);
cityToWatch.setInverterPowerLimit(inverterPowerLimit);
cityToWatch.setInverterEfficiency(inverterEfficiency);

View file

@ -66,6 +66,7 @@ public class OMDataExtractor implements IDataExtractor {
JSONObject jsonData = new JSONObject(data);
JSONArray timeArray = jsonData.getJSONArray("time");
JSONArray weathercodeArray = jsonData.has("weathercode") ? jsonData.getJSONArray("weathercode") : null;
JSONArray tempArray = jsonData.has("temperature_2m") ? jsonData.getJSONArray("temperature_2m") : null;
JSONArray directRadiationArray = jsonData.has("direct_normal_irradiance") ? jsonData.getJSONArray("direct_normal_irradiance") : null;
JSONArray diffuseRadiationArray = jsonData.has("diffuse_radiation") ? jsonData.getJSONArray("diffuse_radiation") : null;
@ -73,18 +74,20 @@ public class OMDataExtractor implements IDataExtractor {
SQLiteHelper dbhelper = SQLiteHelper.getInstance(context);
CityToWatch city = dbhelper.getCityToWatch(cityID);
SolarPowerPlant spp = new SolarPowerPlant(city.getLatitude(), city.getLongitude(), city.getCellsMaxPower(), city.getCellsArea(), city.getCellsEfficiency(),city.getDiffuseEfficiency(), city.getInverterPowerLimit(), city.getInverterEfficiency(), city.getAzimuthAngle(), city.getTiltAngle(), city.getShadingElevation(), city.getShadingOpacity());
SolarPowerPlant spp = new SolarPowerPlant(city.getLatitude(), city.getLongitude(), city.getCellsMaxPower(), city.getCellsArea(), city.getCellsEfficiency(), city.getCellsTempCoeff(), city.getDiffuseEfficiency(), city.getInverterPowerLimit(), city.getInverterEfficiency(), city.getAzimuthAngle(), city.getTiltAngle(), city.getShadingElevation(), city.getShadingOpacity());
IApiToDatabaseConversion conversion = new OMToDatabaseConversion();
float ambientTemperature = 25;
for (int i = 0; i < timeArray.length(); i++) {
HourlyForecast hourlyForecast = new HourlyForecast();
hourlyForecast.setTimestamp(System.currentTimeMillis() / 1000);
if (timeArray!=null && !timeArray.isNull(i)) hourlyForecast.setForecastTime(timeArray.getLong(i)*1000L);
if (tempArray != null && !tempArray.isNull(i)) ambientTemperature = (float) tempArray.getDouble(i);
if (weathercodeArray!=null && !weathercodeArray.isNull(i)) hourlyForecast.setWeatherID(conversion.convertWeatherCategory(weathercodeArray.getString(i)));
if (directRadiationArray!=null && !directRadiationArray.isNull(i)) hourlyForecast.setDirectRadiationNormal((float) directRadiationArray.getDouble(i));
if (diffuseRadiationArray!=null && !diffuseRadiationArray.isNull(i)) hourlyForecast.setDiffuseRadiation((float) diffuseRadiationArray.getDouble(i));
hourlyForecast.setPower(spp.getPower(hourlyForecast.getDirectRadiationNormal(),hourlyForecast.getDiffuseRadiation(), timeArray.getLong(i)-1800)); //use solar position 1/2h earlier for calculation of average power in preceding hour
hourlyForecast.setPower(spp.getPower(hourlyForecast.getDirectRadiationNormal(),hourlyForecast.getDiffuseRadiation(), timeArray.getLong(i)-1800 , ambientTemperature)); //use solar position 1/2h earlier for calculation of average power in preceding hour
hourlyForecasts.add(hourlyForecast);
}
return hourlyForecasts;

View file

@ -24,7 +24,7 @@ public class OMHttpRequest {
SharedPreferences sharedPreferences=PreferenceManager.getDefaultSharedPreferences(context);
return String.format(
"%sforecast?latitude=%s&longitude=%s&forecast_days=%s&hourly=diffuse_radiation,direct_normal_irradiance,weathercode&daily=weathercode,sunrise,sunset,&timeformat=unixtime&timezone=auto",
"%sforecast?latitude=%s&longitude=%s&forecast_days=%s&hourly=temperature_2m,diffuse_radiation,direct_normal_irradiance,weathercode&daily=weathercode,sunrise,sunset,&timeformat=unixtime&timezone=auto",
BuildConfig.BASE_URL,
lat,
lon,

View file

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M440,200L440,40h80v160h-80ZM706,310 L651,255 763,140 819,197 706,310ZM760,520v-80h160v80L760,520ZM440,920L440,760h80v160h-80ZM254,308 L140,197l57,-56 113,113 -56,54ZM762,820L651,705l54,-54 114,110 -57,59ZM40,520v-80h160v80L40,520ZM197,820 L141,763 253,651 282,678 311,706 197,820ZM480,720q-100,0 -170,-70t-70,-170q0,-100 70,-170t170,-70q100,0 170,70t70,170q0,100 -70,170t-170,70ZM480,640q66,0 113,-47t47,-113q0,-66 -47,-113t-113,-47q-66,0 -113,47t-47,113q0,66 47,113t113,47ZM480,480Z"/>
</vector>

View file

@ -1,9 +0,0 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M6.76,4.84l-1.8,-1.79 -1.41,1.41 1.79,1.79 1.42,-1.41zM4,10.5L1,10.5v2h3v-2zM13,0.55h-2L11,3.5h2L13,0.55zM20.45,4.46l-1.41,-1.41 -1.79,1.79 1.41,1.41 1.79,-1.79zM17.24,18.16l1.79,1.8 1.41,-1.41 -1.8,-1.79 -1.4,1.4zM20,10.5v2h3v-2h-3zM12,5.5c-3.31,0 -6,2.69 -6,6s2.69,6 6,6 6,-2.69 6,-6 -2.69,-6 -6,-6zM11,22.45h2L13,19.5h-2v2.95zM3.55,18.54l1.41,1.41 1.79,-1.8 -1.41,-1.41 -1.79,1.8z"/>
</vector>

View file

@ -17,7 +17,6 @@
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:gravity="center"
android:text="@string/card_day_heading"
android:textAllCaps="true"
android:textColor="@color/colorPrimaryDark"
android:textStyle="bold" />

View file

@ -20,7 +20,6 @@
android:textAllCaps="true"
android:textColor="@color/colorPrimaryDark"
android:textStyle="bold"
android:text="@string/card_details_heading"
android:id="@+id/card_details_title"/>
<View
@ -44,7 +43,6 @@
android:layout_column="0"
android:layout_marginBottom="5dp"
android:layout_row="0"
android:text="@string/card_details_rain60min"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/colorPrimaryDark" />
@ -79,7 +77,6 @@
android:layout_column="0"
android:layout_marginBottom="5dp"
android:layout_row="2"
android:text="@string/card_details_humidity"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/colorPrimaryDark" />
@ -101,7 +98,6 @@
android:layout_column="0"
android:layout_marginBottom="5dp"
android:layout_row="3"
android:text="@string/card_details_pressure"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/colorPrimaryDark" />
@ -123,7 +119,6 @@
android:layout_column="0"
android:layout_marginBottom="5dp"
android:layout_row="4"
android:text="@string/card_details_wind_speed"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/colorPrimaryDark" />

View file

@ -91,6 +91,16 @@
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:hint="@string/edit_location_hint_cells_efficiency"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/edit_location_hint_cells_temp_coeff"/>
<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/EditLocation_Cell_Temp_Coeff"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="numberDecimal|numberSigned"
android:hint="@string/edit_location_hint_cells_temp_coeff"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"

View file

@ -89,6 +89,14 @@
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
tools:visibility="visible" />
<TextView
android:id="@+id/city_cells_temp_coeff"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="@string/edit_location_hint_cells_temp_coeff"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
tools:visibility="visible" />
<TextView
android:id="@+id/city_diffuse_efficiency"

View file

@ -5,7 +5,7 @@
android:id="@+id/menu_sun_position"
android:orderInCategory="80"
android:visible="true"
android:icon="@drawable/ic_wb_sunny_24px"
android:icon="@drawable/ic_sunny_24px"
app:showAsAction="always"
android:title="@string/action_sun_position" />
<item

View file

@ -15,11 +15,6 @@
<string name="activity_settings">Einstellungen</string>
<string name="action_refresh">Aktualisieren</string>
<string name="activity_settings_title">Einstellungen</string>
<string name="card_details_heading">Jetzt</string>
<string name="card_details_humidity">Luftfeuchte:</string>
<string name="card_details_pressure">Luftdruck:</string>
<string name="card_details_wind_speed">Wind:</string>
<string name="card_day_heading">Tagesverlauf</string>
<string name="card_week_heading">Woche</string>
<string name="error_convert_to_json">Die erhaltenen Wetterdaten entsprachen nicht dem erwarteten Format.</string>
<string name="error_no_internet">Das Gerät ist nicht mit dem Internet verbunden!</string>
@ -30,20 +25,10 @@
<string name="dialog_add_label">Ort, der hinzugefügt werden soll:</string>
<string name="dialog_add_no_city_found">Es wurde kein Ort gefunden, der der Eingabe entspricht. Es wird empfohlen, einen Eintrag aus dem Dropdown-Menu zu wählen.</string>
<string name="navigation_drawer_close">Navigationsleiste schließen</string>
<string name="settings_title_units">Maßeinheiten</string>
<string name="settings_title_temperature">Temperaturen</string>
<string name="settings_title_distance">Entfernungen</string>
<string name="settings_celsius">Celsius</string>
<string name="settings_fahrenheit">Fahrenheit</string>
<string name="settings_kilometers">Kilometer</string>
<string name="settings_miles">Meilen</string>
<string name="settings_summary_distance">Die Einheit, die zur Anzeige von Entfernungen verwendet wird.</string>
<string name="settings_summary_temperature">Die Einheit, die zur Anzeige von Temperaturen verwendet wird.</string>
<string name="settings_interval_summary">Setzen Sie das Interval der automatischen Updates</string>
<string name="settings_intervals">Intervalle</string>
<string name="settings_update_interval">Update Intervall</string>
<string name="settings_title_display_options">Anzeigeoptionen</string>
<string name="navigation_drawer_open">Navigationsleiste öffnen</string>
<string name="abbreviation_friday">Fr.</string>
<string name="abbreviation_monday">Mo.</string>
@ -62,7 +47,6 @@
<string name="long_press_text">Halten und ziehen Sie, um die Orte zu sortieren.</string>
<string name="swipe_to_delete">Wischen Sie zum Löschen</string>
<string name="infoProvider">Die Wetterinformationen stammen von Open-Meteo.com</string>
<string name="monday">Montag</string>
<string name="tuesday">Dienstag</string>
<string name="wednesday">Mittwoch</string>
@ -71,34 +55,17 @@
<string name="saturday">Samstag</string>
<string name="sunday">Sonntag</string>
<string name="chart">Diagramm</string>
<string name="units_rh">%rh</string>
<string name="units_kWh">kWh</string>
<string name="units_km">km</string>
<string name="units_hPa">hPa</string>
<string name="units_Bft">Bft</string>
<string name="units_mm_h">mm/h</string>
<string name="units_km_h">km/h</string>
<string name="units_mph">mph</string>
<string name="card_details_rain60min">☔ 60min:</string>
<string name="error_no_rain60min_data">keine Daten</string>
<string name="dialog_edit_change_button">Ändern</string>
<string name="edit_location_hint_name">Name</string>
<string name="settings_search">Suche</string>
<string name="settings_temp_decimal">Temperatur mit einer Dezimalstelle anzeigen</string>
<string name="settings_darkmode">Android 10+ Dark Mode</string>
<string name="settings_position">Position</string>
<string name="settings_GPS_summary">Erlaubt die Nutzung der aktuellen GPS Position im ersten TAB und im Widget für das aktuelle Wetter. Das Update der Position wird automatisch vom Widget ausgelöst.</string>
<string name="settings_GPS_position">GPS Nutzung erlauben</string>
<string name="error_no_position">Keine Position verfügbar</string>
<string name="settings_time24h">24-Stunden-Format</string>
<string name="summary_time24h">Systemeinstellung überschreiben</string>
<string name="settings_wind">Beaufort-Skala benutzen</string>
<string name="dialog_OK_button">OK</string>
<string name="dialog_NO_button">Nein</string>
<string name="dialog_Later_button">Vielleicht später</string>
<string name="dialog_StarOnGitHub">Mögen Sie diese App? Bitte vergeben Sie einen Stern auf GitHub und spendieren Sie dem Entwickler einen Kaffee über PayPal.</string>
<string name="settings_show_pressure">Luftdruck anzeigen</string>
<string name="settings_GPS_manual">Nur manuell aktualisieren</string>
<string name="settings_interval_quarter">15 min</string>
<string name="settings_interval_half">30 min</string>
<string name="settings_interval_one">1 h</string>
@ -106,13 +73,7 @@
<string name="settings_interval_six">6 h</string>
<string name="settings_interval_twelve">12 h</string>
<string name="settings_interval_twentyfour">24 h</string>
<string name="rationale_background_location">Bitte erlauben Sie auch die GPS Nutzung im Hintergrund für die Verwendung im Widget</string>
<string name="error_no_gps">Bitte GPS einschalten</string>
<string name="slide3_heading">Open-Meteo</string>
<string name="summary_reanalyze">Verbessern der Wochensymbole durch Analyse der stündlichen Vorhersagen zwischen Sonnenaufgang und Sonnenuntergang (experimentell).</string>
<string name="settings_reanalyze">Wochensymbole</string>
<string name="settings_precipitation">Niederschlag</string>
<string name="summary_precipitation">Schneemenge anstelle der entsprechenden Wassermenge verwenden.</string>
<string name="settings_forecast_days">Anzahl der prognostizierten Tage</string>
<string name="edit_location_hint_latitude">Breitengrad [°]</string>
<string name="edit_location_hint_longitude">Längengrad [°]</string>
@ -133,5 +94,6 @@
<string name="activity_help">Anleitung</string>
<string name="action_sun_position">Sonnenposition</string>
<string name="action_sun_elevation">Elevation [°]</string>
<string name="edit_location_hint_cells_temp_coeff">Temperaturkoeffizient [%/K]</string>
</resources>

View file

@ -1,24 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="temperatureUnitsArray">
<item>@string/settings_celsius</item>
<item>@string/settings_fahrenheit</item>
</string-array>
<string-array name="temperatureUnitsValues">
<item>1</item>
<item>2</item>
</string-array>
<string-array name="distanceUnitsArray">
<item>@string/settings_kilometers</item>
<item>@string/settings_miles</item>
</string-array>
<string-array name="distanceUnitsValues">
<item>1</item>
<item>2</item>
</string-array>
<string-array name="refreshIntervalArray">
<item>@string/settings_interval_quarter</item>
<item>@string/settings_interval_half</item>

View file

@ -13,12 +13,7 @@
<string name="slide1_text">solXpect forecasts the output of your solar power plant</string>
<string name="slide2_heading" translatable="false">Github</string>
<string name="slide2_text">The sourcecode of this app is available at GitHub. For further explanations have a look at the About Page.</string>
<string name="card_details_heading">Now</string>
<string name="card_details_humidity">Humidity:</string>
<string name="card_details_pressure">Pressure:</string>
<string name="card_details_wind_speed">Wind:</string>
<string name="card_week_heading">Week</string>
<string name="card_day_heading">Course of the day</string>
<string name="card_error_heading">Error fetching weather data</string>
<string name="card_error_content">Please try to update!</string>
<string name="about_privacy_heading">Privacy Info</string>
@ -30,15 +25,6 @@
<string name="about_github" translatable="false"><a href="https://github.com/woheller69/solxpect">Github-Repo</a></string>
<string name="about_openmeteo" translatable="false"><a href="https://open-meteo.com">Open-Meteo \n(Attribution 4.0 International CC BY 4.0)</a></string>
<string name="activity_settings_title">Settings</string>
<string name="settings_title_units">Units</string>
<string name="settings_summary_temperature">Set the unit to use for displaying temperatures</string>
<string name="settings_title_temperature">Temperatures</string>
<string name="settings_celsius">Celsius</string>
<string name="settings_fahrenheit">Fahrenheit</string>
<string name="settings_summary_distance">Set the unit to use for displaying distances</string>
<string name="settings_title_distance">Distances</string>
<string name="settings_kilometers">Kilometers</string>
<string name="settings_miles">Miles</string>
<string name="abbreviation_monday">Mo.</string>
<string name="abbreviation_tuesday">Tu.</string>
<string name="abbreviation_wednesday">We.</string>
@ -79,42 +65,18 @@
<string name="saturday">Saturday</string>
<string name="sunday">Sunday</string>
<string name="chart">Chart</string>
<string name="units_rh">%rh</string>
<string name="units_kWh">kWh</string>
<string name="units_km">km</string>
<string name="units_hPa">hPa</string>
<string name="units_Bft">Bft</string>
<string name="units_mm_h">mm/h</string>
<string name="units_km_h">km/h</string>
<string name="units_mph">mph</string>
<string name="card_details_rain60min">☔ 60min:</string>
<string name="error_no_rain60min_data">no data</string>
<string name="dialog_edit_change_button">Modify</string>
<string name="edit_location_hint_name">Name</string>
<string name="settings_search">Search</string>
<string name="settings_temp_decimal">Show temperature with one decimal</string>
<string name="settings_darkmode">Android 10+ Dark Mode</string>
<string name="settings_position">Position</string>
<string name="settings_GPS_summary">Allow usage of current GPS position in first TAB and in current weather widget. Position update is triggered automatically by widget.</string>
<string name="settings_GPS_position">Allow GPS usage</string>
<string name="error_no_position">No position available</string>
<string name="settings_time24h">24-hour format</string>
<string name="summary_time24h">Override system setting</string>
<string name="settings_wind">Use Beaufort scale</string>
<string name="dialog_OK_button">OK</string>
<string name="dialog_NO_button">No</string>
<string name="dialog_Later_button">Maybe later</string>
<string name="dialog_StarOnGitHub">Do you like this app? Please give a star on GitHub and buy the developer a coffee via PayPal.</string>
<string name="settings_show_pressure">Show air pressure</string>
<string name="action_position" translatable="false">Update Location</string>
<string name="settings_GPS_manual">Manual update only</string>
<string name="rationale_background_location">Please also allow GPS usage in the background for use in the widget</string>
<string name="error_no_gps">Please turn on GPS</string>
<string name="slide3_heading">Open-Meteo</string>
<string name="summary_reanalyze">Improve week icons by analyzing hourly forecasts between sunrise and sunset (experimental).</string>
<string name="settings_reanalyze">Week Icons</string>
<string name="settings_precipitation">Precipitation</string>
<string name="summary_precipitation">Use snow amount instead of the equivalent amount of water.</string>
<string name="settings_forecast_days">Number of forecast days</string>
<string name="edit_location_hint_latitude">Latitude [°]</string>
<string name="edit_location_hint_longitude">Longitude [°]</string>
@ -135,4 +97,5 @@
<string name="activity_help">Instructions</string>
<string name="action_sun_position">Sun position</string>
<string name="action_sun_elevation">Elevation [°]</string>
<string name="edit_location_hint_cells_temp_coeff">Temperature coefficient [%/K]</string>
</resources>

View file

@ -0,0 +1,6 @@
Estimate panel temperature from ambient temperature and radiation
Additional parameter: temperature coefficient
Adapt efficiency according to these values
Bugfix input filter
!!! Please enter temperature coeffient of your panels !!!