public class Meteorology extends Object implements Comparable<Meteorology>
dd.MM.yy HH:mm:ss[*] val[*] ...val...The first two colums are the date, followed by an asterisk, if overall weather was bad. Then, individual sensor averages follow, again marked with an asterisk, if currently bad or in retardation. A exclamation mark signals sensor stalled, the bad/good flag is than taken from the prior reading.
| Modifier and Type | Class and Description |
|---|---|
static class |
Meteorology.Robotel
Reads the robotel weather data and does some statistic.
|
static class |
Meteorology.Stella
Reads the Tenerife weather data and does some statistic.
|
| Modifier and Type | Field and Description |
|---|---|
private boolean[] |
bad |
private Date |
date |
static DateFormat |
DF |
private double[] |
reading |
private boolean |
totbad |
private boolean[] |
valid |
private static WeatherSql |
wsql |
| Constructor and Description |
|---|
Meteorology(Date d,
boolean ov,
double[] val,
boolean[] b,
boolean[] v) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Meteorology after)
For sorting: sort to date.
|
static int |
count(List<Meteorology> data,
int month,
int hour)
Count the data points with calendar
|
static List<Meteorology> |
db(List<String> names,
List<Double> badtoggles,
List<Double> goodtoggles,
List<Long> retards,
Date from,
Date to)
Parses a db entry and tries to reconstruct the filters retard time.
|
static List<Meteorology> |
filter(List<Meteorology> data,
int sensor,
double trigg,
boolean below) |
static int[] |
getBadTriggers(List<Meteorology> data)
Count the instances, when the sensor on a specific index was the first
to report bad.
|
static int |
getBadWeather(List<Meteorology> data,
int month,
int hour)
Count the data points with good weather.
|
Date |
getDate()
Returns the date of the sensor average.
|
static int |
getSensorBelow(List<Meteorology> data,
int month,
int hour,
int i0,
double below,
Boolean bad)
Count data points where the sensor at the given index is lower than
the stated value and the weather is bad like the Boolean
|
int |
getSensorCount()
Number of sensor reading.
|
boolean |
isBad(int i0)
Returns true, if the sensor on the given index reported bad.
|
boolean |
isValid(int i0)
Returns true, if the sensor on the given index is valid.
|
boolean |
overallBad()
Returns true, if the overall reading is bad.
|
static List<Meteorology> |
parse(List<String> ascii,
Date from,
Date to)
Parses a list of lines into a list of meterology object, file should
be in correct time order to assure proper assignment of invalid readings
|
static Meteorology |
parseLine(Meteorology last,
String line) |
double |
reading(int i0)
Returns the sensor reading on the given index.
|
String |
toString()
String.
|
public static final DateFormat DF
private final Date date
private final boolean totbad
private final double[] reading
private final boolean[] bad
private final boolean[] valid
private static final WeatherSql wsql
public Meteorology(Date d, boolean ov, double[] val, boolean[] b, boolean[] v)
public static Meteorology parseLine(Meteorology last, String line) throws ParseException
ParseExceptionpublic boolean overallBad()
public boolean isBad(int i0)
public boolean isValid(int i0)
public double reading(int i0)
public Date getDate()
public int getSensorCount()
public int compareTo(Meteorology after)
compareTo in interface Comparable<Meteorology>public static List<Meteorology> parse(List<String> ascii, Date from, Date to) throws ParseException
ParseExceptionpublic static List<Meteorology> db(List<String> names, List<Double> badtoggles, List<Double> goodtoggles, List<Long> retards, Date from, Date to)
public static int count(List<Meteorology> data, int month, int hour)
public static int getBadWeather(List<Meteorology> data, int month, int hour)
public static List<Meteorology> filter(List<Meteorology> data, int sensor, double trigg, boolean below)
public static int getSensorBelow(List<Meteorology> data, int month, int hour, int i0, double below, Boolean bad)
public static int[] getBadTriggers(List<Meteorology> data)