public class Acceleration
extends java.lang.Object
AccelerometerService
.
By using a device's accelerometer the acceleration force in three physical axes can be determined.AccelerometerService
Constructor and Description |
---|
Acceleration(double x,
double y,
double z,
java.time.LocalDateTime timestamp)
Creates a new immutable Acceleration instance with the given x, y, z, and timestamp values.
|
Modifier and Type | Method and Description |
---|---|
java.time.LocalDateTime |
getTimestamp()
Returns the timestamp of the reading
|
double |
getX()
Returns the x value of the reading.
|
double |
getY()
Returns the y value of the reading
|
double |
getZ()
Returns the z value of the reading
|
public Acceleration(double x, double y, double z, java.time.LocalDateTime timestamp)
x
- The x value of the readingy
- The y value of the readingz
- The z value of the readingtimestamp
- The instant at which the reading took placepublic double getX()
public double getY()
public double getZ()
public java.time.LocalDateTime getTimestamp()