3 import java
.nio
.ByteBuffer
;
9 System
.loadLibrary("a");
13 static final native void clinit();
15 final native void init(double fc
, double ts
);
18 * construct a new {@link lpf} object
20 * @param fc cut-off frequency unit(hz)
21 * @param ts sampling time unit(s)
23 public lpf(double fc
, double ts
) {
28 * get coefficient for Low Pass Filter
30 * @return filter coefficient [0,1]
32 public final native double alpha();
35 * get output for Low Pass Filter
37 * @return filter output
39 public final native double output();
42 * generate for Low Pass Filter
44 * @param fc cut-off frequency unit(hz)
45 * @param ts sampling time unit(s)
48 public final native lpf
gen(double fc
, double ts
);
51 * calculate for Low Pass Filter
53 * @param x input value
54 * @return output value
56 public final native double iter(double x
);
59 * zeroing for Low Pass Filter
63 public final native lpf
zero();