optional string android_version = 1;
- */
- com.google.protobuf.ByteString
- getAndroidVersionBytes();
-
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- java.util.Listrepeated .Motion_Sample imu_data = 2;
- */
- Motion_Sample getImuData(int index);
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- int getImuDataCount();
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- java.util.List extends Motion_SampleOrBuilder>
- getImuDataOrBuilderList();
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- Motion_SampleOrBuilder getImuDataOrBuilder(
- int index);
-
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- java.util.Listrepeated .Pdr_Sample pdr_data = 3;
- */
- Pdr_Sample getPdrData(int index);
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- int getPdrDataCount();
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- java.util.List extends Pdr_SampleOrBuilder>
- getPdrDataOrBuilderList();
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- Pdr_SampleOrBuilder getPdrDataOrBuilder(
- int index);
-
- /**
- * repeated .Position_Sample position_data = 4;
- */
- java.util.Listrepeated .Position_Sample position_data = 4;
- */
- Position_Sample getPositionData(int index);
- /**
- * repeated .Position_Sample position_data = 4;
- */
- int getPositionDataCount();
- /**
- * repeated .Position_Sample position_data = 4;
- */
- java.util.List extends Position_SampleOrBuilder>
- getPositionDataOrBuilderList();
- /**
- * repeated .Position_Sample position_data = 4;
- */
- Position_SampleOrBuilder getPositionDataOrBuilder(
- int index);
-
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- java.util.Listrepeated .Pressure_Sample pressure_data = 5;
- */
- Pressure_Sample getPressureData(int index);
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- int getPressureDataCount();
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- java.util.List extends Pressure_SampleOrBuilder>
- getPressureDataOrBuilderList();
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- Pressure_SampleOrBuilder getPressureDataOrBuilder(
- int index);
-
- /**
- * repeated .Light_Sample light_data = 6;
- */
- java.util.Listrepeated .Light_Sample light_data = 6;
- */
- Light_Sample getLightData(int index);
- /**
- * repeated .Light_Sample light_data = 6;
- */
- int getLightDataCount();
- /**
- * repeated .Light_Sample light_data = 6;
- */
- java.util.List extends Light_SampleOrBuilder>
- getLightDataOrBuilderList();
- /**
- * repeated .Light_Sample light_data = 6;
- */
- Light_SampleOrBuilder getLightDataOrBuilder(
- int index);
-
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- java.util.Listrepeated .GNSS_Sample gnss_data = 7;
- */
- GNSS_Sample getGnssData(int index);
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- int getGnssDataCount();
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- java.util.List extends GNSS_SampleOrBuilder>
- getGnssDataOrBuilderList();
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- GNSS_SampleOrBuilder getGnssDataOrBuilder(
- int index);
-
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- java.util.Listrepeated .WiFi_Sample wifi_data = 8;
- */
- WiFi_Sample getWifiData(int index);
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- int getWifiDataCount();
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- java.util.List extends WiFi_SampleOrBuilder>
- getWifiDataOrBuilderList();
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- WiFi_SampleOrBuilder getWifiDataOrBuilder(
- int index);
-
- /**
- * repeated .AP_Data aps_data = 9;
- */
- java.util.Listrepeated .AP_Data aps_data = 9;
- */
- AP_Data getApsData(int index);
- /**
- * repeated .AP_Data aps_data = 9;
- */
- int getApsDataCount();
- /**
- * repeated .AP_Data aps_data = 9;
- */
- java.util.List extends AP_DataOrBuilder>
- getApsDataOrBuilderList();
- /**
- * repeated .AP_Data aps_data = 9;
- */
- AP_DataOrBuilder getApsDataOrBuilder(
- int index);
-
- /**
- * - * UNIX timestamp (in milliseconds) recorded from the start of this - * trajectory data collection event. All future - * timestamps in sub classes are to be RELATIVE timestamps - * (in milliseconds) to this start time. - * E.g. - * start_timestamp = 1674819807315 (UTC 27 Jan 2023 in the morning) - * relative_timestamp = 3000 (3s) - *- * - *
optional int64 start_timestamp = 10;
- */
- long getStartTimestamp();
-
- /**
- * optional string data_identifier = 11;
- */
- String getDataIdentifier();
- /**
- * optional string data_identifier = 11;
- */
- com.google.protobuf.ByteString
- getDataIdentifierBytes();
-
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- boolean hasAccelerometerInfo();
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- Sensor_Info getAccelerometerInfo();
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- Sensor_InfoOrBuilder getAccelerometerInfoOrBuilder();
-
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- boolean hasGyroscopeInfo();
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- Sensor_Info getGyroscopeInfo();
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- Sensor_InfoOrBuilder getGyroscopeInfoOrBuilder();
-
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- boolean hasRotationVectorInfo();
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- Sensor_Info getRotationVectorInfo();
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- Sensor_InfoOrBuilder getRotationVectorInfoOrBuilder();
-
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- boolean hasMagnetometerInfo();
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- Sensor_Info getMagnetometerInfo();
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- Sensor_InfoOrBuilder getMagnetometerInfoOrBuilder();
-
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- boolean hasBarometerInfo();
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- Sensor_Info getBarometerInfo();
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- Sensor_InfoOrBuilder getBarometerInfoOrBuilder();
-
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- boolean hasLightSensorInfo();
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- Sensor_Info getLightSensorInfo();
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- Sensor_InfoOrBuilder getLightSensorInfoOrBuilder();
- }
- /**
- * Protobuf type {@code Trajectory}
- */
- public static final class Trajectory extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:Trajectory)
- TrajectoryOrBuilder {
- // Use Trajectory.newBuilder() to construct.
- private Trajectory(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Trajectory() {
- androidVersion_ = "";
- imuData_ = java.util.Collections.emptyList();
- pdrData_ = java.util.Collections.emptyList();
- positionData_ = java.util.Collections.emptyList();
- pressureData_ = java.util.Collections.emptyList();
- lightData_ = java.util.Collections.emptyList();
- gnssData_ = java.util.Collections.emptyList();
- wifiData_ = java.util.Collections.emptyList();
- apsData_ = java.util.Collections.emptyList();
- startTimestamp_ = 0L;
- dataIdentifier_ = "";
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private Trajectory(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- String s = input.readStringRequireUtf8();
-
- androidVersion_ = s;
- break;
- }
- case 18: {
- if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
- imuData_ = new java.util.ArrayListoptional string android_version = 1;
- */
- public String getAndroidVersion() {
- Object ref = androidVersion_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- androidVersion_ = s;
- return s;
- }
- }
- /**
- * optional string android_version = 1;
- */
- public com.google.protobuf.ByteString
- getAndroidVersionBytes() {
- Object ref = androidVersion_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- androidVersion_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int IMU_DATA_FIELD_NUMBER = 2;
- private java.util.Listrepeated .Motion_Sample imu_data = 2;
- */
- public java.util.Listrepeated .Motion_Sample imu_data = 2;
- */
- public java.util.List extends Motion_SampleOrBuilder>
- getImuDataOrBuilderList() {
- return imuData_;
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public int getImuDataCount() {
- return imuData_.size();
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Motion_Sample getImuData(int index) {
- return imuData_.get(index);
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Motion_SampleOrBuilder getImuDataOrBuilder(
- int index) {
- return imuData_.get(index);
- }
-
- public static final int PDR_DATA_FIELD_NUMBER = 3;
- private java.util.Listrepeated .Pdr_Sample pdr_data = 3;
- */
- public java.util.Listrepeated .Pdr_Sample pdr_data = 3;
- */
- public java.util.List extends Pdr_SampleOrBuilder>
- getPdrDataOrBuilderList() {
- return pdrData_;
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public int getPdrDataCount() {
- return pdrData_.size();
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Pdr_Sample getPdrData(int index) {
- return pdrData_.get(index);
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Pdr_SampleOrBuilder getPdrDataOrBuilder(
- int index) {
- return pdrData_.get(index);
- }
-
- public static final int POSITION_DATA_FIELD_NUMBER = 4;
- private java.util.Listrepeated .Position_Sample position_data = 4;
- */
- public java.util.Listrepeated .Position_Sample position_data = 4;
- */
- public java.util.List extends Position_SampleOrBuilder>
- getPositionDataOrBuilderList() {
- return positionData_;
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public int getPositionDataCount() {
- return positionData_.size();
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Position_Sample getPositionData(int index) {
- return positionData_.get(index);
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Position_SampleOrBuilder getPositionDataOrBuilder(
- int index) {
- return positionData_.get(index);
- }
-
- public static final int PRESSURE_DATA_FIELD_NUMBER = 5;
- private java.util.Listrepeated .Pressure_Sample pressure_data = 5;
- */
- public java.util.Listrepeated .Pressure_Sample pressure_data = 5;
- */
- public java.util.List extends Pressure_SampleOrBuilder>
- getPressureDataOrBuilderList() {
- return pressureData_;
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public int getPressureDataCount() {
- return pressureData_.size();
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Pressure_Sample getPressureData(int index) {
- return pressureData_.get(index);
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Pressure_SampleOrBuilder getPressureDataOrBuilder(
- int index) {
- return pressureData_.get(index);
- }
-
- public static final int LIGHT_DATA_FIELD_NUMBER = 6;
- private java.util.Listrepeated .Light_Sample light_data = 6;
- */
- public java.util.Listrepeated .Light_Sample light_data = 6;
- */
- public java.util.List extends Light_SampleOrBuilder>
- getLightDataOrBuilderList() {
- return lightData_;
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public int getLightDataCount() {
- return lightData_.size();
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Light_Sample getLightData(int index) {
- return lightData_.get(index);
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Light_SampleOrBuilder getLightDataOrBuilder(
- int index) {
- return lightData_.get(index);
- }
-
- public static final int GNSS_DATA_FIELD_NUMBER = 7;
- private java.util.Listrepeated .GNSS_Sample gnss_data = 7;
- */
- public java.util.Listrepeated .GNSS_Sample gnss_data = 7;
- */
- public java.util.List extends GNSS_SampleOrBuilder>
- getGnssDataOrBuilderList() {
- return gnssData_;
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public int getGnssDataCount() {
- return gnssData_.size();
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public GNSS_Sample getGnssData(int index) {
- return gnssData_.get(index);
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public GNSS_SampleOrBuilder getGnssDataOrBuilder(
- int index) {
- return gnssData_.get(index);
- }
-
- public static final int WIFI_DATA_FIELD_NUMBER = 8;
- private java.util.Listrepeated .WiFi_Sample wifi_data = 8;
- */
- public java.util.Listrepeated .WiFi_Sample wifi_data = 8;
- */
- public java.util.List extends WiFi_SampleOrBuilder>
- getWifiDataOrBuilderList() {
- return wifiData_;
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public int getWifiDataCount() {
- return wifiData_.size();
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public WiFi_Sample getWifiData(int index) {
- return wifiData_.get(index);
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public WiFi_SampleOrBuilder getWifiDataOrBuilder(
- int index) {
- return wifiData_.get(index);
- }
-
- public static final int APS_DATA_FIELD_NUMBER = 9;
- private java.util.Listrepeated .AP_Data aps_data = 9;
- */
- public java.util.Listrepeated .AP_Data aps_data = 9;
- */
- public java.util.List extends AP_DataOrBuilder>
- getApsDataOrBuilderList() {
- return apsData_;
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public int getApsDataCount() {
- return apsData_.size();
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public AP_Data getApsData(int index) {
- return apsData_.get(index);
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public AP_DataOrBuilder getApsDataOrBuilder(
- int index) {
- return apsData_.get(index);
- }
-
- public static final int START_TIMESTAMP_FIELD_NUMBER = 10;
- private long startTimestamp_;
- /**
- * - * UNIX timestamp (in milliseconds) recorded from the start of this - * trajectory data collection event. All future - * timestamps in sub classes are to be RELATIVE timestamps - * (in milliseconds) to this start time. - * E.g. - * start_timestamp = 1674819807315 (UTC 27 Jan 2023 in the morning) - * relative_timestamp = 3000 (3s) - *- * - *
optional int64 start_timestamp = 10;
- */
- public long getStartTimestamp() {
- return startTimestamp_;
- }
-
- public static final int DATA_IDENTIFIER_FIELD_NUMBER = 11;
- private volatile Object dataIdentifier_;
- /**
- * optional string data_identifier = 11;
- */
- public String getDataIdentifier() {
- Object ref = dataIdentifier_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- dataIdentifier_ = s;
- return s;
- }
- }
- /**
- * optional string data_identifier = 11;
- */
- public com.google.protobuf.ByteString
- getDataIdentifierBytes() {
- Object ref = dataIdentifier_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- dataIdentifier_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int ACCELEROMETER_INFO_FIELD_NUMBER = 12;
- private Sensor_Info accelerometerInfo_;
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- public boolean hasAccelerometerInfo() {
- return accelerometerInfo_ != null;
- }
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- public Sensor_Info getAccelerometerInfo() {
- return accelerometerInfo_ == null ? Sensor_Info.getDefaultInstance() : accelerometerInfo_;
- }
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- public Sensor_InfoOrBuilder getAccelerometerInfoOrBuilder() {
- return getAccelerometerInfo();
- }
-
- public static final int GYROSCOPE_INFO_FIELD_NUMBER = 13;
- private Sensor_Info gyroscopeInfo_;
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- public boolean hasGyroscopeInfo() {
- return gyroscopeInfo_ != null;
- }
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- public Sensor_Info getGyroscopeInfo() {
- return gyroscopeInfo_ == null ? Sensor_Info.getDefaultInstance() : gyroscopeInfo_;
- }
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- public Sensor_InfoOrBuilder getGyroscopeInfoOrBuilder() {
- return getGyroscopeInfo();
- }
-
- public static final int ROTATION_VECTOR_INFO_FIELD_NUMBER = 14;
- private Sensor_Info rotationVectorInfo_;
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- public boolean hasRotationVectorInfo() {
- return rotationVectorInfo_ != null;
- }
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- public Sensor_Info getRotationVectorInfo() {
- return rotationVectorInfo_ == null ? Sensor_Info.getDefaultInstance() : rotationVectorInfo_;
- }
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- public Sensor_InfoOrBuilder getRotationVectorInfoOrBuilder() {
- return getRotationVectorInfo();
- }
-
- public static final int MAGNETOMETER_INFO_FIELD_NUMBER = 15;
- private Sensor_Info magnetometerInfo_;
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- public boolean hasMagnetometerInfo() {
- return magnetometerInfo_ != null;
- }
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- public Sensor_Info getMagnetometerInfo() {
- return magnetometerInfo_ == null ? Sensor_Info.getDefaultInstance() : magnetometerInfo_;
- }
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- public Sensor_InfoOrBuilder getMagnetometerInfoOrBuilder() {
- return getMagnetometerInfo();
- }
-
- public static final int BAROMETER_INFO_FIELD_NUMBER = 16;
- private Sensor_Info barometerInfo_;
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- public boolean hasBarometerInfo() {
- return barometerInfo_ != null;
- }
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- public Sensor_Info getBarometerInfo() {
- return barometerInfo_ == null ? Sensor_Info.getDefaultInstance() : barometerInfo_;
- }
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- public Sensor_InfoOrBuilder getBarometerInfoOrBuilder() {
- return getBarometerInfo();
- }
-
- public static final int LIGHT_SENSOR_INFO_FIELD_NUMBER = 17;
- private Sensor_Info lightSensorInfo_;
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- public boolean hasLightSensorInfo() {
- return lightSensorInfo_ != null;
- }
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- public Sensor_Info getLightSensorInfo() {
- return lightSensorInfo_ == null ? Sensor_Info.getDefaultInstance() : lightSensorInfo_;
- }
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- public Sensor_InfoOrBuilder getLightSensorInfoOrBuilder() {
- return getLightSensorInfo();
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!getAndroidVersionBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, androidVersion_);
- }
- for (int i = 0; i < imuData_.size(); i++) {
- output.writeMessage(2, imuData_.get(i));
- }
- for (int i = 0; i < pdrData_.size(); i++) {
- output.writeMessage(3, pdrData_.get(i));
- }
- for (int i = 0; i < positionData_.size(); i++) {
- output.writeMessage(4, positionData_.get(i));
- }
- for (int i = 0; i < pressureData_.size(); i++) {
- output.writeMessage(5, pressureData_.get(i));
- }
- for (int i = 0; i < lightData_.size(); i++) {
- output.writeMessage(6, lightData_.get(i));
- }
- for (int i = 0; i < gnssData_.size(); i++) {
- output.writeMessage(7, gnssData_.get(i));
- }
- for (int i = 0; i < wifiData_.size(); i++) {
- output.writeMessage(8, wifiData_.get(i));
- }
- for (int i = 0; i < apsData_.size(); i++) {
- output.writeMessage(9, apsData_.get(i));
- }
- if (startTimestamp_ != 0L) {
- output.writeInt64(10, startTimestamp_);
- }
- if (!getDataIdentifierBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 11, dataIdentifier_);
- }
- if (accelerometerInfo_ != null) {
- output.writeMessage(12, getAccelerometerInfo());
- }
- if (gyroscopeInfo_ != null) {
- output.writeMessage(13, getGyroscopeInfo());
- }
- if (rotationVectorInfo_ != null) {
- output.writeMessage(14, getRotationVectorInfo());
- }
- if (magnetometerInfo_ != null) {
- output.writeMessage(15, getMagnetometerInfo());
- }
- if (barometerInfo_ != null) {
- output.writeMessage(16, getBarometerInfo());
- }
- if (lightSensorInfo_ != null) {
- output.writeMessage(17, getLightSensorInfo());
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getAndroidVersionBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, androidVersion_);
- }
- for (int i = 0; i < imuData_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, imuData_.get(i));
- }
- for (int i = 0; i < pdrData_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, pdrData_.get(i));
- }
- for (int i = 0; i < positionData_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(4, positionData_.get(i));
- }
- for (int i = 0; i < pressureData_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(5, pressureData_.get(i));
- }
- for (int i = 0; i < lightData_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(6, lightData_.get(i));
- }
- for (int i = 0; i < gnssData_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(7, gnssData_.get(i));
- }
- for (int i = 0; i < wifiData_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(8, wifiData_.get(i));
- }
- for (int i = 0; i < apsData_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(9, apsData_.get(i));
- }
- if (startTimestamp_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(10, startTimestamp_);
- }
- if (!getDataIdentifierBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, dataIdentifier_);
- }
- if (accelerometerInfo_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(12, getAccelerometerInfo());
- }
- if (gyroscopeInfo_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(13, getGyroscopeInfo());
- }
- if (rotationVectorInfo_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(14, getRotationVectorInfo());
- }
- if (magnetometerInfo_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(15, getMagnetometerInfo());
- }
- if (barometerInfo_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(16, getBarometerInfo());
- }
- if (lightSensorInfo_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(17, getLightSensorInfo());
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof Trajectory)) {
- return super.equals(obj);
- }
- Trajectory other = (Trajectory) obj;
-
- boolean result = true;
- result = result && getAndroidVersion()
- .equals(other.getAndroidVersion());
- result = result && getImuDataList()
- .equals(other.getImuDataList());
- result = result && getPdrDataList()
- .equals(other.getPdrDataList());
- result = result && getPositionDataList()
- .equals(other.getPositionDataList());
- result = result && getPressureDataList()
- .equals(other.getPressureDataList());
- result = result && getLightDataList()
- .equals(other.getLightDataList());
- result = result && getGnssDataList()
- .equals(other.getGnssDataList());
- result = result && getWifiDataList()
- .equals(other.getWifiDataList());
- result = result && getApsDataList()
- .equals(other.getApsDataList());
- result = result && (getStartTimestamp()
- == other.getStartTimestamp());
- result = result && getDataIdentifier()
- .equals(other.getDataIdentifier());
- result = result && (hasAccelerometerInfo() == other.hasAccelerometerInfo());
- if (hasAccelerometerInfo()) {
- result = result && getAccelerometerInfo()
- .equals(other.getAccelerometerInfo());
- }
- result = result && (hasGyroscopeInfo() == other.hasGyroscopeInfo());
- if (hasGyroscopeInfo()) {
- result = result && getGyroscopeInfo()
- .equals(other.getGyroscopeInfo());
- }
- result = result && (hasRotationVectorInfo() == other.hasRotationVectorInfo());
- if (hasRotationVectorInfo()) {
- result = result && getRotationVectorInfo()
- .equals(other.getRotationVectorInfo());
- }
- result = result && (hasMagnetometerInfo() == other.hasMagnetometerInfo());
- if (hasMagnetometerInfo()) {
- result = result && getMagnetometerInfo()
- .equals(other.getMagnetometerInfo());
- }
- result = result && (hasBarometerInfo() == other.hasBarometerInfo());
- if (hasBarometerInfo()) {
- result = result && getBarometerInfo()
- .equals(other.getBarometerInfo());
- }
- result = result && (hasLightSensorInfo() == other.hasLightSensorInfo());
- if (hasLightSensorInfo()) {
- result = result && getLightSensorInfo()
- .equals(other.getLightSensorInfo());
- }
- return result;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + ANDROID_VERSION_FIELD_NUMBER;
- hash = (53 * hash) + getAndroidVersion().hashCode();
- if (getImuDataCount() > 0) {
- hash = (37 * hash) + IMU_DATA_FIELD_NUMBER;
- hash = (53 * hash) + getImuDataList().hashCode();
- }
- if (getPdrDataCount() > 0) {
- hash = (37 * hash) + PDR_DATA_FIELD_NUMBER;
- hash = (53 * hash) + getPdrDataList().hashCode();
- }
- if (getPositionDataCount() > 0) {
- hash = (37 * hash) + POSITION_DATA_FIELD_NUMBER;
- hash = (53 * hash) + getPositionDataList().hashCode();
- }
- if (getPressureDataCount() > 0) {
- hash = (37 * hash) + PRESSURE_DATA_FIELD_NUMBER;
- hash = (53 * hash) + getPressureDataList().hashCode();
- }
- if (getLightDataCount() > 0) {
- hash = (37 * hash) + LIGHT_DATA_FIELD_NUMBER;
- hash = (53 * hash) + getLightDataList().hashCode();
- }
- if (getGnssDataCount() > 0) {
- hash = (37 * hash) + GNSS_DATA_FIELD_NUMBER;
- hash = (53 * hash) + getGnssDataList().hashCode();
- }
- if (getWifiDataCount() > 0) {
- hash = (37 * hash) + WIFI_DATA_FIELD_NUMBER;
- hash = (53 * hash) + getWifiDataList().hashCode();
- }
- if (getApsDataCount() > 0) {
- hash = (37 * hash) + APS_DATA_FIELD_NUMBER;
- hash = (53 * hash) + getApsDataList().hashCode();
- }
- hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getStartTimestamp());
- hash = (37 * hash) + DATA_IDENTIFIER_FIELD_NUMBER;
- hash = (53 * hash) + getDataIdentifier().hashCode();
- if (hasAccelerometerInfo()) {
- hash = (37 * hash) + ACCELEROMETER_INFO_FIELD_NUMBER;
- hash = (53 * hash) + getAccelerometerInfo().hashCode();
- }
- if (hasGyroscopeInfo()) {
- hash = (37 * hash) + GYROSCOPE_INFO_FIELD_NUMBER;
- hash = (53 * hash) + getGyroscopeInfo().hashCode();
- }
- if (hasRotationVectorInfo()) {
- hash = (37 * hash) + ROTATION_VECTOR_INFO_FIELD_NUMBER;
- hash = (53 * hash) + getRotationVectorInfo().hashCode();
- }
- if (hasMagnetometerInfo()) {
- hash = (37 * hash) + MAGNETOMETER_INFO_FIELD_NUMBER;
- hash = (53 * hash) + getMagnetometerInfo().hashCode();
- }
- if (hasBarometerInfo()) {
- hash = (37 * hash) + BAROMETER_INFO_FIELD_NUMBER;
- hash = (53 * hash) + getBarometerInfo().hashCode();
- }
- if (hasLightSensorInfo()) {
- hash = (37 * hash) + LIGHT_SENSOR_INFO_FIELD_NUMBER;
- hash = (53 * hash) + getLightSensorInfo().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static Trajectory parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Trajectory parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Trajectory parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Trajectory parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Trajectory parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Trajectory parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static Trajectory parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static Trajectory parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static Trajectory parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Trajectory parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(Trajectory prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code Trajectory}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builderoptional string android_version = 1;
- */
- public String getAndroidVersion() {
- Object ref = androidVersion_;
- if (!(ref instanceof String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- androidVersion_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- /**
- * optional string android_version = 1;
- */
- public com.google.protobuf.ByteString
- getAndroidVersionBytes() {
- Object ref = androidVersion_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- androidVersion_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string android_version = 1;
- */
- public Builder setAndroidVersion(
- String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- androidVersion_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string android_version = 1;
- */
- public Builder clearAndroidVersion() {
-
- androidVersion_ = getDefaultInstance().getAndroidVersion();
- onChanged();
- return this;
- }
- /**
- * optional string android_version = 1;
- */
- public Builder setAndroidVersionBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- androidVersion_ = value;
- onChanged();
- return this;
- }
-
- private java.util.Listrepeated .Motion_Sample imu_data = 2;
- */
- public java.util.Listrepeated .Motion_Sample imu_data = 2;
- */
- public int getImuDataCount() {
- if (imuDataBuilder_ == null) {
- return imuData_.size();
- } else {
- return imuDataBuilder_.getCount();
- }
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Motion_Sample getImuData(int index) {
- if (imuDataBuilder_ == null) {
- return imuData_.get(index);
- } else {
- return imuDataBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Builder setImuData(
- int index, Motion_Sample value) {
- if (imuDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureImuDataIsMutable();
- imuData_.set(index, value);
- onChanged();
- } else {
- imuDataBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Builder setImuData(
- int index, Motion_Sample.Builder builderForValue) {
- if (imuDataBuilder_ == null) {
- ensureImuDataIsMutable();
- imuData_.set(index, builderForValue.build());
- onChanged();
- } else {
- imuDataBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Builder addImuData(Motion_Sample value) {
- if (imuDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureImuDataIsMutable();
- imuData_.add(value);
- onChanged();
- } else {
- imuDataBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Builder addImuData(
- int index, Motion_Sample value) {
- if (imuDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureImuDataIsMutable();
- imuData_.add(index, value);
- onChanged();
- } else {
- imuDataBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Builder addImuData(
- Motion_Sample.Builder builderForValue) {
- if (imuDataBuilder_ == null) {
- ensureImuDataIsMutable();
- imuData_.add(builderForValue.build());
- onChanged();
- } else {
- imuDataBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Builder addImuData(
- int index, Motion_Sample.Builder builderForValue) {
- if (imuDataBuilder_ == null) {
- ensureImuDataIsMutable();
- imuData_.add(index, builderForValue.build());
- onChanged();
- } else {
- imuDataBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Builder addAllImuData(
- Iterable extends Motion_Sample> values) {
- if (imuDataBuilder_ == null) {
- ensureImuDataIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, imuData_);
- onChanged();
- } else {
- imuDataBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Builder clearImuData() {
- if (imuDataBuilder_ == null) {
- imuData_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- } else {
- imuDataBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Builder removeImuData(int index) {
- if (imuDataBuilder_ == null) {
- ensureImuDataIsMutable();
- imuData_.remove(index);
- onChanged();
- } else {
- imuDataBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Motion_Sample.Builder getImuDataBuilder(
- int index) {
- return getImuDataFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Motion_SampleOrBuilder getImuDataOrBuilder(
- int index) {
- if (imuDataBuilder_ == null) {
- return imuData_.get(index); } else {
- return imuDataBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public java.util.List extends Motion_SampleOrBuilder>
- getImuDataOrBuilderList() {
- if (imuDataBuilder_ != null) {
- return imuDataBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(imuData_);
- }
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Motion_Sample.Builder addImuDataBuilder() {
- return getImuDataFieldBuilder().addBuilder(
- Motion_Sample.getDefaultInstance());
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public Motion_Sample.Builder addImuDataBuilder(
- int index) {
- return getImuDataFieldBuilder().addBuilder(
- index, Motion_Sample.getDefaultInstance());
- }
- /**
- * repeated .Motion_Sample imu_data = 2;
- */
- public java.util.Listrepeated .Pdr_Sample pdr_data = 3;
- */
- public java.util.Listrepeated .Pdr_Sample pdr_data = 3;
- */
- public int getPdrDataCount() {
- if (pdrDataBuilder_ == null) {
- return pdrData_.size();
- } else {
- return pdrDataBuilder_.getCount();
- }
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Pdr_Sample getPdrData(int index) {
- if (pdrDataBuilder_ == null) {
- return pdrData_.get(index);
- } else {
- return pdrDataBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Builder setPdrData(
- int index, Pdr_Sample value) {
- if (pdrDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePdrDataIsMutable();
- pdrData_.set(index, value);
- onChanged();
- } else {
- pdrDataBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Builder setPdrData(
- int index, Pdr_Sample.Builder builderForValue) {
- if (pdrDataBuilder_ == null) {
- ensurePdrDataIsMutable();
- pdrData_.set(index, builderForValue.build());
- onChanged();
- } else {
- pdrDataBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Builder addPdrData(Pdr_Sample value) {
- if (pdrDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePdrDataIsMutable();
- pdrData_.add(value);
- onChanged();
- } else {
- pdrDataBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Builder addPdrData(
- int index, Pdr_Sample value) {
- if (pdrDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePdrDataIsMutable();
- pdrData_.add(index, value);
- onChanged();
- } else {
- pdrDataBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Builder addPdrData(
- Pdr_Sample.Builder builderForValue) {
- if (pdrDataBuilder_ == null) {
- ensurePdrDataIsMutable();
- pdrData_.add(builderForValue.build());
- onChanged();
- } else {
- pdrDataBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Builder addPdrData(
- int index, Pdr_Sample.Builder builderForValue) {
- if (pdrDataBuilder_ == null) {
- ensurePdrDataIsMutable();
- pdrData_.add(index, builderForValue.build());
- onChanged();
- } else {
- pdrDataBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Builder addAllPdrData(
- Iterable extends Pdr_Sample> values) {
- if (pdrDataBuilder_ == null) {
- ensurePdrDataIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, pdrData_);
- onChanged();
- } else {
- pdrDataBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Builder clearPdrData() {
- if (pdrDataBuilder_ == null) {
- pdrData_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- } else {
- pdrDataBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Builder removePdrData(int index) {
- if (pdrDataBuilder_ == null) {
- ensurePdrDataIsMutable();
- pdrData_.remove(index);
- onChanged();
- } else {
- pdrDataBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Pdr_Sample.Builder getPdrDataBuilder(
- int index) {
- return getPdrDataFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Pdr_SampleOrBuilder getPdrDataOrBuilder(
- int index) {
- if (pdrDataBuilder_ == null) {
- return pdrData_.get(index); } else {
- return pdrDataBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public java.util.List extends Pdr_SampleOrBuilder>
- getPdrDataOrBuilderList() {
- if (pdrDataBuilder_ != null) {
- return pdrDataBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(pdrData_);
- }
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Pdr_Sample.Builder addPdrDataBuilder() {
- return getPdrDataFieldBuilder().addBuilder(
- Pdr_Sample.getDefaultInstance());
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public Pdr_Sample.Builder addPdrDataBuilder(
- int index) {
- return getPdrDataFieldBuilder().addBuilder(
- index, Pdr_Sample.getDefaultInstance());
- }
- /**
- * repeated .Pdr_Sample pdr_data = 3;
- */
- public java.util.Listrepeated .Position_Sample position_data = 4;
- */
- public java.util.Listrepeated .Position_Sample position_data = 4;
- */
- public int getPositionDataCount() {
- if (positionDataBuilder_ == null) {
- return positionData_.size();
- } else {
- return positionDataBuilder_.getCount();
- }
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Position_Sample getPositionData(int index) {
- if (positionDataBuilder_ == null) {
- return positionData_.get(index);
- } else {
- return positionDataBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Builder setPositionData(
- int index, Position_Sample value) {
- if (positionDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePositionDataIsMutable();
- positionData_.set(index, value);
- onChanged();
- } else {
- positionDataBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Builder setPositionData(
- int index, Position_Sample.Builder builderForValue) {
- if (positionDataBuilder_ == null) {
- ensurePositionDataIsMutable();
- positionData_.set(index, builderForValue.build());
- onChanged();
- } else {
- positionDataBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Builder addPositionData(Position_Sample value) {
- if (positionDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePositionDataIsMutable();
- positionData_.add(value);
- onChanged();
- } else {
- positionDataBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Builder addPositionData(
- int index, Position_Sample value) {
- if (positionDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePositionDataIsMutable();
- positionData_.add(index, value);
- onChanged();
- } else {
- positionDataBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Builder addPositionData(
- Position_Sample.Builder builderForValue) {
- if (positionDataBuilder_ == null) {
- ensurePositionDataIsMutable();
- positionData_.add(builderForValue.build());
- onChanged();
- } else {
- positionDataBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Builder addPositionData(
- int index, Position_Sample.Builder builderForValue) {
- if (positionDataBuilder_ == null) {
- ensurePositionDataIsMutable();
- positionData_.add(index, builderForValue.build());
- onChanged();
- } else {
- positionDataBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Builder addAllPositionData(
- Iterable extends Position_Sample> values) {
- if (positionDataBuilder_ == null) {
- ensurePositionDataIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, positionData_);
- onChanged();
- } else {
- positionDataBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Builder clearPositionData() {
- if (positionDataBuilder_ == null) {
- positionData_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000008);
- onChanged();
- } else {
- positionDataBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Builder removePositionData(int index) {
- if (positionDataBuilder_ == null) {
- ensurePositionDataIsMutable();
- positionData_.remove(index);
- onChanged();
- } else {
- positionDataBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Position_Sample.Builder getPositionDataBuilder(
- int index) {
- return getPositionDataFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Position_SampleOrBuilder getPositionDataOrBuilder(
- int index) {
- if (positionDataBuilder_ == null) {
- return positionData_.get(index); } else {
- return positionDataBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public java.util.List extends Position_SampleOrBuilder>
- getPositionDataOrBuilderList() {
- if (positionDataBuilder_ != null) {
- return positionDataBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(positionData_);
- }
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Position_Sample.Builder addPositionDataBuilder() {
- return getPositionDataFieldBuilder().addBuilder(
- Position_Sample.getDefaultInstance());
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public Position_Sample.Builder addPositionDataBuilder(
- int index) {
- return getPositionDataFieldBuilder().addBuilder(
- index, Position_Sample.getDefaultInstance());
- }
- /**
- * repeated .Position_Sample position_data = 4;
- */
- public java.util.Listrepeated .Pressure_Sample pressure_data = 5;
- */
- public java.util.Listrepeated .Pressure_Sample pressure_data = 5;
- */
- public int getPressureDataCount() {
- if (pressureDataBuilder_ == null) {
- return pressureData_.size();
- } else {
- return pressureDataBuilder_.getCount();
- }
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Pressure_Sample getPressureData(int index) {
- if (pressureDataBuilder_ == null) {
- return pressureData_.get(index);
- } else {
- return pressureDataBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Builder setPressureData(
- int index, Pressure_Sample value) {
- if (pressureDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePressureDataIsMutable();
- pressureData_.set(index, value);
- onChanged();
- } else {
- pressureDataBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Builder setPressureData(
- int index, Pressure_Sample.Builder builderForValue) {
- if (pressureDataBuilder_ == null) {
- ensurePressureDataIsMutable();
- pressureData_.set(index, builderForValue.build());
- onChanged();
- } else {
- pressureDataBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Builder addPressureData(Pressure_Sample value) {
- if (pressureDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePressureDataIsMutable();
- pressureData_.add(value);
- onChanged();
- } else {
- pressureDataBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Builder addPressureData(
- int index, Pressure_Sample value) {
- if (pressureDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePressureDataIsMutable();
- pressureData_.add(index, value);
- onChanged();
- } else {
- pressureDataBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Builder addPressureData(
- Pressure_Sample.Builder builderForValue) {
- if (pressureDataBuilder_ == null) {
- ensurePressureDataIsMutable();
- pressureData_.add(builderForValue.build());
- onChanged();
- } else {
- pressureDataBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Builder addPressureData(
- int index, Pressure_Sample.Builder builderForValue) {
- if (pressureDataBuilder_ == null) {
- ensurePressureDataIsMutable();
- pressureData_.add(index, builderForValue.build());
- onChanged();
- } else {
- pressureDataBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Builder addAllPressureData(
- Iterable extends Pressure_Sample> values) {
- if (pressureDataBuilder_ == null) {
- ensurePressureDataIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, pressureData_);
- onChanged();
- } else {
- pressureDataBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Builder clearPressureData() {
- if (pressureDataBuilder_ == null) {
- pressureData_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000010);
- onChanged();
- } else {
- pressureDataBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Builder removePressureData(int index) {
- if (pressureDataBuilder_ == null) {
- ensurePressureDataIsMutable();
- pressureData_.remove(index);
- onChanged();
- } else {
- pressureDataBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Pressure_Sample.Builder getPressureDataBuilder(
- int index) {
- return getPressureDataFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Pressure_SampleOrBuilder getPressureDataOrBuilder(
- int index) {
- if (pressureDataBuilder_ == null) {
- return pressureData_.get(index); } else {
- return pressureDataBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public java.util.List extends Pressure_SampleOrBuilder>
- getPressureDataOrBuilderList() {
- if (pressureDataBuilder_ != null) {
- return pressureDataBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(pressureData_);
- }
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Pressure_Sample.Builder addPressureDataBuilder() {
- return getPressureDataFieldBuilder().addBuilder(
- Pressure_Sample.getDefaultInstance());
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public Pressure_Sample.Builder addPressureDataBuilder(
- int index) {
- return getPressureDataFieldBuilder().addBuilder(
- index, Pressure_Sample.getDefaultInstance());
- }
- /**
- * repeated .Pressure_Sample pressure_data = 5;
- */
- public java.util.Listrepeated .Light_Sample light_data = 6;
- */
- public java.util.Listrepeated .Light_Sample light_data = 6;
- */
- public int getLightDataCount() {
- if (lightDataBuilder_ == null) {
- return lightData_.size();
- } else {
- return lightDataBuilder_.getCount();
- }
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Light_Sample getLightData(int index) {
- if (lightDataBuilder_ == null) {
- return lightData_.get(index);
- } else {
- return lightDataBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Builder setLightData(
- int index, Light_Sample value) {
- if (lightDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureLightDataIsMutable();
- lightData_.set(index, value);
- onChanged();
- } else {
- lightDataBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Builder setLightData(
- int index, Light_Sample.Builder builderForValue) {
- if (lightDataBuilder_ == null) {
- ensureLightDataIsMutable();
- lightData_.set(index, builderForValue.build());
- onChanged();
- } else {
- lightDataBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Builder addLightData(Light_Sample value) {
- if (lightDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureLightDataIsMutable();
- lightData_.add(value);
- onChanged();
- } else {
- lightDataBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Builder addLightData(
- int index, Light_Sample value) {
- if (lightDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureLightDataIsMutable();
- lightData_.add(index, value);
- onChanged();
- } else {
- lightDataBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Builder addLightData(
- Light_Sample.Builder builderForValue) {
- if (lightDataBuilder_ == null) {
- ensureLightDataIsMutable();
- lightData_.add(builderForValue.build());
- onChanged();
- } else {
- lightDataBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Builder addLightData(
- int index, Light_Sample.Builder builderForValue) {
- if (lightDataBuilder_ == null) {
- ensureLightDataIsMutable();
- lightData_.add(index, builderForValue.build());
- onChanged();
- } else {
- lightDataBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Builder addAllLightData(
- Iterable extends Light_Sample> values) {
- if (lightDataBuilder_ == null) {
- ensureLightDataIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, lightData_);
- onChanged();
- } else {
- lightDataBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Builder clearLightData() {
- if (lightDataBuilder_ == null) {
- lightData_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000020);
- onChanged();
- } else {
- lightDataBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Builder removeLightData(int index) {
- if (lightDataBuilder_ == null) {
- ensureLightDataIsMutable();
- lightData_.remove(index);
- onChanged();
- } else {
- lightDataBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Light_Sample.Builder getLightDataBuilder(
- int index) {
- return getLightDataFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Light_SampleOrBuilder getLightDataOrBuilder(
- int index) {
- if (lightDataBuilder_ == null) {
- return lightData_.get(index); } else {
- return lightDataBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public java.util.List extends Light_SampleOrBuilder>
- getLightDataOrBuilderList() {
- if (lightDataBuilder_ != null) {
- return lightDataBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(lightData_);
- }
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Light_Sample.Builder addLightDataBuilder() {
- return getLightDataFieldBuilder().addBuilder(
- Light_Sample.getDefaultInstance());
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public Light_Sample.Builder addLightDataBuilder(
- int index) {
- return getLightDataFieldBuilder().addBuilder(
- index, Light_Sample.getDefaultInstance());
- }
- /**
- * repeated .Light_Sample light_data = 6;
- */
- public java.util.Listrepeated .GNSS_Sample gnss_data = 7;
- */
- public java.util.Listrepeated .GNSS_Sample gnss_data = 7;
- */
- public int getGnssDataCount() {
- if (gnssDataBuilder_ == null) {
- return gnssData_.size();
- } else {
- return gnssDataBuilder_.getCount();
- }
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public GNSS_Sample getGnssData(int index) {
- if (gnssDataBuilder_ == null) {
- return gnssData_.get(index);
- } else {
- return gnssDataBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public Builder setGnssData(
- int index, GNSS_Sample value) {
- if (gnssDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureGnssDataIsMutable();
- gnssData_.set(index, value);
- onChanged();
- } else {
- gnssDataBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public Builder setGnssData(
- int index, GNSS_Sample.Builder builderForValue) {
- if (gnssDataBuilder_ == null) {
- ensureGnssDataIsMutable();
- gnssData_.set(index, builderForValue.build());
- onChanged();
- } else {
- gnssDataBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public Builder addGnssData(GNSS_Sample value) {
- if (gnssDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureGnssDataIsMutable();
- gnssData_.add(value);
- onChanged();
- } else {
- gnssDataBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public Builder addGnssData(
- int index, GNSS_Sample value) {
- if (gnssDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureGnssDataIsMutable();
- gnssData_.add(index, value);
- onChanged();
- } else {
- gnssDataBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public Builder addGnssData(
- GNSS_Sample.Builder builderForValue) {
- if (gnssDataBuilder_ == null) {
- ensureGnssDataIsMutable();
- gnssData_.add(builderForValue.build());
- onChanged();
- } else {
- gnssDataBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public Builder addGnssData(
- int index, GNSS_Sample.Builder builderForValue) {
- if (gnssDataBuilder_ == null) {
- ensureGnssDataIsMutable();
- gnssData_.add(index, builderForValue.build());
- onChanged();
- } else {
- gnssDataBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public Builder addAllGnssData(
- Iterable extends GNSS_Sample> values) {
- if (gnssDataBuilder_ == null) {
- ensureGnssDataIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, gnssData_);
- onChanged();
- } else {
- gnssDataBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public Builder clearGnssData() {
- if (gnssDataBuilder_ == null) {
- gnssData_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000040);
- onChanged();
- } else {
- gnssDataBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public Builder removeGnssData(int index) {
- if (gnssDataBuilder_ == null) {
- ensureGnssDataIsMutable();
- gnssData_.remove(index);
- onChanged();
- } else {
- gnssDataBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public GNSS_Sample.Builder getGnssDataBuilder(
- int index) {
- return getGnssDataFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public GNSS_SampleOrBuilder getGnssDataOrBuilder(
- int index) {
- if (gnssDataBuilder_ == null) {
- return gnssData_.get(index); } else {
- return gnssDataBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public java.util.List extends GNSS_SampleOrBuilder>
- getGnssDataOrBuilderList() {
- if (gnssDataBuilder_ != null) {
- return gnssDataBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(gnssData_);
- }
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public GNSS_Sample.Builder addGnssDataBuilder() {
- return getGnssDataFieldBuilder().addBuilder(
- GNSS_Sample.getDefaultInstance());
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public GNSS_Sample.Builder addGnssDataBuilder(
- int index) {
- return getGnssDataFieldBuilder().addBuilder(
- index, GNSS_Sample.getDefaultInstance());
- }
- /**
- * repeated .GNSS_Sample gnss_data = 7;
- */
- public java.util.Listrepeated .WiFi_Sample wifi_data = 8;
- */
- public java.util.Listrepeated .WiFi_Sample wifi_data = 8;
- */
- public int getWifiDataCount() {
- if (wifiDataBuilder_ == null) {
- return wifiData_.size();
- } else {
- return wifiDataBuilder_.getCount();
- }
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public WiFi_Sample getWifiData(int index) {
- if (wifiDataBuilder_ == null) {
- return wifiData_.get(index);
- } else {
- return wifiDataBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public Builder setWifiData(
- int index, WiFi_Sample value) {
- if (wifiDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWifiDataIsMutable();
- wifiData_.set(index, value);
- onChanged();
- } else {
- wifiDataBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public Builder setWifiData(
- int index, WiFi_Sample.Builder builderForValue) {
- if (wifiDataBuilder_ == null) {
- ensureWifiDataIsMutable();
- wifiData_.set(index, builderForValue.build());
- onChanged();
- } else {
- wifiDataBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public Builder addWifiData(WiFi_Sample value) {
- if (wifiDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWifiDataIsMutable();
- wifiData_.add(value);
- onChanged();
- } else {
- wifiDataBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public Builder addWifiData(
- int index, WiFi_Sample value) {
- if (wifiDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWifiDataIsMutable();
- wifiData_.add(index, value);
- onChanged();
- } else {
- wifiDataBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public Builder addWifiData(
- WiFi_Sample.Builder builderForValue) {
- if (wifiDataBuilder_ == null) {
- ensureWifiDataIsMutable();
- wifiData_.add(builderForValue.build());
- onChanged();
- } else {
- wifiDataBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public Builder addWifiData(
- int index, WiFi_Sample.Builder builderForValue) {
- if (wifiDataBuilder_ == null) {
- ensureWifiDataIsMutable();
- wifiData_.add(index, builderForValue.build());
- onChanged();
- } else {
- wifiDataBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public Builder addAllWifiData(
- Iterable extends WiFi_Sample> values) {
- if (wifiDataBuilder_ == null) {
- ensureWifiDataIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, wifiData_);
- onChanged();
- } else {
- wifiDataBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public Builder clearWifiData() {
- if (wifiDataBuilder_ == null) {
- wifiData_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000080);
- onChanged();
- } else {
- wifiDataBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public Builder removeWifiData(int index) {
- if (wifiDataBuilder_ == null) {
- ensureWifiDataIsMutable();
- wifiData_.remove(index);
- onChanged();
- } else {
- wifiDataBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public WiFi_Sample.Builder getWifiDataBuilder(
- int index) {
- return getWifiDataFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public WiFi_SampleOrBuilder getWifiDataOrBuilder(
- int index) {
- if (wifiDataBuilder_ == null) {
- return wifiData_.get(index); } else {
- return wifiDataBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public java.util.List extends WiFi_SampleOrBuilder>
- getWifiDataOrBuilderList() {
- if (wifiDataBuilder_ != null) {
- return wifiDataBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(wifiData_);
- }
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public WiFi_Sample.Builder addWifiDataBuilder() {
- return getWifiDataFieldBuilder().addBuilder(
- WiFi_Sample.getDefaultInstance());
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public WiFi_Sample.Builder addWifiDataBuilder(
- int index) {
- return getWifiDataFieldBuilder().addBuilder(
- index, WiFi_Sample.getDefaultInstance());
- }
- /**
- * repeated .WiFi_Sample wifi_data = 8;
- */
- public java.util.Listrepeated .AP_Data aps_data = 9;
- */
- public java.util.Listrepeated .AP_Data aps_data = 9;
- */
- public int getApsDataCount() {
- if (apsDataBuilder_ == null) {
- return apsData_.size();
- } else {
- return apsDataBuilder_.getCount();
- }
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public AP_Data getApsData(int index) {
- if (apsDataBuilder_ == null) {
- return apsData_.get(index);
- } else {
- return apsDataBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public Builder setApsData(
- int index, AP_Data value) {
- if (apsDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureApsDataIsMutable();
- apsData_.set(index, value);
- onChanged();
- } else {
- apsDataBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public Builder setApsData(
- int index, AP_Data.Builder builderForValue) {
- if (apsDataBuilder_ == null) {
- ensureApsDataIsMutable();
- apsData_.set(index, builderForValue.build());
- onChanged();
- } else {
- apsDataBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public Builder addApsData(AP_Data value) {
- if (apsDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureApsDataIsMutable();
- apsData_.add(value);
- onChanged();
- } else {
- apsDataBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public Builder addApsData(
- int index, AP_Data value) {
- if (apsDataBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureApsDataIsMutable();
- apsData_.add(index, value);
- onChanged();
- } else {
- apsDataBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public Builder addApsData(
- AP_Data.Builder builderForValue) {
- if (apsDataBuilder_ == null) {
- ensureApsDataIsMutable();
- apsData_.add(builderForValue.build());
- onChanged();
- } else {
- apsDataBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public Builder addApsData(
- int index, AP_Data.Builder builderForValue) {
- if (apsDataBuilder_ == null) {
- ensureApsDataIsMutable();
- apsData_.add(index, builderForValue.build());
- onChanged();
- } else {
- apsDataBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public Builder addAllApsData(
- Iterable extends AP_Data> values) {
- if (apsDataBuilder_ == null) {
- ensureApsDataIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, apsData_);
- onChanged();
- } else {
- apsDataBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public Builder clearApsData() {
- if (apsDataBuilder_ == null) {
- apsData_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000100);
- onChanged();
- } else {
- apsDataBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public Builder removeApsData(int index) {
- if (apsDataBuilder_ == null) {
- ensureApsDataIsMutable();
- apsData_.remove(index);
- onChanged();
- } else {
- apsDataBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public AP_Data.Builder getApsDataBuilder(
- int index) {
- return getApsDataFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public AP_DataOrBuilder getApsDataOrBuilder(
- int index) {
- if (apsDataBuilder_ == null) {
- return apsData_.get(index); } else {
- return apsDataBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public java.util.List extends AP_DataOrBuilder>
- getApsDataOrBuilderList() {
- if (apsDataBuilder_ != null) {
- return apsDataBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(apsData_);
- }
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public AP_Data.Builder addApsDataBuilder() {
- return getApsDataFieldBuilder().addBuilder(
- AP_Data.getDefaultInstance());
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public AP_Data.Builder addApsDataBuilder(
- int index) {
- return getApsDataFieldBuilder().addBuilder(
- index, AP_Data.getDefaultInstance());
- }
- /**
- * repeated .AP_Data aps_data = 9;
- */
- public java.util.List- * UNIX timestamp (in milliseconds) recorded from the start of this - * trajectory data collection event. All future - * timestamps in sub classes are to be RELATIVE timestamps - * (in milliseconds) to this start time. - * E.g. - * start_timestamp = 1674819807315 (UTC 27 Jan 2023 in the morning) - * relative_timestamp = 3000 (3s) - *- * - *
optional int64 start_timestamp = 10;
- */
- public long getStartTimestamp() {
- return startTimestamp_;
- }
- /**
- * - * UNIX timestamp (in milliseconds) recorded from the start of this - * trajectory data collection event. All future - * timestamps in sub classes are to be RELATIVE timestamps - * (in milliseconds) to this start time. - * E.g. - * start_timestamp = 1674819807315 (UTC 27 Jan 2023 in the morning) - * relative_timestamp = 3000 (3s) - *- * - *
optional int64 start_timestamp = 10;
- */
- public Builder setStartTimestamp(long value) {
-
- startTimestamp_ = value;
- onChanged();
- return this;
- }
- /**
- * - * UNIX timestamp (in milliseconds) recorded from the start of this - * trajectory data collection event. All future - * timestamps in sub classes are to be RELATIVE timestamps - * (in milliseconds) to this start time. - * E.g. - * start_timestamp = 1674819807315 (UTC 27 Jan 2023 in the morning) - * relative_timestamp = 3000 (3s) - *- * - *
optional int64 start_timestamp = 10;
- */
- public Builder clearStartTimestamp() {
-
- startTimestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private Object dataIdentifier_ = "";
- /**
- * optional string data_identifier = 11;
- */
- public String getDataIdentifier() {
- Object ref = dataIdentifier_;
- if (!(ref instanceof String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- dataIdentifier_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- /**
- * optional string data_identifier = 11;
- */
- public com.google.protobuf.ByteString
- getDataIdentifierBytes() {
- Object ref = dataIdentifier_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- dataIdentifier_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string data_identifier = 11;
- */
- public Builder setDataIdentifier(
- String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- dataIdentifier_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string data_identifier = 11;
- */
- public Builder clearDataIdentifier() {
-
- dataIdentifier_ = getDefaultInstance().getDataIdentifier();
- onChanged();
- return this;
- }
- /**
- * optional string data_identifier = 11;
- */
- public Builder setDataIdentifierBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- dataIdentifier_ = value;
- onChanged();
- return this;
- }
-
- private Sensor_Info accelerometerInfo_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder> accelerometerInfoBuilder_;
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- public boolean hasAccelerometerInfo() {
- return accelerometerInfoBuilder_ != null || accelerometerInfo_ != null;
- }
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- public Sensor_Info getAccelerometerInfo() {
- if (accelerometerInfoBuilder_ == null) {
- return accelerometerInfo_ == null ? Sensor_Info.getDefaultInstance() : accelerometerInfo_;
- } else {
- return accelerometerInfoBuilder_.getMessage();
- }
- }
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- public Builder setAccelerometerInfo(Sensor_Info value) {
- if (accelerometerInfoBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- accelerometerInfo_ = value;
- onChanged();
- } else {
- accelerometerInfoBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- public Builder setAccelerometerInfo(
- Sensor_Info.Builder builderForValue) {
- if (accelerometerInfoBuilder_ == null) {
- accelerometerInfo_ = builderForValue.build();
- onChanged();
- } else {
- accelerometerInfoBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- public Builder mergeAccelerometerInfo(Sensor_Info value) {
- if (accelerometerInfoBuilder_ == null) {
- if (accelerometerInfo_ != null) {
- accelerometerInfo_ =
- Sensor_Info.newBuilder(accelerometerInfo_).mergeFrom(value).buildPartial();
- } else {
- accelerometerInfo_ = value;
- }
- onChanged();
- } else {
- accelerometerInfoBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- public Builder clearAccelerometerInfo() {
- if (accelerometerInfoBuilder_ == null) {
- accelerometerInfo_ = null;
- onChanged();
- } else {
- accelerometerInfo_ = null;
- accelerometerInfoBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- public Sensor_Info.Builder getAccelerometerInfoBuilder() {
-
- onChanged();
- return getAccelerometerInfoFieldBuilder().getBuilder();
- }
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- public Sensor_InfoOrBuilder getAccelerometerInfoOrBuilder() {
- if (accelerometerInfoBuilder_ != null) {
- return accelerometerInfoBuilder_.getMessageOrBuilder();
- } else {
- return accelerometerInfo_ == null ?
- Sensor_Info.getDefaultInstance() : accelerometerInfo_;
- }
- }
- /**
- * optional .Sensor_Info accelerometer_info = 12;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder>
- getAccelerometerInfoFieldBuilder() {
- if (accelerometerInfoBuilder_ == null) {
- accelerometerInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder>(
- getAccelerometerInfo(),
- getParentForChildren(),
- isClean());
- accelerometerInfo_ = null;
- }
- return accelerometerInfoBuilder_;
- }
-
- private Sensor_Info gyroscopeInfo_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder> gyroscopeInfoBuilder_;
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- public boolean hasGyroscopeInfo() {
- return gyroscopeInfoBuilder_ != null || gyroscopeInfo_ != null;
- }
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- public Sensor_Info getGyroscopeInfo() {
- if (gyroscopeInfoBuilder_ == null) {
- return gyroscopeInfo_ == null ? Sensor_Info.getDefaultInstance() : gyroscopeInfo_;
- } else {
- return gyroscopeInfoBuilder_.getMessage();
- }
- }
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- public Builder setGyroscopeInfo(Sensor_Info value) {
- if (gyroscopeInfoBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- gyroscopeInfo_ = value;
- onChanged();
- } else {
- gyroscopeInfoBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- public Builder setGyroscopeInfo(
- Sensor_Info.Builder builderForValue) {
- if (gyroscopeInfoBuilder_ == null) {
- gyroscopeInfo_ = builderForValue.build();
- onChanged();
- } else {
- gyroscopeInfoBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- public Builder mergeGyroscopeInfo(Sensor_Info value) {
- if (gyroscopeInfoBuilder_ == null) {
- if (gyroscopeInfo_ != null) {
- gyroscopeInfo_ =
- Sensor_Info.newBuilder(gyroscopeInfo_).mergeFrom(value).buildPartial();
- } else {
- gyroscopeInfo_ = value;
- }
- onChanged();
- } else {
- gyroscopeInfoBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- public Builder clearGyroscopeInfo() {
- if (gyroscopeInfoBuilder_ == null) {
- gyroscopeInfo_ = null;
- onChanged();
- } else {
- gyroscopeInfo_ = null;
- gyroscopeInfoBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- public Sensor_Info.Builder getGyroscopeInfoBuilder() {
-
- onChanged();
- return getGyroscopeInfoFieldBuilder().getBuilder();
- }
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- public Sensor_InfoOrBuilder getGyroscopeInfoOrBuilder() {
- if (gyroscopeInfoBuilder_ != null) {
- return gyroscopeInfoBuilder_.getMessageOrBuilder();
- } else {
- return gyroscopeInfo_ == null ?
- Sensor_Info.getDefaultInstance() : gyroscopeInfo_;
- }
- }
- /**
- * optional .Sensor_Info gyroscope_info = 13;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder>
- getGyroscopeInfoFieldBuilder() {
- if (gyroscopeInfoBuilder_ == null) {
- gyroscopeInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder>(
- getGyroscopeInfo(),
- getParentForChildren(),
- isClean());
- gyroscopeInfo_ = null;
- }
- return gyroscopeInfoBuilder_;
- }
-
- private Sensor_Info rotationVectorInfo_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder> rotationVectorInfoBuilder_;
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- public boolean hasRotationVectorInfo() {
- return rotationVectorInfoBuilder_ != null || rotationVectorInfo_ != null;
- }
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- public Sensor_Info getRotationVectorInfo() {
- if (rotationVectorInfoBuilder_ == null) {
- return rotationVectorInfo_ == null ? Sensor_Info.getDefaultInstance() : rotationVectorInfo_;
- } else {
- return rotationVectorInfoBuilder_.getMessage();
- }
- }
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- public Builder setRotationVectorInfo(Sensor_Info value) {
- if (rotationVectorInfoBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- rotationVectorInfo_ = value;
- onChanged();
- } else {
- rotationVectorInfoBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- public Builder setRotationVectorInfo(
- Sensor_Info.Builder builderForValue) {
- if (rotationVectorInfoBuilder_ == null) {
- rotationVectorInfo_ = builderForValue.build();
- onChanged();
- } else {
- rotationVectorInfoBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- public Builder mergeRotationVectorInfo(Sensor_Info value) {
- if (rotationVectorInfoBuilder_ == null) {
- if (rotationVectorInfo_ != null) {
- rotationVectorInfo_ =
- Sensor_Info.newBuilder(rotationVectorInfo_).mergeFrom(value).buildPartial();
- } else {
- rotationVectorInfo_ = value;
- }
- onChanged();
- } else {
- rotationVectorInfoBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- public Builder clearRotationVectorInfo() {
- if (rotationVectorInfoBuilder_ == null) {
- rotationVectorInfo_ = null;
- onChanged();
- } else {
- rotationVectorInfo_ = null;
- rotationVectorInfoBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- public Sensor_Info.Builder getRotationVectorInfoBuilder() {
-
- onChanged();
- return getRotationVectorInfoFieldBuilder().getBuilder();
- }
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- public Sensor_InfoOrBuilder getRotationVectorInfoOrBuilder() {
- if (rotationVectorInfoBuilder_ != null) {
- return rotationVectorInfoBuilder_.getMessageOrBuilder();
- } else {
- return rotationVectorInfo_ == null ?
- Sensor_Info.getDefaultInstance() : rotationVectorInfo_;
- }
- }
- /**
- * optional .Sensor_Info rotation_vector_info = 14;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder>
- getRotationVectorInfoFieldBuilder() {
- if (rotationVectorInfoBuilder_ == null) {
- rotationVectorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder>(
- getRotationVectorInfo(),
- getParentForChildren(),
- isClean());
- rotationVectorInfo_ = null;
- }
- return rotationVectorInfoBuilder_;
- }
-
- private Sensor_Info magnetometerInfo_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder> magnetometerInfoBuilder_;
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- public boolean hasMagnetometerInfo() {
- return magnetometerInfoBuilder_ != null || magnetometerInfo_ != null;
- }
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- public Sensor_Info getMagnetometerInfo() {
- if (magnetometerInfoBuilder_ == null) {
- return magnetometerInfo_ == null ? Sensor_Info.getDefaultInstance() : magnetometerInfo_;
- } else {
- return magnetometerInfoBuilder_.getMessage();
- }
- }
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- public Builder setMagnetometerInfo(Sensor_Info value) {
- if (magnetometerInfoBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- magnetometerInfo_ = value;
- onChanged();
- } else {
- magnetometerInfoBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- public Builder setMagnetometerInfo(
- Sensor_Info.Builder builderForValue) {
- if (magnetometerInfoBuilder_ == null) {
- magnetometerInfo_ = builderForValue.build();
- onChanged();
- } else {
- magnetometerInfoBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- public Builder mergeMagnetometerInfo(Sensor_Info value) {
- if (magnetometerInfoBuilder_ == null) {
- if (magnetometerInfo_ != null) {
- magnetometerInfo_ =
- Sensor_Info.newBuilder(magnetometerInfo_).mergeFrom(value).buildPartial();
- } else {
- magnetometerInfo_ = value;
- }
- onChanged();
- } else {
- magnetometerInfoBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- public Builder clearMagnetometerInfo() {
- if (magnetometerInfoBuilder_ == null) {
- magnetometerInfo_ = null;
- onChanged();
- } else {
- magnetometerInfo_ = null;
- magnetometerInfoBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- public Sensor_Info.Builder getMagnetometerInfoBuilder() {
-
- onChanged();
- return getMagnetometerInfoFieldBuilder().getBuilder();
- }
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- public Sensor_InfoOrBuilder getMagnetometerInfoOrBuilder() {
- if (magnetometerInfoBuilder_ != null) {
- return magnetometerInfoBuilder_.getMessageOrBuilder();
- } else {
- return magnetometerInfo_ == null ?
- Sensor_Info.getDefaultInstance() : magnetometerInfo_;
- }
- }
- /**
- * optional .Sensor_Info magnetometer_info = 15;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder>
- getMagnetometerInfoFieldBuilder() {
- if (magnetometerInfoBuilder_ == null) {
- magnetometerInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder>(
- getMagnetometerInfo(),
- getParentForChildren(),
- isClean());
- magnetometerInfo_ = null;
- }
- return magnetometerInfoBuilder_;
- }
-
- private Sensor_Info barometerInfo_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder> barometerInfoBuilder_;
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- public boolean hasBarometerInfo() {
- return barometerInfoBuilder_ != null || barometerInfo_ != null;
- }
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- public Sensor_Info getBarometerInfo() {
- if (barometerInfoBuilder_ == null) {
- return barometerInfo_ == null ? Sensor_Info.getDefaultInstance() : barometerInfo_;
- } else {
- return barometerInfoBuilder_.getMessage();
- }
- }
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- public Builder setBarometerInfo(Sensor_Info value) {
- if (barometerInfoBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- barometerInfo_ = value;
- onChanged();
- } else {
- barometerInfoBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- public Builder setBarometerInfo(
- Sensor_Info.Builder builderForValue) {
- if (barometerInfoBuilder_ == null) {
- barometerInfo_ = builderForValue.build();
- onChanged();
- } else {
- barometerInfoBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- public Builder mergeBarometerInfo(Sensor_Info value) {
- if (barometerInfoBuilder_ == null) {
- if (barometerInfo_ != null) {
- barometerInfo_ =
- Sensor_Info.newBuilder(barometerInfo_).mergeFrom(value).buildPartial();
- } else {
- barometerInfo_ = value;
- }
- onChanged();
- } else {
- barometerInfoBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- public Builder clearBarometerInfo() {
- if (barometerInfoBuilder_ == null) {
- barometerInfo_ = null;
- onChanged();
- } else {
- barometerInfo_ = null;
- barometerInfoBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- public Sensor_Info.Builder getBarometerInfoBuilder() {
-
- onChanged();
- return getBarometerInfoFieldBuilder().getBuilder();
- }
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- public Sensor_InfoOrBuilder getBarometerInfoOrBuilder() {
- if (barometerInfoBuilder_ != null) {
- return barometerInfoBuilder_.getMessageOrBuilder();
- } else {
- return barometerInfo_ == null ?
- Sensor_Info.getDefaultInstance() : barometerInfo_;
- }
- }
- /**
- * optional .Sensor_Info barometer_info = 16;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder>
- getBarometerInfoFieldBuilder() {
- if (barometerInfoBuilder_ == null) {
- barometerInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder>(
- getBarometerInfo(),
- getParentForChildren(),
- isClean());
- barometerInfo_ = null;
- }
- return barometerInfoBuilder_;
- }
-
- private Sensor_Info lightSensorInfo_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder> lightSensorInfoBuilder_;
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- public boolean hasLightSensorInfo() {
- return lightSensorInfoBuilder_ != null || lightSensorInfo_ != null;
- }
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- public Sensor_Info getLightSensorInfo() {
- if (lightSensorInfoBuilder_ == null) {
- return lightSensorInfo_ == null ? Sensor_Info.getDefaultInstance() : lightSensorInfo_;
- } else {
- return lightSensorInfoBuilder_.getMessage();
- }
- }
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- public Builder setLightSensorInfo(Sensor_Info value) {
- if (lightSensorInfoBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- lightSensorInfo_ = value;
- onChanged();
- } else {
- lightSensorInfoBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- public Builder setLightSensorInfo(
- Sensor_Info.Builder builderForValue) {
- if (lightSensorInfoBuilder_ == null) {
- lightSensorInfo_ = builderForValue.build();
- onChanged();
- } else {
- lightSensorInfoBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- public Builder mergeLightSensorInfo(Sensor_Info value) {
- if (lightSensorInfoBuilder_ == null) {
- if (lightSensorInfo_ != null) {
- lightSensorInfo_ =
- Sensor_Info.newBuilder(lightSensorInfo_).mergeFrom(value).buildPartial();
- } else {
- lightSensorInfo_ = value;
- }
- onChanged();
- } else {
- lightSensorInfoBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- public Builder clearLightSensorInfo() {
- if (lightSensorInfoBuilder_ == null) {
- lightSensorInfo_ = null;
- onChanged();
- } else {
- lightSensorInfo_ = null;
- lightSensorInfoBuilder_ = null;
- }
-
- return this;
- }
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- public Sensor_Info.Builder getLightSensorInfoBuilder() {
-
- onChanged();
- return getLightSensorInfoFieldBuilder().getBuilder();
- }
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- public Sensor_InfoOrBuilder getLightSensorInfoOrBuilder() {
- if (lightSensorInfoBuilder_ != null) {
- return lightSensorInfoBuilder_.getMessageOrBuilder();
- } else {
- return lightSensorInfo_ == null ?
- Sensor_Info.getDefaultInstance() : lightSensorInfo_;
- }
- }
- /**
- * optional .Sensor_Info light_sensor_info = 17;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder>
- getLightSensorInfoFieldBuilder() {
- if (lightSensorInfoBuilder_ == null) {
- lightSensorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder>(
- getLightSensorInfo(),
- getParentForChildren(),
- isClean());
- lightSensorInfo_ = null;
- }
- return lightSensorInfoBuilder_;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:Trajectory)
- }
-
- // @@protoc_insertion_point(class_scope:Trajectory)
- private static final Trajectory DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new Trajectory();
- }
-
- public static Trajectory getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser- * milliseconds from the start_timestamp - *- * - *
optional int64 relative_timestamp = 1;
- */
- long getRelativeTimestamp();
-
- /**
- * - * Both in metres. You should implement an algorithm to estimate - * these values. The values are always relative to your start point - * so the first entry should always be x = 0.0, y = 0.0 - *- * - *
optional float x = 2;
- */
- float getX();
-
- /**
- * optional float y = 3;
- */
- float getY();
- }
- /**
- * Protobuf type {@code Pdr_Sample}
- */
- public static final class Pdr_Sample extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:Pdr_Sample)
- Pdr_SampleOrBuilder {
- // Use Pdr_Sample.newBuilder() to construct.
- private Pdr_Sample(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Pdr_Sample() {
- relativeTimestamp_ = 0L;
- x_ = 0F;
- y_ = 0F;
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private Pdr_Sample(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 8: {
-
- relativeTimestamp_ = input.readInt64();
- break;
- }
- case 21: {
-
- x_ = input.readFloat();
- break;
- }
- case 29: {
-
- y_ = input.readFloat();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return Traj.internal_static_Pdr_Sample_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return Traj.internal_static_Pdr_Sample_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Pdr_Sample.class, Builder.class);
- }
-
- public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1;
- private long relativeTimestamp_;
- /**
- * - * milliseconds from the start_timestamp - *- * - *
optional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
-
- public static final int X_FIELD_NUMBER = 2;
- private float x_;
- /**
- * - * Both in metres. You should implement an algorithm to estimate - * these values. The values are always relative to your start point - * so the first entry should always be x = 0.0, y = 0.0 - *- * - *
optional float x = 2;
- */
- public float getX() {
- return x_;
- }
-
- public static final int Y_FIELD_NUMBER = 3;
- private float y_;
- /**
- * optional float y = 3;
- */
- public float getY() {
- return y_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (relativeTimestamp_ != 0L) {
- output.writeInt64(1, relativeTimestamp_);
- }
- if (x_ != 0F) {
- output.writeFloat(2, x_);
- }
- if (y_ != 0F) {
- output.writeFloat(3, y_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (relativeTimestamp_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, relativeTimestamp_);
- }
- if (x_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(2, x_);
- }
- if (y_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(3, y_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof Pdr_Sample)) {
- return super.equals(obj);
- }
- Pdr_Sample other = (Pdr_Sample) obj;
-
- boolean result = true;
- result = result && (getRelativeTimestamp()
- == other.getRelativeTimestamp());
- result = result && (
- Float.floatToIntBits(getX())
- == Float.floatToIntBits(
- other.getX()));
- result = result && (
- Float.floatToIntBits(getY())
- == Float.floatToIntBits(
- other.getY()));
- return result;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getRelativeTimestamp());
- hash = (37 * hash) + X_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getX());
- hash = (37 * hash) + Y_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getY());
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static Pdr_Sample parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Pdr_Sample parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Pdr_Sample parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Pdr_Sample parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Pdr_Sample parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Pdr_Sample parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static Pdr_Sample parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static Pdr_Sample parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static Pdr_Sample parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Pdr_Sample parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(Pdr_Sample prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code Pdr_Sample}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder- * milliseconds from the start_timestamp - *- * - *
optional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
- /**
- * - * milliseconds from the start_timestamp - *- * - *
optional int64 relative_timestamp = 1;
- */
- public Builder setRelativeTimestamp(long value) {
-
- relativeTimestamp_ = value;
- onChanged();
- return this;
- }
- /**
- * - * milliseconds from the start_timestamp - *- * - *
optional int64 relative_timestamp = 1;
- */
- public Builder clearRelativeTimestamp() {
-
- relativeTimestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private float x_ ;
- /**
- * - * Both in metres. You should implement an algorithm to estimate - * these values. The values are always relative to your start point - * so the first entry should always be x = 0.0, y = 0.0 - *- * - *
optional float x = 2;
- */
- public float getX() {
- return x_;
- }
- /**
- * - * Both in metres. You should implement an algorithm to estimate - * these values. The values are always relative to your start point - * so the first entry should always be x = 0.0, y = 0.0 - *- * - *
optional float x = 2;
- */
- public Builder setX(float value) {
-
- x_ = value;
- onChanged();
- return this;
- }
- /**
- * - * Both in metres. You should implement an algorithm to estimate - * these values. The values are always relative to your start point - * so the first entry should always be x = 0.0, y = 0.0 - *- * - *
optional float x = 2;
- */
- public Builder clearX() {
-
- x_ = 0F;
- onChanged();
- return this;
- }
-
- private float y_ ;
- /**
- * optional float y = 3;
- */
- public float getY() {
- return y_;
- }
- /**
- * optional float y = 3;
- */
- public Builder setY(float value) {
-
- y_ = value;
- onChanged();
- return this;
- }
- /**
- * optional float y = 3;
- */
- public Builder clearY() {
-
- y_ = 0F;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:Pdr_Sample)
- }
-
- // @@protoc_insertion_point(class_scope:Pdr_Sample)
- private static final Pdr_Sample DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new Pdr_Sample();
- }
-
- public static Pdr_Sample getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser- * milliseconds - *- * - *
optional int64 relative_timestamp = 1;
- */
- long getRelativeTimestamp();
-
- /**
- * - * m/s^2 - *- * - *
optional float acc_x = 2;
- */
- float getAccX();
-
- /**
- * optional float acc_y = 3;
- */
- float getAccY();
-
- /**
- * optional float acc_z = 4;
- */
- float getAccZ();
-
- /**
- * - * radians/s - *- * - *
optional float gyr_x = 5;
- */
- float getGyrX();
-
- /**
- * optional float gyr_y = 6;
- */
- float getGyrY();
-
- /**
- * optional float gyr_z = 7;
- */
- float getGyrZ();
-
- /**
- * - * unitless, 4 components should sum to ~1 - *- * - *
optional float rotation_vector_x = 8;
- */
- float getRotationVectorX();
-
- /**
- * optional float rotation_vector_y = 9;
- */
- float getRotationVectorY();
-
- /**
- * optional float rotation_vector_z = 10;
- */
- float getRotationVectorZ();
-
- /**
- * optional float rotation_vector_w = 11;
- */
- float getRotationVectorW();
-
- /**
- * - * Integer - *- * - *
optional int32 step_count = 12;
- */
- int getStepCount();
- }
- /**
- * Protobuf type {@code Motion_Sample}
- */
- public static final class Motion_Sample extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:Motion_Sample)
- Motion_SampleOrBuilder {
- // Use Motion_Sample.newBuilder() to construct.
- private Motion_Sample(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Motion_Sample() {
- relativeTimestamp_ = 0L;
- accX_ = 0F;
- accY_ = 0F;
- accZ_ = 0F;
- gyrX_ = 0F;
- gyrY_ = 0F;
- gyrZ_ = 0F;
- rotationVectorX_ = 0F;
- rotationVectorY_ = 0F;
- rotationVectorZ_ = 0F;
- rotationVectorW_ = 0F;
- stepCount_ = 0;
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private Motion_Sample(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 8: {
-
- relativeTimestamp_ = input.readInt64();
- break;
- }
- case 21: {
-
- accX_ = input.readFloat();
- break;
- }
- case 29: {
-
- accY_ = input.readFloat();
- break;
- }
- case 37: {
-
- accZ_ = input.readFloat();
- break;
- }
- case 45: {
-
- gyrX_ = input.readFloat();
- break;
- }
- case 53: {
-
- gyrY_ = input.readFloat();
- break;
- }
- case 61: {
-
- gyrZ_ = input.readFloat();
- break;
- }
- case 69: {
-
- rotationVectorX_ = input.readFloat();
- break;
- }
- case 77: {
-
- rotationVectorY_ = input.readFloat();
- break;
- }
- case 85: {
-
- rotationVectorZ_ = input.readFloat();
- break;
- }
- case 93: {
-
- rotationVectorW_ = input.readFloat();
- break;
- }
- case 96: {
-
- stepCount_ = input.readInt32();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return Traj.internal_static_Motion_Sample_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return Traj.internal_static_Motion_Sample_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Motion_Sample.class, Builder.class);
- }
-
- public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1;
- private long relativeTimestamp_;
- /**
- * - * milliseconds - *- * - *
optional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
-
- public static final int ACC_X_FIELD_NUMBER = 2;
- private float accX_;
- /**
- * - * m/s^2 - *- * - *
optional float acc_x = 2;
- */
- public float getAccX() {
- return accX_;
- }
-
- public static final int ACC_Y_FIELD_NUMBER = 3;
- private float accY_;
- /**
- * optional float acc_y = 3;
- */
- public float getAccY() {
- return accY_;
- }
-
- public static final int ACC_Z_FIELD_NUMBER = 4;
- private float accZ_;
- /**
- * optional float acc_z = 4;
- */
- public float getAccZ() {
- return accZ_;
- }
-
- public static final int GYR_X_FIELD_NUMBER = 5;
- private float gyrX_;
- /**
- * - * radians/s - *- * - *
optional float gyr_x = 5;
- */
- public float getGyrX() {
- return gyrX_;
- }
-
- public static final int GYR_Y_FIELD_NUMBER = 6;
- private float gyrY_;
- /**
- * optional float gyr_y = 6;
- */
- public float getGyrY() {
- return gyrY_;
- }
-
- public static final int GYR_Z_FIELD_NUMBER = 7;
- private float gyrZ_;
- /**
- * optional float gyr_z = 7;
- */
- public float getGyrZ() {
- return gyrZ_;
- }
-
- public static final int ROTATION_VECTOR_X_FIELD_NUMBER = 8;
- private float rotationVectorX_;
- /**
- * - * unitless, 4 components should sum to ~1 - *- * - *
optional float rotation_vector_x = 8;
- */
- public float getRotationVectorX() {
- return rotationVectorX_;
- }
-
- public static final int ROTATION_VECTOR_Y_FIELD_NUMBER = 9;
- private float rotationVectorY_;
- /**
- * optional float rotation_vector_y = 9;
- */
- public float getRotationVectorY() {
- return rotationVectorY_;
- }
-
- public static final int ROTATION_VECTOR_Z_FIELD_NUMBER = 10;
- private float rotationVectorZ_;
- /**
- * optional float rotation_vector_z = 10;
- */
- public float getRotationVectorZ() {
- return rotationVectorZ_;
- }
-
- public static final int ROTATION_VECTOR_W_FIELD_NUMBER = 11;
- private float rotationVectorW_;
- /**
- * optional float rotation_vector_w = 11;
- */
- public float getRotationVectorW() {
- return rotationVectorW_;
- }
-
- public static final int STEP_COUNT_FIELD_NUMBER = 12;
- private int stepCount_;
- /**
- * - * Integer - *- * - *
optional int32 step_count = 12;
- */
- public int getStepCount() {
- return stepCount_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (relativeTimestamp_ != 0L) {
- output.writeInt64(1, relativeTimestamp_);
- }
- if (accX_ != 0F) {
- output.writeFloat(2, accX_);
- }
- if (accY_ != 0F) {
- output.writeFloat(3, accY_);
- }
- if (accZ_ != 0F) {
- output.writeFloat(4, accZ_);
- }
- if (gyrX_ != 0F) {
- output.writeFloat(5, gyrX_);
- }
- if (gyrY_ != 0F) {
- output.writeFloat(6, gyrY_);
- }
- if (gyrZ_ != 0F) {
- output.writeFloat(7, gyrZ_);
- }
- if (rotationVectorX_ != 0F) {
- output.writeFloat(8, rotationVectorX_);
- }
- if (rotationVectorY_ != 0F) {
- output.writeFloat(9, rotationVectorY_);
- }
- if (rotationVectorZ_ != 0F) {
- output.writeFloat(10, rotationVectorZ_);
- }
- if (rotationVectorW_ != 0F) {
- output.writeFloat(11, rotationVectorW_);
- }
- if (stepCount_ != 0) {
- output.writeInt32(12, stepCount_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (relativeTimestamp_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, relativeTimestamp_);
- }
- if (accX_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(2, accX_);
- }
- if (accY_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(3, accY_);
- }
- if (accZ_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(4, accZ_);
- }
- if (gyrX_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(5, gyrX_);
- }
- if (gyrY_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(6, gyrY_);
- }
- if (gyrZ_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(7, gyrZ_);
- }
- if (rotationVectorX_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(8, rotationVectorX_);
- }
- if (rotationVectorY_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(9, rotationVectorY_);
- }
- if (rotationVectorZ_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(10, rotationVectorZ_);
- }
- if (rotationVectorW_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(11, rotationVectorW_);
- }
- if (stepCount_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(12, stepCount_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof Motion_Sample)) {
- return super.equals(obj);
- }
- Motion_Sample other = (Motion_Sample) obj;
-
- boolean result = true;
- result = result && (getRelativeTimestamp()
- == other.getRelativeTimestamp());
- result = result && (
- Float.floatToIntBits(getAccX())
- == Float.floatToIntBits(
- other.getAccX()));
- result = result && (
- Float.floatToIntBits(getAccY())
- == Float.floatToIntBits(
- other.getAccY()));
- result = result && (
- Float.floatToIntBits(getAccZ())
- == Float.floatToIntBits(
- other.getAccZ()));
- result = result && (
- Float.floatToIntBits(getGyrX())
- == Float.floatToIntBits(
- other.getGyrX()));
- result = result && (
- Float.floatToIntBits(getGyrY())
- == Float.floatToIntBits(
- other.getGyrY()));
- result = result && (
- Float.floatToIntBits(getGyrZ())
- == Float.floatToIntBits(
- other.getGyrZ()));
- result = result && (
- Float.floatToIntBits(getRotationVectorX())
- == Float.floatToIntBits(
- other.getRotationVectorX()));
- result = result && (
- Float.floatToIntBits(getRotationVectorY())
- == Float.floatToIntBits(
- other.getRotationVectorY()));
- result = result && (
- Float.floatToIntBits(getRotationVectorZ())
- == Float.floatToIntBits(
- other.getRotationVectorZ()));
- result = result && (
- Float.floatToIntBits(getRotationVectorW())
- == Float.floatToIntBits(
- other.getRotationVectorW()));
- result = result && (getStepCount()
- == other.getStepCount());
- return result;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getRelativeTimestamp());
- hash = (37 * hash) + ACC_X_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getAccX());
- hash = (37 * hash) + ACC_Y_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getAccY());
- hash = (37 * hash) + ACC_Z_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getAccZ());
- hash = (37 * hash) + GYR_X_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getGyrX());
- hash = (37 * hash) + GYR_Y_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getGyrY());
- hash = (37 * hash) + GYR_Z_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getGyrZ());
- hash = (37 * hash) + ROTATION_VECTOR_X_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getRotationVectorX());
- hash = (37 * hash) + ROTATION_VECTOR_Y_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getRotationVectorY());
- hash = (37 * hash) + ROTATION_VECTOR_Z_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getRotationVectorZ());
- hash = (37 * hash) + ROTATION_VECTOR_W_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getRotationVectorW());
- hash = (37 * hash) + STEP_COUNT_FIELD_NUMBER;
- hash = (53 * hash) + getStepCount();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static Motion_Sample parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Motion_Sample parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Motion_Sample parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Motion_Sample parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Motion_Sample parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Motion_Sample parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static Motion_Sample parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static Motion_Sample parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static Motion_Sample parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Motion_Sample parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(Motion_Sample prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code Motion_Sample}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder- * milliseconds - *- * - *
optional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
- /**
- * - * milliseconds - *- * - *
optional int64 relative_timestamp = 1;
- */
- public Builder setRelativeTimestamp(long value) {
-
- relativeTimestamp_ = value;
- onChanged();
- return this;
- }
- /**
- * - * milliseconds - *- * - *
optional int64 relative_timestamp = 1;
- */
- public Builder clearRelativeTimestamp() {
-
- relativeTimestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private float accX_ ;
- /**
- * - * m/s^2 - *- * - *
optional float acc_x = 2;
- */
- public float getAccX() {
- return accX_;
- }
- /**
- * - * m/s^2 - *- * - *
optional float acc_x = 2;
- */
- public Builder setAccX(float value) {
-
- accX_ = value;
- onChanged();
- return this;
- }
- /**
- * - * m/s^2 - *- * - *
optional float acc_x = 2;
- */
- public Builder clearAccX() {
-
- accX_ = 0F;
- onChanged();
- return this;
- }
-
- private float accY_ ;
- /**
- * optional float acc_y = 3;
- */
- public float getAccY() {
- return accY_;
- }
- /**
- * optional float acc_y = 3;
- */
- public Builder setAccY(float value) {
-
- accY_ = value;
- onChanged();
- return this;
- }
- /**
- * optional float acc_y = 3;
- */
- public Builder clearAccY() {
-
- accY_ = 0F;
- onChanged();
- return this;
- }
-
- private float accZ_ ;
- /**
- * optional float acc_z = 4;
- */
- public float getAccZ() {
- return accZ_;
- }
- /**
- * optional float acc_z = 4;
- */
- public Builder setAccZ(float value) {
-
- accZ_ = value;
- onChanged();
- return this;
- }
- /**
- * optional float acc_z = 4;
- */
- public Builder clearAccZ() {
-
- accZ_ = 0F;
- onChanged();
- return this;
- }
-
- private float gyrX_ ;
- /**
- * - * radians/s - *- * - *
optional float gyr_x = 5;
- */
- public float getGyrX() {
- return gyrX_;
- }
- /**
- * - * radians/s - *- * - *
optional float gyr_x = 5;
- */
- public Builder setGyrX(float value) {
-
- gyrX_ = value;
- onChanged();
- return this;
- }
- /**
- * - * radians/s - *- * - *
optional float gyr_x = 5;
- */
- public Builder clearGyrX() {
-
- gyrX_ = 0F;
- onChanged();
- return this;
- }
-
- private float gyrY_ ;
- /**
- * optional float gyr_y = 6;
- */
- public float getGyrY() {
- return gyrY_;
- }
- /**
- * optional float gyr_y = 6;
- */
- public Builder setGyrY(float value) {
-
- gyrY_ = value;
- onChanged();
- return this;
- }
- /**
- * optional float gyr_y = 6;
- */
- public Builder clearGyrY() {
-
- gyrY_ = 0F;
- onChanged();
- return this;
- }
-
- private float gyrZ_ ;
- /**
- * optional float gyr_z = 7;
- */
- public float getGyrZ() {
- return gyrZ_;
- }
- /**
- * optional float gyr_z = 7;
- */
- public Builder setGyrZ(float value) {
-
- gyrZ_ = value;
- onChanged();
- return this;
- }
- /**
- * optional float gyr_z = 7;
- */
- public Builder clearGyrZ() {
-
- gyrZ_ = 0F;
- onChanged();
- return this;
- }
-
- private float rotationVectorX_ ;
- /**
- * - * unitless, 4 components should sum to ~1 - *- * - *
optional float rotation_vector_x = 8;
- */
- public float getRotationVectorX() {
- return rotationVectorX_;
- }
- /**
- * - * unitless, 4 components should sum to ~1 - *- * - *
optional float rotation_vector_x = 8;
- */
- public Builder setRotationVectorX(float value) {
-
- rotationVectorX_ = value;
- onChanged();
- return this;
- }
- /**
- * - * unitless, 4 components should sum to ~1 - *- * - *
optional float rotation_vector_x = 8;
- */
- public Builder clearRotationVectorX() {
-
- rotationVectorX_ = 0F;
- onChanged();
- return this;
- }
-
- private float rotationVectorY_ ;
- /**
- * optional float rotation_vector_y = 9;
- */
- public float getRotationVectorY() {
- return rotationVectorY_;
- }
- /**
- * optional float rotation_vector_y = 9;
- */
- public Builder setRotationVectorY(float value) {
-
- rotationVectorY_ = value;
- onChanged();
- return this;
- }
- /**
- * optional float rotation_vector_y = 9;
- */
- public Builder clearRotationVectorY() {
-
- rotationVectorY_ = 0F;
- onChanged();
- return this;
- }
-
- private float rotationVectorZ_ ;
- /**
- * optional float rotation_vector_z = 10;
- */
- public float getRotationVectorZ() {
- return rotationVectorZ_;
- }
- /**
- * optional float rotation_vector_z = 10;
- */
- public Builder setRotationVectorZ(float value) {
-
- rotationVectorZ_ = value;
- onChanged();
- return this;
- }
- /**
- * optional float rotation_vector_z = 10;
- */
- public Builder clearRotationVectorZ() {
-
- rotationVectorZ_ = 0F;
- onChanged();
- return this;
- }
-
- private float rotationVectorW_ ;
- /**
- * optional float rotation_vector_w = 11;
- */
- public float getRotationVectorW() {
- return rotationVectorW_;
- }
- /**
- * optional float rotation_vector_w = 11;
- */
- public Builder setRotationVectorW(float value) {
-
- rotationVectorW_ = value;
- onChanged();
- return this;
- }
- /**
- * optional float rotation_vector_w = 11;
- */
- public Builder clearRotationVectorW() {
-
- rotationVectorW_ = 0F;
- onChanged();
- return this;
- }
-
- private int stepCount_ ;
- /**
- * - * Integer - *- * - *
optional int32 step_count = 12;
- */
- public int getStepCount() {
- return stepCount_;
- }
- /**
- * - * Integer - *- * - *
optional int32 step_count = 12;
- */
- public Builder setStepCount(int value) {
-
- stepCount_ = value;
- onChanged();
- return this;
- }
- /**
- * - * Integer - *- * - *
optional int32 step_count = 12;
- */
- public Builder clearStepCount() {
-
- stepCount_ = 0;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:Motion_Sample)
- }
-
- // @@protoc_insertion_point(class_scope:Motion_Sample)
- private static final Motion_Sample DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new Motion_Sample();
- }
-
- public static Motion_Sample getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parseroptional int64 relative_timestamp = 1;
- */
- long getRelativeTimestamp();
-
- /**
- * - * uT - *- * - *
optional float mag_x = 2;
- */
- float getMagX();
-
- /**
- * optional float mag_y = 3;
- */
- float getMagY();
-
- /**
- * optional float mag_z = 4;
- */
- float getMagZ();
- }
- /**
- * Protobuf type {@code Position_Sample}
- */
- public static final class Position_Sample extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:Position_Sample)
- Position_SampleOrBuilder {
- // Use Position_Sample.newBuilder() to construct.
- private Position_Sample(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Position_Sample() {
- relativeTimestamp_ = 0L;
- magX_ = 0F;
- magY_ = 0F;
- magZ_ = 0F;
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private Position_Sample(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 8: {
-
- relativeTimestamp_ = input.readInt64();
- break;
- }
- case 21: {
-
- magX_ = input.readFloat();
- break;
- }
- case 29: {
-
- magY_ = input.readFloat();
- break;
- }
- case 37: {
-
- magZ_ = input.readFloat();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return Traj.internal_static_Position_Sample_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return Traj.internal_static_Position_Sample_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Position_Sample.class, Builder.class);
- }
-
- public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1;
- private long relativeTimestamp_;
- /**
- * optional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
-
- public static final int MAG_X_FIELD_NUMBER = 2;
- private float magX_;
- /**
- * - * uT - *- * - *
optional float mag_x = 2;
- */
- public float getMagX() {
- return magX_;
- }
-
- public static final int MAG_Y_FIELD_NUMBER = 3;
- private float magY_;
- /**
- * optional float mag_y = 3;
- */
- public float getMagY() {
- return magY_;
- }
-
- public static final int MAG_Z_FIELD_NUMBER = 4;
- private float magZ_;
- /**
- * optional float mag_z = 4;
- */
- public float getMagZ() {
- return magZ_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (relativeTimestamp_ != 0L) {
- output.writeInt64(1, relativeTimestamp_);
- }
- if (magX_ != 0F) {
- output.writeFloat(2, magX_);
- }
- if (magY_ != 0F) {
- output.writeFloat(3, magY_);
- }
- if (magZ_ != 0F) {
- output.writeFloat(4, magZ_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (relativeTimestamp_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, relativeTimestamp_);
- }
- if (magX_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(2, magX_);
- }
- if (magY_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(3, magY_);
- }
- if (magZ_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(4, magZ_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof Position_Sample)) {
- return super.equals(obj);
- }
- Position_Sample other = (Position_Sample) obj;
-
- boolean result = true;
- result = result && (getRelativeTimestamp()
- == other.getRelativeTimestamp());
- result = result && (
- Float.floatToIntBits(getMagX())
- == Float.floatToIntBits(
- other.getMagX()));
- result = result && (
- Float.floatToIntBits(getMagY())
- == Float.floatToIntBits(
- other.getMagY()));
- result = result && (
- Float.floatToIntBits(getMagZ())
- == Float.floatToIntBits(
- other.getMagZ()));
- return result;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getRelativeTimestamp());
- hash = (37 * hash) + MAG_X_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getMagX());
- hash = (37 * hash) + MAG_Y_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getMagY());
- hash = (37 * hash) + MAG_Z_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getMagZ());
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static Position_Sample parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Position_Sample parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Position_Sample parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Position_Sample parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Position_Sample parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Position_Sample parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static Position_Sample parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static Position_Sample parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static Position_Sample parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Position_Sample parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(Position_Sample prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code Position_Sample}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builderoptional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
- /**
- * optional int64 relative_timestamp = 1;
- */
- public Builder setRelativeTimestamp(long value) {
-
- relativeTimestamp_ = value;
- onChanged();
- return this;
- }
- /**
- * optional int64 relative_timestamp = 1;
- */
- public Builder clearRelativeTimestamp() {
-
- relativeTimestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private float magX_ ;
- /**
- * - * uT - *- * - *
optional float mag_x = 2;
- */
- public float getMagX() {
- return magX_;
- }
- /**
- * - * uT - *- * - *
optional float mag_x = 2;
- */
- public Builder setMagX(float value) {
-
- magX_ = value;
- onChanged();
- return this;
- }
- /**
- * - * uT - *- * - *
optional float mag_x = 2;
- */
- public Builder clearMagX() {
-
- magX_ = 0F;
- onChanged();
- return this;
- }
-
- private float magY_ ;
- /**
- * optional float mag_y = 3;
- */
- public float getMagY() {
- return magY_;
- }
- /**
- * optional float mag_y = 3;
- */
- public Builder setMagY(float value) {
-
- magY_ = value;
- onChanged();
- return this;
- }
- /**
- * optional float mag_y = 3;
- */
- public Builder clearMagY() {
-
- magY_ = 0F;
- onChanged();
- return this;
- }
-
- private float magZ_ ;
- /**
- * optional float mag_z = 4;
- */
- public float getMagZ() {
- return magZ_;
- }
- /**
- * optional float mag_z = 4;
- */
- public Builder setMagZ(float value) {
-
- magZ_ = value;
- onChanged();
- return this;
- }
- /**
- * optional float mag_z = 4;
- */
- public Builder clearMagZ() {
-
- magZ_ = 0F;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:Position_Sample)
- }
-
- // @@protoc_insertion_point(class_scope:Position_Sample)
- private static final Position_Sample DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new Position_Sample();
- }
-
- public static Position_Sample getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parseroptional int64 relative_timestamp = 1;
- */
- long getRelativeTimestamp();
-
- /**
- * - * mbar - *- * - *
optional float pressure = 2;
- */
- float getPressure();
- }
- /**
- * Protobuf type {@code Pressure_Sample}
- */
- public static final class Pressure_Sample extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:Pressure_Sample)
- Pressure_SampleOrBuilder {
- // Use Pressure_Sample.newBuilder() to construct.
- private Pressure_Sample(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Pressure_Sample() {
- relativeTimestamp_ = 0L;
- pressure_ = 0F;
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private Pressure_Sample(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 8: {
-
- relativeTimestamp_ = input.readInt64();
- break;
- }
- case 21: {
-
- pressure_ = input.readFloat();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return Traj.internal_static_Pressure_Sample_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return Traj.internal_static_Pressure_Sample_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Pressure_Sample.class, Builder.class);
- }
-
- public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1;
- private long relativeTimestamp_;
- /**
- * optional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
-
- public static final int PRESSURE_FIELD_NUMBER = 2;
- private float pressure_;
- /**
- * - * mbar - *- * - *
optional float pressure = 2;
- */
- public float getPressure() {
- return pressure_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (relativeTimestamp_ != 0L) {
- output.writeInt64(1, relativeTimestamp_);
- }
- if (pressure_ != 0F) {
- output.writeFloat(2, pressure_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (relativeTimestamp_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, relativeTimestamp_);
- }
- if (pressure_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(2, pressure_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof Pressure_Sample)) {
- return super.equals(obj);
- }
- Pressure_Sample other = (Pressure_Sample) obj;
-
- boolean result = true;
- result = result && (getRelativeTimestamp()
- == other.getRelativeTimestamp());
- result = result && (
- Float.floatToIntBits(getPressure())
- == Float.floatToIntBits(
- other.getPressure()));
- return result;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getRelativeTimestamp());
- hash = (37 * hash) + PRESSURE_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getPressure());
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static Pressure_Sample parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Pressure_Sample parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Pressure_Sample parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Pressure_Sample parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Pressure_Sample parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Pressure_Sample parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static Pressure_Sample parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static Pressure_Sample parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static Pressure_Sample parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Pressure_Sample parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(Pressure_Sample prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code Pressure_Sample}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builderoptional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
- /**
- * optional int64 relative_timestamp = 1;
- */
- public Builder setRelativeTimestamp(long value) {
-
- relativeTimestamp_ = value;
- onChanged();
- return this;
- }
- /**
- * optional int64 relative_timestamp = 1;
- */
- public Builder clearRelativeTimestamp() {
-
- relativeTimestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private float pressure_ ;
- /**
- * - * mbar - *- * - *
optional float pressure = 2;
- */
- public float getPressure() {
- return pressure_;
- }
- /**
- * - * mbar - *- * - *
optional float pressure = 2;
- */
- public Builder setPressure(float value) {
-
- pressure_ = value;
- onChanged();
- return this;
- }
- /**
- * - * mbar - *- * - *
optional float pressure = 2;
- */
- public Builder clearPressure() {
-
- pressure_ = 0F;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:Pressure_Sample)
- }
-
- // @@protoc_insertion_point(class_scope:Pressure_Sample)
- private static final Pressure_Sample DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new Pressure_Sample();
- }
-
- public static Pressure_Sample getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parseroptional int64 relative_timestamp = 1;
- */
- long getRelativeTimestamp();
-
- /**
- * - * lux - *- * - *
optional float light = 2;
- */
- float getLight();
- }
- /**
- * Protobuf type {@code Light_Sample}
- */
- public static final class Light_Sample extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:Light_Sample)
- Light_SampleOrBuilder {
- // Use Light_Sample.newBuilder() to construct.
- private Light_Sample(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Light_Sample() {
- relativeTimestamp_ = 0L;
- light_ = 0F;
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private Light_Sample(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 8: {
-
- relativeTimestamp_ = input.readInt64();
- break;
- }
- case 21: {
-
- light_ = input.readFloat();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return Traj.internal_static_Light_Sample_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return Traj.internal_static_Light_Sample_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Light_Sample.class, Builder.class);
- }
-
- public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1;
- private long relativeTimestamp_;
- /**
- * optional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
-
- public static final int LIGHT_FIELD_NUMBER = 2;
- private float light_;
- /**
- * - * lux - *- * - *
optional float light = 2;
- */
- public float getLight() {
- return light_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (relativeTimestamp_ != 0L) {
- output.writeInt64(1, relativeTimestamp_);
- }
- if (light_ != 0F) {
- output.writeFloat(2, light_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (relativeTimestamp_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, relativeTimestamp_);
- }
- if (light_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(2, light_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof Light_Sample)) {
- return super.equals(obj);
- }
- Light_Sample other = (Light_Sample) obj;
-
- boolean result = true;
- result = result && (getRelativeTimestamp()
- == other.getRelativeTimestamp());
- result = result && (
- Float.floatToIntBits(getLight())
- == Float.floatToIntBits(
- other.getLight()));
- return result;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getRelativeTimestamp());
- hash = (37 * hash) + LIGHT_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getLight());
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static Light_Sample parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Light_Sample parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Light_Sample parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Light_Sample parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Light_Sample parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Light_Sample parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static Light_Sample parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static Light_Sample parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static Light_Sample parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Light_Sample parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(Light_Sample prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code Light_Sample}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builderoptional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
- /**
- * optional int64 relative_timestamp = 1;
- */
- public Builder setRelativeTimestamp(long value) {
-
- relativeTimestamp_ = value;
- onChanged();
- return this;
- }
- /**
- * optional int64 relative_timestamp = 1;
- */
- public Builder clearRelativeTimestamp() {
-
- relativeTimestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private float light_ ;
- /**
- * - * lux - *- * - *
optional float light = 2;
- */
- public float getLight() {
- return light_;
- }
- /**
- * - * lux - *- * - *
optional float light = 2;
- */
- public Builder setLight(float value) {
-
- light_ = value;
- onChanged();
- return this;
- }
- /**
- * - * lux - *- * - *
optional float light = 2;
- */
- public Builder clearLight() {
-
- light_ = 0F;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:Light_Sample)
- }
-
- // @@protoc_insertion_point(class_scope:Light_Sample)
- private static final Light_Sample DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new Light_Sample();
- }
-
- public static Light_Sample getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parseroptional int64 relative_timestamp = 1;
- */
- long getRelativeTimestamp();
-
- /**
- * - * degrees (minimum 6 significant figures) - * latitude between -90 and 90 - *- * - *
optional float latitude = 2;
- */
- float getLatitude();
-
- /**
- * - * longitude between -180 and 180 - *- * - *
optional float longitude = 3;
- */
- float getLongitude();
-
- /**
- * - *metres - *- * - *
optional float altitude = 4;
- */
- float getAltitude();
-
- /**
- * - * metres - *- * - *
optional float accuracy = 5;
- */
- float getAccuracy();
-
- /**
- * - * m/s - *- * - *
optional float speed = 6;
- */
- float getSpeed();
-
- /**
- * - * e.g 'gps' or 'network' - *- * - *
optional string provider = 7;
- */
- String getProvider();
- /**
- * - * e.g 'gps' or 'network' - *- * - *
optional string provider = 7;
- */
- com.google.protobuf.ByteString
- getProviderBytes();
- }
- /**
- * Protobuf type {@code GNSS_Sample}
- */
- public static final class GNSS_Sample extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:GNSS_Sample)
- GNSS_SampleOrBuilder {
- // Use GNSS_Sample.newBuilder() to construct.
- private GNSS_Sample(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private GNSS_Sample() {
- relativeTimestamp_ = 0L;
- latitude_ = 0F;
- longitude_ = 0F;
- altitude_ = 0F;
- accuracy_ = 0F;
- speed_ = 0F;
- provider_ = "";
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private GNSS_Sample(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 8: {
-
- relativeTimestamp_ = input.readInt64();
- break;
- }
- case 21: {
-
- latitude_ = input.readFloat();
- break;
- }
- case 29: {
-
- longitude_ = input.readFloat();
- break;
- }
- case 37: {
-
- altitude_ = input.readFloat();
- break;
- }
- case 45: {
-
- accuracy_ = input.readFloat();
- break;
- }
- case 53: {
-
- speed_ = input.readFloat();
- break;
- }
- case 58: {
- String s = input.readStringRequireUtf8();
-
- provider_ = s;
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return Traj.internal_static_GNSS_Sample_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return Traj.internal_static_GNSS_Sample_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- GNSS_Sample.class, Builder.class);
- }
-
- public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1;
- private long relativeTimestamp_;
- /**
- * optional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
-
- public static final int LATITUDE_FIELD_NUMBER = 2;
- private float latitude_;
- /**
- * - * degrees (minimum 6 significant figures) - * latitude between -90 and 90 - *- * - *
optional float latitude = 2;
- */
- public float getLatitude() {
- return latitude_;
- }
-
- public static final int LONGITUDE_FIELD_NUMBER = 3;
- private float longitude_;
- /**
- * - * longitude between -180 and 180 - *- * - *
optional float longitude = 3;
- */
- public float getLongitude() {
- return longitude_;
- }
-
- public static final int ALTITUDE_FIELD_NUMBER = 4;
- private float altitude_;
- /**
- * - *metres - *- * - *
optional float altitude = 4;
- */
- public float getAltitude() {
- return altitude_;
- }
-
- public static final int ACCURACY_FIELD_NUMBER = 5;
- private float accuracy_;
- /**
- * - * metres - *- * - *
optional float accuracy = 5;
- */
- public float getAccuracy() {
- return accuracy_;
- }
-
- public static final int SPEED_FIELD_NUMBER = 6;
- private float speed_;
- /**
- * - * m/s - *- * - *
optional float speed = 6;
- */
- public float getSpeed() {
- return speed_;
- }
-
- public static final int PROVIDER_FIELD_NUMBER = 7;
- private volatile Object provider_;
- /**
- * - * e.g 'gps' or 'network' - *- * - *
optional string provider = 7;
- */
- public String getProvider() {
- Object ref = provider_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- provider_ = s;
- return s;
- }
- }
- /**
- * - * e.g 'gps' or 'network' - *- * - *
optional string provider = 7;
- */
- public com.google.protobuf.ByteString
- getProviderBytes() {
- Object ref = provider_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- provider_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (relativeTimestamp_ != 0L) {
- output.writeInt64(1, relativeTimestamp_);
- }
- if (latitude_ != 0F) {
- output.writeFloat(2, latitude_);
- }
- if (longitude_ != 0F) {
- output.writeFloat(3, longitude_);
- }
- if (altitude_ != 0F) {
- output.writeFloat(4, altitude_);
- }
- if (accuracy_ != 0F) {
- output.writeFloat(5, accuracy_);
- }
- if (speed_ != 0F) {
- output.writeFloat(6, speed_);
- }
- if (!getProviderBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 7, provider_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (relativeTimestamp_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, relativeTimestamp_);
- }
- if (latitude_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(2, latitude_);
- }
- if (longitude_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(3, longitude_);
- }
- if (altitude_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(4, altitude_);
- }
- if (accuracy_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(5, accuracy_);
- }
- if (speed_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(6, speed_);
- }
- if (!getProviderBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, provider_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof GNSS_Sample)) {
- return super.equals(obj);
- }
- GNSS_Sample other = (GNSS_Sample) obj;
-
- boolean result = true;
- result = result && (getRelativeTimestamp()
- == other.getRelativeTimestamp());
- result = result && (
- Float.floatToIntBits(getLatitude())
- == Float.floatToIntBits(
- other.getLatitude()));
- result = result && (
- Float.floatToIntBits(getLongitude())
- == Float.floatToIntBits(
- other.getLongitude()));
- result = result && (
- Float.floatToIntBits(getAltitude())
- == Float.floatToIntBits(
- other.getAltitude()));
- result = result && (
- Float.floatToIntBits(getAccuracy())
- == Float.floatToIntBits(
- other.getAccuracy()));
- result = result && (
- Float.floatToIntBits(getSpeed())
- == Float.floatToIntBits(
- other.getSpeed()));
- result = result && getProvider()
- .equals(other.getProvider());
- return result;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getRelativeTimestamp());
- hash = (37 * hash) + LATITUDE_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getLatitude());
- hash = (37 * hash) + LONGITUDE_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getLongitude());
- hash = (37 * hash) + ALTITUDE_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getAltitude());
- hash = (37 * hash) + ACCURACY_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getAccuracy());
- hash = (37 * hash) + SPEED_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getSpeed());
- hash = (37 * hash) + PROVIDER_FIELD_NUMBER;
- hash = (53 * hash) + getProvider().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static GNSS_Sample parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static GNSS_Sample parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static GNSS_Sample parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static GNSS_Sample parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static GNSS_Sample parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static GNSS_Sample parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static GNSS_Sample parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static GNSS_Sample parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static GNSS_Sample parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static GNSS_Sample parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(GNSS_Sample prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code GNSS_Sample}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builderoptional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
- /**
- * optional int64 relative_timestamp = 1;
- */
- public Builder setRelativeTimestamp(long value) {
-
- relativeTimestamp_ = value;
- onChanged();
- return this;
- }
- /**
- * optional int64 relative_timestamp = 1;
- */
- public Builder clearRelativeTimestamp() {
-
- relativeTimestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private float latitude_ ;
- /**
- * - * degrees (minimum 6 significant figures) - * latitude between -90 and 90 - *- * - *
optional float latitude = 2;
- */
- public float getLatitude() {
- return latitude_;
- }
- /**
- * - * degrees (minimum 6 significant figures) - * latitude between -90 and 90 - *- * - *
optional float latitude = 2;
- */
- public Builder setLatitude(float value) {
-
- latitude_ = value;
- onChanged();
- return this;
- }
- /**
- * - * degrees (minimum 6 significant figures) - * latitude between -90 and 90 - *- * - *
optional float latitude = 2;
- */
- public Builder clearLatitude() {
-
- latitude_ = 0F;
- onChanged();
- return this;
- }
-
- private float longitude_ ;
- /**
- * - * longitude between -180 and 180 - *- * - *
optional float longitude = 3;
- */
- public float getLongitude() {
- return longitude_;
- }
- /**
- * - * longitude between -180 and 180 - *- * - *
optional float longitude = 3;
- */
- public Builder setLongitude(float value) {
-
- longitude_ = value;
- onChanged();
- return this;
- }
- /**
- * - * longitude between -180 and 180 - *- * - *
optional float longitude = 3;
- */
- public Builder clearLongitude() {
-
- longitude_ = 0F;
- onChanged();
- return this;
- }
-
- private float altitude_ ;
- /**
- * - *metres - *- * - *
optional float altitude = 4;
- */
- public float getAltitude() {
- return altitude_;
- }
- /**
- * - *metres - *- * - *
optional float altitude = 4;
- */
- public Builder setAltitude(float value) {
-
- altitude_ = value;
- onChanged();
- return this;
- }
- /**
- * - *metres - *- * - *
optional float altitude = 4;
- */
- public Builder clearAltitude() {
-
- altitude_ = 0F;
- onChanged();
- return this;
- }
-
- private float accuracy_ ;
- /**
- * - * metres - *- * - *
optional float accuracy = 5;
- */
- public float getAccuracy() {
- return accuracy_;
- }
- /**
- * - * metres - *- * - *
optional float accuracy = 5;
- */
- public Builder setAccuracy(float value) {
-
- accuracy_ = value;
- onChanged();
- return this;
- }
- /**
- * - * metres - *- * - *
optional float accuracy = 5;
- */
- public Builder clearAccuracy() {
-
- accuracy_ = 0F;
- onChanged();
- return this;
- }
-
- private float speed_ ;
- /**
- * - * m/s - *- * - *
optional float speed = 6;
- */
- public float getSpeed() {
- return speed_;
- }
- /**
- * - * m/s - *- * - *
optional float speed = 6;
- */
- public Builder setSpeed(float value) {
-
- speed_ = value;
- onChanged();
- return this;
- }
- /**
- * - * m/s - *- * - *
optional float speed = 6;
- */
- public Builder clearSpeed() {
-
- speed_ = 0F;
- onChanged();
- return this;
- }
-
- private Object provider_ = "";
- /**
- * - * e.g 'gps' or 'network' - *- * - *
optional string provider = 7;
- */
- public String getProvider() {
- Object ref = provider_;
- if (!(ref instanceof String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- provider_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- /**
- * - * e.g 'gps' or 'network' - *- * - *
optional string provider = 7;
- */
- public com.google.protobuf.ByteString
- getProviderBytes() {
- Object ref = provider_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- provider_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * - * e.g 'gps' or 'network' - *- * - *
optional string provider = 7;
- */
- public Builder setProvider(
- String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- provider_ = value;
- onChanged();
- return this;
- }
- /**
- * - * e.g 'gps' or 'network' - *- * - *
optional string provider = 7;
- */
- public Builder clearProvider() {
-
- provider_ = getDefaultInstance().getProvider();
- onChanged();
- return this;
- }
- /**
- * - * e.g 'gps' or 'network' - *- * - *
optional string provider = 7;
- */
- public Builder setProviderBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- provider_ = value;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:GNSS_Sample)
- }
-
- // @@protoc_insertion_point(class_scope:GNSS_Sample)
- private static final GNSS_Sample DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new GNSS_Sample();
- }
-
- public static GNSS_Sample getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parseroptional int64 relative_timestamp = 1;
- */
- long getRelativeTimestamp();
-
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- java.util.Listrepeated .Mac_Scan mac_scans = 2;
- */
- Mac_Scan getMacScans(int index);
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- int getMacScansCount();
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- java.util.List extends Mac_ScanOrBuilder>
- getMacScansOrBuilderList();
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- Mac_ScanOrBuilder getMacScansOrBuilder(
- int index);
- }
- /**
- * Protobuf type {@code WiFi_Sample}
- */
- public static final class WiFi_Sample extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:WiFi_Sample)
- WiFi_SampleOrBuilder {
- // Use WiFi_Sample.newBuilder() to construct.
- private WiFi_Sample(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private WiFi_Sample() {
- relativeTimestamp_ = 0L;
- macScans_ = java.util.Collections.emptyList();
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private WiFi_Sample(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 8: {
-
- relativeTimestamp_ = input.readInt64();
- break;
- }
- case 18: {
- if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
- macScans_ = new java.util.ArrayListoptional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
-
- public static final int MAC_SCANS_FIELD_NUMBER = 2;
- private java.util.Listrepeated .Mac_Scan mac_scans = 2;
- */
- public java.util.Listrepeated .Mac_Scan mac_scans = 2;
- */
- public java.util.List extends Mac_ScanOrBuilder>
- getMacScansOrBuilderList() {
- return macScans_;
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public int getMacScansCount() {
- return macScans_.size();
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Mac_Scan getMacScans(int index) {
- return macScans_.get(index);
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Mac_ScanOrBuilder getMacScansOrBuilder(
- int index) {
- return macScans_.get(index);
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (relativeTimestamp_ != 0L) {
- output.writeInt64(1, relativeTimestamp_);
- }
- for (int i = 0; i < macScans_.size(); i++) {
- output.writeMessage(2, macScans_.get(i));
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (relativeTimestamp_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, relativeTimestamp_);
- }
- for (int i = 0; i < macScans_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, macScans_.get(i));
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof WiFi_Sample)) {
- return super.equals(obj);
- }
- WiFi_Sample other = (WiFi_Sample) obj;
-
- boolean result = true;
- result = result && (getRelativeTimestamp()
- == other.getRelativeTimestamp());
- result = result && getMacScansList()
- .equals(other.getMacScansList());
- return result;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getRelativeTimestamp());
- if (getMacScansCount() > 0) {
- hash = (37 * hash) + MAC_SCANS_FIELD_NUMBER;
- hash = (53 * hash) + getMacScansList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static WiFi_Sample parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static WiFi_Sample parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static WiFi_Sample parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static WiFi_Sample parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static WiFi_Sample parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static WiFi_Sample parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static WiFi_Sample parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static WiFi_Sample parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static WiFi_Sample parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static WiFi_Sample parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(WiFi_Sample prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code WiFi_Sample}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builderoptional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
- /**
- * optional int64 relative_timestamp = 1;
- */
- public Builder setRelativeTimestamp(long value) {
-
- relativeTimestamp_ = value;
- onChanged();
- return this;
- }
- /**
- * optional int64 relative_timestamp = 1;
- */
- public Builder clearRelativeTimestamp() {
-
- relativeTimestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private java.util.Listrepeated .Mac_Scan mac_scans = 2;
- */
- public java.util.Listrepeated .Mac_Scan mac_scans = 2;
- */
- public int getMacScansCount() {
- if (macScansBuilder_ == null) {
- return macScans_.size();
- } else {
- return macScansBuilder_.getCount();
- }
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Mac_Scan getMacScans(int index) {
- if (macScansBuilder_ == null) {
- return macScans_.get(index);
- } else {
- return macScansBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Builder setMacScans(
- int index, Mac_Scan value) {
- if (macScansBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureMacScansIsMutable();
- macScans_.set(index, value);
- onChanged();
- } else {
- macScansBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Builder setMacScans(
- int index, Mac_Scan.Builder builderForValue) {
- if (macScansBuilder_ == null) {
- ensureMacScansIsMutable();
- macScans_.set(index, builderForValue.build());
- onChanged();
- } else {
- macScansBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Builder addMacScans(Mac_Scan value) {
- if (macScansBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureMacScansIsMutable();
- macScans_.add(value);
- onChanged();
- } else {
- macScansBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Builder addMacScans(
- int index, Mac_Scan value) {
- if (macScansBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureMacScansIsMutable();
- macScans_.add(index, value);
- onChanged();
- } else {
- macScansBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Builder addMacScans(
- Mac_Scan.Builder builderForValue) {
- if (macScansBuilder_ == null) {
- ensureMacScansIsMutable();
- macScans_.add(builderForValue.build());
- onChanged();
- } else {
- macScansBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Builder addMacScans(
- int index, Mac_Scan.Builder builderForValue) {
- if (macScansBuilder_ == null) {
- ensureMacScansIsMutable();
- macScans_.add(index, builderForValue.build());
- onChanged();
- } else {
- macScansBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Builder addAllMacScans(
- Iterable extends Mac_Scan> values) {
- if (macScansBuilder_ == null) {
- ensureMacScansIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, macScans_);
- onChanged();
- } else {
- macScansBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Builder clearMacScans() {
- if (macScansBuilder_ == null) {
- macScans_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- } else {
- macScansBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Builder removeMacScans(int index) {
- if (macScansBuilder_ == null) {
- ensureMacScansIsMutable();
- macScans_.remove(index);
- onChanged();
- } else {
- macScansBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Mac_Scan.Builder getMacScansBuilder(
- int index) {
- return getMacScansFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Mac_ScanOrBuilder getMacScansOrBuilder(
- int index) {
- if (macScansBuilder_ == null) {
- return macScans_.get(index); } else {
- return macScansBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public java.util.List extends Mac_ScanOrBuilder>
- getMacScansOrBuilderList() {
- if (macScansBuilder_ != null) {
- return macScansBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(macScans_);
- }
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Mac_Scan.Builder addMacScansBuilder() {
- return getMacScansFieldBuilder().addBuilder(
- Mac_Scan.getDefaultInstance());
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public Mac_Scan.Builder addMacScansBuilder(
- int index) {
- return getMacScansFieldBuilder().addBuilder(
- index, Mac_Scan.getDefaultInstance());
- }
- /**
- * repeated .Mac_Scan mac_scans = 2;
- */
- public java.util.Listoptional int64 relative_timestamp = 1;
- */
- long getRelativeTimestamp();
-
- /**
- * - * Integer encoding of the hex mac address - * e.g. 207394925843984 - *- * - *
optional int64 mac = 2;
- */
- long getMac();
-
- /**
- * - * rssi integer in dBm. - * typically between -120 and -10 - *- * - *
optional int32 rssi = 3;
- */
- int getRssi();
- }
- /**
- * Protobuf type {@code Mac_Scan}
- */
- public static final class Mac_Scan extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:Mac_Scan)
- Mac_ScanOrBuilder {
- // Use Mac_Scan.newBuilder() to construct.
- private Mac_Scan(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Mac_Scan() {
- relativeTimestamp_ = 0L;
- mac_ = 0L;
- rssi_ = 0;
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private Mac_Scan(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 8: {
-
- relativeTimestamp_ = input.readInt64();
- break;
- }
- case 16: {
-
- mac_ = input.readInt64();
- break;
- }
- case 24: {
-
- rssi_ = input.readInt32();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return Traj.internal_static_Mac_Scan_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return Traj.internal_static_Mac_Scan_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Mac_Scan.class, Builder.class);
- }
-
- public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1;
- private long relativeTimestamp_;
- /**
- * optional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
-
- public static final int MAC_FIELD_NUMBER = 2;
- private long mac_;
- /**
- * - * Integer encoding of the hex mac address - * e.g. 207394925843984 - *- * - *
optional int64 mac = 2;
- */
- public long getMac() {
- return mac_;
- }
-
- public static final int RSSI_FIELD_NUMBER = 3;
- private int rssi_;
- /**
- * - * rssi integer in dBm. - * typically between -120 and -10 - *- * - *
optional int32 rssi = 3;
- */
- public int getRssi() {
- return rssi_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (relativeTimestamp_ != 0L) {
- output.writeInt64(1, relativeTimestamp_);
- }
- if (mac_ != 0L) {
- output.writeInt64(2, mac_);
- }
- if (rssi_ != 0) {
- output.writeInt32(3, rssi_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (relativeTimestamp_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, relativeTimestamp_);
- }
- if (mac_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(2, mac_);
- }
- if (rssi_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(3, rssi_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof Mac_Scan)) {
- return super.equals(obj);
- }
- Mac_Scan other = (Mac_Scan) obj;
-
- boolean result = true;
- result = result && (getRelativeTimestamp()
- == other.getRelativeTimestamp());
- result = result && (getMac()
- == other.getMac());
- result = result && (getRssi()
- == other.getRssi());
- return result;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getRelativeTimestamp());
- hash = (37 * hash) + MAC_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getMac());
- hash = (37 * hash) + RSSI_FIELD_NUMBER;
- hash = (53 * hash) + getRssi();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static Mac_Scan parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Mac_Scan parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Mac_Scan parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Mac_Scan parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Mac_Scan parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Mac_Scan parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static Mac_Scan parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static Mac_Scan parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static Mac_Scan parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Mac_Scan parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(Mac_Scan prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code Mac_Scan}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builderoptional int64 relative_timestamp = 1;
- */
- public long getRelativeTimestamp() {
- return relativeTimestamp_;
- }
- /**
- * optional int64 relative_timestamp = 1;
- */
- public Builder setRelativeTimestamp(long value) {
-
- relativeTimestamp_ = value;
- onChanged();
- return this;
- }
- /**
- * optional int64 relative_timestamp = 1;
- */
- public Builder clearRelativeTimestamp() {
-
- relativeTimestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private long mac_ ;
- /**
- * - * Integer encoding of the hex mac address - * e.g. 207394925843984 - *- * - *
optional int64 mac = 2;
- */
- public long getMac() {
- return mac_;
- }
- /**
- * - * Integer encoding of the hex mac address - * e.g. 207394925843984 - *- * - *
optional int64 mac = 2;
- */
- public Builder setMac(long value) {
-
- mac_ = value;
- onChanged();
- return this;
- }
- /**
- * - * Integer encoding of the hex mac address - * e.g. 207394925843984 - *- * - *
optional int64 mac = 2;
- */
- public Builder clearMac() {
-
- mac_ = 0L;
- onChanged();
- return this;
- }
-
- private int rssi_ ;
- /**
- * - * rssi integer in dBm. - * typically between -120 and -10 - *- * - *
optional int32 rssi = 3;
- */
- public int getRssi() {
- return rssi_;
- }
- /**
- * - * rssi integer in dBm. - * typically between -120 and -10 - *- * - *
optional int32 rssi = 3;
- */
- public Builder setRssi(int value) {
-
- rssi_ = value;
- onChanged();
- return this;
- }
- /**
- * - * rssi integer in dBm. - * typically between -120 and -10 - *- * - *
optional int32 rssi = 3;
- */
- public Builder clearRssi() {
-
- rssi_ = 0;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:Mac_Scan)
- }
-
- // @@protoc_insertion_point(class_scope:Mac_Scan)
- private static final Mac_Scan DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new Mac_Scan();
- }
-
- public static Mac_Scan getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser- * Integer encoding of the hex mac address - * e.g. 207394925843984 - *- * - *
optional int64 mac = 1;
- */
- long getMac();
-
- /**
- * - * E.g. 'Eduroam' or 'Starbucks_free_wifi' - *- * - *
optional string ssid = 2;
- */
- String getSsid();
- /**
- * - * E.g. 'Eduroam' or 'Starbucks_free_wifi' - *- * - *
optional string ssid = 2;
- */
- com.google.protobuf.ByteString
- getSsidBytes();
-
- /**
- * - * Typically 2.4GHz or 5GHz - *- * - *
optional int64 frequency = 3;
- */
- long getFrequency();
- }
- /**
- * Protobuf type {@code AP_Data}
- */
- public static final class AP_Data extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:AP_Data)
- AP_DataOrBuilder {
- // Use AP_Data.newBuilder() to construct.
- private AP_Data(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private AP_Data() {
- mac_ = 0L;
- ssid_ = "";
- frequency_ = 0L;
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private AP_Data(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 8: {
-
- mac_ = input.readInt64();
- break;
- }
- case 18: {
- String s = input.readStringRequireUtf8();
-
- ssid_ = s;
- break;
- }
- case 24: {
-
- frequency_ = input.readInt64();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return Traj.internal_static_AP_Data_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return Traj.internal_static_AP_Data_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- AP_Data.class, Builder.class);
- }
-
- public static final int MAC_FIELD_NUMBER = 1;
- private long mac_;
- /**
- * - * Integer encoding of the hex mac address - * e.g. 207394925843984 - *- * - *
optional int64 mac = 1;
- */
- public long getMac() {
- return mac_;
- }
-
- public static final int SSID_FIELD_NUMBER = 2;
- private volatile Object ssid_;
- /**
- * - * E.g. 'Eduroam' or 'Starbucks_free_wifi' - *- * - *
optional string ssid = 2;
- */
- public String getSsid() {
- Object ref = ssid_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- ssid_ = s;
- return s;
- }
- }
- /**
- * - * E.g. 'Eduroam' or 'Starbucks_free_wifi' - *- * - *
optional string ssid = 2;
- */
- public com.google.protobuf.ByteString
- getSsidBytes() {
- Object ref = ssid_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- ssid_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int FREQUENCY_FIELD_NUMBER = 3;
- private long frequency_;
- /**
- * - * Typically 2.4GHz or 5GHz - *- * - *
optional int64 frequency = 3;
- */
- public long getFrequency() {
- return frequency_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (mac_ != 0L) {
- output.writeInt64(1, mac_);
- }
- if (!getSsidBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ssid_);
- }
- if (frequency_ != 0L) {
- output.writeInt64(3, frequency_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (mac_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, mac_);
- }
- if (!getSsidBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ssid_);
- }
- if (frequency_ != 0L) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(3, frequency_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof AP_Data)) {
- return super.equals(obj);
- }
- AP_Data other = (AP_Data) obj;
-
- boolean result = true;
- result = result && (getMac()
- == other.getMac());
- result = result && getSsid()
- .equals(other.getSsid());
- result = result && (getFrequency()
- == other.getFrequency());
- return result;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + MAC_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getMac());
- hash = (37 * hash) + SSID_FIELD_NUMBER;
- hash = (53 * hash) + getSsid().hashCode();
- hash = (37 * hash) + FREQUENCY_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getFrequency());
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static AP_Data parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static AP_Data parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static AP_Data parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static AP_Data parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static AP_Data parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static AP_Data parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static AP_Data parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static AP_Data parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static AP_Data parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static AP_Data parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(AP_Data prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code AP_Data}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder- * Integer encoding of the hex mac address - * e.g. 207394925843984 - *- * - *
optional int64 mac = 1;
- */
- public long getMac() {
- return mac_;
- }
- /**
- * - * Integer encoding of the hex mac address - * e.g. 207394925843984 - *- * - *
optional int64 mac = 1;
- */
- public Builder setMac(long value) {
-
- mac_ = value;
- onChanged();
- return this;
- }
- /**
- * - * Integer encoding of the hex mac address - * e.g. 207394925843984 - *- * - *
optional int64 mac = 1;
- */
- public Builder clearMac() {
-
- mac_ = 0L;
- onChanged();
- return this;
- }
-
- private Object ssid_ = "";
- /**
- * - * E.g. 'Eduroam' or 'Starbucks_free_wifi' - *- * - *
optional string ssid = 2;
- */
- public String getSsid() {
- Object ref = ssid_;
- if (!(ref instanceof String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- ssid_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- /**
- * - * E.g. 'Eduroam' or 'Starbucks_free_wifi' - *- * - *
optional string ssid = 2;
- */
- public com.google.protobuf.ByteString
- getSsidBytes() {
- Object ref = ssid_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- ssid_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * - * E.g. 'Eduroam' or 'Starbucks_free_wifi' - *- * - *
optional string ssid = 2;
- */
- public Builder setSsid(
- String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- ssid_ = value;
- onChanged();
- return this;
- }
- /**
- * - * E.g. 'Eduroam' or 'Starbucks_free_wifi' - *- * - *
optional string ssid = 2;
- */
- public Builder clearSsid() {
-
- ssid_ = getDefaultInstance().getSsid();
- onChanged();
- return this;
- }
- /**
- * - * E.g. 'Eduroam' or 'Starbucks_free_wifi' - *- * - *
optional string ssid = 2;
- */
- public Builder setSsidBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- ssid_ = value;
- onChanged();
- return this;
- }
-
- private long frequency_ ;
- /**
- * - * Typically 2.4GHz or 5GHz - *- * - *
optional int64 frequency = 3;
- */
- public long getFrequency() {
- return frequency_;
- }
- /**
- * - * Typically 2.4GHz or 5GHz - *- * - *
optional int64 frequency = 3;
- */
- public Builder setFrequency(long value) {
-
- frequency_ = value;
- onChanged();
- return this;
- }
- /**
- * - * Typically 2.4GHz or 5GHz - *- * - *
optional int64 frequency = 3;
- */
- public Builder clearFrequency() {
-
- frequency_ = 0L;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:AP_Data)
- }
-
- // @@protoc_insertion_point(class_scope:AP_Data)
- private static final AP_Data DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new AP_Data();
- }
-
- public static AP_Data getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parseroptional string name = 1;
- */
- String getName();
- /**
- * optional string name = 1;
- */
- com.google.protobuf.ByteString
- getNameBytes();
-
- /**
- * optional string vendor = 2;
- */
- String getVendor();
- /**
- * optional string vendor = 2;
- */
- com.google.protobuf.ByteString
- getVendorBytes();
-
- /**
- * optional float resolution = 3;
- */
- float getResolution();
-
- /**
- * optional float power = 4;
- */
- float getPower();
-
- /**
- * optional int32 version = 5;
- */
- int getVersion();
-
- /**
- * optional int32 type = 6;
- */
- int getType();
- }
- /**
- * Protobuf type {@code Sensor_Info}
- */
- public static final class Sensor_Info extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:Sensor_Info)
- Sensor_InfoOrBuilder {
- // Use Sensor_Info.newBuilder() to construct.
- private Sensor_Info(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Sensor_Info() {
- name_ = "";
- vendor_ = "";
- resolution_ = 0F;
- power_ = 0F;
- version_ = 0;
- type_ = 0;
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private Sensor_Info(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- int mutable_bitField0_ = 0;
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!input.skipField(tag)) {
- done = true;
- }
- break;
- }
- case 10: {
- String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 18: {
- String s = input.readStringRequireUtf8();
-
- vendor_ = s;
- break;
- }
- case 29: {
-
- resolution_ = input.readFloat();
- break;
- }
- case 37: {
-
- power_ = input.readFloat();
- break;
- }
- case 40: {
-
- version_ = input.readInt32();
- break;
- }
- case 48: {
-
- type_ = input.readInt32();
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return Traj.internal_static_Sensor_Info_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return Traj.internal_static_Sensor_Info_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Sensor_Info.class, Builder.class);
- }
-
- public static final int NAME_FIELD_NUMBER = 1;
- private volatile Object name_;
- /**
- * optional string name = 1;
- */
- public String getName() {
- Object ref = name_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- name_ = s;
- return s;
- }
- }
- /**
- * optional string name = 1;
- */
- public com.google.protobuf.ByteString
- getNameBytes() {
- Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int VENDOR_FIELD_NUMBER = 2;
- private volatile Object vendor_;
- /**
- * optional string vendor = 2;
- */
- public String getVendor() {
- Object ref = vendor_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- vendor_ = s;
- return s;
- }
- }
- /**
- * optional string vendor = 2;
- */
- public com.google.protobuf.ByteString
- getVendorBytes() {
- Object ref = vendor_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- vendor_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int RESOLUTION_FIELD_NUMBER = 3;
- private float resolution_;
- /**
- * optional float resolution = 3;
- */
- public float getResolution() {
- return resolution_;
- }
-
- public static final int POWER_FIELD_NUMBER = 4;
- private float power_;
- /**
- * optional float power = 4;
- */
- public float getPower() {
- return power_;
- }
-
- public static final int VERSION_FIELD_NUMBER = 5;
- private int version_;
- /**
- * optional int32 version = 5;
- */
- public int getVersion() {
- return version_;
- }
-
- public static final int TYPE_FIELD_NUMBER = 6;
- private int type_;
- /**
- * optional int32 type = 6;
- */
- public int getType() {
- return type_;
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!getNameBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
- }
- if (!getVendorBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vendor_);
- }
- if (resolution_ != 0F) {
- output.writeFloat(3, resolution_);
- }
- if (power_ != 0F) {
- output.writeFloat(4, power_);
- }
- if (version_ != 0) {
- output.writeInt32(5, version_);
- }
- if (type_ != 0) {
- output.writeInt32(6, type_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getNameBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
- }
- if (!getVendorBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vendor_);
- }
- if (resolution_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(3, resolution_);
- }
- if (power_ != 0F) {
- size += com.google.protobuf.CodedOutputStream
- .computeFloatSize(4, power_);
- }
- if (version_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(5, version_);
- }
- if (type_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(6, type_);
- }
- memoizedSize = size;
- return size;
- }
-
- private static final long serialVersionUID = 0L;
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof Sensor_Info)) {
- return super.equals(obj);
- }
- Sensor_Info other = (Sensor_Info) obj;
-
- boolean result = true;
- result = result && getName()
- .equals(other.getName());
- result = result && getVendor()
- .equals(other.getVendor());
- result = result && (
- Float.floatToIntBits(getResolution())
- == Float.floatToIntBits(
- other.getResolution()));
- result = result && (
- Float.floatToIntBits(getPower())
- == Float.floatToIntBits(
- other.getPower()));
- result = result && (getVersion()
- == other.getVersion());
- result = result && (getType()
- == other.getType());
- return result;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- hash = (37 * hash) + NAME_FIELD_NUMBER;
- hash = (53 * hash) + getName().hashCode();
- hash = (37 * hash) + VENDOR_FIELD_NUMBER;
- hash = (53 * hash) + getVendor().hashCode();
- hash = (37 * hash) + RESOLUTION_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getResolution());
- hash = (37 * hash) + POWER_FIELD_NUMBER;
- hash = (53 * hash) + Float.floatToIntBits(
- getPower());
- hash = (37 * hash) + VERSION_FIELD_NUMBER;
- hash = (53 * hash) + getVersion();
- hash = (37 * hash) + TYPE_FIELD_NUMBER;
- hash = (53 * hash) + getType();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static Sensor_Info parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Sensor_Info parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Sensor_Info parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Sensor_Info parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Sensor_Info parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Sensor_Info parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static Sensor_Info parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static Sensor_Info parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static Sensor_Info parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Sensor_Info parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(Sensor_Info prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code Sensor_Info}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builderoptional string name = 1;
- */
- public String getName() {
- Object ref = name_;
- if (!(ref instanceof String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- name_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- /**
- * optional string name = 1;
- */
- public com.google.protobuf.ByteString
- getNameBytes() {
- Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string name = 1;
- */
- public Builder setName(
- String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- name_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string name = 1;
- */
- public Builder clearName() {
-
- name_ = getDefaultInstance().getName();
- onChanged();
- return this;
- }
- /**
- * optional string name = 1;
- */
- public Builder setNameBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- name_ = value;
- onChanged();
- return this;
- }
-
- private Object vendor_ = "";
- /**
- * optional string vendor = 2;
- */
- public String getVendor() {
- Object ref = vendor_;
- if (!(ref instanceof String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- vendor_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- /**
- * optional string vendor = 2;
- */
- public com.google.protobuf.ByteString
- getVendorBytes() {
- Object ref = vendor_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- vendor_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string vendor = 2;
- */
- public Builder setVendor(
- String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- vendor_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string vendor = 2;
- */
- public Builder clearVendor() {
-
- vendor_ = getDefaultInstance().getVendor();
- onChanged();
- return this;
- }
- /**
- * optional string vendor = 2;
- */
- public Builder setVendorBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- vendor_ = value;
- onChanged();
- return this;
- }
-
- private float resolution_ ;
- /**
- * optional float resolution = 3;
- */
- public float getResolution() {
- return resolution_;
- }
- /**
- * optional float resolution = 3;
- */
- public Builder setResolution(float value) {
-
- resolution_ = value;
- onChanged();
- return this;
- }
- /**
- * optional float resolution = 3;
- */
- public Builder clearResolution() {
-
- resolution_ = 0F;
- onChanged();
- return this;
- }
-
- private float power_ ;
- /**
- * optional float power = 4;
- */
- public float getPower() {
- return power_;
- }
- /**
- * optional float power = 4;
- */
- public Builder setPower(float value) {
-
- power_ = value;
- onChanged();
- return this;
- }
- /**
- * optional float power = 4;
- */
- public Builder clearPower() {
-
- power_ = 0F;
- onChanged();
- return this;
- }
-
- private int version_ ;
- /**
- * optional int32 version = 5;
- */
- public int getVersion() {
- return version_;
- }
- /**
- * optional int32 version = 5;
- */
- public Builder setVersion(int value) {
-
- version_ = value;
- onChanged();
- return this;
- }
- /**
- * optional int32 version = 5;
- */
- public Builder clearVersion() {
-
- version_ = 0;
- onChanged();
- return this;
- }
-
- private int type_ ;
- /**
- * optional int32 type = 6;
- */
- public int getType() {
- return type_;
- }
- /**
- * optional int32 type = 6;
- */
- public Builder setType(int value) {
-
- type_ = value;
- onChanged();
- return this;
- }
- /**
- * optional int32 type = 6;
- */
- public Builder clearType() {
-
- type_ = 0;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:Sensor_Info)
- }
-
- // @@protoc_insertion_point(class_scope:Sensor_Info)
- private static final Sensor_Info DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new Sensor_Info();
- }
-
- public static Sensor_Info getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser
@@ -60,6 +62,10 @@ public class RecordingFragment extends Fragment {
// UI elements
private MaterialButton completeButton, cancelButton;
+
+ private FloatingActionButton testPointButton;
+
+
private ImageView recIcon;
private ProgressBar timeRemaining;
private TextView elevation, distanceTravelled, gnssError;
@@ -71,7 +77,27 @@ public class RecordingFragment extends Fragment {
private SensorFusion sensorFusion;
private Handler refreshDataHandler;
private CountDownTimer autoStop;
-
+ //CHEN 2 SWITCH FLOOR
+
+ private long lastFloorChangeTimeMs = 0L;
+ //CHEN 2
+
+ private long allowFloorChangeUntilMs = 0L;
+ private static final long FLOOR_CHANGE_ALLOW_WINDOW_MS = 3000L;
+ //END
+ private static final double VERTICAL_FEATURE_NEAR_THRESHOLD_METERS = 4.0;
+ private static final long FLOOR_CHANGE_COOLDOWN_MS = 4000L;
+
+ //end
+ //DISTINGUISH LIFT/STAIRS
+ private String lastVerticalMode = "unknown";
+ private static final float LIFT_HORIZONTAL_MOVE_THRESHOLD = 1.2f;
+
+ private long lastWallToastTimeMs = 0L;
+ private static final long WALL_TOAST_COOLDOWN_MS = 2000L;
+ private long lastVerticalHintToastTimeMs = 0L;
+ private static final long VERTICAL_HINT_TOAST_COOLDOWN_MS = 2000L;
+ //END
// Distance tracking
private float distance = 0f;
private float previousPosX = 0f;
@@ -100,6 +126,19 @@ public void onCreate(Bundle savedInstanceState) {
Context context = requireActivity();
this.settings = PreferenceManager.getDefaultSharedPreferences(context);
this.refreshDataHandler = new Handler();
+
+ this.sensorFusion.setWallEventListener(() -> {
+ long now = System.currentTimeMillis();
+
+ if (now - lastWallToastTimeMs > WALL_TOAST_COOLDOWN_MS && isAdded()) {
+ requireActivity().runOnUiThread(() ->
+ Toast.makeText(requireContext(),
+ "Wall detected. Cannot pass through.",
+ Toast.LENGTH_SHORT).show()
+ );
+ lastWallToastTimeMs = now;
+ }
+ });
}
@Nullable
@@ -137,6 +176,10 @@ public void onViewCreated(@NonNull View view,
completeButton = view.findViewById(R.id.stopButton);
cancelButton = view.findViewById(R.id.cancelButton);
+
+ testPointButton = view.findViewById(R.id.testPointButton);
+ testPointButton.setOnClickListener(v -> onTestPointClicked());
+
recIcon = view.findViewById(R.id.redDot);
timeRemaining = view.findViewById(R.id.timeRemainingBar);
@@ -149,6 +192,15 @@ public void onViewCreated(@NonNull View view,
completeButton.setOnClickListener(v -> {
// Stop recording & go to correction
if (autoStop != null) autoStop.cancel();
+ //Chen :If current location is available, proactively trigger a floorplan request to refresh nearby indoor venues.
+ if (trajectoryMapFragment != null) {
+ LatLng loc = trajectoryMapFragment.getCurrentLocation();
+ if (loc != null) {
+ trajectoryMapFragment.requestFloorplansNow(loc);
+ }
+ }
+
+ //end
sensorFusion.stopRecording();
// Show Correction screen
((RecordingActivity) requireActivity()).showCorrectionScreen();
@@ -207,7 +259,7 @@ public void onFinish() {
}.start();
} else {
// No set time limit, just keep refreshing
- refreshDataHandler.post(refreshDataTask);
+ //refreshDataHandler.post(refreshDataTask);
}
}
@@ -227,29 +279,129 @@ private void updateUIandPosition() {
float elevationVal = sensorFusion.getElevation();
elevation.setText(getString(R.string.elevation, String.format("%.1f", elevationVal)));
- // Current location
- // Convert PDR coordinates to actual LatLng if you have a known starting lat/lon
- // Or simply pass relative data for the TrajectoryMapFragment to handle
- // For example:
- float[] latLngArray = sensorFusion.getGNSSLatitude(true);
- if (latLngArray != null) {
- LatLng oldLocation = trajectoryMapFragment.getCurrentLocation(); // or store locally
- LatLng newLocation = UtilFunctions.calculateNewPos(
- oldLocation == null ? new LatLng(latLngArray[0], latLngArray[1]) : oldLocation,
- new float[]{ pdrValues[0] - previousPosX, pdrValues[1] - previousPosY }
- );
-
- // Pass the location + orientation to the map
- if (trajectoryMapFragment != null) {
- trajectoryMapFragment.updateUserLocation(newLocation,
- (float) Math.toDegrees(sensorFusion.passOrientation()));
+ // Main displayed position: ONLY use fused result
+ LatLng fusedLatLng = sensorFusion.getFusedEstimatedLatLng();
+
+ if (trajectoryMapFragment != null) {
+ LatLng oldLocation = trajectoryMapFragment.getCurrentLocation();
+ LatLng candidateLocation = fusedLatLng;
+
+ if (candidateLocation != null) {
+ LatLng finalLocation = candidateLocation;
+
+ // Step 1: wall-based map matching
+ if (oldLocation != null && trajectoryMapFragment.crossesWall(oldLocation, candidateLocation)) {
+ finalLocation = trajectoryMapFragment.getLastValidPointBeforeWall(oldLocation, candidateLocation);
+ Log.d("MapMatching", "Blocked by wall, using last valid point");
+
+ }
+
+ // Step 2: floor-change gating and vertical-mode classification
+ boolean allowFloorChange = false;
+
+ if (finalLocation != null) {
+ long now = System.currentTimeMillis();
+
+ boolean nearStairs =
+ trajectoryMapFragment.isNearStairs(finalLocation, VERTICAL_FEATURE_NEAR_THRESHOLD_METERS);
+
+ boolean nearLift =
+ trajectoryMapFragment.isNearLift(finalLocation, VERTICAL_FEATURE_NEAR_THRESHOLD_METERS);
+
+ boolean nearVerticalFeature = nearStairs || nearLift;
+
+ if (now - lastVerticalHintToastTimeMs > VERTICAL_HINT_TOAST_COOLDOWN_MS) {
+ if (nearStairs) {
+ Toast.makeText(requireContext(), "Near stairs area", Toast.LENGTH_SHORT).show();
+ lastVerticalHintToastTimeMs = now;
+ } else if (nearLift) {
+ Toast.makeText(requireContext(), "Near lift area", Toast.LENGTH_SHORT).show();
+ lastVerticalHintToastTimeMs = now;
+ }
+ }
+
+ boolean cooldownPassed =
+ (now - lastFloorChangeTimeMs) >= FLOOR_CHANGE_COOLDOWN_MS;
+
+ float horizontalStep =
+ (float) Math.sqrt(
+ Math.pow(pdrValues[0] - previousPosX, 2) +
+ Math.pow(pdrValues[1] - previousPosY, 2)
+ );
+
+ String verticalMode = "unknown";
+
+ if (cooldownPassed) {
+ if (nearLift && horizontalStep <= LIFT_HORIZONTAL_MOVE_THRESHOLD) {
+ verticalMode = "lift";
+ allowFloorChange = true;
+ allowFloorChangeUntilMs = now + FLOOR_CHANGE_ALLOW_WINDOW_MS;
+ lastFloorChangeTimeMs = now;
+ } else if (nearStairs && horizontalStep > LIFT_HORIZONTAL_MOVE_THRESHOLD) {
+ verticalMode = "stairs";
+ allowFloorChange = true;
+ allowFloorChangeUntilMs = now + FLOOR_CHANGE_ALLOW_WINDOW_MS;
+ lastFloorChangeTimeMs = now;
+ } else if (nearVerticalFeature) {
+ verticalMode = nearLift ? "lift?" : "stairs?";
+ allowFloorChange = true;
+ allowFloorChangeUntilMs = now + FLOOR_CHANGE_ALLOW_WINDOW_MS;
+ lastFloorChangeTimeMs = now;
+ }
+ }
+
+ lastVerticalMode = verticalMode;
+
+ Log.d("MapMatching",
+ "elevation=" + elevationVal
+ + ", horizontalStep=" + horizontalStep
+ + ", nearStairs=" + nearStairs
+ + ", nearLift=" + nearLift
+ + ", verticalMode=" + verticalMode
+ + ", allowFloorChange=" + allowFloorChange);
+ } else {
+ lastVerticalMode = "unknown";
+ }
+
+ if (System.currentTimeMillis() < allowFloorChangeUntilMs) {
+ allowFloorChange = true;
+ }
+
+ trajectoryMapFragment.setMapMatchingAllowsFloorChange(allowFloorChange);
+ trajectoryMapFragment.updateUserLocation(
+ finalLocation,
+ (float) Math.toDegrees(sensorFusion.passOrientation())
+ );
+ trajectoryMapFragment.requestFloorplansIfNeeded(finalLocation);
+ } else {
+ // No fused result yet -> keep the red main marker still
+ trajectoryMapFragment.setMapMatchingAllowsFloorChange(false);
+ lastVerticalMode = "unknown";
+ }
+
+ // Keep elevation state updated even when fused is not ready
+
+ // ===== 3.3 last N observations =====
+ LatLng gnssObs = sensorFusion.getCurrentGnssLatLng();
+ LatLng wifiObs = sensorFusion.getCurrentWifiLatLng();
+ LatLng pdrObs = sensorFusion.getCurrentPdrLatLng();
+
+ if (gnssObs != null) {
+ trajectoryMapFragment.addGnssObservation(gnssObs);
+ }
+
+ if (wifiObs != null) {
+ trajectoryMapFragment.addWifiObservation(wifiObs);
+ }
+
+ if (pdrObs != null) {
+ trajectoryMapFragment.addPdrObservation(pdrObs);
}
}
// GNSS logic if you want to show GNSS error, etc.
float[] gnss = sensorFusion.getSensorValueMap().get(SensorTypes.GNSSLATLONG);
if (gnss != null && trajectoryMapFragment != null) {
- // If user toggles showing GNSS in the map, call e.g.
if (trajectoryMapFragment.isGnssEnabled()) {
LatLng gnssLocation = new LatLng(gnss[0], gnss[1]);
LatLng currentLoc = trajectoryMapFragment.getCurrentLocation();
@@ -265,7 +417,7 @@ private void updateUIandPosition() {
}
}
- // Update previous
+ // Update previous PDR values
previousPosX = pdrValues[0];
previousPosY = pdrValues[1];
}
@@ -295,4 +447,36 @@ public void onResume() {
refreshDataHandler.postDelayed(refreshDataTask, 500);
}
}
+
+ private int testPointCount = 0;
+
+ //
+ private void onTestPointClicked() {
+ if (trajectoryMapFragment == null) {
+ Toast.makeText(requireContext(), "Map not ready", Toast.LENGTH_SHORT).show();
+ return;
+ }
+
+ LatLng pos = trajectoryMapFragment.getCurrentLocation();
+ if (pos == null) {
+ Toast.makeText(requireContext(), "Position not ready yet", Toast.LENGTH_SHORT).show();
+ return;
+ }
+
+ long timestampMs = System.currentTimeMillis();
+ testPointCount++;
+
+ trajectoryMapFragment.addTestPointMarker(pos, testPointCount);
+
+ Log.d("TestPoint",
+ "TP " + testPointCount +
+ " ts=" + timestampMs +
+ " lat=" + pos.latitude +
+ " lon=" + pos.longitude);
+
+ Toast.makeText(requireContext(),
+ "Test Point " + testPointCount + " saved",
+ Toast.LENGTH_SHORT).show();
+ }
+
}
diff --git a/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/StartLocationFragment.java b/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/StartLocationFragment.java
index ee14f69f..b244abd9 100644
--- a/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/StartLocationFragment.java
+++ b/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/StartLocationFragment.java
@@ -5,6 +5,9 @@
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
+import android.widget.EditText; //EE HUNG added
+import android.widget.Toast; // EE HUNG added
+
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -48,6 +51,7 @@ public class StartLocationFragment extends Fragment {
private float zoom = 19f;
// Instance for managing indoor building overlays (if any)
private NucleusBuildingManager nucleusBuildingManager;
+
// Dummy variable for floor index
private int FloorNK;
@@ -72,6 +76,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container,
}
View rootView = inflater.inflate(R.layout.fragment_startlocation, container, false);
+
// Obtain the start position from the GPS data from the SensorFusion class
startPosition = sensorFusion.getGNSSLatitude(false);
// If no location found, zoom the map out
@@ -117,6 +122,9 @@ public void onMapReady(GoogleMap mMap) {
.draggable(true));
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(position, zoom));
+
+
+
// Drag listener for the marker to update the start position when dragged
mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {
/**
@@ -147,6 +155,9 @@ public void onMarkerDrag(Marker marker) {}
return rootView;
}
+
+
+
/**
* {@inheritDoc}
* Button onClick listener enabled to detect when to go to next fragment and start PDR recording.
@@ -155,6 +166,7 @@ public void onMarkerDrag(Marker marker) {}
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
+
this.button = view.findViewById(R.id.startLocationDone);
this.button.setOnClickListener(new View.OnClickListener() {
/**
@@ -164,13 +176,25 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
*/
@Override
public void onClick(View view) {
+ //EE HUNG added
+ // 1. Find the input field from the XML
+ EditText nameInput = getView().findViewById(R.id.trajectoryNameInput);
+ String trajName = nameInput.getText().toString().trim();
+
+ // 2. Validate: Stop if the name is empty
+ if (trajName.isEmpty()) {
+ Toast.makeText(getContext(), "Please enter a trajectory name!", Toast.LENGTH_SHORT).show();
+ return; // Stop here, do not start recording
+ }
+
+
float chosenLat = startPosition[0];
float chosenLon = startPosition[1];
// If the Activity is RecordingActivity
if (requireActivity() instanceof RecordingActivity) {
// Start sensor recording + set the start location
- sensorFusion.startRecording();
+ sensorFusion.startRecording(trajName); //EE HUNG added
sensorFusion.setStartGNSSLatitude(startPosition);
// Now switch to the recording screen
diff --git a/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/TrajectoryMapFragment.java b/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/TrajectoryMapFragment.java
index eb0bad65..32830ab1 100644
--- a/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/TrajectoryMapFragment.java
+++ b/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/TrajectoryMapFragment.java
@@ -1,5 +1,7 @@
package com.openpositioning.PositionMe.presentation.fragment;
+
+
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
@@ -10,6 +12,25 @@
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import com.google.android.gms.maps.CameraUpdateFactory;
+import com.openpositioning.PositionMe.data.remote.ServerCommunications;
+import android.os.Handler;
+import com.openpositioning.PositionMe.utils.UtilFunctions;
+import com.google.android.gms.maps.model.LatLng;
+import android.content.Context;
+import com.openpositioning.PositionMe.presentation.activity.MainActivity;
+import org.json.JSONObject;
+import org.json.JSONArray;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+
+import com.google.android.gms.maps.model.Polyline;
+import com.google.android.gms.maps.model.PolylineOptions;
import com.google.android.material.switchmaterial.SwitchMaterial;
import androidx.annotation.NonNull;
@@ -20,14 +41,17 @@
import com.openpositioning.PositionMe.R;
import com.openpositioning.PositionMe.sensors.SensorFusion;
import com.openpositioning.PositionMe.utils.IndoorMapManager;
-import com.openpositioning.PositionMe.utils.UtilFunctions;
-import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.*;
-import java.util.ArrayList;
-import java.util.List;
+import android.widget.Toast;
+import com.google.android.gms.maps.model.Polygon;
+import com.google.android.gms.maps.model.PolygonOptions;
+
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.Paint;
/**
@@ -78,10 +102,131 @@ public class TrajectoryMapFragment extends Fragment {
private SwitchMaterial autoFloorSwitch;
private com.google.android.material.floatingactionbutton.FloatingActionButton floorUpButton, floorDownButton;
+ private com.google.android.material.floatingactionbutton.FloatingActionButton exitIndoorButton;
+ private ServerCommunications serverCommunications;
+
+ private com.google.android.material.floatingactionbutton.FloatingActionButton recenterButton;
+
+ // just focus one time when entry this fragment auto
+ private boolean pendingInitialRecenter = true;
+
+ private boolean followMyLocation = false;
+
+ private final Handler indoorHandler = new Handler();
+ private Runnable indoorTask;
+
+ private boolean autoFloorEnabled = false;
+ private final android.os.Handler autoFloorHandler = new android.os.Handler(android.os.Looper.getMainLooper());
+ private Runnable autoFloorRunnable;
+
+ //CHEN 2 CONTROL FLOORCHANGE
+ private boolean mapMatchingAllowsFloorChange = false;
+
+ private Float autoFloorBaseElevation = null;
+ private long lastAutoFloorSwitchMs = 0L;
+ private Integer autoFloorBaseIdx = null;
+ private static final long AUTO_FLOOR_INTERVAL_MS = 800;
+ private static final long AUTO_FLOOR_DEBOUNCE_MS = 1500;
+
+ // ===== 3.3 Data display: last N observations =====
+ private static final int MAX_OBSERVATIONS = 10;
+
+ private final List
* Initialise all Movement sensor instances from context and predetermined types. Creates a
* server communication instance for sending trajectories. Saves current absolute and relative
* time, and initialises saving the recording to false.
*
- * @param context application context for permissions and device access.
- *
+ * @param context application context for permissions and device access.
* @see MovementSensor handling all SensorManager based data collection devices.
* @see ServerCommunications handling communication with the server.
* @see GNSSDataProcessor for location data processing.
@@ -250,7 +295,7 @@ public void setContext(Context context) {
this.pathView = new PathView(context, null);
this.wiFiPositioning = new WiFiPositioning(context);
- if(settings.getBoolean("overwrite_constants", false)) {
+ if (settings.getBoolean("overwrite_constants", false)) {
this.filter_coefficient = Float.parseFloat(settings.getString("accel_filter", "0.96"));
} else {
this.filter_coefficient = FILTER_COEFFICIENT;
@@ -264,14 +309,15 @@ public void setContext(Context context) {
//endregion
//region Sensor processing
+
/**
* {@inheritDoc}
- *
+ *
* Called every time a Sensor value is updated.
- *
+ *
* Checks originating sensor type, if the data is meaningful save it to a local variable.
*
- * @param sensorEvent SensorEvent of sensor with values changed, includes types and values.
+ * @param sensorEvent SensorEvent of sensor with values changed, includes types and values.
*/
@Override
public void onSensorChanged(SensorEvent sensorEvent) {
@@ -296,7 +342,6 @@ public void onSensorChanged(SensorEvent sensorEvent) {
eventCounts.put(sensorType, eventCounts.getOrDefault(sensorType, 0) + 1);
-
switch (sensorType) {
case Sensor.TYPE_ACCELEROMETER:
acceleration[0] = sensorEvent.values[0];
@@ -354,8 +399,23 @@ public void onSensorChanged(SensorEvent sensorEvent) {
light = sensorEvent.values[0];
break;
- case Sensor.TYPE_PROXIMITY:
+ case Sensor.TYPE_PROXIMITY: //EE HUNG added
+ // 1. Update the local variable (keep this for the screen UI)
proximity = sensorEvent.values[0];
+
+ // 2. Save to the file if we are recording
+ if (this.saveRecording) {
+ long timestamp = System.currentTimeMillis() - this.absoluteStartTime;
+
+ Log.d("ProximityTest", "SAVING PROXIMITY: " + sensorEvent.values[0]);
+
+ Traj.ProximityReading proxReading = Traj.ProximityReading.newBuilder()
+ .setRelativeTimestamp(timestamp)
+ .setDistance(sensorEvent.values[0]) // Distance in cm
+ .build();
+
+ this.trajectory.addProximityData(proxReading);
+ }
break;
case Sensor.TYPE_MAGNETIC_FIELD:
@@ -374,25 +434,18 @@ public void onSensorChanged(SensorEvent sensorEvent) {
case Sensor.TYPE_STEP_DETECTOR:
long stepTime = SystemClock.uptimeMillis() - bootTime;
-
if (currentTime - lastStepTime < 20) {
Log.e("SensorFusion", "Ignoring step event, too soon after last step event:" + (currentTime - lastStepTime) + " ms");
- // Ignore rapid successive step events
break;
- }
-
- else {
+ } else {
lastStepTime = currentTime;
- // Log if accelMagnitude is empty
if (accelMagnitude.isEmpty()) {
- Log.e("SensorFusion",
- "stepDetection triggered, but accelMagnitude is empty! " +
- "This can cause updatePdr(...) to fail or return bad results.");
- } else {
- Log.d("SensorFusion",
- "stepDetection triggered, accelMagnitude size = " + accelMagnitude.size());
+ Log.e("SensorFusion", "stepDetection triggered, but accelMagnitude is empty! Aborting step to prevent NaN virus.");
+ break;
}
+ Log.d("SensorFusion", "stepDetection triggered, accelMagnitude size = " + accelMagnitude.size());
+
float[] newCords = this.pdrProcessing.updatePdr(
stepTime,
this.accelMagnitude,
@@ -402,11 +455,25 @@ public void onSensorChanged(SensorEvent sensorEvent) {
// Clear the accelMagnitude after using it
this.accelMagnitude.clear();
+ // ==========================================
+ // THE SILENT NAN SHIELD (This was missing!)
+ // ==========================================
+ double stepLength = passAverageStepLength();
+ if (Float.isNaN(newCords[0]) || Float.isNaN(newCords[1]) || Double.isNaN(stepLength) || stepLength <= 0.0) {
+ Log.e("SensorFusion", "NaN Virus caught in PDR! Dropping bad step.");
+ break; // Silently drop the broken step. Do not infect the swarm!
+ }
+ // ==========================================
+
+ // EE HUNG NEW CODE: Move the particles!
+ if (isFilterInitialized) {
+ predictParticles(stepLength, this.orientation[0]);
+ }
if (saveRecording) {
this.pathView.drawTrajectory(newCords);
stepCounter++;
- trajectory.addPdrData(Traj.Pdr_Sample.newBuilder()
+ trajectory.addPdrData(Traj.RelativePosition.newBuilder()
.setRelativeTimestamp(SystemClock.uptimeMillis() - bootTime)
.setX(newCords[0])
.setY(newCords[1]));
@@ -417,50 +484,88 @@ public void onSensorChanged(SensorEvent sensorEvent) {
}
}
- /**
- * Utility function to log the event frequency of each sensor.
- * Call this periodically for debugging purposes.
- */
- public void logSensorFrequencies() {
- for (int sensorType : eventCounts.keySet()) {
- Log.d("SensorFusion", "Sensor " + sensorType + " | Event Count: " + eventCounts.get(sensorType));
- }
- }
-
/**
* {@inheritDoc}
- *
+ *
* Location listener class to receive updates from the location manager.
- *
+ *
* Passed to the {@link GNSSDataProcessor} to receive the location data in this class. Save the
* values in instance variables.
*/
- class myLocationListener implements LocationListener{
+ class myLocationListener implements LocationListener {
@Override
public void onLocationChanged(@NonNull Location location) {
- //Toast.makeText(context, "Location Changed", Toast.LENGTH_SHORT).show();
latitude = (float) location.getLatitude();
longitude = (float) location.getLongitude();
float altitude = (float) location.getAltitude();
+
+ // ==========================================
+ // THE GNSS NAN SHIELD
+ // ==========================================
+ if (Float.isNaN(latitude) || Float.isNaN(longitude) || (latitude == 0.0f && longitude == 0.0f)) {
+ return; // Drop bad satellite data
+ }
+
+ // ==========================================
+ // THE WEAK SIGNAL BOUNCER (NEW FIX)
+ // ==========================================
float accuracy = (float) location.getAccuracy();
- float speed = (float) location.getSpeed();
- String provider = location.getProvider();
- if(saveRecording) {
- trajectory.addGnssData(Traj.GNSS_Sample.newBuilder()
- .setAccuracy(accuracy)
- .setAltitude(altitude)
- .setLatitude(latitude)
- .setLongitude(longitude)
- .setSpeed(speed)
- .setProvider(provider)
- .setRelativeTimestamp(System.currentTimeMillis()-absoluteStartTime));
+ // If the satellite is guessing with an accuracy worse than 12 meters, ignore it!
+ if (accuracy > 12.0f) {
+ Log.e("SensorFusion", "GNSS accuracy is terrible (" + accuracy + "m). Ignoring satellite and trusting PDR.");
+ return; // Throw it in the trash!
+ }
+ // ==========================================
+
+ // --- THE DYNAMIC START ---
+ if (!hasAcquiredInitialLocation) {
+ long now = System.currentTimeMillis();
+
+ if (!preferWifiForStart || (now - startLocationRequestTimeMs) > WIFI_START_TIMEOUT_MS) {
+ startLocation[0] = latitude;
+ startLocation[1] = longitude;
+ hasAcquiredInitialLocation = true;
+ preferWifiForStart = false;
+ Log.d("DynamicStart", "Locked GNSS start location (fallback): " + latitude + ", " + longitude);
+ } else {
+ Log.d("DynamicStart", "Skipping GNSS start lock, waiting for WiFi...");
+ }
+ }
+
+
+ // ============================================================
+ // EE HUNG - TRANSLATE AND TRIGGER
+ // ============================================================
+ // 1. Translate Degrees to Meters
+ double[] localCoords = convertToLocalMeters(latitude, longitude);
+ double localX = localCoords[0]; // Easting (Meters)
+ double localY = localCoords[1]; // Northing (Meters)
+
+ // 2. Feed the METERS to the Particle Filter
+ onNewPositionReceived(localX, localY, "gnss");
+ // ============================================================
+
+ if (saveRecording) {
+ // Fix for Line 451:
+ Traj.GNSSPosition position = Traj.GNSSPosition.newBuilder()
+ .setLatitude(location.getLatitude())
+ .setLongitude(location.getLongitude())
+ .setAltitude(location.getAltitude()) // This fixes the specific error
+ .build();
+
+ trajectory.addGnssData(Traj.GNSSReading.newBuilder()
+ .setPosition(position)
+ .setAccuracy(location.getAccuracy())
+ .setSpeed(location.getSpeed())
+ .setBearing(location.getBearing())
+ .setProvider(location.getProvider()));
}
}
}
/**
* {@inheritDoc}
- *
+ *
* Receives updates from {@link WifiDataProcessor}.
*
* @see WifiDataProcessor object for wifi scanning.
@@ -470,30 +575,66 @@ public void update(Object[] wifiList) {
// Save newest wifi values to local variable
this.wifiList = Stream.of(wifiList).map(o -> (Wifi) o).collect(Collectors.toList());
- if(this.saveRecording) {
- Traj.WiFi_Sample.Builder wifiData = Traj.WiFi_Sample.newBuilder()
- .setRelativeTimestamp(SystemClock.uptimeMillis()-bootTime);
+ // (EE HUNG) --- DUPLICATE CHECK CODE ---
+ if (!this.wifiList.isEmpty()) {
+ // Create a "Signature" using the first WiFi network found (Name + Signal Level)
+ // If the first network is exactly the same as before, the whole scan is likely a duplicate (cached).
+ Wifi firstItem = this.wifiList.get(0);
+ String currentSignature = firstItem.getSsid() + " " + firstItem.getLevel();
+
+ if (currentSignature.equals(lastScanSignature)) {
+ // IT IS A REPEAT!
+ android.util.Log.e("WiFi_Check", "⚠️ REPEATED FINGERPRINT DETECTED (Cached Data)");
+ // Optional: Show a toast if you really want to see it on screen
+ // Toast.makeText(context, "Duplicate Scan Ignored", Toast.LENGTH_SHORT).show();
+ return;
+ } else {
+ // IT IS FRESH!
+ android.util.Log.i("WiFi_Check", "✅ FRESH FINGERPRINT (New Data)");
+ // Update the memory for next time
+ lastScanSignature = currentSignature;
+ }
+ }
+ // -----------------------------
+ if (this.saveRecording) {
+ Traj.Fingerprint.Builder wifiData = Traj.Fingerprint.newBuilder()
+ .setRelativeTimestamp(SystemClock.uptimeMillis() - bootTime);
for (Wifi data : this.wifiList) {
- wifiData.addMacScans(Traj.Mac_Scan.newBuilder()
+ // Fix: Method is now 'addRfScans' because field is 'rf_scans'
+ wifiData.addRfScans(Traj.RFScan.newBuilder()
.setRelativeTimestamp(SystemClock.uptimeMillis() - bootTime)
- .setMac(data.getBssid()).setRssi(data.getLevel()));
+ .setMac(data.getBssid())
+ .setRssi(data.getLevel())
+ .setIsRttSupported(data.is80211mcResponder()) //
+ .setSsid(data.getSsid())
+ .setFrequency(data.getFrequency()));
+
+ // Inside the loop in SensorFusion.java
+ if (data.is80211mcResponder()) {
+ // Log now shows Frequency + Name
+ android.util.Log.i("WiFi_Check", "RTT! Freq: " + data.getFrequency() + " | Name: " + data.getSsid());
+ } else {
+ // Log now shows Frequency + Name
+ android.util.Log.d("WiFi_Check", "Normal. Freq: " + data.getFrequency() + " | Name: " + data.getSsid());
+ }
+
}
- // Adding WiFi data to Trajectory
- this.trajectory.addWifiData(wifiData);
+
+// Fix: Method is now 'addWifiFingerprints' because field is 'wifi_fingerprints'
+ this.trajectory.addWifiFingerprints(wifiData);
}
- createWifiPositioningRequest();
+ createWifiPositionRequestCallback();
}
/**
* Function to create a request to obtain a wifi location for the obtained wifi fingerprint
- *
*/
- private void createWifiPositioningRequest(){
+ private void createWifiPositioningRequest() {
// Try catch block to catch any errors and prevent app crashing
try {
// Creating a JSON object to store the WiFi access points
- JSONObject wifiAccessPoints=new JSONObject();
- for (Wifi data : this.wifiList){
+ JSONObject wifiAccessPoints = new JSONObject();
+ for (Wifi data : this.wifiList) {
wifiAccessPoints.put(String.valueOf(data.getBssid()), data.getLevel());
}
// Creating POST Request
@@ -503,19 +644,20 @@ private void createWifiPositioningRequest(){
} catch (JSONException e) {
// Catching error while making JSON object, to prevent crashes
// Error log to keep record of errors (for secure programming and maintainability)
- Log.e("jsonErrors","Error creating json object"+e.toString());
+ Log.e("jsonErrors", "Error creating json object" + e.toString());
}
}
// Callback Example Function
+
/**
* Function to create a request to obtain a wifi location for the obtained wifi fingerprint
* using Volley Callback
*/
- private void createWifiPositionRequestCallback(){
+ private void createWifiPositionRequestCallback() {
try {
// Creating a JSON object to store the WiFi access points
- JSONObject wifiAccessPoints=new JSONObject();
- for (Wifi data : this.wifiList){
+ JSONObject wifiAccessPoints = new JSONObject();
+ for (Wifi data : this.wifiList) {
wifiAccessPoints.put(String.valueOf(data.getBssid()), data.getLevel());
}
// Creating POST Request
@@ -524,110 +666,51 @@ private void createWifiPositionRequestCallback(){
this.wiFiPositioning.request(wifiFingerPrint, new WiFiPositioning.VolleyCallback() {
@Override
public void onSuccess(LatLng wifiLocation, int floor) {
- // Handle the success response
+ // --- THE DYNAMIC START ---
+ if (!hasAcquiredInitialLocation) {
+ startLocation[0] = (float) wifiLocation.latitude;
+ startLocation[1] = (float) wifiLocation.longitude;
+ hasAcquiredInitialLocation = true;
+ preferWifiForStart = false;
+ Log.d("DynamicStart", "Locked WiFi start location: " + wifiLocation.latitude + ", " + wifiLocation.longitude);
+ }
+
+ // ============================================================
+ // EE HUNG - TRANSLATE AND TRIGGER (THE WIFI FIX)
+ // ============================================================
+ // 1. Translate WiFi Degrees to Local Meters
+ double[] localWifiCoords = convertToLocalMeters(wifiLocation.latitude, wifiLocation.longitude);
+
+ // 2. Feed the WiFi ping into the Particle Filter!
+ onNewPositionReceived(localWifiCoords[0], localWifiCoords[1], "wifi");
+ // ============================================================
}
@Override
public void onError(String message) {
- // Handle the error response
+ Log.e("WiFiFusion", "Failed to get WiFi position: " + message);
}
});
} catch (JSONException e) {
// Catching error while making JSON object, to prevent crashes
// Error log to keep record of errors (for secure programming and maintainability)
- Log.e("jsonErrors","Error creating json object"+e.toString());
+ Log.e("jsonErrors", "Error creating json object" + e.toString());
}
}
- /**
- * Method to get user position obtained using {@link WiFiPositioning}.
- *
- * @return {@link LatLng} corresponding to user's position.
- */
- public LatLng getLatLngWifiPositioning(){return this.wiFiPositioning.getWifiLocation();}
-
- /**
- * Method to get current floor the user is at, obtained using WiFiPositioning
- * @see WiFiPositioning for WiFi positioning
- * @return Current floor user is at using WiFiPositioning
- */
- public int getWifiFloor(){
- return this.wiFiPositioning.getFloor();
- }
-
- /**
- * Method used for converting an array of orientation angles into a rotation matrix.
- *
- * @param o An array containing orientation angles in radians
- * @return resultMatrix representing the orientation angles
- */
- private float[] getRotationMatrixFromOrientation(float[] o) {
- float[] xM = new float[9];
- float[] yM = new float[9];
- float[] zM = new float[9];
-
- float sinX = (float)Math.sin(o[1]);
- float cosX = (float)Math.cos(o[1]);
- float sinY = (float)Math.sin(o[2]);
- float cosY = (float)Math.cos(o[2]);
- float sinZ = (float)Math.sin(o[0]);
- float cosZ = (float)Math.cos(o[0]);
-
- // rotation about x-axis (pitch)
- xM[0] = 1.0f; xM[1] = 0.0f; xM[2] = 0.0f;
- xM[3] = 0.0f; xM[4] = cosX; xM[5] = sinX;
- xM[6] = 0.0f; xM[7] = -sinX; xM[8] = cosX;
-
- // rotation about y-axis (roll)
- yM[0] = cosY; yM[1] = 0.0f; yM[2] = sinY;
- yM[3] = 0.0f; yM[4] = 1.0f; yM[5] = 0.0f;
- yM[6] = -sinY; yM[7] = 0.0f; yM[8] = cosY;
-
- // rotation about z-axis (azimuth)
- zM[0] = cosZ; zM[1] = sinZ; zM[2] = 0.0f;
- zM[3] = -sinZ; zM[4] = cosZ; zM[5] = 0.0f;
- zM[6] = 0.0f; zM[7] = 0.0f; zM[8] = 1.0f;
-
- // rotation order is y, x, z (roll, pitch, azimuth)
- float[] resultMatrix = matrixMultiplication(xM, yM);
- resultMatrix = matrixMultiplication(zM, resultMatrix);
- return resultMatrix;
- }
-
- /**
- * Performs and matrix multiplication of two 3x3 matrices and returns the product.
- *
- * @param A An array representing a 3x3 matrix
- * @param B An array representing a 3x3 matrix
- * @return result representing the product of A and B
- */
- private float[] matrixMultiplication(float[] A, float[] B) {
- float[] result = new float[9];
-
- result[0] = A[0] * B[0] + A[1] * B[3] + A[2] * B[6];
- result[1] = A[0] * B[1] + A[1] * B[4] + A[2] * B[7];
- result[2] = A[0] * B[2] + A[1] * B[5] + A[2] * B[8];
- result[3] = A[3] * B[0] + A[4] * B[3] + A[5] * B[6];
- result[4] = A[3] * B[1] + A[4] * B[4] + A[5] * B[7];
- result[5] = A[3] * B[2] + A[4] * B[5] + A[5] * B[8];
-
- result[6] = A[6] * B[0] + A[7] * B[3] + A[8] * B[6];
- result[7] = A[6] * B[1] + A[7] * B[4] + A[8] * B[7];
- result[8] = A[6] * B[2] + A[7] * B[5] + A[8] * B[8];
-
- return result;
- }
/**
* {@inheritDoc}
*/
@Override
- public void onAccuracyChanged(Sensor sensor, int i) {}
+ public void onAccuracyChanged(Sensor sensor, int i) {
+ }
//endregion
//region Getters/Setters
+
/**
* Getter function for core location data.
*
@@ -635,15 +718,26 @@ public void onAccuracyChanged(Sensor sensor, int i) {}
* @return longitude and latitude data in a float[2].
*/
public float[] getGNSSLatitude(boolean start) {
- float [] latLong = new float[2];
- if(!start) {
- latLong[0] = latitude;
- latLong[1] = longitude;
+ // ==========================================
+ // THE ULTIMATE CRASH SHIELD
+ // ==========================================
+ // The UI will crash if we hand it a 'null' array because it strictly reads index [0].
+ // If we haven't locked onto a real signal yet, we MUST give it a valid array of numbers!
+ if (!hasAcquiredInitialLocation) {
+ return new float[]{55.92285f, -3.17407f}; // Safe Nucleus Fallback
}
- else{
- latLong = startLocation;
+
+ // Once the WiFi or GNSS locks on, we return the real data:
+ if (start) {
+ // Extra safety check: ensure startLocation isn't somehow empty
+ if (startLocation == null || startLocation.length < 2) {
+ return new float[]{55.92285f, -3.17407f};
+ }
+ return startLocation; // The exact place you started
}
- return latLong;
+
+ // Return your continuous, real-time walking location
+ return new float[]{latitude, longitude};
}
/**
@@ -651,7 +745,7 @@ public float[] getGNSSLatitude(boolean start) {
*
* @param startPosition contains the initial location set by the user
*/
- public void setStartGNSSLatitude(float[] startPosition){
+ public void setStartGNSSLatitude(float[] startPosition) {
startLocation = startPosition;
}
@@ -661,7 +755,7 @@ public void setStartGNSSLatitude(float[] startPosition){
*
* @param scalingRatio new size of path due to updated step length
*/
- public void redrawPath(float scalingRatio){
+ public void redrawPath(float scalingRatio) {
pathView.redraw(scalingRatio);
}
@@ -671,7 +765,7 @@ public void redrawPath(float scalingRatio){
*
* @return average step count of total PDR.
*/
- public float passAverageStepLength(){
+ public float passAverageStepLength() {
return pdrProcessing.getAverageStepLength();
}
@@ -681,17 +775,17 @@ public float passAverageStepLength(){
*
* @return orientation of device.
*/
- public float passOrientation(){
+ public float passOrientation() {
return orientation[0];
}
/**
* Return most recent sensor readings.
- *
+ *
* Collects all most recent readings from movement and location sensors, packages them in a map
* that is indexed by {@link SensorTypes} and makes it accessible for other classes.
*
- * @return Map of
* Should be called from {@link MainActivity} when resuming the application. Sampling rate is in
* microseconds, IMU needs 100Hz, rest 1Hz
*
@@ -809,49 +880,16 @@ public void resumeListening() {
gnssProcessor.startLocationUpdates();
}
- /**
- * Un-registers all device listeners and pauses data collection.
- *
- * Should be called from {@link MainActivity} when pausing the application.
- *
- * @see MovementSensor handles SensorManager based devices.
- * @see WifiDataProcessor handles wifi data.
- * @see GNSSDataProcessor handles location data.
- */
- public void stopListening() {
- if(!saveRecording) {
- // Unregister sensor-manager based devices
- accelerometerSensor.sensorManager.unregisterListener(this);
- barometerSensor.sensorManager.unregisterListener(this);
- gyroscopeSensor.sensorManager.unregisterListener(this);
- lightSensor.sensorManager.unregisterListener(this);
- proximitySensor.sensorManager.unregisterListener(this);
- magnetometerSensor.sensorManager.unregisterListener(this);
- stepDetectionSensor.sensorManager.unregisterListener(this);
- rotationSensor.sensorManager.unregisterListener(this);
- linearAccelerationSensor.sensorManager.unregisterListener(this);
- gravitySensor.sensorManager.unregisterListener(this);
- //The app often crashes here because the scan receiver stops after it has found the list.
- // It will only unregister one if there is to unregister
- try {
- this.wifiProcessor.stopListening(); //error here?
- } catch (Exception e) {
- System.err.println("Wifi resumed before existing");
- }
- // Stop receiving location updates
- this.gnssProcessor.stopUpdating();
- }
- }
/**
* Enables saving sensor values to the trajectory object.
- *
+ *
* Sets save recording to true, resets the absolute start time and create new timer object for
* periodically writing data to trajectory.
*
* @see Traj object for storing data.
*/
- public void startRecording() {
+ public void startRecording(String customName) {
// If wakeLock is null (e.g. not initialized or was cleared), reinitialize it.
if (wakeLock == null) {
PowerManager powerManager = (PowerManager) this.appContext.getSystemService(Context.POWER_SERVICE);
@@ -863,22 +901,48 @@ public void startRecording() {
this.stepCounter = 0;
this.absoluteStartTime = System.currentTimeMillis();
this.bootTime = SystemClock.uptimeMillis();
+
+ this.hasAcquiredInitialLocation = false;
+ this.preferWifiForStart = true;
+ this.startLocationRequestTimeMs = System.currentTimeMillis();
// Protobuf trajectory class for sending sensor data to restful API
this.trajectory = Traj.Trajectory.newBuilder()
.setAndroidVersion(Build.VERSION.RELEASE)
- .setStartTimestamp(absoluteStartTime)
- .setAccelerometerInfo(createInfoBuilder(accelerometerSensor))
- .setGyroscopeInfo(createInfoBuilder(gyroscopeSensor))
- .setMagnetometerInfo(createInfoBuilder(magnetometerSensor))
- .setBarometerInfo(createInfoBuilder(barometerSensor))
- .setLightSensorInfo(createInfoBuilder(lightSensor));
-
+ .setTrajectoryName(customName != null && !customName.isEmpty() ? customName : "Trajectory_" + absoluteStartTime).setStartTimestamp(absoluteStartTime)
+ // ADD .build() to the end of every line here:
+ .setAccelerometerInfo(createInfoBuilder(accelerometerSensor).build())
+ .setGyroscopeInfo(createInfoBuilder(gyroscopeSensor).build())
+ .setMagnetometerInfo(createInfoBuilder(magnetometerSensor).build())
+ .setBarometerInfo(createInfoBuilder(barometerSensor).build())
+ .setLightSensorInfo(createInfoBuilder(lightSensor).build())
+ .setProximityInfo(createInfoBuilder(proximitySensor).build());//EE HUNG added
+
+ // NEW: Turn on the Proximity Sensor
+ if (accelerometerSensor != null && accelerometerSensor.sensorManager != null && proximitySensor != null) {
+ accelerometerSensor.sensorManager.registerListener(this, proximitySensor.sensor, (int) 1e6);
+ }
+ // 2. EE HUNG NEW CODE: Auto-Capture Initial Orientation (Heading)
+ // ============================================================
+ if (this.orientation != null && this.orientation.length > 0) {
+ // Convert Radians (from sensor) to Degrees (0-360)
+ float azimuthDegrees = (float) Math.toDegrees(this.orientation[0]);
+
+ // Fix negative angles (e.g., -90 becomes 270)
+ if (azimuthDegrees < 0) {
+ azimuthDegrees += 360;
+ }
+ // Save it to the file!
+ // NOTE: If .setStartOrientation turns RED, try .setAzimuth or .setHeading
+ this.trajectory.setStartOrientation(azimuthDegrees);
+ Toast.makeText(this.appContext, "Started! Heading: " + (int) azimuthDegrees + "°", Toast.LENGTH_SHORT).show();
+ }
+ // ===========================================================
this.storeTrajectoryTimer = new Timer();
this.storeTrajectoryTimer.schedule(new storeDataInTrajectory(), 0, TIME_CONST);
this.pdrProcessing.resetPDR();
- if(settings.getBoolean("overwrite_constants", false)) {
+ if (settings.getBoolean("overwrite_constants", false)) {
this.filter_coefficient = Float.parseFloat(settings.getString("accel_filter", "0.96"));
} else {
this.filter_coefficient = FILTER_COEFFICIENT;
@@ -887,7 +951,7 @@ public void startRecording() {
/**
* Disables saving sensor values to the trajectory object.
- *
+ *
* Check if a recording is in progress. If it is, it sets save recording to false, and cancels
* the timer objects.
*
@@ -896,13 +960,21 @@ public void startRecording() {
*/
public void stopRecording() {
// Only cancel if we are running
- if(this.saveRecording) {
+ if (this.saveRecording) {
this.saveRecording = false;
storeTrajectoryTimer.cancel();
}
- if(wakeLock.isHeld()) {
+ if (wakeLock.isHeld()) {
this.wakeLock.release();
}
+
+ // EE HUNG--- NEW CODE: Turn off the Proximity Sensor ---
+ if (accelerometerSensor != null && accelerometerSensor.sensorManager != null && proximitySensor != null) {
+ // We use the same manager (from accelerometer) to unregister the proximity sensor
+ accelerometerSensor.sensorManager.unregisterListener(this, proximitySensor.sensor);
+ }
+ // -----------------------------------------------
+
}
//endregion
@@ -922,16 +994,15 @@ public void sendTrajectoryToCloud() {
}
/**
- * Creates a {@link Traj.Sensor_Info} objects from the specified sensor's data.
- *
- * @param sensor MovementSensor objects with populated sensorInfo fields
- * @return Traj.SensorInfo object to be used in building the trajectory
+ * Creates a {@link Traj.SensorInfo} objects from the specified sensor's data.
*
+ * @param sensor MovementSensor objects with populated sensorInfo fields
+ * @return Traj.SensorInfo object to be used in building the trajectory
* @see Traj Trajectory object used for communication with the server
* @see MovementSensor class abstracting SensorManager based sensors
*/
- private Traj.Sensor_Info.Builder createInfoBuilder(MovementSensor sensor) {
- return Traj.Sensor_Info.newBuilder()
+ private Traj.SensorInfo.Builder createInfoBuilder(MovementSensor sensor) {
+ return Traj.SensorInfo.newBuilder()
.setName(sensor.sensorInfo.getName())
.setVendor(sensor.sensorInfo.getVendor())
.setResolution(sensor.sensorInfo.getResolution())
@@ -942,36 +1013,53 @@ private Traj.Sensor_Info.Builder createInfoBuilder(MovementSensor sensor) {
/**
* Timer task to record data with the desired frequency in the trajectory class.
- *
- * Inherently threaded, runnables are created in {@link SensorFusion#startRecording()} and
+ *
+ * Inherently threaded, runnables are created in {@link SensorFusion} and
* destroyed in {@link SensorFusion#stopRecording()}.
*/
private class storeDataInTrajectory extends TimerTask {
public void run() {
// Store IMU and magnetometer data in Trajectory class
- trajectory.addImuData(Traj.Motion_Sample.newBuilder()
- .setRelativeTimestamp(SystemClock.uptimeMillis()-bootTime)
- .setAccX(acceleration[0])
- .setAccY(acceleration[1])
- .setAccZ(acceleration[2])
- .setGyrX(angularVelocity[0])
- .setGyrY(angularVelocity[1])
- .setGyrZ(angularVelocity[2])
- .setGyrZ(angularVelocity[2])
- .setRotationVectorX(rotation[0])
- .setRotationVectorY(rotation[1])
- .setRotationVectorZ(rotation[2])
- .setRotationVectorW(rotation[3])
- .setStepCount(stepCounter))
- .addPositionData(Traj.Position_Sample.newBuilder()
- .setMagX(magneticField[0])
- .setMagY(magneticField[1])
- .setMagZ(magneticField[2])
- .setRelativeTimestamp(SystemClock.uptimeMillis()-bootTime))
-// .addGnssData(Traj.GNSS_Sample.newBuilder()
-// .setLatitude(latitude)
-// .setLongitude(longitude)
-// .setRelativeTimestamp(SystemClock.uptimeMillis()-bootTime))
+ // 1. Pack the Acceleration Box
+ Traj.Vector3 accVector = Traj.Vector3.newBuilder()
+ .setX(acceleration[0])
+ .setY(acceleration[1])
+ .setZ(acceleration[2])
+ .build();
+
+// 2. Pack the Gyroscope Box
+ Traj.Vector3 gyrVector = Traj.Vector3.newBuilder()
+ .setX(angularVelocity[0])
+ .setY(angularVelocity[1])
+ .setZ(angularVelocity[2])
+ .build();
+
+// 3. Pack the Rotation Box (Quaternion)
+ Traj.Quaternion rotVector = Traj.Quaternion.newBuilder()
+ .setX(rotation[0])
+ .setY(rotation[1])
+ .setZ(rotation[2])
+ .setW(rotation[3])
+ .build();
+
+// 4. Send the package
+ trajectory.addImuData(Traj.IMUReading.newBuilder()
+ .setRelativeTimestamp(SystemClock.uptimeMillis() - bootTime)
+ .setAcc(accVector)
+ .setGyr(gyrVector)
+ .setRotationVector(rotVector)
+ .setStepCount(stepCounter));
+ // 1. Pack the Magnetometer Box
+ Traj.Vector3 magVector = Traj.Vector3.newBuilder()
+ .setX(magneticField[0])
+ .setY(magneticField[1])
+ .setZ(magneticField[2])
+ .build();
+
+// 2. Send the package (Note: Method is now 'addMagnetometerData', not 'addPositionData')
+ trajectory.addMagnetometerData(Traj.MagnetometerReading.newBuilder()
+ .setRelativeTimestamp(SystemClock.uptimeMillis() - bootTime)
+ .setMag(magVector));
;
// Divide timer with a counter for storing data every 1 second
@@ -979,10 +1067,10 @@ public void run() {
counter = 0;
// Store pressure and light data
if (barometerSensor.sensor != null) {
- trajectory.addPressureData(Traj.Pressure_Sample.newBuilder()
+ trajectory.addPressureData(Traj.BarometerReading.newBuilder()
.setPressure(pressure)
.setRelativeTimestamp(SystemClock.uptimeMillis() - bootTime))
- .addLightData(Traj.Light_Sample.newBuilder()
+ .addLightData(Traj.LightReading.newBuilder()
.setLight(light)
.setRelativeTimestamp(SystemClock.uptimeMillis() - bootTime)
.build());
@@ -993,16 +1081,14 @@ public void run() {
secondCounter = 0;
//Current Wifi Object
Wifi currentWifi = wifiProcessor.getCurrentWifiData();
- trajectory.addApsData(Traj.AP_Data.newBuilder()
+ trajectory.addApsData(Traj.WiFiAPData.newBuilder()
.setMac(currentWifi.getBssid())
.setSsid(currentWifi.getSsid())
.setFrequency(currentWifi.getFrequency()));
- }
- else {
+ } else {
secondCounter++;
}
- }
- else {
+ } else {
counter++;
}
@@ -1010,5 +1096,436 @@ public void run() {
}
//endregion
+// EE HUNG added
+ public String getTrajectoryId() {
+ if (this.trajectory != null) {
+ // Change .getTrajectoryId() to .getTrajectoryName()
+ return this.trajectory.getTrajectoryName();
+ }
+ return null;
+ }
+
+
+ // ==========================================
+ // EE HUNG - WGS84 TO LOCAL GRID TRANSLATOR
+ // ==========================================
+
+ //Update these with the exact GPS coordinates of your starting location (e.g., Nucleus entrance)
+ private static final double REF_LAT = 55.9228505640599;
+ private static final double REF_LON = -3.174077391048845;
+ private static final double EARTH_RADIUS = 6378137.0; // Earth's radius in meters
+ /**
+ * Converts global WGS84 (Lat/Lon) to local Easting/Northing (X/Y) in meters.
+ */
+ private double[] convertToLocalMeters(double lat, double lon) {
+ // Convert degrees to radians
+ double latRad = Math.toRadians(lat);
+ double lonRad = Math.toRadians(lon);
+ double refLatRad = Math.toRadians(REF_LAT);
+ double refLonRad = Math.toRadians(REF_LON);
+
+ // Equirectangular approximation for small distances
+ double x = EARTH_RADIUS * (lonRad - refLonRad) * Math.cos(refLatRad);
+ double y = EARTH_RADIUS * (latRad - refLatRad);
+
+ // Returns {Easting (X), Northing (Y)}
+ return new double[]{x, y};
+ }
+
+ /**
+ * Translates Local Meters back to WGS84 Degrees for Google Maps
+ */
+ private double[] convertMetersToWGS84(double x, double y) {
+ double refLatRad = Math.toRadians(REF_LAT);
+ double refLonRad = Math.toRadians(REF_LON);
+
+ double latRad = refLatRad + (y / EARTH_RADIUS);
+ double lonRad = refLonRad + (x / (EARTH_RADIUS * Math.cos(refLatRad)));
+
+ return new double[]{Math.toDegrees(latRad), Math.toDegrees(lonRad)};
+ }
+
+// ==========================================
+ // EE HUNG - PARTICLE FILTER ENGINE
+ // ==========================================
+
+ /**
+ * Trigger 1: When we get a new absolute position from GNSS or WiFi.
+ */
+ public void onNewPositionReceived(double measureX, double measureY, String source) {
+ if (!isFilterInitialized) {
+ // First time getting location? Spawn particles in a cluster here!
+ for (int i = 0; i < NUM_PARTICLES; i++) {
+ particles.add(new Particle(measureX, measureY, 1.0 / NUM_PARTICLES));
+ }
+ isFilterInitialized = true;
+ Log.d("ParticleFilter", "Filter Initialized with 1000 particles at " + measureX + ", " + measureY);
+ } else {
+ // Already running? Update weights and Resample!
+ double variance = WIFI_MEASUREMENT_VARIANCE;
+ if ("gnss".equalsIgnoreCase(source)) {
+ variance = GNSS_MEASUREMENT_VARIANCE;
+ }
+
+ updateParticlesWeights(measureX, measureY, variance);
+ resampleParticles();
+ Log.d("ParticleFilter", "Particles updated and resampled.");
+ }
+ }
+
+ /**
+ * Step 1: PREDICT (Move the particles based on steps)
+ * Normal: try direct motion first.
+ * If blocked by wall: enter short wall-follow mode and slide along wall.
+ */
+ //CHEN 2
+ private void predictParticles(double stepLength, double heading) {
+ double stepNoiseStdDev = 0.15;
+ double headingNoiseStdDev = 0.08;
+
+ int blockedCount = 0;
+
+ for (Particle p : particles) {
+ double oldX = p.x;
+ double oldY = p.y;
+
+ double noisyStep = Math.max(MIN_STEP_LENGTH,
+ stepLength + random.nextGaussian() * stepNoiseStdDev);
+ double noisyHeading = heading + random.nextGaussian() * headingNoiseStdDev;
+
+ double directX = oldX + noisyStep * Math.sin(noisyHeading);
+ double directY = oldY + noisyStep * Math.cos(noisyHeading);
+
+ if (!isBlocked(oldX, oldY, directX, directY)) {
+ p.x = directX;
+ p.y = directY;
+ continue;
+ }
+
+ blockedCount++;
+
+ MoveCandidate slide = trySimpleWallSlide(
+ oldX,
+ oldY,
+ noisyStep,
+ noisyHeading,
+ directX,
+ directY
+ );
+
+ if (slide != null) {
+ p.x = slide.x;
+ p.y = slide.y;
+ p.weight *= slide.weightScale;
+ } else {
+ p.x = oldX;
+ p.y = oldY;
+ p.weight *= 0.95;
+ }
+ }
+
+ if (!particles.isEmpty()) {
+ double blockedRatio = blockedCount / (double) particles.size();
+
+ if (blockedRatio > 0.30) {
+ notifyWallDetected();
+ }
+ }
+ }
+
+
+ private static class MoveCandidate {
+ double x;
+ double y;
+ double weightScale;
+
+ MoveCandidate(double x, double y, double weightScale) {
+ this.x = x;
+ this.y = y;
+ this.weightScale = weightScale;
+ }
+ }
+ //END
+ /**
+ * Step 2: UPDATE (Score particles based on distance to measurement)
+ */
+ private void updateParticlesWeights(double measuredX, double measuredY, double variance) {
+ double totalWeight = 0.0;
+
+ for (Particle p : particles) {
+ double distanceSquared = Math.pow(p.x - measuredX, 2) + Math.pow(p.y - measuredY, 2);
+ p.weight *= Math.exp(-distanceSquared / (2 * variance));
+ totalWeight += p.weight;
+ }
+
+ // --- THE RESCUE BLOCK FIX ---
+ if (totalWeight < 0.000001) {
+ Log.e("ParticleFilter", "Swarm is trapped! Respawning at new measurement.");
+
+ // THE FIX: Wipe out the trapped clones and teleport them to the new WiFi/GNSS ping
+ particles.clear();
+ for (int i = 0; i < NUM_PARTICLES; i++) {
+ // Add a 2-meter random spread so they don't all spawn exactly inside a solid brick
+ double spawnX = measuredX + (random.nextGaussian() * 2.0);
+ double spawnY = measuredY + (random.nextGaussian() * 2.0);
+
+ particles.add(new Particle(spawnX, spawnY, 1.0 / NUM_PARTICLES));
+ }
+ return;
+ }
+ // ------------------------
+
+ // Normalize weights
+ for (Particle p : particles) {
+ p.weight /= totalWeight;
+ }
+ }
+
+ /**
+ * Step 3: RESAMPLE (Delete bad guesses, clone good ones)
+ */
+ private void resampleParticles() {
+ if (particles.isEmpty()) return;
+
+ List> getWallSegmentsForCurrentFloor() {
+ String floorKey = getCurrentFloorKey();
+ if (floorKey == null) return new ArrayList<>();
+ return wallSegmentsByFloor.getOrDefault(floorKey, new ArrayList<>());
+ }
+
+ //CHEN 2 WALL
+ private android.graphics.PointF latLngToLocalMeters(LatLng ref, LatLng p) {
+ double dLat = (p.latitude - ref.latitude) * 111320.0;
+ double dLon = (p.longitude - ref.longitude) * 111320.0 * Math.cos(Math.toRadians(ref.latitude));
+ return new android.graphics.PointF((float) dLon, (float) dLat);
+ }
+
+ private float cross(android.graphics.PointF a, android.graphics.PointF b, android.graphics.PointF c) {
+ return (b.x - a.x) * (c.y - a.y) - (b.y - a.y) * (c.x - a.x);
+ }
+
+ private boolean onSegment(android.graphics.PointF a, android.graphics.PointF b, android.graphics.PointF p) {
+ return p.x <= Math.max(a.x, b.x) + 1e-6 &&
+ p.x >= Math.min(a.x, b.x) - 1e-6 &&
+ p.y <= Math.max(a.y, b.y) + 1e-6 &&
+ p.y >= Math.min(a.y, b.y) - 1e-6;
+ }
+
+ private boolean segmentsIntersect(android.graphics.PointF a,
+ android.graphics.PointF b,
+ android.graphics.PointF c,
+ android.graphics.PointF d) {
+ float d1 = cross(a, b, c);
+ float d2 = cross(a, b, d);
+ float d3 = cross(c, d, a);
+ float d4 = cross(c, d, b);
+
+ if (((d1 > 0 && d2 < 0) || (d1 < 0 && d2 > 0)) &&
+ ((d3 > 0 && d4 < 0) || (d3 < 0 && d4 > 0))) {
+ return true;
+ }
+
+ if (Math.abs(d1) < 1e-6 && onSegment(a, b, c)) return true;
+ if (Math.abs(d2) < 1e-6 && onSegment(a, b, d)) return true;
+ if (Math.abs(d3) < 1e-6 && onSegment(c, d, a)) return true;
+ if (Math.abs(d4) < 1e-6 && onSegment(c, d, b)) return true;
+
+ return false;
+ }
+
+ public boolean crossesWall(LatLng start, LatLng end) {
+ if (start == null || end == null) return false;
+
+ List
> walls = getWallSegmentsForCurrentFloor();
+ if (walls == null || walls.isEmpty()) return false;
+
+ android.graphics.PointF a = latLngToLocalMeters(start, start);
+ android.graphics.PointF b = latLngToLocalMeters(start, end);
+
+ for (List
> getStairsSegmentsForCurrentFloor() {
+ String floorKey = getCurrentFloorKey();
+ if (floorKey == null) return new ArrayList<>();
+ return stairsSegmentsByFloor.getOrDefault(floorKey, new ArrayList<>());
+ }
+
+ public List
> getLiftSegmentsForCurrentFloor() {
+ String floorKey = getCurrentFloorKey();
+ if (floorKey == null) return new ArrayList<>();
+ return liftSegmentsByFloor.getOrDefault(floorKey, new ArrayList<>());
+ }
+
+ private double distanceMeters(LatLng a, LatLng b) {
+ float[] results = new float[1];
+ android.location.Location.distanceBetween(
+ a.latitude, a.longitude,
+ b.latitude, b.longitude,
+ results
+ );
+ return results[0];
+ }
+
+ private boolean isNearFeature(LatLng position, List
> featureSegments, double thresholdMeters) {
+ if (position == null || featureSegments == null || featureSegments.isEmpty()) return false;
+
+ for (List
SensorTypes to float array of most recent values.
+ * @return Map of SensorTypes to float array of most recent values.
*/
public Map