|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectstella.sensor.Meteorology
public class Meteorology
Class that reads weather ascii files in the format:
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.
| Nested Class Summary | |
|---|---|
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. |
| Field Summary | |
|---|---|
private boolean[] |
bad
|
private Date |
date
|
static DateFormat |
DF
|
private double[] |
reading
|
private boolean |
totbad
|
private boolean[] |
valid
|
| Constructor Summary | |
|---|---|
Meteorology(Date d,
boolean ov,
double[] val,
boolean[] b,
boolean[] v)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final DateFormat DF
private Date date
private boolean totbad
private double[] reading
private boolean[] bad
private boolean[] valid
| Constructor Detail |
|---|
public Meteorology(Date d,
boolean ov,
double[] val,
boolean[] b,
boolean[] v)
| Method Detail |
|---|
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 String toString()
toString in class Object
public static List<Meteorology> parse(List<String> ascii,
Date from,
Date to)
throws ParseException
ParseException
public 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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||