MPressure extends Measurement { @NonNull @Override public String toRow() { return millis + "," + nano + ",alt," + Numbers.format3.format(pressure); } MPressure(long millis, long nano, double altitude, double climb, float pressure); @NonNull @Override String toRow(); @NonNull @Override String toString(); final String sensor; final double altitude; final double climb; final double pressure; }
@Test public void toRow() { assertEquals("1541348400990,111000,alt,1014.3", pres.toRow()); }