Pre-AlphaV8 - Epizentrum fehlt
This commit is contained in:
parent
d3a1380658
commit
2e0da83888
@ -74,7 +74,7 @@ public class EarthquakeLocation extends FragmentActivity implements OnMapReadyCa
|
||||
}
|
||||
else{
|
||||
defineGPSforMapping(task.getResult());
|
||||
//ermittleEpizentrum(task.getResult());
|
||||
ermittleEpizentrum(task.getResult());
|
||||
//mapToDetektionssignale(task.getResult());
|
||||
}
|
||||
}
|
||||
@ -126,7 +126,6 @@ public class EarthquakeLocation extends FragmentActivity implements OnMapReadyCa
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
public Epizentrum ermittleEpizentrum(DataSnapshot data)
|
||||
{
|
||||
System.out.println("############## EPIZENTRUM ###############");
|
||||
Erdbeben erdbeben = new Erdbeben();
|
||||
erdbeben.addDetektionssignalList(mapToDetektionssignale(data));
|
||||
|
||||
@ -135,12 +134,14 @@ public class EarthquakeLocation extends FragmentActivity implements OnMapReadyCa
|
||||
|
||||
if(Objects.isNull(epizentrum))
|
||||
{
|
||||
System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!Kein Epizentrum vorhanden!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
|
||||
Log.i(TAGEPIZENTRUM, "Kein Epizentrum vorhanden");
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.i(TAGEPIZENTRUM, "Epizentrum konnte ermittelt werden, Koordinaten: " + epizentrum.getKoordinaten().getX() + " " + epizentrum.getKoordinaten().getY());
|
||||
}
|
||||
|
||||
return epizentrum;
|
||||
}
|
||||
|
||||
@ -148,7 +149,6 @@ public class EarthquakeLocation extends FragmentActivity implements OnMapReadyCa
|
||||
@RequiresApi(api = Build.VERSION_CODES.O)
|
||||
public ArrayList<Detektionssignal> mapToDetektionssignale(DataSnapshot data)
|
||||
{
|
||||
System.out.println("################# ARRAYLIST ####################");
|
||||
ArrayList<Detektionssignal> detektionssignale = new ArrayList<>();
|
||||
for(int i=1; i<=3; i++)
|
||||
{
|
||||
@ -178,6 +178,7 @@ public class EarthquakeLocation extends FragmentActivity implements OnMapReadyCa
|
||||
|
||||
detektionssignale.add(detektionssignal);
|
||||
}
|
||||
System.out.println("detektionsingale size: " + detektionssignale.size());
|
||||
return detektionssignale;
|
||||
}
|
||||
|
||||
|
@ -357,7 +357,7 @@ public class MainActivity extends AppCompatActivity {
|
||||
mDatenbank.child("IDG" + k).child("e_laengengrad").setValue(currentLocation.getLongitude());
|
||||
mDatenbank.child("IDG" + k).child("h_timestamp").setValue(Calendar.getInstance().getTimeInMillis());
|
||||
mDatenbank.child("IDG" + k).child("i_amplitude").setValue(1000);
|
||||
mDatenbank.child("IDG" + k).child("w_wellengeschwindigkeit").setValue(4500);
|
||||
mDatenbank.child("IDG" + k).child("w_wellengeschwindigkeit").setValue(10);
|
||||
}
|
||||
|
||||
//###### Bei Eintragungen in der DB ####
|
||||
@ -383,12 +383,14 @@ public class MainActivity extends AppCompatActivity {
|
||||
{
|
||||
if(analyzeForFullIDG(data,i))
|
||||
{
|
||||
//Ein voller IDG slot
|
||||
takenIDG++;
|
||||
}
|
||||
}
|
||||
|
||||
if(takenIDG>=1 && takenIDG <=5)
|
||||
{
|
||||
//Schreibt bei einer neuen vollen IDG ins Display
|
||||
//Kommt bei einer neuen vollen IDG ins Display
|
||||
for(writtenDevices = writtenDevices; writtenDevices <= takenIDG; writtenDevices++)
|
||||
{
|
||||
setDisplayText(data,writtenDevices);
|
||||
@ -458,7 +460,6 @@ public class MainActivity extends AppCompatActivity {
|
||||
txtDevice4.setText("Device ID 4: "+ androidid + "\n" + "Latitude: "+breitengrad+"\n"+ "Longitude: "+ laengengrad +"\n" + "Time Stamp: "+ timestamp + "\n" + "LocalDateTime: " + localedatetime +"\n"+ "Amplitude: "+ ampltiude+"\n");
|
||||
break;
|
||||
default:
|
||||
System.out.println("Default Case trifft zu");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ import java.util.Objects;
|
||||
public class Erdbeben {
|
||||
|
||||
//ToDO anpassen an Szenario umso mehr umso wahrscheinlich ein Ergebnis, oder Abbruchbedingung mit do while
|
||||
public static final Integer SCHLEIFENDURCHLAUFTE = 400;
|
||||
public static final Integer SCHLEIFENDURCHLAUFTE = 5000;
|
||||
|
||||
|
||||
private Epizentrum epizentrum;
|
||||
|
@ -22,8 +22,8 @@ import java.util.Set;
|
||||
public class EpizentrumRechnung {
|
||||
|
||||
//ToDo Schrittweite und Abstand auf Szenario anpassen
|
||||
private static final double SCHRITTWEITE = 0.02;
|
||||
private static final double MAX_ABSTAND = 0.009;
|
||||
private static final double SCHRITTWEITE = 0.0001;
|
||||
private static final double MAX_ABSTAND = 0.001;
|
||||
private static final int DOUBLESTELLEN = 8;
|
||||
|
||||
|
||||
@ -86,6 +86,7 @@ public class EpizentrumRechnung {
|
||||
}
|
||||
|
||||
public boolean genuegendSchnittpunktevorhanden(ArrayList<EndpunktVerbindung> endpunktVerbindungen) {
|
||||
System.out.println("<<<<<<<<<<<<<<<<<<<<<<genuegendSchnittpunktevorhanden");
|
||||
|
||||
for (EndpunktVerbindung endpunktVerbindung : endpunktVerbindungen) {
|
||||
ArrayList<Schnittpunkt> templist;
|
||||
|
Loading…
x
Reference in New Issue
Block a user