add help activity

This commit is contained in:
woheller69 2023-04-08 17:46:35 +02:00
parent 4a81cd5c1f
commit 36a3e02c52
11 changed files with 211 additions and 2 deletions

View file

@ -8,6 +8,7 @@ solXpect forecasts the output of your solar power plant
This app takes direct and diffuse radiation data from Open-Meteo.com, calculates the position
of the sun and projects the radiation on your solar panel.
It shows the estimated energy production for the next hours and up to 16 days.
The hourly values are calculated for the preceding hour. So if there are 150 Wh shown at 11:00 this means you can expect 150 Wh between 10:00 and 11:00.
<img src="fastlane/metadata/android/en-US/images/phoneScreenshots/01.png" width="150"/> <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/02.png" width="150"/> <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/03.png" width="150"/> <img src="fastlane/metadata/android/en-US/images/phoneScreenshots/04.png" width="150"/>

View file

@ -46,6 +46,15 @@
android:name="android.support.PARENT_ACTIVITY"
android:value="org.woheller69.weather.activities.ForecastCityActivity" />
</activity>
<activity
android:name="org.woheller69.weather.activities.HelpActivity"
android:label="@string/activity_help"
android:parentActivityName="org.woheller69.weather.activities.ForecastCityActivity"
android:theme="@style/AppTheme.NoActionBar">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.woheller69.weather.activities.ForecastCityActivity" />
</activity>
<activity
android:name="org.woheller69.weather.activities.SettingsActivity"

View file

@ -0,0 +1,50 @@
<html>
<body>
<h2>Übersicht</h2>
Diese App nimmt direkte und diffuse Strahlungsdaten 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 Stunden und bis zu 16 Tage an.
Die Stundenwerte werden für die vorangegangene Stunde berechnet.
Wenn also um 11:00 Uhr 150 Wh angezeigt werden, bedeutet dies, dass Sie zwischen 10:00 und 11:00 Uhr mit 150 Wh rechnen können.
<h2>Parameter</h2>
<h3>Breitengrad [°]</h3>
Der Breitengrad gibt die Nord-Süd-Position Ihres Solarkraftwerks an. Er reicht von 90° am Südpol bis 90° am Nordpol.
<h3>Längengrad [°]</h3>
Der Längengrad gibt die Ost-West-Position Ihres Solarkraftwerks an. Der Nullmeridian definiert 0° Länge. Positive Längen liegen östlich des Nullmeridians, negative westlich.
<h3>Azimut [°]</h3>
Azimut ist die horizontale Richtung Ihres Solarkraftwerks. 0° entspricht Norden, 90° entspricht Osten, 180° entspricht Süden, 270° entspricht Westen.
<h3>Neigung [°]</h3>
Neigung ist die vertikale Richtung Ihres Solarkraftwerks. 0° bedeutet, dass es zum Himmel zeigt, 90° bedeutet, dass es vertikal ausgerichtet ist und zum Horizont zeigt.
<h3>Zellen max. Leistung [W]</h3>
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>Zellenfläche [m<sup>2</sup>]</h3>
Größe der aktiven 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 %.
Dies ist auch abhängig von Reflexionen etc.
<h3>Wechselrichterleistung [W]</h3>
Maximale Leistung Ihres Wechselrichters. Wenn sie niedriger als die maximale Leistung Ihrer Panels ist, wird die Ausgangsleistung Ihres Systems durch diesen Parameter begrenzt.
<h3>Wirkungsgrad des Wechselrichters [%]</h3>
Wirkungsgrad Ihres Wechselrichters.
<h3>Abschattung</h3>
In diesem Abschnitt können Sie die Abschattung Ihrer Solarmodule definieren.
Für jeden Azimutwinkelbereich können Sie die minimale Elevation der Sonne angeben, die erforderlich ist, damit die Sonne auf die Solarmodule trifft.
Für Elevationen unter diesem Wert können Sie den Prozentsatz der Abschattung festlegen. Beispielsweise reduziert ein Gebäude die Strahlung um 100 %, ein Baum vielleicht nur um 60 %.
</body>
</html>

View file

@ -0,0 +1,50 @@
<html>
<body>
<h2>Overview</h2>
This app takes direct and diffuse radiation data from Open-Meteo.com, calculates the position
of the sun and projects the radiation on your solar panel.
It shows the estimated energy production for the next hours and up to 16 days.
The hourly values are calculated for the preceding hour.
So if there are 150 Wh shown at 11:00 this means you can expect 150 Wh between 10:00 and 11:00.
<h2>Parameters</h2>
<h3>Latitude [°]</h3>
Latitude specifies the northsouth position of your solar power plant. It ranges from 90° at the south pole to 90° at the north pole.
<h3>Longitude [°]</h3>
Longitude specifies the eastwest position of your solar power plant. The prime meridian defines 0° longitude. Positive longitudes are east of the prime meridian, negative ones are west.
<h3>Azimuth [°]</h3>
Azimuth is the horizontal direction of your solar power plant. 0° equals North, 90° equals East, 180° equals South, 270° equals West.
<h3>Tilt [°]</h3>
Tilt is the vertical direction of your solar power plant. 0° means it points up towards the the sky, 90° means it has a vertical orientation and points towards the horizon.
<h3>Cells max power [W]</h3>
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>Cell area [m<sup>2</sup>]</h3>
Size of the active area 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%.
Also depends on reflections etc.
<h3>Inverter power [W]</h3>
Maximum power of your inverter. If it is lower than the maximum power of your panels the output power of your system will be limited by this parameter.
<h3>Inverter efficiency [%]</h3>
Efficiency of your inverter.
<h3>Shading</h3>
In this section you can define the shading on your solar panels.
For each azimuth angle range, you can specify the minimum elevation of the sun that is necessary for the sun to hit the solar panels.
For elevations below this value you can set the percentage of shading. For example, a building will reduce radiation by 100%, a tree maybe only by 60%.
</body>
</html>

View file

@ -0,0 +1,44 @@
package org.woheller69.weather.activities;
import android.content.res.AssetManager;
import android.os.Bundle;
import android.webkit.WebView;
import org.woheller69.weather.R;
import androidx.appcompat.app.ActionBar;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
public class HelpActivity extends NavigationActivity{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_help);
WebView view = findViewById(R.id.help);
String language = getResources().getConfiguration().getLocales().get(0).getLanguage();
String filename = "help-"+language+".html";
AssetManager am = getAssets();
try {
List<String> mapList = Arrays.asList(am.list("help"));
if (!mapList.contains(filename)) {
filename = "help-en.html";
}
} catch ( IOException ex){
ex.printStackTrace();
}
view.loadUrl("file:///android_asset/help/"+ filename);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) {
actionBar.setDisplayHomeAsUpEnabled(true);
}
}
}

View file

@ -174,10 +174,13 @@ public class NavigationActivity extends AppCompatActivity implements OnNavigatio
startActivity(intent);
}else if (itemId==R.id.nav_about) {
intent = new Intent(this, AboutActivity.class);
createBackStack(intent);
startActivity(intent);
}else if(itemId==R.id.nav_settings) {
intent = new Intent(this, SettingsActivity.class);
createBackStack(intent);
startActivity(intent);
}else if(itemId==R.id.nav_help) {
intent = new Intent(this, HelpActivity.class);
startActivity(intent);
}else if (itemId==R.id.star_on_github){
startActivity(new Intent(Intent.ACTION_VIEW,
Uri.parse(BuildConfig.GITHUB_URL)));

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="#FF000000"
android:pathData="M478,720q21,0 35.5,-14.5T528,670q0,-21 -14.5,-35.5T478,620q-21,0 -35.5,14.5T428,670q0,21 14.5,35.5T478,720ZM480,880q-83,0 -156,-31.5T197,763q-54,-54 -85.5,-127T80,480q0,-83 31.5,-156T197,197q54,-54 127,-85.5T480,80q83,0 156,31.5T763,197q54,54 85.5,127T880,480q0,83 -31.5,156T763,763q-54,54 -127,85.5T480,880ZM484,308q25,0 43.5,16t18.5,40q0,22 -13.5,39T502,435q-23,20 -40.5,44T444,533q0,14 10.5,23.5T479,566q15,0 25.5,-10t13.5,-25q4,-21 18,-37.5t30,-31.5q23,-22 39.5,-48t16.5,-58q0,-51 -41.5,-83.5T484,240q-38,0 -72.5,16T359,305q-7,12 -4.5,25.5T368,351q14,8 29,5t25,-17q11,-15 27.5,-23t34.5,-8Z"/>
</vector>

View file

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".activities.HelpActivity">
<include layout="@layout/toolbar" />
<WebView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/help"
android:layout_marginTop="53dp"
android:layout_width="match_parent"
android:layout_height="fill_parent" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.google.android.material.navigation.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/nav_header_main"
app:menu="@menu/activity_main_drawer" />
</androidx.drawerlayout.widget.DrawerLayout>

View file

@ -21,6 +21,10 @@
android:id="@+id/nav_settings"
android:icon="@drawable/ic_settings_24px"
android:title="@string/activity_settings" />
<item
android:id="@+id/nav_help"
android:icon="@drawable/ic_help_24px"
android:title="@string/activity_help" />
<item
android:id="@+id/nav_about"
android:icon="@drawable/ic_info_24px"

View file

@ -130,5 +130,6 @@
<string name="edit_location_shading_solar_elevation_heading">Min. Elevation der Sonne [°]</string>
<string name="edit_location_shading_opacity_heading">Abschattung unterhalb dieser Elevation [%]</string>
<string name="edit_location_shading_heading">Abschattung</string>
<string name="activity_help">Anleitung</string>
</resources>

View file

@ -132,4 +132,5 @@
<string name="edit_location_shading_solar_elevation_heading">Min. solar elevation [°]</string>
<string name="edit_location_shading_opacity_heading">Shading below this elevation [%]</string>
<string name="edit_location_shading_heading">Shading</string>
<string name="activity_help">Instructions</string>
</resources>