diff --git a/.gitignore b/.gitignore index d4c3a57e..55e62e88 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ .cxx local.properties /.idea/ +secrets.properties diff --git a/Change_by_haoning_0208.md b/Change_by_haoning_0208.md new file mode 100644 index 00000000..cc161e7f --- /dev/null +++ b/Change_by_haoning_0208.md @@ -0,0 +1,78 @@ +**Date**: 2026-02-08 + +### New Fields Added +1. **trajectory_id** (string) - For naming/identifying trajectories +2. **initial_position** (GNSSPosition) - Starting position of trajectory +3. **test_points** (repeated GNSSPosition) - Test points for positioning algorithms +4. **sensor_info** - Information for 7 sensors: + - accelerometer_info + - gyroscope_info + - rotation_vector_info + - magnetometer_info + - barometer_info + - light_sensor_info + - proximity_info +5. **WiFiAPData.rtt_enabled** (bool) - RTT support flag +6. **BleData** enhanced with: + - mac_address, name, tx_power_level + - advertise_flags, service_uuids, manufacturer_data + +--- + +### Breaking Changes - API Updates + +### Class Name Changes + +| Old Name | New Name | +|-------------------|----------| +| `Pdr_Sample` | `RelativePosition` | +| `GNSS_Sample` | `GNSSReading` | +| `WiFi_Sample` | `Fingerprint` | +| `Mac_Scan` | `RFScan` | +| `Motion_Sampleq` | `IMUReading` | +| `Position_Sample` | `MagnetometerReading` | +| `Pressure_Sample` | `BarometerReading` | +| `Light_Sample` | `LightReading` | +| `AP_Data` | `WiFiAPData` | + +### Method Name Changes + +| Old Method | New Method | +|------------|------------| +| `addRfScans()` | `addRfScans()` | +| `addWifiData()` | `addWifiFingerprints()` | +| `addPositionData()` | `addMagnetometerData()` | +| `getPositionDataCount()` | `getMagnetometerDataCount()` | +| `getWifiDataCount()` | `getWifiFingerprintsCount()` | + +### Structure Changes + +**IMU Data** - Now uses Vector3/Quaternion: +```java +// OLD +.setAccX(x).setAccY(y).setAccZ(z) + +// NEW +.setAcc(Traj.Vector3.newBuilder().setX(x).setY(y).setZ(z).build()) +``` + +**GNSS Data** - Position nested in GNSSPosition: +```java +// OLD +.setLatitude(lat).setLongitude(lon).setAltitude(alt) + +// NEW +.setPosition(Traj.GNSSPosition.newBuilder() + .setLatitude(lat).setLongitude(lon).setAltitude(alt).build()) +``` + +--- + +### Files Modified + +- `Traj.java` - Regenerated from proto +- `SensorFusion.java` - Updated API calls +- `ServerCommunications.java` - Updated API calls +- `app/build.gradle` - Updated protobuf dependency to 4.29.6 + +--- \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 3e29b13f..21b89d1f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -25,6 +25,9 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + manifestPlaceholders = [ + MAPS_API_KEY: localProperties['MAPS_API_KEY'] ?: '' + ] // Example of referencing secrets (if you use secrets.properties): buildConfigField "String", "MAPS_API_KEY", "\"${localProperties['MAPS_API_KEY'] ?: ''}\"" @@ -73,7 +76,7 @@ dependencies { androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' implementation 'com.google.android.material:material:1.12.0' - implementation 'com.google.protobuf:protobuf-java:3.0.0' + implementation 'com.google.protobuf:protobuf-java:4.29.6' implementation 'com.squareup.okhttp3:okhttp:4.10.0' implementation "com.google.protobuf:protobuf-java-util:3.0.0" implementation "com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 678711fd..54a9f15f 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -32,6 +32,16 @@ + + + + + + + @@ -84,7 +94,7 @@ + android:value="${MAPS_API_KEY}"/> string android_version = 1; + * @return The androidVersion. + */ + java.lang.String getAndroidVersion(); + /** + * string android_version = 1; + * @return The bytes for androidVersion. + */ + com.google.protobuf.ByteString + getAndroidVersionBytes(); + + /** + *
+     * version 2.0
+     * 
+ * + * float trajectory_version = 2; + * @return The trajectoryVersion. + */ + float getTrajectoryVersion(); /** - * optional string android_version = 1; + *
+     * trajectory id/name for identification
+     * 
+ * + * string trajectory_id = 3; + * @return The trajectoryId. */ - String getAndroidVersion(); + java.lang.String getTrajectoryId(); /** - * optional string android_version = 1; + *
+     * trajectory id/name for identification
+     * 
+ * + * string trajectory_id = 3; + * @return The bytes for trajectoryId. */ com.google.protobuf.ByteString - getAndroidVersionBytes(); + getTrajectoryIdBytes(); /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - java.util.List - getImuDataList(); + java.util.List + getImuDataList(); /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - Motion_Sample getImuData(int index); + com.openpositioning.PositionMe.Traj.IMUReading getImuData(int index); /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ int getImuDataCount(); /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - java.util.List - getImuDataOrBuilderList(); + java.util.List + getImuDataOrBuilderList(); /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - Motion_SampleOrBuilder getImuDataOrBuilder( - int index); + com.openpositioning.PositionMe.Traj.IMUReadingOrBuilder getImuDataOrBuilder( + int index); /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - java.util.List - getPdrDataList(); + java.util.List + getPdrDataList(); /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - Pdr_Sample getPdrData(int index); + com.openpositioning.PositionMe.Traj.RelativePosition getPdrData(int index); /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ int getPdrDataCount(); /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - java.util.List - getPdrDataOrBuilderList(); + java.util.List + getPdrDataOrBuilderList(); /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - Pdr_SampleOrBuilder getPdrDataOrBuilder( - int index); + com.openpositioning.PositionMe.Traj.RelativePositionOrBuilder getPdrDataOrBuilder( + int index); /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - java.util.List - getPositionDataList(); + java.util.List + getMagnetometerDataList(); /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - Position_Sample getPositionData(int index); + com.openpositioning.PositionMe.Traj.MagnetometerReading getMagnetometerData(int index); /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - int getPositionDataCount(); + int getMagnetometerDataCount(); /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - java.util.List - getPositionDataOrBuilderList(); + java.util.List + getMagnetometerDataOrBuilderList(); /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - Position_SampleOrBuilder getPositionDataOrBuilder( - int index); + com.openpositioning.PositionMe.Traj.MagnetometerReadingOrBuilder getMagnetometerDataOrBuilder( + int index); /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - java.util.List - getPressureDataList(); + java.util.List + getPressureDataList(); /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - Pressure_Sample getPressureData(int index); + com.openpositioning.PositionMe.Traj.BarometerReading getPressureData(int index); /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ int getPressureDataCount(); /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - java.util.List - getPressureDataOrBuilderList(); + java.util.List + getPressureDataOrBuilderList(); /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - Pressure_SampleOrBuilder getPressureDataOrBuilder( - int index); + com.openpositioning.PositionMe.Traj.BarometerReadingOrBuilder getPressureDataOrBuilder( + int index); /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - java.util.List - getLightDataList(); + java.util.List + getLightDataList(); /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - Light_Sample getLightData(int index); + com.openpositioning.PositionMe.Traj.LightReading getLightData(int index); /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ int getLightDataCount(); /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; + */ + java.util.List + getLightDataOrBuilderList(); + /** + * repeated .LightReading light_data = 8; + */ + com.openpositioning.PositionMe.Traj.LightReadingOrBuilder getLightDataOrBuilder( + int index); + + /** + * repeated .ProximityReading proximity_data = 9; + */ + java.util.List + getProximityDataList(); + /** + * repeated .ProximityReading proximity_data = 9; + */ + com.openpositioning.PositionMe.Traj.ProximityReading getProximityData(int index); + /** + * repeated .ProximityReading proximity_data = 9; + */ + int getProximityDataCount(); + /** + * repeated .ProximityReading proximity_data = 9; */ - java.util.List - getLightDataOrBuilderList(); + java.util.List + getProximityDataOrBuilderList(); /** - * repeated .Light_Sample light_data = 6; + * repeated .ProximityReading proximity_data = 9; */ - Light_SampleOrBuilder getLightDataOrBuilder( - int index); + com.openpositioning.PositionMe.Traj.ProximityReadingOrBuilder getProximityDataOrBuilder( + int index); /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - java.util.List - getGnssDataList(); + java.util.List + getGnssDataList(); /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - GNSS_Sample getGnssData(int index); + com.openpositioning.PositionMe.Traj.GNSSReading getGnssData(int index); /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ int getGnssDataCount(); /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - java.util.List - getGnssDataOrBuilderList(); + java.util.List + getGnssDataOrBuilderList(); /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - GNSS_SampleOrBuilder getGnssDataOrBuilder( - int index); + com.openpositioning.PositionMe.Traj.GNSSReadingOrBuilder getGnssDataOrBuilder( + int index); /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - java.util.List - getWifiDataList(); + java.util.List + getWifiFingerprintsList(); /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - WiFi_Sample getWifiData(int index); + com.openpositioning.PositionMe.Traj.Fingerprint getWifiFingerprints(int index); /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - int getWifiDataCount(); + int getWifiFingerprintsCount(); /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - java.util.List - getWifiDataOrBuilderList(); + java.util.List + getWifiFingerprintsOrBuilderList(); /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - WiFi_SampleOrBuilder getWifiDataOrBuilder( - int index); + com.openpositioning.PositionMe.Traj.FingerprintOrBuilder getWifiFingerprintsOrBuilder( + int index); /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - java.util.List - getApsDataList(); + java.util.List + getApsDataList(); /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - AP_Data getApsData(int index); + com.openpositioning.PositionMe.Traj.WiFiAPData getApsData(int index); /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ int getApsDataCount(); /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; + */ + java.util.List + getApsDataOrBuilderList(); + /** + * repeated .WiFiAPData aps_data = 12; + */ + com.openpositioning.PositionMe.Traj.WiFiAPDataOrBuilder getApsDataOrBuilder( + int index); + + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + java.util.List + getWifiRttDataList(); + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + com.openpositioning.PositionMe.Traj.WiFiRTTReading getWifiRttData(int index); + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + int getWifiRttDataCount(); + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + java.util.List + getWifiRttDataOrBuilderList(); + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + com.openpositioning.PositionMe.Traj.WiFiRTTReadingOrBuilder getWifiRttDataOrBuilder( + int index); + + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + java.util.List + getBleFingerprintsList(); + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + com.openpositioning.PositionMe.Traj.Fingerprint getBleFingerprints(int index); + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + int getBleFingerprintsCount(); + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + java.util.List + getBleFingerprintsOrBuilderList(); + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + com.openpositioning.PositionMe.Traj.FingerprintOrBuilder getBleFingerprintsOrBuilder( + int index); + + /** + * repeated .BleData ble_data = 15; + */ + java.util.List + getBleDataList(); + /** + * repeated .BleData ble_data = 15; + */ + com.openpositioning.PositionMe.Traj.BleData getBleData(int index); + /** + * repeated .BleData ble_data = 15; + */ + int getBleDataCount(); + /** + * repeated .BleData ble_data = 15; */ - java.util.List - getApsDataOrBuilderList(); + java.util.List + getBleDataOrBuilderList(); /** - * repeated .AP_Data aps_data = 9; + * repeated .BleData ble_data = 15; */ - AP_DataOrBuilder getApsDataOrBuilder( - int index); + com.openpositioning.PositionMe.Traj.BleDataOrBuilder getBleDataOrBuilder( + int index); /** *
@@ -229,390 +370,265 @@ AP_DataOrBuilder getApsDataOrBuilder(
      * relative_timestamp = 3000 (3s)
      * 
* - * optional int64 start_timestamp = 10; + * int64 start_timestamp = 16; + * @return The startTimestamp. */ long getStartTimestamp(); /** - * optional string data_identifier = 11; + * .GNSSPosition initial_position = 17; + * @return Whether the initialPosition field is set. */ - String getDataIdentifier(); + boolean hasInitialPosition(); /** - * optional string data_identifier = 11; + * .GNSSPosition initial_position = 17; + * @return The initialPosition. */ - com.google.protobuf.ByteString - getDataIdentifierBytes(); + com.openpositioning.PositionMe.Traj.GNSSPosition getInitialPosition(); + /** + * .GNSSPosition initial_position = 17; + */ + com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getInitialPositionOrBuilder(); + + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + java.util.List + getCorrectedPositionsList(); + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + com.openpositioning.PositionMe.Traj.GNSSPosition getCorrectedPositions(int index); + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + int getCorrectedPositionsCount(); + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + java.util.List + getCorrectedPositionsOrBuilderList(); + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getCorrectedPositionsOrBuilder( + int index); /** - * optional .Sensor_Info accelerometer_info = 12; + * .SensorInfo accelerometer_info = 19; + * @return Whether the accelerometerInfo field is set. */ boolean hasAccelerometerInfo(); /** - * optional .Sensor_Info accelerometer_info = 12; + * .SensorInfo accelerometer_info = 19; + * @return The accelerometerInfo. */ - Sensor_Info getAccelerometerInfo(); + com.openpositioning.PositionMe.Traj.SensorInfo getAccelerometerInfo(); /** - * optional .Sensor_Info accelerometer_info = 12; + * .SensorInfo accelerometer_info = 19; */ - Sensor_InfoOrBuilder getAccelerometerInfoOrBuilder(); + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getAccelerometerInfoOrBuilder(); /** - * optional .Sensor_Info gyroscope_info = 13; + * .SensorInfo gyroscope_info = 20; + * @return Whether the gyroscopeInfo field is set. */ boolean hasGyroscopeInfo(); /** - * optional .Sensor_Info gyroscope_info = 13; + * .SensorInfo gyroscope_info = 20; + * @return The gyroscopeInfo. */ - Sensor_Info getGyroscopeInfo(); + com.openpositioning.PositionMe.Traj.SensorInfo getGyroscopeInfo(); /** - * optional .Sensor_Info gyroscope_info = 13; + * .SensorInfo gyroscope_info = 20; */ - Sensor_InfoOrBuilder getGyroscopeInfoOrBuilder(); + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getGyroscopeInfoOrBuilder(); /** - * optional .Sensor_Info rotation_vector_info = 14; + * .SensorInfo rotation_vector_info = 21; + * @return Whether the rotationVectorInfo field is set. */ boolean hasRotationVectorInfo(); /** - * optional .Sensor_Info rotation_vector_info = 14; + * .SensorInfo rotation_vector_info = 21; + * @return The rotationVectorInfo. */ - Sensor_Info getRotationVectorInfo(); + com.openpositioning.PositionMe.Traj.SensorInfo getRotationVectorInfo(); /** - * optional .Sensor_Info rotation_vector_info = 14; + * .SensorInfo rotation_vector_info = 21; */ - Sensor_InfoOrBuilder getRotationVectorInfoOrBuilder(); + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getRotationVectorInfoOrBuilder(); /** - * optional .Sensor_Info magnetometer_info = 15; + * .SensorInfo magnetometer_info = 22; + * @return Whether the magnetometerInfo field is set. */ boolean hasMagnetometerInfo(); /** - * optional .Sensor_Info magnetometer_info = 15; + * .SensorInfo magnetometer_info = 22; + * @return The magnetometerInfo. */ - Sensor_Info getMagnetometerInfo(); + com.openpositioning.PositionMe.Traj.SensorInfo getMagnetometerInfo(); /** - * optional .Sensor_Info magnetometer_info = 15; + * .SensorInfo magnetometer_info = 22; */ - Sensor_InfoOrBuilder getMagnetometerInfoOrBuilder(); + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getMagnetometerInfoOrBuilder(); /** - * optional .Sensor_Info barometer_info = 16; + * .SensorInfo barometer_info = 23; + * @return Whether the barometerInfo field is set. */ boolean hasBarometerInfo(); /** - * optional .Sensor_Info barometer_info = 16; + * .SensorInfo barometer_info = 23; + * @return The barometerInfo. */ - Sensor_Info getBarometerInfo(); + com.openpositioning.PositionMe.Traj.SensorInfo getBarometerInfo(); /** - * optional .Sensor_Info barometer_info = 16; + * .SensorInfo barometer_info = 23; */ - Sensor_InfoOrBuilder getBarometerInfoOrBuilder(); + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getBarometerInfoOrBuilder(); /** - * optional .Sensor_Info light_sensor_info = 17; + * .SensorInfo light_SensorInfo = 24; + * @return Whether the lightSensorInfo field is set. */ boolean hasLightSensorInfo(); /** - * optional .Sensor_Info light_sensor_info = 17; + * .SensorInfo light_SensorInfo = 24; + * @return The lightSensorInfo. + */ + com.openpositioning.PositionMe.Traj.SensorInfo getLightSensorInfo(); + /** + * .SensorInfo light_SensorInfo = 24; + */ + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getLightSensorInfoOrBuilder(); + + /** + * .SensorInfo proximity_info = 25; + * @return Whether the proximityInfo field is set. + */ + boolean hasProximityInfo(); + /** + * .SensorInfo proximity_info = 25; + * @return The proximityInfo. + */ + com.openpositioning.PositionMe.Traj.SensorInfo getProximityInfo(); + /** + * .SensorInfo proximity_info = 25; + */ + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getProximityInfoOrBuilder(); + + /** + * repeated .GNSSPosition test_points = 26; + */ + java.util.List + getTestPointsList(); + /** + * repeated .GNSSPosition test_points = 26; + */ + com.openpositioning.PositionMe.Traj.GNSSPosition getTestPoints(int index); + /** + * repeated .GNSSPosition test_points = 26; + */ + int getTestPointsCount(); + /** + * repeated .GNSSPosition test_points = 26; */ - Sensor_Info getLightSensorInfo(); + java.util.List + getTestPointsOrBuilderList(); /** - * optional .Sensor_Info light_sensor_info = 17; + * repeated .GNSSPosition test_points = 26; */ - Sensor_InfoOrBuilder getLightSensorInfoOrBuilder(); + com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getTestPointsOrBuilder( + int index); } /** * Protobuf type {@code Trajectory} */ - public static final class Trajectory extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:Trajectory) - TrajectoryOrBuilder { + public static final class Trajectory extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Trajectory) + TrajectoryOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + Trajectory.class.getName()); + } // Use Trajectory.newBuilder() to construct. - private Trajectory(com.google.protobuf.GeneratedMessageV3.Builder builder) { + private Trajectory(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private Trajectory() { androidVersion_ = ""; + trajectoryId_ = ""; imuData_ = java.util.Collections.emptyList(); pdrData_ = java.util.Collections.emptyList(); - positionData_ = java.util.Collections.emptyList(); + magnetometerData_ = java.util.Collections.emptyList(); pressureData_ = java.util.Collections.emptyList(); lightData_ = java.util.Collections.emptyList(); + proximityData_ = java.util.Collections.emptyList(); gnssData_ = java.util.Collections.emptyList(); - wifiData_ = java.util.Collections.emptyList(); + wifiFingerprints_ = 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.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - imuData_.add( - input.readMessage(Motion_Sample.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - pdrData_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - pdrData_.add( - input.readMessage(Pdr_Sample.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - positionData_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - positionData_.add( - input.readMessage(Position_Sample.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - pressureData_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - pressureData_.add( - input.readMessage(Pressure_Sample.parser(), extensionRegistry)); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - lightData_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - lightData_.add( - input.readMessage(Light_Sample.parser(), extensionRegistry)); - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - gnssData_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - gnssData_.add( - input.readMessage(GNSS_Sample.parser(), extensionRegistry)); - break; - } - case 66: { - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { - wifiData_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; - } - wifiData_.add( - input.readMessage(WiFi_Sample.parser(), extensionRegistry)); - break; - } - case 74: { - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - apsData_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000100; - } - apsData_.add( - input.readMessage(AP_Data.parser(), extensionRegistry)); - break; - } - case 80: { - - startTimestamp_ = input.readInt64(); - break; - } - case 90: { - String s = input.readStringRequireUtf8(); - - dataIdentifier_ = s; - break; - } - case 98: { - Sensor_Info.Builder subBuilder = null; - if (accelerometerInfo_ != null) { - subBuilder = accelerometerInfo_.toBuilder(); - } - accelerometerInfo_ = input.readMessage(Sensor_Info.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(accelerometerInfo_); - accelerometerInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 106: { - Sensor_Info.Builder subBuilder = null; - if (gyroscopeInfo_ != null) { - subBuilder = gyroscopeInfo_.toBuilder(); - } - gyroscopeInfo_ = input.readMessage(Sensor_Info.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(gyroscopeInfo_); - gyroscopeInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 114: { - Sensor_Info.Builder subBuilder = null; - if (rotationVectorInfo_ != null) { - subBuilder = rotationVectorInfo_.toBuilder(); - } - rotationVectorInfo_ = input.readMessage(Sensor_Info.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rotationVectorInfo_); - rotationVectorInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 122: { - Sensor_Info.Builder subBuilder = null; - if (magnetometerInfo_ != null) { - subBuilder = magnetometerInfo_.toBuilder(); - } - magnetometerInfo_ = input.readMessage(Sensor_Info.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(magnetometerInfo_); - magnetometerInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 130: { - Sensor_Info.Builder subBuilder = null; - if (barometerInfo_ != null) { - subBuilder = barometerInfo_.toBuilder(); - } - barometerInfo_ = input.readMessage(Sensor_Info.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(barometerInfo_); - barometerInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 138: { - Sensor_Info.Builder subBuilder = null; - if (lightSensorInfo_ != null) { - subBuilder = lightSensorInfo_.toBuilder(); - } - lightSensorInfo_ = input.readMessage(Sensor_Info.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lightSensorInfo_); - lightSensorInfo_ = subBuilder.buildPartial(); - } - - 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 { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - imuData_ = java.util.Collections.unmodifiableList(imuData_); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - pdrData_ = java.util.Collections.unmodifiableList(pdrData_); - } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - positionData_ = java.util.Collections.unmodifiableList(positionData_); - } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - pressureData_ = java.util.Collections.unmodifiableList(pressureData_); - } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - lightData_ = java.util.Collections.unmodifiableList(lightData_); - } - if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { - gnssData_ = java.util.Collections.unmodifiableList(gnssData_); - } - if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { - wifiData_ = java.util.Collections.unmodifiableList(wifiData_); - } - if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { - apsData_ = java.util.Collections.unmodifiableList(apsData_); - } - makeExtensionsImmutable(); - } + wifiRttData_ = java.util.Collections.emptyList(); + bleFingerprints_ = java.util.Collections.emptyList(); + bleData_ = java.util.Collections.emptyList(); + correctedPositions_ = java.util.Collections.emptyList(); + testPoints_ = java.util.Collections.emptyList(); } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_Trajectory_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Trajectory_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Trajectory_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Trajectory.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Trajectory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Trajectory.class, com.openpositioning.PositionMe.Traj.Trajectory.Builder.class); } private int bitField0_; public static final int ANDROID_VERSION_FIELD_NUMBER = 1; - private volatile Object androidVersion_; + @SuppressWarnings("serial") + private volatile java.lang.Object androidVersion_ = ""; /** - * optional string android_version = 1; + * string android_version = 1; + * @return The androidVersion. */ - public String getAndroidVersion() { - Object ref = androidVersion_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getAndroidVersion() { + java.lang.Object ref = androidVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); androidVersion_ = s; return s; } } /** - * optional string android_version = 1; + * string android_version = 1; + * @return The bytes for androidVersion. */ + @java.lang.Override 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); + getAndroidVersionBytes() { + java.lang.Object ref = androidVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); androidVersion_ = b; return b; } else { @@ -620,288 +636,562 @@ public String getAndroidVersion() { } } - public static final int IMU_DATA_FIELD_NUMBER = 2; - private java.util.List imuData_; + public static final int TRAJECTORY_VERSION_FIELD_NUMBER = 2; + private float trajectoryVersion_ = 0F; + /** + *
+     * version 2.0
+     * 
+ * + * float trajectory_version = 2; + * @return The trajectoryVersion. + */ + @java.lang.Override + public float getTrajectoryVersion() { + return trajectoryVersion_; + } + + public static final int TRAJECTORY_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object trajectoryId_ = ""; + /** + *
+     * trajectory id/name for identification
+     * 
+ * + * string trajectory_id = 3; + * @return The trajectoryId. + */ + @java.lang.Override + public java.lang.String getTrajectoryId() { + java.lang.Object ref = trajectoryId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trajectoryId_ = s; + return s; + } + } + /** + *
+     * trajectory id/name for identification
+     * 
+ * + * string trajectory_id = 3; + * @return The bytes for trajectoryId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTrajectoryIdBytes() { + java.lang.Object ref = trajectoryId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trajectoryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMU_DATA_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List imuData_; /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - public java.util.List getImuDataList() { + @java.lang.Override + public java.util.List getImuDataList() { return imuData_; } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - public java.util.List - getImuDataOrBuilderList() { + @java.lang.Override + public java.util.List + getImuDataOrBuilderList() { return imuData_; } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ + @java.lang.Override public int getImuDataCount() { return imuData_.size(); } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - public Motion_Sample getImuData(int index) { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.IMUReading getImuData(int index) { return imuData_.get(index); } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - public Motion_SampleOrBuilder getImuDataOrBuilder( - int index) { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.IMUReadingOrBuilder getImuDataOrBuilder( + int index) { return imuData_.get(index); } - public static final int PDR_DATA_FIELD_NUMBER = 3; - private java.util.List pdrData_; + public static final int PDR_DATA_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List pdrData_; /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - public java.util.List getPdrDataList() { + @java.lang.Override + public java.util.List getPdrDataList() { return pdrData_; } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - public java.util.List - getPdrDataOrBuilderList() { + @java.lang.Override + public java.util.List + getPdrDataOrBuilderList() { return pdrData_; } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ + @java.lang.Override public int getPdrDataCount() { return pdrData_.size(); } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - public Pdr_Sample getPdrData(int index) { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RelativePosition getPdrData(int index) { return pdrData_.get(index); } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - public Pdr_SampleOrBuilder getPdrDataOrBuilder( - int index) { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RelativePositionOrBuilder getPdrDataOrBuilder( + int index) { return pdrData_.get(index); } - public static final int POSITION_DATA_FIELD_NUMBER = 4; - private java.util.List positionData_; + public static final int MAGNETOMETER_DATA_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private java.util.List magnetometerData_; /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public java.util.List getPositionDataList() { - return positionData_; + @java.lang.Override + public java.util.List getMagnetometerDataList() { + return magnetometerData_; } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public java.util.List - getPositionDataOrBuilderList() { - return positionData_; + @java.lang.Override + public java.util.List + getMagnetometerDataOrBuilderList() { + return magnetometerData_; } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public int getPositionDataCount() { - return positionData_.size(); + @java.lang.Override + public int getMagnetometerDataCount() { + return magnetometerData_.size(); } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Position_Sample getPositionData(int index) { - return positionData_.get(index); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.MagnetometerReading getMagnetometerData(int index) { + return magnetometerData_.get(index); } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Position_SampleOrBuilder getPositionDataOrBuilder( - int index) { - return positionData_.get(index); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.MagnetometerReadingOrBuilder getMagnetometerDataOrBuilder( + int index) { + return magnetometerData_.get(index); } - public static final int PRESSURE_DATA_FIELD_NUMBER = 5; - private java.util.List pressureData_; + public static final int PRESSURE_DATA_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private java.util.List pressureData_; /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - public java.util.List getPressureDataList() { + @java.lang.Override + public java.util.List getPressureDataList() { return pressureData_; } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - public java.util.List - getPressureDataOrBuilderList() { + @java.lang.Override + public java.util.List + getPressureDataOrBuilderList() { return pressureData_; } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ + @java.lang.Override public int getPressureDataCount() { return pressureData_.size(); } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - public Pressure_Sample getPressureData(int index) { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BarometerReading getPressureData(int index) { return pressureData_.get(index); } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - public Pressure_SampleOrBuilder getPressureDataOrBuilder( - int index) { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BarometerReadingOrBuilder getPressureDataOrBuilder( + int index) { return pressureData_.get(index); } - public static final int LIGHT_DATA_FIELD_NUMBER = 6; - private java.util.List lightData_; + public static final int LIGHT_DATA_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private java.util.List lightData_; /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - public java.util.List getLightDataList() { + @java.lang.Override + public java.util.List getLightDataList() { return lightData_; } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - public java.util.List - getLightDataOrBuilderList() { + @java.lang.Override + public java.util.List + getLightDataOrBuilderList() { return lightData_; } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ + @java.lang.Override public int getLightDataCount() { return lightData_.size(); } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - public Light_Sample getLightData(int index) { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.LightReading getLightData(int index) { return lightData_.get(index); } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - public Light_SampleOrBuilder getLightDataOrBuilder( - int index) { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.LightReadingOrBuilder getLightDataOrBuilder( + int index) { return lightData_.get(index); } - public static final int GNSS_DATA_FIELD_NUMBER = 7; - private java.util.List gnssData_; + public static final int PROXIMITY_DATA_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private java.util.List proximityData_; + /** + * repeated .ProximityReading proximity_data = 9; + */ + @java.lang.Override + public java.util.List getProximityDataList() { + return proximityData_; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + @java.lang.Override + public java.util.List + getProximityDataOrBuilderList() { + return proximityData_; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + @java.lang.Override + public int getProximityDataCount() { + return proximityData_.size(); + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.ProximityReading getProximityData(int index) { + return proximityData_.get(index); + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.ProximityReadingOrBuilder getProximityDataOrBuilder( + int index) { + return proximityData_.get(index); + } + + public static final int GNSS_DATA_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private java.util.List gnssData_; /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - public java.util.List getGnssDataList() { + @java.lang.Override + public java.util.List getGnssDataList() { return gnssData_; } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - public java.util.List - getGnssDataOrBuilderList() { + @java.lang.Override + public java.util.List + getGnssDataOrBuilderList() { return gnssData_; } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ + @java.lang.Override public int getGnssDataCount() { return gnssData_.size(); } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - public GNSS_Sample getGnssData(int index) { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSReading getGnssData(int index) { return gnssData_.get(index); } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - public GNSS_SampleOrBuilder getGnssDataOrBuilder( - int index) { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSReadingOrBuilder getGnssDataOrBuilder( + int index) { return gnssData_.get(index); } - public static final int WIFI_DATA_FIELD_NUMBER = 8; - private java.util.List wifiData_; + public static final int WIFI_FINGERPRINTS_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private java.util.List wifiFingerprints_; /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public java.util.List getWifiDataList() { - return wifiData_; + @java.lang.Override + public java.util.List getWifiFingerprintsList() { + return wifiFingerprints_; } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public java.util.List - getWifiDataOrBuilderList() { - return wifiData_; + @java.lang.Override + public java.util.List + getWifiFingerprintsOrBuilderList() { + return wifiFingerprints_; } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public int getWifiDataCount() { - return wifiData_.size(); + @java.lang.Override + public int getWifiFingerprintsCount() { + return wifiFingerprints_.size(); } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public WiFi_Sample getWifiData(int index) { - return wifiData_.get(index); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Fingerprint getWifiFingerprints(int index) { + return wifiFingerprints_.get(index); } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public WiFi_SampleOrBuilder getWifiDataOrBuilder( - int index) { - return wifiData_.get(index); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.FingerprintOrBuilder getWifiFingerprintsOrBuilder( + int index) { + return wifiFingerprints_.get(index); } - public static final int APS_DATA_FIELD_NUMBER = 9; - private java.util.List apsData_; + public static final int APS_DATA_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private java.util.List apsData_; /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - public java.util.List getApsDataList() { + @java.lang.Override + public java.util.List getApsDataList() { return apsData_; } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - public java.util.List - getApsDataOrBuilderList() { + @java.lang.Override + public java.util.List + getApsDataOrBuilderList() { return apsData_; } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ + @java.lang.Override public int getApsDataCount() { return apsData_.size(); } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - public AP_Data getApsData(int index) { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiAPData getApsData(int index) { return apsData_.get(index); } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - public AP_DataOrBuilder getApsDataOrBuilder( - int index) { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiAPDataOrBuilder getApsDataOrBuilder( + int index) { return apsData_.get(index); } - public static final int START_TIMESTAMP_FIELD_NUMBER = 10; - private long startTimestamp_; + public static final int WIFI_RTT_DATA_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private java.util.List wifiRttData_; + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + @java.lang.Override + public java.util.List getWifiRttDataList() { + return wifiRttData_; + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + @java.lang.Override + public java.util.List + getWifiRttDataOrBuilderList() { + return wifiRttData_; + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + @java.lang.Override + public int getWifiRttDataCount() { + return wifiRttData_.size(); + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiRTTReading getWifiRttData(int index) { + return wifiRttData_.get(index); + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiRTTReadingOrBuilder getWifiRttDataOrBuilder( + int index) { + return wifiRttData_.get(index); + } + + public static final int BLE_FINGERPRINTS_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private java.util.List bleFingerprints_; + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + @java.lang.Override + public java.util.List getBleFingerprintsList() { + return bleFingerprints_; + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + @java.lang.Override + public java.util.List + getBleFingerprintsOrBuilderList() { + return bleFingerprints_; + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + @java.lang.Override + public int getBleFingerprintsCount() { + return bleFingerprints_.size(); + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Fingerprint getBleFingerprints(int index) { + return bleFingerprints_.get(index); + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.FingerprintOrBuilder getBleFingerprintsOrBuilder( + int index) { + return bleFingerprints_.get(index); + } + + public static final int BLE_DATA_FIELD_NUMBER = 15; + @SuppressWarnings("serial") + private java.util.List bleData_; + /** + * repeated .BleData ble_data = 15; + */ + @java.lang.Override + public java.util.List getBleDataList() { + return bleData_; + } + /** + * repeated .BleData ble_data = 15; + */ + @java.lang.Override + public java.util.List + getBleDataOrBuilderList() { + return bleData_; + } + /** + * repeated .BleData ble_data = 15; + */ + @java.lang.Override + public int getBleDataCount() { + return bleData_.size(); + } + /** + * repeated .BleData ble_data = 15; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BleData getBleData(int index) { + return bleData_.get(index); + } + /** + * repeated .BleData ble_data = 15; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BleDataOrBuilder getBleDataOrBuilder( + int index) { + return bleData_.get(index); + } + + public static final int START_TIMESTAMP_FIELD_NUMBER = 16; + private long startTimestamp_ = 0L; /** *
      * UNIX timestamp (in milliseconds) recorded from the start of this
@@ -913,175 +1203,308 @@ public AP_DataOrBuilder getApsDataOrBuilder(
      * relative_timestamp = 3000 (3s)
      * 
* - * optional int64 start_timestamp = 10; + * int64 start_timestamp = 16; + * @return The startTimestamp. */ + @java.lang.Override public long getStartTimestamp() { return startTimestamp_; } - public static final int DATA_IDENTIFIER_FIELD_NUMBER = 11; - private volatile Object dataIdentifier_; + public static final int INITIAL_POSITION_FIELD_NUMBER = 17; + private com.openpositioning.PositionMe.Traj.GNSSPosition initialPosition_; /** - * optional string data_identifier = 11; + * .GNSSPosition initial_position = 17; + * @return Whether the initialPosition field is set. */ - 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; - } + @java.lang.Override + public boolean hasInitialPosition() { + return ((bitField0_ & 0x00000001) != 0); } /** - * optional string data_identifier = 11; + * .GNSSPosition initial_position = 17; + * @return The initialPosition. */ - 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; - } + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition getInitialPosition() { + return initialPosition_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : initialPosition_; + } + /** + * .GNSSPosition initial_position = 17; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getInitialPositionOrBuilder() { + return initialPosition_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : initialPosition_; + } + + public static final int CORRECTED_POSITIONS_FIELD_NUMBER = 18; + @SuppressWarnings("serial") + private java.util.List correctedPositions_; + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + @java.lang.Override + public java.util.List getCorrectedPositionsList() { + return correctedPositions_; + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + @java.lang.Override + public java.util.List + getCorrectedPositionsOrBuilderList() { + return correctedPositions_; + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + @java.lang.Override + public int getCorrectedPositionsCount() { + return correctedPositions_.size(); + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition getCorrectedPositions(int index) { + return correctedPositions_.get(index); + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getCorrectedPositionsOrBuilder( + int index) { + return correctedPositions_.get(index); } - public static final int ACCELEROMETER_INFO_FIELD_NUMBER = 12; - private Sensor_Info accelerometerInfo_; + public static final int ACCELEROMETER_INFO_FIELD_NUMBER = 19; + private com.openpositioning.PositionMe.Traj.SensorInfo accelerometerInfo_; /** - * optional .Sensor_Info accelerometer_info = 12; + * .SensorInfo accelerometer_info = 19; + * @return Whether the accelerometerInfo field is set. */ + @java.lang.Override public boolean hasAccelerometerInfo() { - return accelerometerInfo_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** - * optional .Sensor_Info accelerometer_info = 12; + * .SensorInfo accelerometer_info = 19; + * @return The accelerometerInfo. */ - public Sensor_Info getAccelerometerInfo() { - return accelerometerInfo_ == null ? Sensor_Info.getDefaultInstance() : accelerometerInfo_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getAccelerometerInfo() { + return accelerometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : accelerometerInfo_; } /** - * optional .Sensor_Info accelerometer_info = 12; + * .SensorInfo accelerometer_info = 19; */ - public Sensor_InfoOrBuilder getAccelerometerInfoOrBuilder() { - return getAccelerometerInfo(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getAccelerometerInfoOrBuilder() { + return accelerometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : accelerometerInfo_; } - public static final int GYROSCOPE_INFO_FIELD_NUMBER = 13; - private Sensor_Info gyroscopeInfo_; + public static final int GYROSCOPE_INFO_FIELD_NUMBER = 20; + private com.openpositioning.PositionMe.Traj.SensorInfo gyroscopeInfo_; /** - * optional .Sensor_Info gyroscope_info = 13; + * .SensorInfo gyroscope_info = 20; + * @return Whether the gyroscopeInfo field is set. */ + @java.lang.Override public boolean hasGyroscopeInfo() { - return gyroscopeInfo_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** - * optional .Sensor_Info gyroscope_info = 13; + * .SensorInfo gyroscope_info = 20; + * @return The gyroscopeInfo. */ - public Sensor_Info getGyroscopeInfo() { - return gyroscopeInfo_ == null ? Sensor_Info.getDefaultInstance() : gyroscopeInfo_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getGyroscopeInfo() { + return gyroscopeInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : gyroscopeInfo_; } /** - * optional .Sensor_Info gyroscope_info = 13; + * .SensorInfo gyroscope_info = 20; */ - public Sensor_InfoOrBuilder getGyroscopeInfoOrBuilder() { - return getGyroscopeInfo(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getGyroscopeInfoOrBuilder() { + return gyroscopeInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : gyroscopeInfo_; } - public static final int ROTATION_VECTOR_INFO_FIELD_NUMBER = 14; - private Sensor_Info rotationVectorInfo_; + public static final int ROTATION_VECTOR_INFO_FIELD_NUMBER = 21; + private com.openpositioning.PositionMe.Traj.SensorInfo rotationVectorInfo_; /** - * optional .Sensor_Info rotation_vector_info = 14; + * .SensorInfo rotation_vector_info = 21; + * @return Whether the rotationVectorInfo field is set. */ + @java.lang.Override public boolean hasRotationVectorInfo() { - return rotationVectorInfo_ != null; + return ((bitField0_ & 0x00000008) != 0); } /** - * optional .Sensor_Info rotation_vector_info = 14; + * .SensorInfo rotation_vector_info = 21; + * @return The rotationVectorInfo. */ - public Sensor_Info getRotationVectorInfo() { - return rotationVectorInfo_ == null ? Sensor_Info.getDefaultInstance() : rotationVectorInfo_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getRotationVectorInfo() { + return rotationVectorInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : rotationVectorInfo_; } /** - * optional .Sensor_Info rotation_vector_info = 14; + * .SensorInfo rotation_vector_info = 21; */ - public Sensor_InfoOrBuilder getRotationVectorInfoOrBuilder() { - return getRotationVectorInfo(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getRotationVectorInfoOrBuilder() { + return rotationVectorInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : rotationVectorInfo_; } - public static final int MAGNETOMETER_INFO_FIELD_NUMBER = 15; - private Sensor_Info magnetometerInfo_; + public static final int MAGNETOMETER_INFO_FIELD_NUMBER = 22; + private com.openpositioning.PositionMe.Traj.SensorInfo magnetometerInfo_; /** - * optional .Sensor_Info magnetometer_info = 15; + * .SensorInfo magnetometer_info = 22; + * @return Whether the magnetometerInfo field is set. */ + @java.lang.Override public boolean hasMagnetometerInfo() { - return magnetometerInfo_ != null; + return ((bitField0_ & 0x00000010) != 0); } /** - * optional .Sensor_Info magnetometer_info = 15; + * .SensorInfo magnetometer_info = 22; + * @return The magnetometerInfo. */ - public Sensor_Info getMagnetometerInfo() { - return magnetometerInfo_ == null ? Sensor_Info.getDefaultInstance() : magnetometerInfo_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getMagnetometerInfo() { + return magnetometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : magnetometerInfo_; } /** - * optional .Sensor_Info magnetometer_info = 15; + * .SensorInfo magnetometer_info = 22; */ - public Sensor_InfoOrBuilder getMagnetometerInfoOrBuilder() { - return getMagnetometerInfo(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getMagnetometerInfoOrBuilder() { + return magnetometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : magnetometerInfo_; } - public static final int BAROMETER_INFO_FIELD_NUMBER = 16; - private Sensor_Info barometerInfo_; + public static final int BAROMETER_INFO_FIELD_NUMBER = 23; + private com.openpositioning.PositionMe.Traj.SensorInfo barometerInfo_; /** - * optional .Sensor_Info barometer_info = 16; + * .SensorInfo barometer_info = 23; + * @return Whether the barometerInfo field is set. */ + @java.lang.Override public boolean hasBarometerInfo() { - return barometerInfo_ != null; + return ((bitField0_ & 0x00000020) != 0); } /** - * optional .Sensor_Info barometer_info = 16; + * .SensorInfo barometer_info = 23; + * @return The barometerInfo. */ - public Sensor_Info getBarometerInfo() { - return barometerInfo_ == null ? Sensor_Info.getDefaultInstance() : barometerInfo_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getBarometerInfo() { + return barometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : barometerInfo_; } /** - * optional .Sensor_Info barometer_info = 16; + * .SensorInfo barometer_info = 23; */ - public Sensor_InfoOrBuilder getBarometerInfoOrBuilder() { - return getBarometerInfo(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getBarometerInfoOrBuilder() { + return barometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : barometerInfo_; } - public static final int LIGHT_SENSOR_INFO_FIELD_NUMBER = 17; - private Sensor_Info lightSensorInfo_; + public static final int LIGHT_SensorInfo_FIELD_NUMBER = 24; + private com.openpositioning.PositionMe.Traj.SensorInfo lightSensorInfo_; /** - * optional .Sensor_Info light_sensor_info = 17; + * .SensorInfo light_SensorInfo = 24; + * @return Whether the lightSensorInfo field is set. */ + @java.lang.Override public boolean hasLightSensorInfo() { - return lightSensorInfo_ != null; + return ((bitField0_ & 0x00000040) != 0); } /** - * optional .Sensor_Info light_sensor_info = 17; + * .SensorInfo light_SensorInfo = 24; + * @return The lightSensorInfo. */ - public Sensor_Info getLightSensorInfo() { - return lightSensorInfo_ == null ? Sensor_Info.getDefaultInstance() : lightSensorInfo_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getLightSensorInfo() { + return lightSensorInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : lightSensorInfo_; } /** - * optional .Sensor_Info light_sensor_info = 17; + * .SensorInfo light_SensorInfo = 24; */ - public Sensor_InfoOrBuilder getLightSensorInfoOrBuilder() { - return getLightSensorInfo(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getLightSensorInfoOrBuilder() { + return lightSensorInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : lightSensorInfo_; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; + public static final int PROXIMITY_INFO_FIELD_NUMBER = 25; + private com.openpositioning.PositionMe.Traj.SensorInfo proximityInfo_; + /** + * .SensorInfo proximity_info = 25; + * @return Whether the proximityInfo field is set. + */ + @java.lang.Override + public boolean hasProximityInfo() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * .SensorInfo proximity_info = 25; + * @return The proximityInfo. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getProximityInfo() { + return proximityInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : proximityInfo_; + } + /** + * .SensorInfo proximity_info = 25; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getProximityInfoOrBuilder() { + return proximityInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : proximityInfo_; + } + + public static final int TEST_POINTS_FIELD_NUMBER = 26; + @SuppressWarnings("serial") + private java.util.List testPoints_; + /** + * repeated .GNSSPosition test_points = 26; + */ + @java.lang.Override + public java.util.List getTestPointsList() { + return testPoints_; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + @java.lang.Override + public java.util.List + getTestPointsOrBuilderList() { + return testPoints_; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + @java.lang.Override + public int getTestPointsCount() { + return testPoints_.size(); + } + /** + * repeated .GNSSPosition test_points = 26; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition getTestPoints(int index) { + return testPoints_.get(index); + } + /** + * repeated .GNSSPosition test_points = 26; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getTestPointsOrBuilder( + int index) { + return testPoints_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; @@ -1089,212 +1512,308 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getAndroidVersionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, androidVersion_); + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(androidVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, androidVersion_); + } + if (java.lang.Float.floatToRawIntBits(trajectoryVersion_) != 0) { + output.writeFloat(2, trajectoryVersion_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trajectoryId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, trajectoryId_); } for (int i = 0; i < imuData_.size(); i++) { - output.writeMessage(2, imuData_.get(i)); + output.writeMessage(4, imuData_.get(i)); } for (int i = 0; i < pdrData_.size(); i++) { - output.writeMessage(3, pdrData_.get(i)); + output.writeMessage(5, pdrData_.get(i)); } - for (int i = 0; i < positionData_.size(); i++) { - output.writeMessage(4, positionData_.get(i)); + for (int i = 0; i < magnetometerData_.size(); i++) { + output.writeMessage(6, magnetometerData_.get(i)); } for (int i = 0; i < pressureData_.size(); i++) { - output.writeMessage(5, pressureData_.get(i)); + output.writeMessage(7, pressureData_.get(i)); } for (int i = 0; i < lightData_.size(); i++) { - output.writeMessage(6, lightData_.get(i)); + output.writeMessage(8, lightData_.get(i)); + } + for (int i = 0; i < proximityData_.size(); i++) { + output.writeMessage(9, proximityData_.get(i)); } for (int i = 0; i < gnssData_.size(); i++) { - output.writeMessage(7, gnssData_.get(i)); + output.writeMessage(10, gnssData_.get(i)); } - for (int i = 0; i < wifiData_.size(); i++) { - output.writeMessage(8, wifiData_.get(i)); + for (int i = 0; i < wifiFingerprints_.size(); i++) { + output.writeMessage(11, wifiFingerprints_.get(i)); } for (int i = 0; i < apsData_.size(); i++) { - output.writeMessage(9, apsData_.get(i)); + output.writeMessage(12, apsData_.get(i)); + } + for (int i = 0; i < wifiRttData_.size(); i++) { + output.writeMessage(13, wifiRttData_.get(i)); + } + for (int i = 0; i < bleFingerprints_.size(); i++) { + output.writeMessage(14, bleFingerprints_.get(i)); + } + for (int i = 0; i < bleData_.size(); i++) { + output.writeMessage(15, bleData_.get(i)); } if (startTimestamp_ != 0L) { - output.writeInt64(10, startTimestamp_); + output.writeInt64(16, startTimestamp_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(17, getInitialPosition()); } - if (!getDataIdentifierBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 11, dataIdentifier_); + for (int i = 0; i < correctedPositions_.size(); i++) { + output.writeMessage(18, correctedPositions_.get(i)); } - if (accelerometerInfo_ != null) { - output.writeMessage(12, getAccelerometerInfo()); + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(19, getAccelerometerInfo()); } - if (gyroscopeInfo_ != null) { - output.writeMessage(13, getGyroscopeInfo()); + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(20, getGyroscopeInfo()); } - if (rotationVectorInfo_ != null) { - output.writeMessage(14, getRotationVectorInfo()); + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(21, getRotationVectorInfo()); } - if (magnetometerInfo_ != null) { - output.writeMessage(15, getMagnetometerInfo()); + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(22, getMagnetometerInfo()); } - if (barometerInfo_ != null) { - output.writeMessage(16, getBarometerInfo()); + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(23, getBarometerInfo()); } - if (lightSensorInfo_ != null) { - output.writeMessage(17, getLightSensorInfo()); + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(24, getLightSensorInfo()); } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(25, getProximityInfo()); + } + for (int i = 0; i < testPoints_.size(); i++) { + output.writeMessage(26, testPoints_.get(i)); + } + getUnknownFields().writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; - if (!getAndroidVersionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, androidVersion_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(androidVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, androidVersion_); + } + if (java.lang.Float.floatToRawIntBits(trajectoryVersion_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, trajectoryVersion_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trajectoryId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, trajectoryId_); } for (int i = 0; i < imuData_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, imuData_.get(i)); + .computeMessageSize(4, imuData_.get(i)); } for (int i = 0; i < pdrData_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, pdrData_.get(i)); + .computeMessageSize(5, pdrData_.get(i)); } - for (int i = 0; i < positionData_.size(); i++) { + for (int i = 0; i < magnetometerData_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, positionData_.get(i)); + .computeMessageSize(6, magnetometerData_.get(i)); } for (int i = 0; i < pressureData_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, pressureData_.get(i)); + .computeMessageSize(7, pressureData_.get(i)); } for (int i = 0; i < lightData_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, lightData_.get(i)); + .computeMessageSize(8, lightData_.get(i)); + } + for (int i = 0; i < proximityData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, proximityData_.get(i)); } for (int i = 0; i < gnssData_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, gnssData_.get(i)); + .computeMessageSize(10, gnssData_.get(i)); } - for (int i = 0; i < wifiData_.size(); i++) { + for (int i = 0; i < wifiFingerprints_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, wifiData_.get(i)); + .computeMessageSize(11, wifiFingerprints_.get(i)); } for (int i = 0; i < apsData_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, apsData_.get(i)); + .computeMessageSize(12, apsData_.get(i)); + } + for (int i = 0; i < wifiRttData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, wifiRttData_.get(i)); + } + for (int i = 0; i < bleFingerprints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, bleFingerprints_.get(i)); + } + for (int i = 0; i < bleData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, bleData_.get(i)); } if (startTimestamp_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(10, startTimestamp_); + .computeInt64Size(16, startTimestamp_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getInitialPosition()); + } + for (int i = 0; i < correctedPositions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, correctedPositions_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, getAccelerometerInfo()); } - if (!getDataIdentifierBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, dataIdentifier_); + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getGyroscopeInfo()); } - if (accelerometerInfo_ != null) { + if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, getAccelerometerInfo()); + .computeMessageSize(21, getRotationVectorInfo()); } - if (gyroscopeInfo_ != null) { + if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(13, getGyroscopeInfo()); + .computeMessageSize(22, getMagnetometerInfo()); } - if (rotationVectorInfo_ != null) { + if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(14, getRotationVectorInfo()); + .computeMessageSize(23, getBarometerInfo()); } - if (magnetometerInfo_ != null) { + if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, getMagnetometerInfo()); + .computeMessageSize(24, getLightSensorInfo()); } - if (barometerInfo_ != null) { + if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, getBarometerInfo()); + .computeMessageSize(25, getProximityInfo()); } - if (lightSensorInfo_ != null) { + for (int i = 0; i < testPoints_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(17, getLightSensorInfo()); + .computeMessageSize(26, testPoints_.get(i)); } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj instanceof Trajectory)) { + if (!(obj instanceof com.openpositioning.PositionMe.Traj.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()); + com.openpositioning.PositionMe.Traj.Trajectory other = (com.openpositioning.PositionMe.Traj.Trajectory) obj; + + if (!getAndroidVersion() + .equals(other.getAndroidVersion())) return false; + if (java.lang.Float.floatToIntBits(getTrajectoryVersion()) + != java.lang.Float.floatToIntBits( + other.getTrajectoryVersion())) return false; + if (!getTrajectoryId() + .equals(other.getTrajectoryId())) return false; + if (!getImuDataList() + .equals(other.getImuDataList())) return false; + if (!getPdrDataList() + .equals(other.getPdrDataList())) return false; + if (!getMagnetometerDataList() + .equals(other.getMagnetometerDataList())) return false; + if (!getPressureDataList() + .equals(other.getPressureDataList())) return false; + if (!getLightDataList() + .equals(other.getLightDataList())) return false; + if (!getProximityDataList() + .equals(other.getProximityDataList())) return false; + if (!getGnssDataList() + .equals(other.getGnssDataList())) return false; + if (!getWifiFingerprintsList() + .equals(other.getWifiFingerprintsList())) return false; + if (!getApsDataList() + .equals(other.getApsDataList())) return false; + if (!getWifiRttDataList() + .equals(other.getWifiRttDataList())) return false; + if (!getBleFingerprintsList() + .equals(other.getBleFingerprintsList())) return false; + if (!getBleDataList() + .equals(other.getBleDataList())) return false; + if (getStartTimestamp() + != other.getStartTimestamp()) return false; + if (hasInitialPosition() != other.hasInitialPosition()) return false; + if (hasInitialPosition()) { + if (!getInitialPosition() + .equals(other.getInitialPosition())) return false; + } + if (!getCorrectedPositionsList() + .equals(other.getCorrectedPositionsList())) return false; + if (hasAccelerometerInfo() != other.hasAccelerometerInfo()) return false; if (hasAccelerometerInfo()) { - result = result && getAccelerometerInfo() - .equals(other.getAccelerometerInfo()); + if (!getAccelerometerInfo() + .equals(other.getAccelerometerInfo())) return false; } - result = result && (hasGyroscopeInfo() == other.hasGyroscopeInfo()); + if (hasGyroscopeInfo() != other.hasGyroscopeInfo()) return false; if (hasGyroscopeInfo()) { - result = result && getGyroscopeInfo() - .equals(other.getGyroscopeInfo()); + if (!getGyroscopeInfo() + .equals(other.getGyroscopeInfo())) return false; } - result = result && (hasRotationVectorInfo() == other.hasRotationVectorInfo()); + if (hasRotationVectorInfo() != other.hasRotationVectorInfo()) return false; if (hasRotationVectorInfo()) { - result = result && getRotationVectorInfo() - .equals(other.getRotationVectorInfo()); + if (!getRotationVectorInfo() + .equals(other.getRotationVectorInfo())) return false; } - result = result && (hasMagnetometerInfo() == other.hasMagnetometerInfo()); + if (hasMagnetometerInfo() != other.hasMagnetometerInfo()) return false; if (hasMagnetometerInfo()) { - result = result && getMagnetometerInfo() - .equals(other.getMagnetometerInfo()); + if (!getMagnetometerInfo() + .equals(other.getMagnetometerInfo())) return false; } - result = result && (hasBarometerInfo() == other.hasBarometerInfo()); + if (hasBarometerInfo() != other.hasBarometerInfo()) return false; if (hasBarometerInfo()) { - result = result && getBarometerInfo() - .equals(other.getBarometerInfo()); + if (!getBarometerInfo() + .equals(other.getBarometerInfo())) return false; } - result = result && (hasLightSensorInfo() == other.hasLightSensorInfo()); + if (hasLightSensorInfo() != other.hasLightSensorInfo()) return false; if (hasLightSensorInfo()) { - result = result && getLightSensorInfo() - .equals(other.getLightSensorInfo()); + if (!getLightSensorInfo() + .equals(other.getLightSensorInfo())) return false; } - return result; + if (hasProximityInfo() != other.hasProximityInfo()) return false; + if (hasProximityInfo()) { + if (!getProximityInfo() + .equals(other.getProximityInfo())) return false; + } + if (!getTestPointsList() + .equals(other.getTestPointsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - @Override + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ANDROID_VERSION_FIELD_NUMBER; hash = (53 * hash) + getAndroidVersion().hashCode(); + hash = (37 * hash) + TRAJECTORY_VERSION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getTrajectoryVersion()); + hash = (37 * hash) + TRAJECTORY_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrajectoryId().hashCode(); if (getImuDataCount() > 0) { hash = (37 * hash) + IMU_DATA_FIELD_NUMBER; hash = (53 * hash) + getImuDataList().hashCode(); @@ -1303,9 +1822,9 @@ public int hashCode() { 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 (getMagnetometerDataCount() > 0) { + hash = (37 * hash) + MAGNETOMETER_DATA_FIELD_NUMBER; + hash = (53 * hash) + getMagnetometerDataList().hashCode(); } if (getPressureDataCount() > 0) { hash = (37 * hash) + PRESSURE_DATA_FIELD_NUMBER; @@ -1315,23 +1834,45 @@ public int hashCode() { hash = (37 * hash) + LIGHT_DATA_FIELD_NUMBER; hash = (53 * hash) + getLightDataList().hashCode(); } + if (getProximityDataCount() > 0) { + hash = (37 * hash) + PROXIMITY_DATA_FIELD_NUMBER; + hash = (53 * hash) + getProximityDataList().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 (getWifiFingerprintsCount() > 0) { + hash = (37 * hash) + WIFI_FINGERPRINTS_FIELD_NUMBER; + hash = (53 * hash) + getWifiFingerprintsList().hashCode(); } if (getApsDataCount() > 0) { hash = (37 * hash) + APS_DATA_FIELD_NUMBER; hash = (53 * hash) + getApsDataList().hashCode(); } + if (getWifiRttDataCount() > 0) { + hash = (37 * hash) + WIFI_RTT_DATA_FIELD_NUMBER; + hash = (53 * hash) + getWifiRttDataList().hashCode(); + } + if (getBleFingerprintsCount() > 0) { + hash = (37 * hash) + BLE_FINGERPRINTS_FIELD_NUMBER; + hash = (53 * hash) + getBleFingerprintsList().hashCode(); + } + if (getBleDataCount() > 0) { + hash = (37 * hash) + BLE_DATA_FIELD_NUMBER; + hash = (53 * hash) + getBleDataList().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(); + getStartTimestamp()); + if (hasInitialPosition()) { + hash = (37 * hash) + INITIAL_POSITION_FIELD_NUMBER; + hash = (53 * hash) + getInitialPosition().hashCode(); + } + if (getCorrectedPositionsCount() > 0) { + hash = (37 * hash) + CORRECTED_POSITIONS_FIELD_NUMBER; + hash = (53 * hash) + getCorrectedPositionsList().hashCode(); + } if (hasAccelerometerInfo()) { hash = (37 * hash) + ACCELEROMETER_INFO_FIELD_NUMBER; hash = (53 * hash) + getAccelerometerInfo().hashCode(); @@ -1353,88 +1894,111 @@ public int hashCode() { hash = (53 * hash) + getBarometerInfo().hashCode(); } if (hasLightSensorInfo()) { - hash = (37 * hash) + LIGHT_SENSOR_INFO_FIELD_NUMBER; + hash = (37 * hash) + LIGHT_SensorInfo_FIELD_NUMBER; hash = (53 * hash) + getLightSensorInfo().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + if (hasProximityInfo()) { + hash = (37 * hash) + PROXIMITY_INFO_FIELD_NUMBER; + hash = (53 * hash) + getProximityInfo().hashCode(); + } + if (getTestPointsCount() > 0) { + hash = (37 * hash) + TEST_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getTestPointsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static Trajectory parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.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 { + public static com.openpositioning.PositionMe.Traj.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 { + public static com.openpositioning.PositionMe.Traj.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 { + public static com.openpositioning.PositionMe.Traj.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 static com.openpositioning.PositionMe.Traj.Trajectory parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.Trajectory parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.Trajectory parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(Trajectory prototype) { + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.Trajectory prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } @@ -1442,316 +2006,462 @@ protected Builder newBuilderForType( * Protobuf type {@code Trajectory} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:Trajectory) - TrajectoryOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Trajectory) + com.openpositioning.PositionMe.Traj.TrajectoryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_Trajectory_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Trajectory_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Trajectory_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Trajectory.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Trajectory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Trajectory.class, com.openpositioning.PositionMe.Traj.Trajectory.Builder.class); } - // Construct using Traj.Trajectory.newBuilder() + // Construct using com.openpositioning.PositionMe.Traj.Trajectory.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { getImuDataFieldBuilder(); getPdrDataFieldBuilder(); - getPositionDataFieldBuilder(); + getMagnetometerDataFieldBuilder(); getPressureDataFieldBuilder(); getLightDataFieldBuilder(); + getProximityDataFieldBuilder(); getGnssDataFieldBuilder(); - getWifiDataFieldBuilder(); + getWifiFingerprintsFieldBuilder(); getApsDataFieldBuilder(); - } - } + getWifiRttDataFieldBuilder(); + getBleFingerprintsFieldBuilder(); + getBleDataFieldBuilder(); + getInitialPositionFieldBuilder(); + getCorrectedPositionsFieldBuilder(); + getAccelerometerInfoFieldBuilder(); + getGyroscopeInfoFieldBuilder(); + getRotationVectorInfoFieldBuilder(); + getMagnetometerInfoFieldBuilder(); + getBarometerInfoFieldBuilder(); + getLightSensorInfoFieldBuilder(); + getProximityInfoFieldBuilder(); + getTestPointsFieldBuilder(); + } + } + @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; androidVersion_ = ""; - + trajectoryVersion_ = 0F; + trajectoryId_ = ""; if (imuDataBuilder_ == null) { imuData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + imuData_ = null; imuDataBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); if (pdrDataBuilder_ == null) { pdrData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + pdrData_ = null; pdrDataBuilder_.clear(); } - if (positionDataBuilder_ == null) { - positionData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); + if (magnetometerDataBuilder_ == null) { + magnetometerData_ = java.util.Collections.emptyList(); } else { - positionDataBuilder_.clear(); + magnetometerData_ = null; + magnetometerDataBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000020); if (pressureDataBuilder_ == null) { pressureData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + pressureData_ = null; pressureDataBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000040); if (lightDataBuilder_ == null) { lightData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); } else { + lightData_ = null; lightDataBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000080); + if (proximityDataBuilder_ == null) { + proximityData_ = java.util.Collections.emptyList(); + } else { + proximityData_ = null; + proximityDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); if (gnssDataBuilder_ == null) { gnssData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); } else { + gnssData_ = null; gnssDataBuilder_.clear(); } - if (wifiDataBuilder_ == null) { - wifiData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000200); + if (wifiFingerprintsBuilder_ == null) { + wifiFingerprints_ = java.util.Collections.emptyList(); } else { - wifiDataBuilder_.clear(); + wifiFingerprints_ = null; + wifiFingerprintsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000400); if (apsDataBuilder_ == null) { apsData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); } else { + apsData_ = null; apsDataBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000800); + if (wifiRttDataBuilder_ == null) { + wifiRttData_ = java.util.Collections.emptyList(); + } else { + wifiRttData_ = null; + wifiRttDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00001000); + if (bleFingerprintsBuilder_ == null) { + bleFingerprints_ = java.util.Collections.emptyList(); + } else { + bleFingerprints_ = null; + bleFingerprintsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + if (bleDataBuilder_ == null) { + bleData_ = java.util.Collections.emptyList(); + } else { + bleData_ = null; + bleDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00004000); startTimestamp_ = 0L; - - dataIdentifier_ = ""; - - if (accelerometerInfoBuilder_ == null) { - accelerometerInfo_ = null; + initialPosition_ = null; + if (initialPositionBuilder_ != null) { + initialPositionBuilder_.dispose(); + initialPositionBuilder_ = null; + } + if (correctedPositionsBuilder_ == null) { + correctedPositions_ = java.util.Collections.emptyList(); } else { - accelerometerInfo_ = null; + correctedPositions_ = null; + correctedPositionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00020000); + accelerometerInfo_ = null; + if (accelerometerInfoBuilder_ != null) { + accelerometerInfoBuilder_.dispose(); accelerometerInfoBuilder_ = null; } - if (gyroscopeInfoBuilder_ == null) { - gyroscopeInfo_ = null; - } else { - gyroscopeInfo_ = null; + gyroscopeInfo_ = null; + if (gyroscopeInfoBuilder_ != null) { + gyroscopeInfoBuilder_.dispose(); gyroscopeInfoBuilder_ = null; } - if (rotationVectorInfoBuilder_ == null) { - rotationVectorInfo_ = null; - } else { - rotationVectorInfo_ = null; + rotationVectorInfo_ = null; + if (rotationVectorInfoBuilder_ != null) { + rotationVectorInfoBuilder_.dispose(); rotationVectorInfoBuilder_ = null; } - if (magnetometerInfoBuilder_ == null) { - magnetometerInfo_ = null; - } else { - magnetometerInfo_ = null; + magnetometerInfo_ = null; + if (magnetometerInfoBuilder_ != null) { + magnetometerInfoBuilder_.dispose(); magnetometerInfoBuilder_ = null; } - if (barometerInfoBuilder_ == null) { - barometerInfo_ = null; - } else { - barometerInfo_ = null; + barometerInfo_ = null; + if (barometerInfoBuilder_ != null) { + barometerInfoBuilder_.dispose(); barometerInfoBuilder_ = null; } - if (lightSensorInfoBuilder_ == null) { - lightSensorInfo_ = null; - } else { - lightSensorInfo_ = null; + lightSensorInfo_ = null; + if (lightSensorInfoBuilder_ != null) { + lightSensorInfoBuilder_.dispose(); lightSensorInfoBuilder_ = null; } + proximityInfo_ = null; + if (proximityInfoBuilder_ != null) { + proximityInfoBuilder_.dispose(); + proximityInfoBuilder_ = null; + } + if (testPointsBuilder_ == null) { + testPoints_ = java.util.Collections.emptyList(); + } else { + testPoints_ = null; + testPointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x02000000); return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Traj.internal_static_Trajectory_descriptor; + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_Trajectory_descriptor; } - public Trajectory getDefaultInstanceForType() { - return Trajectory.getDefaultInstance(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Trajectory getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.Trajectory.getDefaultInstance(); } - public Trajectory build() { - Trajectory result = buildPartial(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Trajectory build() { + com.openpositioning.PositionMe.Traj.Trajectory result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public Trajectory buildPartial() { - Trajectory result = new Trajectory(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.androidVersion_ = androidVersion_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Trajectory buildPartial() { + com.openpositioning.PositionMe.Traj.Trajectory result = new com.openpositioning.PositionMe.Traj.Trajectory(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.openpositioning.PositionMe.Traj.Trajectory result) { if (imuDataBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000008) != 0)) { imuData_ = java.util.Collections.unmodifiableList(imuData_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } result.imuData_ = imuData_; } else { result.imuData_ = imuDataBuilder_.build(); } if (pdrDataBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000010) != 0)) { pdrData_ = java.util.Collections.unmodifiableList(pdrData_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); } result.pdrData_ = pdrData_; } else { result.pdrData_ = pdrDataBuilder_.build(); } - if (positionDataBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { - positionData_ = java.util.Collections.unmodifiableList(positionData_); - bitField0_ = (bitField0_ & ~0x00000008); + if (magnetometerDataBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + magnetometerData_ = java.util.Collections.unmodifiableList(magnetometerData_); + bitField0_ = (bitField0_ & ~0x00000020); } - result.positionData_ = positionData_; + result.magnetometerData_ = magnetometerData_; } else { - result.positionData_ = positionDataBuilder_.build(); + result.magnetometerData_ = magnetometerDataBuilder_.build(); } if (pressureDataBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000040) != 0)) { pressureData_ = java.util.Collections.unmodifiableList(pressureData_); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000040); } result.pressureData_ = pressureData_; } else { result.pressureData_ = pressureDataBuilder_.build(); } if (lightDataBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000080) != 0)) { lightData_ = java.util.Collections.unmodifiableList(lightData_); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); } result.lightData_ = lightData_; } else { result.lightData_ = lightDataBuilder_.build(); } + if (proximityDataBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + proximityData_ = java.util.Collections.unmodifiableList(proximityData_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.proximityData_ = proximityData_; + } else { + result.proximityData_ = proximityDataBuilder_.build(); + } if (gnssDataBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (((bitField0_ & 0x00000200) != 0)) { gnssData_ = java.util.Collections.unmodifiableList(gnssData_); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000200); } result.gnssData_ = gnssData_; } else { result.gnssData_ = gnssDataBuilder_.build(); } - if (wifiDataBuilder_ == null) { - if (((bitField0_ & 0x00000080) == 0x00000080)) { - wifiData_ = java.util.Collections.unmodifiableList(wifiData_); - bitField0_ = (bitField0_ & ~0x00000080); + if (wifiFingerprintsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + wifiFingerprints_ = java.util.Collections.unmodifiableList(wifiFingerprints_); + bitField0_ = (bitField0_ & ~0x00000400); } - result.wifiData_ = wifiData_; + result.wifiFingerprints_ = wifiFingerprints_; } else { - result.wifiData_ = wifiDataBuilder_.build(); + result.wifiFingerprints_ = wifiFingerprintsBuilder_.build(); } if (apsDataBuilder_ == null) { - if (((bitField0_ & 0x00000100) == 0x00000100)) { + if (((bitField0_ & 0x00000800) != 0)) { apsData_ = java.util.Collections.unmodifiableList(apsData_); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000800); } result.apsData_ = apsData_; } else { result.apsData_ = apsDataBuilder_.build(); } - result.startTimestamp_ = startTimestamp_; - result.dataIdentifier_ = dataIdentifier_; - if (accelerometerInfoBuilder_ == null) { - result.accelerometerInfo_ = accelerometerInfo_; - } else { - result.accelerometerInfo_ = accelerometerInfoBuilder_.build(); - } - if (gyroscopeInfoBuilder_ == null) { - result.gyroscopeInfo_ = gyroscopeInfo_; + if (wifiRttDataBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0)) { + wifiRttData_ = java.util.Collections.unmodifiableList(wifiRttData_); + bitField0_ = (bitField0_ & ~0x00001000); + } + result.wifiRttData_ = wifiRttData_; } else { - result.gyroscopeInfo_ = gyroscopeInfoBuilder_.build(); + result.wifiRttData_ = wifiRttDataBuilder_.build(); } - if (rotationVectorInfoBuilder_ == null) { - result.rotationVectorInfo_ = rotationVectorInfo_; + if (bleFingerprintsBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0)) { + bleFingerprints_ = java.util.Collections.unmodifiableList(bleFingerprints_); + bitField0_ = (bitField0_ & ~0x00002000); + } + result.bleFingerprints_ = bleFingerprints_; } else { - result.rotationVectorInfo_ = rotationVectorInfoBuilder_.build(); + result.bleFingerprints_ = bleFingerprintsBuilder_.build(); } - if (magnetometerInfoBuilder_ == null) { - result.magnetometerInfo_ = magnetometerInfo_; + if (bleDataBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0)) { + bleData_ = java.util.Collections.unmodifiableList(bleData_); + bitField0_ = (bitField0_ & ~0x00004000); + } + result.bleData_ = bleData_; } else { - result.magnetometerInfo_ = magnetometerInfoBuilder_.build(); + result.bleData_ = bleDataBuilder_.build(); } - if (barometerInfoBuilder_ == null) { - result.barometerInfo_ = barometerInfo_; + if (correctedPositionsBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0)) { + correctedPositions_ = java.util.Collections.unmodifiableList(correctedPositions_); + bitField0_ = (bitField0_ & ~0x00020000); + } + result.correctedPositions_ = correctedPositions_; } else { - result.barometerInfo_ = barometerInfoBuilder_.build(); + result.correctedPositions_ = correctedPositionsBuilder_.build(); } - if (lightSensorInfoBuilder_ == null) { - result.lightSensorInfo_ = lightSensorInfo_; + if (testPointsBuilder_ == null) { + if (((bitField0_ & 0x02000000) != 0)) { + testPoints_ = java.util.Collections.unmodifiableList(testPoints_); + bitField0_ = (bitField0_ & ~0x02000000); + } + result.testPoints_ = testPoints_; } else { - result.lightSensorInfo_ = lightSensorInfoBuilder_.build(); + result.testPoints_ = testPointsBuilder_.build(); } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; } - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.addRepeatedField(field, value); - } + private void buildPartial0(com.openpositioning.PositionMe.Traj.Trajectory result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.androidVersion_ = androidVersion_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.trajectoryVersion_ = trajectoryVersion_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.trajectoryId_ = trajectoryId_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.startTimestamp_ = startTimestamp_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00010000) != 0)) { + result.initialPosition_ = initialPositionBuilder_ == null + ? initialPosition_ + : initialPositionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.accelerometerInfo_ = accelerometerInfoBuilder_ == null + ? accelerometerInfo_ + : accelerometerInfoBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.gyroscopeInfo_ = gyroscopeInfoBuilder_ == null + ? gyroscopeInfo_ + : gyroscopeInfoBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.rotationVectorInfo_ = rotationVectorInfoBuilder_ == null + ? rotationVectorInfo_ + : rotationVectorInfoBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.magnetometerInfo_ = magnetometerInfoBuilder_ == null + ? magnetometerInfo_ + : magnetometerInfoBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.barometerInfo_ = barometerInfoBuilder_ == null + ? barometerInfo_ + : barometerInfoBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.lightSensorInfo_ = lightSensorInfoBuilder_ == null + ? lightSensorInfo_ + : lightSensorInfoBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.proximityInfo_ = proximityInfoBuilder_ == null + ? proximityInfo_ + : proximityInfoBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Trajectory) { - return mergeFrom((Trajectory)other); + if (other instanceof com.openpositioning.PositionMe.Traj.Trajectory) { + return mergeFrom((com.openpositioning.PositionMe.Traj.Trajectory)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(Trajectory other) { - if (other == Trajectory.getDefaultInstance()) return this; + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.Trajectory other) { + if (other == com.openpositioning.PositionMe.Traj.Trajectory.getDefaultInstance()) return this; if (!other.getAndroidVersion().isEmpty()) { androidVersion_ = other.androidVersion_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getTrajectoryVersion() != 0F) { + setTrajectoryVersion(other.getTrajectoryVersion()); + } + if (!other.getTrajectoryId().isEmpty()) { + trajectoryId_ = other.trajectoryId_; + bitField0_ |= 0x00000004; onChanged(); } if (imuDataBuilder_ == null) { if (!other.imuData_.isEmpty()) { if (imuData_.isEmpty()) { imuData_ = other.imuData_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureImuDataIsMutable(); imuData_.addAll(other.imuData_); @@ -1764,10 +2474,10 @@ public Builder mergeFrom(Trajectory other) { imuDataBuilder_.dispose(); imuDataBuilder_ = null; imuData_ = other.imuData_; - bitField0_ = (bitField0_ & ~0x00000002); - imuDataBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getImuDataFieldBuilder() : null; + bitField0_ = (bitField0_ & ~0x00000008); + imuDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getImuDataFieldBuilder() : null; } else { imuDataBuilder_.addAllMessages(other.imuData_); } @@ -1777,7 +2487,7 @@ public Builder mergeFrom(Trajectory other) { if (!other.pdrData_.isEmpty()) { if (pdrData_.isEmpty()) { pdrData_ = other.pdrData_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensurePdrDataIsMutable(); pdrData_.addAll(other.pdrData_); @@ -1790,38 +2500,38 @@ public Builder mergeFrom(Trajectory other) { pdrDataBuilder_.dispose(); pdrDataBuilder_ = null; pdrData_ = other.pdrData_; - bitField0_ = (bitField0_ & ~0x00000004); - pdrDataBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPdrDataFieldBuilder() : null; + bitField0_ = (bitField0_ & ~0x00000010); + pdrDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPdrDataFieldBuilder() : null; } else { pdrDataBuilder_.addAllMessages(other.pdrData_); } } } - if (positionDataBuilder_ == null) { - if (!other.positionData_.isEmpty()) { - if (positionData_.isEmpty()) { - positionData_ = other.positionData_; - bitField0_ = (bitField0_ & ~0x00000008); + if (magnetometerDataBuilder_ == null) { + if (!other.magnetometerData_.isEmpty()) { + if (magnetometerData_.isEmpty()) { + magnetometerData_ = other.magnetometerData_; + bitField0_ = (bitField0_ & ~0x00000020); } else { - ensurePositionDataIsMutable(); - positionData_.addAll(other.positionData_); + ensureMagnetometerDataIsMutable(); + magnetometerData_.addAll(other.magnetometerData_); } onChanged(); } } else { - if (!other.positionData_.isEmpty()) { - if (positionDataBuilder_.isEmpty()) { - positionDataBuilder_.dispose(); - positionDataBuilder_ = null; - positionData_ = other.positionData_; - bitField0_ = (bitField0_ & ~0x00000008); - positionDataBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPositionDataFieldBuilder() : null; + if (!other.magnetometerData_.isEmpty()) { + if (magnetometerDataBuilder_.isEmpty()) { + magnetometerDataBuilder_.dispose(); + magnetometerDataBuilder_ = null; + magnetometerData_ = other.magnetometerData_; + bitField0_ = (bitField0_ & ~0x00000020); + magnetometerDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getMagnetometerDataFieldBuilder() : null; } else { - positionDataBuilder_.addAllMessages(other.positionData_); + magnetometerDataBuilder_.addAllMessages(other.magnetometerData_); } } } @@ -1829,7 +2539,7 @@ public Builder mergeFrom(Trajectory other) { if (!other.pressureData_.isEmpty()) { if (pressureData_.isEmpty()) { pressureData_ = other.pressureData_; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000040); } else { ensurePressureDataIsMutable(); pressureData_.addAll(other.pressureData_); @@ -1842,10 +2552,10 @@ public Builder mergeFrom(Trajectory other) { pressureDataBuilder_.dispose(); pressureDataBuilder_ = null; pressureData_ = other.pressureData_; - bitField0_ = (bitField0_ & ~0x00000010); - pressureDataBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getPressureDataFieldBuilder() : null; + bitField0_ = (bitField0_ & ~0x00000040); + pressureDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPressureDataFieldBuilder() : null; } else { pressureDataBuilder_.addAllMessages(other.pressureData_); } @@ -1855,7 +2565,7 @@ public Builder mergeFrom(Trajectory other) { if (!other.lightData_.isEmpty()) { if (lightData_.isEmpty()) { lightData_ = other.lightData_; - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); } else { ensureLightDataIsMutable(); lightData_.addAll(other.lightData_); @@ -1868,20 +2578,46 @@ public Builder mergeFrom(Trajectory other) { lightDataBuilder_.dispose(); lightDataBuilder_ = null; lightData_ = other.lightData_; - bitField0_ = (bitField0_ & ~0x00000020); - lightDataBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getLightDataFieldBuilder() : null; + bitField0_ = (bitField0_ & ~0x00000080); + lightDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLightDataFieldBuilder() : null; } else { lightDataBuilder_.addAllMessages(other.lightData_); } } } + if (proximityDataBuilder_ == null) { + if (!other.proximityData_.isEmpty()) { + if (proximityData_.isEmpty()) { + proximityData_ = other.proximityData_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureProximityDataIsMutable(); + proximityData_.addAll(other.proximityData_); + } + onChanged(); + } + } else { + if (!other.proximityData_.isEmpty()) { + if (proximityDataBuilder_.isEmpty()) { + proximityDataBuilder_.dispose(); + proximityDataBuilder_ = null; + proximityData_ = other.proximityData_; + bitField0_ = (bitField0_ & ~0x00000100); + proximityDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getProximityDataFieldBuilder() : null; + } else { + proximityDataBuilder_.addAllMessages(other.proximityData_); + } + } + } if (gnssDataBuilder_ == null) { if (!other.gnssData_.isEmpty()) { if (gnssData_.isEmpty()) { gnssData_ = other.gnssData_; - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000200); } else { ensureGnssDataIsMutable(); gnssData_.addAll(other.gnssData_); @@ -1894,38 +2630,38 @@ public Builder mergeFrom(Trajectory other) { gnssDataBuilder_.dispose(); gnssDataBuilder_ = null; gnssData_ = other.gnssData_; - bitField0_ = (bitField0_ & ~0x00000040); - gnssDataBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getGnssDataFieldBuilder() : null; + bitField0_ = (bitField0_ & ~0x00000200); + gnssDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getGnssDataFieldBuilder() : null; } else { gnssDataBuilder_.addAllMessages(other.gnssData_); } } } - if (wifiDataBuilder_ == null) { - if (!other.wifiData_.isEmpty()) { - if (wifiData_.isEmpty()) { - wifiData_ = other.wifiData_; - bitField0_ = (bitField0_ & ~0x00000080); + if (wifiFingerprintsBuilder_ == null) { + if (!other.wifiFingerprints_.isEmpty()) { + if (wifiFingerprints_.isEmpty()) { + wifiFingerprints_ = other.wifiFingerprints_; + bitField0_ = (bitField0_ & ~0x00000400); } else { - ensureWifiDataIsMutable(); - wifiData_.addAll(other.wifiData_); + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.addAll(other.wifiFingerprints_); } onChanged(); } } else { - if (!other.wifiData_.isEmpty()) { - if (wifiDataBuilder_.isEmpty()) { - wifiDataBuilder_.dispose(); - wifiDataBuilder_ = null; - wifiData_ = other.wifiData_; - bitField0_ = (bitField0_ & ~0x00000080); - wifiDataBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getWifiDataFieldBuilder() : null; + if (!other.wifiFingerprints_.isEmpty()) { + if (wifiFingerprintsBuilder_.isEmpty()) { + wifiFingerprintsBuilder_.dispose(); + wifiFingerprintsBuilder_ = null; + wifiFingerprints_ = other.wifiFingerprints_; + bitField0_ = (bitField0_ & ~0x00000400); + wifiFingerprintsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getWifiFingerprintsFieldBuilder() : null; } else { - wifiDataBuilder_.addAllMessages(other.wifiData_); + wifiFingerprintsBuilder_.addAllMessages(other.wifiFingerprints_); } } } @@ -1933,7 +2669,7 @@ public Builder mergeFrom(Trajectory other) { if (!other.apsData_.isEmpty()) { if (apsData_.isEmpty()) { apsData_ = other.apsData_; - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000800); } else { ensureApsDataIsMutable(); apsData_.addAll(other.apsData_); @@ -1946,21 +2682,124 @@ public Builder mergeFrom(Trajectory other) { apsDataBuilder_.dispose(); apsDataBuilder_ = null; apsData_ = other.apsData_; - bitField0_ = (bitField0_ & ~0x00000100); - apsDataBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getApsDataFieldBuilder() : null; + bitField0_ = (bitField0_ & ~0x00000800); + apsDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getApsDataFieldBuilder() : null; } else { apsDataBuilder_.addAllMessages(other.apsData_); } } } + if (wifiRttDataBuilder_ == null) { + if (!other.wifiRttData_.isEmpty()) { + if (wifiRttData_.isEmpty()) { + wifiRttData_ = other.wifiRttData_; + bitField0_ = (bitField0_ & ~0x00001000); + } else { + ensureWifiRttDataIsMutable(); + wifiRttData_.addAll(other.wifiRttData_); + } + onChanged(); + } + } else { + if (!other.wifiRttData_.isEmpty()) { + if (wifiRttDataBuilder_.isEmpty()) { + wifiRttDataBuilder_.dispose(); + wifiRttDataBuilder_ = null; + wifiRttData_ = other.wifiRttData_; + bitField0_ = (bitField0_ & ~0x00001000); + wifiRttDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getWifiRttDataFieldBuilder() : null; + } else { + wifiRttDataBuilder_.addAllMessages(other.wifiRttData_); + } + } + } + if (bleFingerprintsBuilder_ == null) { + if (!other.bleFingerprints_.isEmpty()) { + if (bleFingerprints_.isEmpty()) { + bleFingerprints_ = other.bleFingerprints_; + bitField0_ = (bitField0_ & ~0x00002000); + } else { + ensureBleFingerprintsIsMutable(); + bleFingerprints_.addAll(other.bleFingerprints_); + } + onChanged(); + } + } else { + if (!other.bleFingerprints_.isEmpty()) { + if (bleFingerprintsBuilder_.isEmpty()) { + bleFingerprintsBuilder_.dispose(); + bleFingerprintsBuilder_ = null; + bleFingerprints_ = other.bleFingerprints_; + bitField0_ = (bitField0_ & ~0x00002000); + bleFingerprintsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getBleFingerprintsFieldBuilder() : null; + } else { + bleFingerprintsBuilder_.addAllMessages(other.bleFingerprints_); + } + } + } + if (bleDataBuilder_ == null) { + if (!other.bleData_.isEmpty()) { + if (bleData_.isEmpty()) { + bleData_ = other.bleData_; + bitField0_ = (bitField0_ & ~0x00004000); + } else { + ensureBleDataIsMutable(); + bleData_.addAll(other.bleData_); + } + onChanged(); + } + } else { + if (!other.bleData_.isEmpty()) { + if (bleDataBuilder_.isEmpty()) { + bleDataBuilder_.dispose(); + bleDataBuilder_ = null; + bleData_ = other.bleData_; + bitField0_ = (bitField0_ & ~0x00004000); + bleDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getBleDataFieldBuilder() : null; + } else { + bleDataBuilder_.addAllMessages(other.bleData_); + } + } + } if (other.getStartTimestamp() != 0L) { setStartTimestamp(other.getStartTimestamp()); } - if (!other.getDataIdentifier().isEmpty()) { - dataIdentifier_ = other.dataIdentifier_; - onChanged(); + if (other.hasInitialPosition()) { + mergeInitialPosition(other.getInitialPosition()); + } + if (correctedPositionsBuilder_ == null) { + if (!other.correctedPositions_.isEmpty()) { + if (correctedPositions_.isEmpty()) { + correctedPositions_ = other.correctedPositions_; + bitField0_ = (bitField0_ & ~0x00020000); + } else { + ensureCorrectedPositionsIsMutable(); + correctedPositions_.addAll(other.correctedPositions_); + } + onChanged(); + } + } else { + if (!other.correctedPositions_.isEmpty()) { + if (correctedPositionsBuilder_.isEmpty()) { + correctedPositionsBuilder_.dispose(); + correctedPositionsBuilder_ = null; + correctedPositions_ = other.correctedPositions_; + bitField0_ = (bitField0_ & ~0x00020000); + correctedPositionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getCorrectedPositionsFieldBuilder() : null; + } else { + correctedPositionsBuilder_.addAllMessages(other.correctedPositions_); + } + } } if (other.hasAccelerometerInfo()) { mergeAccelerometerInfo(other.getAccelerometerInfo()); @@ -1980,59 +2819,364 @@ public Builder mergeFrom(Trajectory other) { if (other.hasLightSensorInfo()) { mergeLightSensorInfo(other.getLightSensorInfo()); } + if (other.hasProximityInfo()) { + mergeProximityInfo(other.getProximityInfo()); + } + if (testPointsBuilder_ == null) { + if (!other.testPoints_.isEmpty()) { + if (testPoints_.isEmpty()) { + testPoints_ = other.testPoints_; + bitField0_ = (bitField0_ & ~0x02000000); + } else { + ensureTestPointsIsMutable(); + testPoints_.addAll(other.testPoints_); + } + onChanged(); + } + } else { + if (!other.testPoints_.isEmpty()) { + if (testPointsBuilder_.isEmpty()) { + testPointsBuilder_.dispose(); + testPointsBuilder_ = null; + testPoints_ = other.testPoints_; + bitField0_ = (bitField0_ & ~0x02000000); + testPointsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTestPointsFieldBuilder() : null; + } else { + testPointsBuilder_.addAllMessages(other.testPoints_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } + @java.lang.Override public final boolean isInitialized() { return true; } + @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Trajectory parsedMessage = null; + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + androidVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: { + trajectoryVersion_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 26: { + trajectoryId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.openpositioning.PositionMe.Traj.IMUReading m = + input.readMessage( + com.openpositioning.PositionMe.Traj.IMUReading.parser(), + extensionRegistry); + if (imuDataBuilder_ == null) { + ensureImuDataIsMutable(); + imuData_.add(m); + } else { + imuDataBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + com.openpositioning.PositionMe.Traj.RelativePosition m = + input.readMessage( + com.openpositioning.PositionMe.Traj.RelativePosition.parser(), + extensionRegistry); + if (pdrDataBuilder_ == null) { + ensurePdrDataIsMutable(); + pdrData_.add(m); + } else { + pdrDataBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: { + com.openpositioning.PositionMe.Traj.MagnetometerReading m = + input.readMessage( + com.openpositioning.PositionMe.Traj.MagnetometerReading.parser(), + extensionRegistry); + if (magnetometerDataBuilder_ == null) { + ensureMagnetometerDataIsMutable(); + magnetometerData_.add(m); + } else { + magnetometerDataBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: { + com.openpositioning.PositionMe.Traj.BarometerReading m = + input.readMessage( + com.openpositioning.PositionMe.Traj.BarometerReading.parser(), + extensionRegistry); + if (pressureDataBuilder_ == null) { + ensurePressureDataIsMutable(); + pressureData_.add(m); + } else { + pressureDataBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: { + com.openpositioning.PositionMe.Traj.LightReading m = + input.readMessage( + com.openpositioning.PositionMe.Traj.LightReading.parser(), + extensionRegistry); + if (lightDataBuilder_ == null) { + ensureLightDataIsMutable(); + lightData_.add(m); + } else { + lightDataBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: { + com.openpositioning.PositionMe.Traj.ProximityReading m = + input.readMessage( + com.openpositioning.PositionMe.Traj.ProximityReading.parser(), + extensionRegistry); + if (proximityDataBuilder_ == null) { + ensureProximityDataIsMutable(); + proximityData_.add(m); + } else { + proximityDataBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: { + com.openpositioning.PositionMe.Traj.GNSSReading m = + input.readMessage( + com.openpositioning.PositionMe.Traj.GNSSReading.parser(), + extensionRegistry); + if (gnssDataBuilder_ == null) { + ensureGnssDataIsMutable(); + gnssData_.add(m); + } else { + gnssDataBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: { + com.openpositioning.PositionMe.Traj.Fingerprint m = + input.readMessage( + com.openpositioning.PositionMe.Traj.Fingerprint.parser(), + extensionRegistry); + if (wifiFingerprintsBuilder_ == null) { + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.add(m); + } else { + wifiFingerprintsBuilder_.addMessage(m); + } + break; + } // case 90 + case 98: { + com.openpositioning.PositionMe.Traj.WiFiAPData m = + input.readMessage( + com.openpositioning.PositionMe.Traj.WiFiAPData.parser(), + extensionRegistry); + if (apsDataBuilder_ == null) { + ensureApsDataIsMutable(); + apsData_.add(m); + } else { + apsDataBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: { + com.openpositioning.PositionMe.Traj.WiFiRTTReading m = + input.readMessage( + com.openpositioning.PositionMe.Traj.WiFiRTTReading.parser(), + extensionRegistry); + if (wifiRttDataBuilder_ == null) { + ensureWifiRttDataIsMutable(); + wifiRttData_.add(m); + } else { + wifiRttDataBuilder_.addMessage(m); + } + break; + } // case 106 + case 114: { + com.openpositioning.PositionMe.Traj.Fingerprint m = + input.readMessage( + com.openpositioning.PositionMe.Traj.Fingerprint.parser(), + extensionRegistry); + if (bleFingerprintsBuilder_ == null) { + ensureBleFingerprintsIsMutable(); + bleFingerprints_.add(m); + } else { + bleFingerprintsBuilder_.addMessage(m); + } + break; + } // case 114 + case 122: { + com.openpositioning.PositionMe.Traj.BleData m = + input.readMessage( + com.openpositioning.PositionMe.Traj.BleData.parser(), + extensionRegistry); + if (bleDataBuilder_ == null) { + ensureBleDataIsMutable(); + bleData_.add(m); + } else { + bleDataBuilder_.addMessage(m); + } + break; + } // case 122 + case 128: { + startTimestamp_ = input.readInt64(); + bitField0_ |= 0x00008000; + break; + } // case 128 + case 138: { + input.readMessage( + getInitialPositionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 138 + case 146: { + com.openpositioning.PositionMe.Traj.GNSSPosition m = + input.readMessage( + com.openpositioning.PositionMe.Traj.GNSSPosition.parser(), + extensionRegistry); + if (correctedPositionsBuilder_ == null) { + ensureCorrectedPositionsIsMutable(); + correctedPositions_.add(m); + } else { + correctedPositionsBuilder_.addMessage(m); + } + break; + } // case 146 + case 154: { + input.readMessage( + getAccelerometerInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 154 + case 162: { + input.readMessage( + getGyroscopeInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 162 + case 170: { + input.readMessage( + getRotationVectorInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 170 + case 178: { + input.readMessage( + getMagnetometerInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case 178 + case 186: { + input.readMessage( + getBarometerInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00400000; + break; + } // case 186 + case 194: { + input.readMessage( + getLightSensorInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00800000; + break; + } // case 194 + case 202: { + input.readMessage( + getProximityInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x01000000; + break; + } // case 202 + case 210: { + com.openpositioning.PositionMe.Traj.GNSSPosition m = + input.readMessage( + com.openpositioning.PositionMe.Traj.GNSSPosition.parser(), + extensionRegistry); + if (testPointsBuilder_ == null) { + ensureTestPointsIsMutable(); + testPoints_.add(m); + } else { + testPointsBuilder_.addMessage(m); + } + break; + } // case 210 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Trajectory) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; - private Object androidVersion_ = ""; + private java.lang.Object androidVersion_ = ""; /** - * optional string android_version = 1; + * string android_version = 1; + * @return The androidVersion. */ - public String getAndroidVersion() { - Object ref = androidVersion_; - if (!(ref instanceof String)) { + public java.lang.String getAndroidVersion() { + java.lang.Object ref = androidVersion_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); androidVersion_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string android_version = 1; + * string android_version = 1; + * @return The bytes for androidVersion. */ public com.google.protobuf.ByteString - getAndroidVersionBytes() { - Object ref = androidVersion_; + getAndroidVersionBytes() { + java.lang.Object ref = androidVersion_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); androidVersion_ = b; return b; } else { @@ -2040,58 +3184,195 @@ public String getAndroidVersion() { } } /** - * optional string android_version = 1; + * string android_version = 1; + * @param value The androidVersion to set. + * @return This builder for chaining. */ public Builder setAndroidVersion( - String value) { - if (value == null) { - throw new NullPointerException(); - } - + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } androidVersion_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * optional string android_version = 1; + * string android_version = 1; + * @return This builder for chaining. */ public Builder clearAndroidVersion() { - androidVersion_ = getDefaultInstance().getAndroidVersion(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** - * optional string android_version = 1; + * string android_version = 1; + * @param value The bytes for androidVersion to set. + * @return This builder for chaining. */ public Builder setAndroidVersionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); androidVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private float trajectoryVersion_ ; + /** + *
+       * version 2.0
+       * 
+ * + * float trajectory_version = 2; + * @return The trajectoryVersion. + */ + @java.lang.Override + public float getTrajectoryVersion() { + return trajectoryVersion_; + } + /** + *
+       * version 2.0
+       * 
+ * + * float trajectory_version = 2; + * @param value The trajectoryVersion to set. + * @return This builder for chaining. + */ + public Builder setTrajectoryVersion(float value) { + + trajectoryVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * version 2.0
+       * 
+ * + * float trajectory_version = 2; + * @return This builder for chaining. + */ + public Builder clearTrajectoryVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + trajectoryVersion_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object trajectoryId_ = ""; + /** + *
+       * trajectory id/name for identification
+       * 
+ * + * string trajectory_id = 3; + * @return The trajectoryId. + */ + public java.lang.String getTrajectoryId() { + java.lang.Object ref = trajectoryId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trajectoryId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * trajectory id/name for identification
+       * 
+ * + * string trajectory_id = 3; + * @return The bytes for trajectoryId. + */ + public com.google.protobuf.ByteString + getTrajectoryIdBytes() { + java.lang.Object ref = trajectoryId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trajectoryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * trajectory id/name for identification
+       * 
+ * + * string trajectory_id = 3; + * @param value The trajectoryId to set. + * @return This builder for chaining. + */ + public Builder setTrajectoryId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + trajectoryId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * trajectory id/name for identification
+       * 
+ * + * string trajectory_id = 3; + * @return This builder for chaining. + */ + public Builder clearTrajectoryId() { + trajectoryId_ = getDefaultInstance().getTrajectoryId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * trajectory id/name for identification
+       * 
+ * + * string trajectory_id = 3; + * @param value The bytes for trajectoryId to set. + * @return This builder for chaining. + */ + public Builder setTrajectoryIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + trajectoryId_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } - private java.util.List imuData_ = - java.util.Collections.emptyList(); + private java.util.List imuData_ = + java.util.Collections.emptyList(); private void ensureImuDataIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - imuData_ = new java.util.ArrayList(imuData_); - bitField0_ |= 0x00000002; - } + if (!((bitField0_ & 0x00000008) != 0)) { + imuData_ = new java.util.ArrayList(imuData_); + bitField0_ |= 0x00000008; + } } - private com.google.protobuf.RepeatedFieldBuilderV3< - Motion_Sample, Motion_Sample.Builder, Motion_SampleOrBuilder> imuDataBuilder_; + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.IMUReading, com.openpositioning.PositionMe.Traj.IMUReading.Builder, com.openpositioning.PositionMe.Traj.IMUReadingOrBuilder> imuDataBuilder_; /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - public java.util.List getImuDataList() { + public java.util.List getImuDataList() { if (imuDataBuilder_ == null) { return java.util.Collections.unmodifiableList(imuData_); } else { @@ -2099,7 +3380,7 @@ public java.util.List getImuDataList() { } } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ public int getImuDataCount() { if (imuDataBuilder_ == null) { @@ -2109,9 +3390,9 @@ public int getImuDataCount() { } } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - public Motion_Sample getImuData(int index) { + public com.openpositioning.PositionMe.Traj.IMUReading getImuData(int index) { if (imuDataBuilder_ == null) { return imuData_.get(index); } else { @@ -2119,10 +3400,10 @@ public Motion_Sample getImuData(int index) { } } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ public Builder setImuData( - int index, Motion_Sample value) { + int index, com.openpositioning.PositionMe.Traj.IMUReading value) { if (imuDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -2136,10 +3417,10 @@ public Builder setImuData( return this; } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ public Builder setImuData( - int index, Motion_Sample.Builder builderForValue) { + int index, com.openpositioning.PositionMe.Traj.IMUReading.Builder builderForValue) { if (imuDataBuilder_ == null) { ensureImuDataIsMutable(); imuData_.set(index, builderForValue.build()); @@ -2150,9 +3431,9 @@ public Builder setImuData( return this; } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - public Builder addImuData(Motion_Sample value) { + public Builder addImuData(com.openpositioning.PositionMe.Traj.IMUReading value) { if (imuDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -2166,10 +3447,10 @@ public Builder addImuData(Motion_Sample value) { return this; } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ public Builder addImuData( - int index, Motion_Sample value) { + int index, com.openpositioning.PositionMe.Traj.IMUReading value) { if (imuDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -2183,10 +3464,10 @@ public Builder addImuData( return this; } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ public Builder addImuData( - Motion_Sample.Builder builderForValue) { + com.openpositioning.PositionMe.Traj.IMUReading.Builder builderForValue) { if (imuDataBuilder_ == null) { ensureImuDataIsMutable(); imuData_.add(builderForValue.build()); @@ -2197,10 +3478,10 @@ public Builder addImuData( return this; } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ public Builder addImuData( - int index, Motion_Sample.Builder builderForValue) { + int index, com.openpositioning.PositionMe.Traj.IMUReading.Builder builderForValue) { if (imuDataBuilder_ == null) { ensureImuDataIsMutable(); imuData_.add(index, builderForValue.build()); @@ -2211,14 +3492,14 @@ public Builder addImuData( return this; } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ public Builder addAllImuData( - Iterable values) { + java.lang.Iterable values) { if (imuDataBuilder_ == null) { ensureImuDataIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, imuData_); + values, imuData_); onChanged(); } else { imuDataBuilder_.addAllMessages(values); @@ -2226,12 +3507,12 @@ public Builder addAllImuData( return this; } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ public Builder clearImuData() { if (imuDataBuilder_ == null) { imuData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { imuDataBuilder_.clear(); @@ -2239,7 +3520,7 @@ public Builder clearImuData() { return this; } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ public Builder removeImuData(int index) { if (imuDataBuilder_ == null) { @@ -2252,27 +3533,27 @@ public Builder removeImuData(int index) { return this; } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - public Motion_Sample.Builder getImuDataBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.IMUReading.Builder getImuDataBuilder( + int index) { return getImuDataFieldBuilder().getBuilder(index); } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - public Motion_SampleOrBuilder getImuDataOrBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.IMUReadingOrBuilder getImuDataOrBuilder( + int index) { if (imuDataBuilder_ == null) { return imuData_.get(index); } else { return imuDataBuilder_.getMessageOrBuilder(index); } } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - public java.util.List - getImuDataOrBuilderList() { + public java.util.List + getImuDataOrBuilderList() { if (imuDataBuilder_ != null) { return imuDataBuilder_.getMessageOrBuilderList(); } else { @@ -2280,35 +3561,35 @@ public Motion_SampleOrBuilder getImuDataOrBuilder( } } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - public Motion_Sample.Builder addImuDataBuilder() { + public com.openpositioning.PositionMe.Traj.IMUReading.Builder addImuDataBuilder() { return getImuDataFieldBuilder().addBuilder( - Motion_Sample.getDefaultInstance()); + com.openpositioning.PositionMe.Traj.IMUReading.getDefaultInstance()); } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - public Motion_Sample.Builder addImuDataBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.IMUReading.Builder addImuDataBuilder( + int index) { return getImuDataFieldBuilder().addBuilder( - index, Motion_Sample.getDefaultInstance()); + index, com.openpositioning.PositionMe.Traj.IMUReading.getDefaultInstance()); } /** - * repeated .Motion_Sample imu_data = 2; + * repeated .IMUReading imu_data = 4; */ - public java.util.List - getImuDataBuilderList() { + public java.util.List + getImuDataBuilderList() { return getImuDataFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - Motion_Sample, Motion_Sample.Builder, Motion_SampleOrBuilder> - getImuDataFieldBuilder() { + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.IMUReading, com.openpositioning.PositionMe.Traj.IMUReading.Builder, com.openpositioning.PositionMe.Traj.IMUReadingOrBuilder> + getImuDataFieldBuilder() { if (imuDataBuilder_ == null) { - imuDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - Motion_Sample, Motion_Sample.Builder, Motion_SampleOrBuilder>( + imuDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.IMUReading, com.openpositioning.PositionMe.Traj.IMUReading.Builder, com.openpositioning.PositionMe.Traj.IMUReadingOrBuilder>( imuData_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); imuData_ = null; @@ -2316,22 +3597,22 @@ public Motion_Sample.Builder addImuDataBuilder( return imuDataBuilder_; } - private java.util.List pdrData_ = - java.util.Collections.emptyList(); + private java.util.List pdrData_ = + java.util.Collections.emptyList(); private void ensurePdrDataIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - pdrData_ = new java.util.ArrayList(pdrData_); - bitField0_ |= 0x00000004; - } + if (!((bitField0_ & 0x00000010) != 0)) { + pdrData_ = new java.util.ArrayList(pdrData_); + bitField0_ |= 0x00000010; + } } - private com.google.protobuf.RepeatedFieldBuilderV3< - Pdr_Sample, Pdr_Sample.Builder, Pdr_SampleOrBuilder> pdrDataBuilder_; + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.RelativePosition, com.openpositioning.PositionMe.Traj.RelativePosition.Builder, com.openpositioning.PositionMe.Traj.RelativePositionOrBuilder> pdrDataBuilder_; /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - public java.util.List getPdrDataList() { + public java.util.List getPdrDataList() { if (pdrDataBuilder_ == null) { return java.util.Collections.unmodifiableList(pdrData_); } else { @@ -2339,7 +3620,7 @@ public java.util.List getPdrDataList() { } } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ public int getPdrDataCount() { if (pdrDataBuilder_ == null) { @@ -2349,9 +3630,9 @@ public int getPdrDataCount() { } } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - public Pdr_Sample getPdrData(int index) { + public com.openpositioning.PositionMe.Traj.RelativePosition getPdrData(int index) { if (pdrDataBuilder_ == null) { return pdrData_.get(index); } else { @@ -2359,10 +3640,10 @@ public Pdr_Sample getPdrData(int index) { } } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ public Builder setPdrData( - int index, Pdr_Sample value) { + int index, com.openpositioning.PositionMe.Traj.RelativePosition value) { if (pdrDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -2376,10 +3657,10 @@ public Builder setPdrData( return this; } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ public Builder setPdrData( - int index, Pdr_Sample.Builder builderForValue) { + int index, com.openpositioning.PositionMe.Traj.RelativePosition.Builder builderForValue) { if (pdrDataBuilder_ == null) { ensurePdrDataIsMutable(); pdrData_.set(index, builderForValue.build()); @@ -2390,9 +3671,9 @@ public Builder setPdrData( return this; } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - public Builder addPdrData(Pdr_Sample value) { + public Builder addPdrData(com.openpositioning.PositionMe.Traj.RelativePosition value) { if (pdrDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -2406,10 +3687,10 @@ public Builder addPdrData(Pdr_Sample value) { return this; } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ public Builder addPdrData( - int index, Pdr_Sample value) { + int index, com.openpositioning.PositionMe.Traj.RelativePosition value) { if (pdrDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -2423,10 +3704,10 @@ public Builder addPdrData( return this; } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ public Builder addPdrData( - Pdr_Sample.Builder builderForValue) { + com.openpositioning.PositionMe.Traj.RelativePosition.Builder builderForValue) { if (pdrDataBuilder_ == null) { ensurePdrDataIsMutable(); pdrData_.add(builderForValue.build()); @@ -2437,10 +3718,10 @@ public Builder addPdrData( return this; } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ public Builder addPdrData( - int index, Pdr_Sample.Builder builderForValue) { + int index, com.openpositioning.PositionMe.Traj.RelativePosition.Builder builderForValue) { if (pdrDataBuilder_ == null) { ensurePdrDataIsMutable(); pdrData_.add(index, builderForValue.build()); @@ -2451,14 +3732,14 @@ public Builder addPdrData( return this; } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ public Builder addAllPdrData( - Iterable values) { + java.lang.Iterable values) { if (pdrDataBuilder_ == null) { ensurePdrDataIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pdrData_); + values, pdrData_); onChanged(); } else { pdrDataBuilder_.addAllMessages(values); @@ -2466,12 +3747,12 @@ public Builder addAllPdrData( return this; } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ public Builder clearPdrData() { if (pdrDataBuilder_ == null) { pdrData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { pdrDataBuilder_.clear(); @@ -2479,7 +3760,7 @@ public Builder clearPdrData() { return this; } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ public Builder removePdrData(int index) { if (pdrDataBuilder_ == null) { @@ -2492,27 +3773,27 @@ public Builder removePdrData(int index) { return this; } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - public Pdr_Sample.Builder getPdrDataBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.RelativePosition.Builder getPdrDataBuilder( + int index) { return getPdrDataFieldBuilder().getBuilder(index); } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - public Pdr_SampleOrBuilder getPdrDataOrBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.RelativePositionOrBuilder getPdrDataOrBuilder( + int index) { if (pdrDataBuilder_ == null) { return pdrData_.get(index); } else { return pdrDataBuilder_.getMessageOrBuilder(index); } } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - public java.util.List - getPdrDataOrBuilderList() { + public java.util.List + getPdrDataOrBuilderList() { if (pdrDataBuilder_ != null) { return pdrDataBuilder_.getMessageOrBuilderList(); } else { @@ -2520,35 +3801,35 @@ public Pdr_SampleOrBuilder getPdrDataOrBuilder( } } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - public Pdr_Sample.Builder addPdrDataBuilder() { + public com.openpositioning.PositionMe.Traj.RelativePosition.Builder addPdrDataBuilder() { return getPdrDataFieldBuilder().addBuilder( - Pdr_Sample.getDefaultInstance()); + com.openpositioning.PositionMe.Traj.RelativePosition.getDefaultInstance()); } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - public Pdr_Sample.Builder addPdrDataBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.RelativePosition.Builder addPdrDataBuilder( + int index) { return getPdrDataFieldBuilder().addBuilder( - index, Pdr_Sample.getDefaultInstance()); + index, com.openpositioning.PositionMe.Traj.RelativePosition.getDefaultInstance()); } /** - * repeated .Pdr_Sample pdr_data = 3; + * repeated .RelativePosition pdr_data = 5; */ - public java.util.List - getPdrDataBuilderList() { + public java.util.List + getPdrDataBuilderList() { return getPdrDataFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - Pdr_Sample, Pdr_Sample.Builder, Pdr_SampleOrBuilder> - getPdrDataFieldBuilder() { + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.RelativePosition, com.openpositioning.PositionMe.Traj.RelativePosition.Builder, com.openpositioning.PositionMe.Traj.RelativePositionOrBuilder> + getPdrDataFieldBuilder() { if (pdrDataBuilder_ == null) { - pdrDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - Pdr_Sample, Pdr_Sample.Builder, Pdr_SampleOrBuilder>( + pdrDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.RelativePosition, com.openpositioning.PositionMe.Traj.RelativePosition.Builder, com.openpositioning.PositionMe.Traj.RelativePositionOrBuilder>( pdrData_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); pdrData_ = null; @@ -2556,262 +3837,262 @@ public Pdr_Sample.Builder addPdrDataBuilder( return pdrDataBuilder_; } - private java.util.List positionData_ = - java.util.Collections.emptyList(); - private void ensurePositionDataIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - positionData_ = new java.util.ArrayList(positionData_); - bitField0_ |= 0x00000008; - } + private java.util.List magnetometerData_ = + java.util.Collections.emptyList(); + private void ensureMagnetometerDataIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + magnetometerData_ = new java.util.ArrayList(magnetometerData_); + bitField0_ |= 0x00000020; + } } - private com.google.protobuf.RepeatedFieldBuilderV3< - Position_Sample, Position_Sample.Builder, Position_SampleOrBuilder> positionDataBuilder_; + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.MagnetometerReading, com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder, com.openpositioning.PositionMe.Traj.MagnetometerReadingOrBuilder> magnetometerDataBuilder_; /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public java.util.List getPositionDataList() { - if (positionDataBuilder_ == null) { - return java.util.Collections.unmodifiableList(positionData_); + public java.util.List getMagnetometerDataList() { + if (magnetometerDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(magnetometerData_); } else { - return positionDataBuilder_.getMessageList(); + return magnetometerDataBuilder_.getMessageList(); } } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public int getPositionDataCount() { - if (positionDataBuilder_ == null) { - return positionData_.size(); + public int getMagnetometerDataCount() { + if (magnetometerDataBuilder_ == null) { + return magnetometerData_.size(); } else { - return positionDataBuilder_.getCount(); + return magnetometerDataBuilder_.getCount(); } } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Position_Sample getPositionData(int index) { - if (positionDataBuilder_ == null) { - return positionData_.get(index); + public com.openpositioning.PositionMe.Traj.MagnetometerReading getMagnetometerData(int index) { + if (magnetometerDataBuilder_ == null) { + return magnetometerData_.get(index); } else { - return positionDataBuilder_.getMessage(index); + return magnetometerDataBuilder_.getMessage(index); } } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Builder setPositionData( - int index, Position_Sample value) { - if (positionDataBuilder_ == null) { + public Builder setMagnetometerData( + int index, com.openpositioning.PositionMe.Traj.MagnetometerReading value) { + if (magnetometerDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensurePositionDataIsMutable(); - positionData_.set(index, value); + ensureMagnetometerDataIsMutable(); + magnetometerData_.set(index, value); onChanged(); } else { - positionDataBuilder_.setMessage(index, value); + magnetometerDataBuilder_.setMessage(index, value); } return this; } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Builder setPositionData( - int index, Position_Sample.Builder builderForValue) { - if (positionDataBuilder_ == null) { - ensurePositionDataIsMutable(); - positionData_.set(index, builderForValue.build()); + public Builder setMagnetometerData( + int index, com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder builderForValue) { + if (magnetometerDataBuilder_ == null) { + ensureMagnetometerDataIsMutable(); + magnetometerData_.set(index, builderForValue.build()); onChanged(); } else { - positionDataBuilder_.setMessage(index, builderForValue.build()); + magnetometerDataBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Builder addPositionData(Position_Sample value) { - if (positionDataBuilder_ == null) { + public Builder addMagnetometerData(com.openpositioning.PositionMe.Traj.MagnetometerReading value) { + if (magnetometerDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensurePositionDataIsMutable(); - positionData_.add(value); + ensureMagnetometerDataIsMutable(); + magnetometerData_.add(value); onChanged(); } else { - positionDataBuilder_.addMessage(value); + magnetometerDataBuilder_.addMessage(value); } return this; } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Builder addPositionData( - int index, Position_Sample value) { - if (positionDataBuilder_ == null) { + public Builder addMagnetometerData( + int index, com.openpositioning.PositionMe.Traj.MagnetometerReading value) { + if (magnetometerDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensurePositionDataIsMutable(); - positionData_.add(index, value); + ensureMagnetometerDataIsMutable(); + magnetometerData_.add(index, value); onChanged(); } else { - positionDataBuilder_.addMessage(index, value); + magnetometerDataBuilder_.addMessage(index, value); } return this; } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Builder addPositionData( - Position_Sample.Builder builderForValue) { - if (positionDataBuilder_ == null) { - ensurePositionDataIsMutable(); - positionData_.add(builderForValue.build()); + public Builder addMagnetometerData( + com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder builderForValue) { + if (magnetometerDataBuilder_ == null) { + ensureMagnetometerDataIsMutable(); + magnetometerData_.add(builderForValue.build()); onChanged(); } else { - positionDataBuilder_.addMessage(builderForValue.build()); + magnetometerDataBuilder_.addMessage(builderForValue.build()); } return this; } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Builder addPositionData( - int index, Position_Sample.Builder builderForValue) { - if (positionDataBuilder_ == null) { - ensurePositionDataIsMutable(); - positionData_.add(index, builderForValue.build()); + public Builder addMagnetometerData( + int index, com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder builderForValue) { + if (magnetometerDataBuilder_ == null) { + ensureMagnetometerDataIsMutable(); + magnetometerData_.add(index, builderForValue.build()); onChanged(); } else { - positionDataBuilder_.addMessage(index, builderForValue.build()); + magnetometerDataBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Builder addAllPositionData( - Iterable values) { - if (positionDataBuilder_ == null) { - ensurePositionDataIsMutable(); + public Builder addAllMagnetometerData( + java.lang.Iterable values) { + if (magnetometerDataBuilder_ == null) { + ensureMagnetometerDataIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, positionData_); + values, magnetometerData_); onChanged(); } else { - positionDataBuilder_.addAllMessages(values); + magnetometerDataBuilder_.addAllMessages(values); } return this; } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Builder clearPositionData() { - if (positionDataBuilder_ == null) { - positionData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + public Builder clearMagnetometerData() { + if (magnetometerDataBuilder_ == null) { + magnetometerData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { - positionDataBuilder_.clear(); + magnetometerDataBuilder_.clear(); } return this; } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Builder removePositionData(int index) { - if (positionDataBuilder_ == null) { - ensurePositionDataIsMutable(); - positionData_.remove(index); + public Builder removeMagnetometerData(int index) { + if (magnetometerDataBuilder_ == null) { + ensureMagnetometerDataIsMutable(); + magnetometerData_.remove(index); onChanged(); } else { - positionDataBuilder_.remove(index); + magnetometerDataBuilder_.remove(index); } return this; } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Position_Sample.Builder getPositionDataBuilder( - int index) { - return getPositionDataFieldBuilder().getBuilder(index); + public com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder getMagnetometerDataBuilder( + int index) { + return getMagnetometerDataFieldBuilder().getBuilder(index); } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Position_SampleOrBuilder getPositionDataOrBuilder( - int index) { - if (positionDataBuilder_ == null) { - return positionData_.get(index); } else { - return positionDataBuilder_.getMessageOrBuilder(index); + public com.openpositioning.PositionMe.Traj.MagnetometerReadingOrBuilder getMagnetometerDataOrBuilder( + int index) { + if (magnetometerDataBuilder_ == null) { + return magnetometerData_.get(index); } else { + return magnetometerDataBuilder_.getMessageOrBuilder(index); } } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public java.util.List - getPositionDataOrBuilderList() { - if (positionDataBuilder_ != null) { - return positionDataBuilder_.getMessageOrBuilderList(); + public java.util.List + getMagnetometerDataOrBuilderList() { + if (magnetometerDataBuilder_ != null) { + return magnetometerDataBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(positionData_); + return java.util.Collections.unmodifiableList(magnetometerData_); } } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Position_Sample.Builder addPositionDataBuilder() { - return getPositionDataFieldBuilder().addBuilder( - Position_Sample.getDefaultInstance()); + public com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder addMagnetometerDataBuilder() { + return getMagnetometerDataFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.MagnetometerReading.getDefaultInstance()); } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public Position_Sample.Builder addPositionDataBuilder( - int index) { - return getPositionDataFieldBuilder().addBuilder( - index, Position_Sample.getDefaultInstance()); + public com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder addMagnetometerDataBuilder( + int index) { + return getMagnetometerDataFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.MagnetometerReading.getDefaultInstance()); } /** - * repeated .Position_Sample position_data = 4; + * repeated .MagnetometerReading magnetometer_data = 6; */ - public java.util.List - getPositionDataBuilderList() { - return getPositionDataFieldBuilder().getBuilderList(); + public java.util.List + getMagnetometerDataBuilderList() { + return getMagnetometerDataFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - Position_Sample, Position_Sample.Builder, Position_SampleOrBuilder> - getPositionDataFieldBuilder() { - if (positionDataBuilder_ == null) { - positionDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - Position_Sample, Position_Sample.Builder, Position_SampleOrBuilder>( - positionData_, - ((bitField0_ & 0x00000008) == 0x00000008), + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.MagnetometerReading, com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder, com.openpositioning.PositionMe.Traj.MagnetometerReadingOrBuilder> + getMagnetometerDataFieldBuilder() { + if (magnetometerDataBuilder_ == null) { + magnetometerDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.MagnetometerReading, com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder, com.openpositioning.PositionMe.Traj.MagnetometerReadingOrBuilder>( + magnetometerData_, + ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); - positionData_ = null; + magnetometerData_ = null; } - return positionDataBuilder_; + return magnetometerDataBuilder_; } - private java.util.List pressureData_ = - java.util.Collections.emptyList(); + private java.util.List pressureData_ = + java.util.Collections.emptyList(); private void ensurePressureDataIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - pressureData_ = new java.util.ArrayList(pressureData_); - bitField0_ |= 0x00000010; - } + if (!((bitField0_ & 0x00000040) != 0)) { + pressureData_ = new java.util.ArrayList(pressureData_); + bitField0_ |= 0x00000040; + } } - private com.google.protobuf.RepeatedFieldBuilderV3< - Pressure_Sample, Pressure_Sample.Builder, Pressure_SampleOrBuilder> pressureDataBuilder_; + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.BarometerReading, com.openpositioning.PositionMe.Traj.BarometerReading.Builder, com.openpositioning.PositionMe.Traj.BarometerReadingOrBuilder> pressureDataBuilder_; /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - public java.util.List getPressureDataList() { + public java.util.List getPressureDataList() { if (pressureDataBuilder_ == null) { return java.util.Collections.unmodifiableList(pressureData_); } else { @@ -2819,7 +4100,7 @@ public java.util.List getPressureDataList() { } } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ public int getPressureDataCount() { if (pressureDataBuilder_ == null) { @@ -2829,9 +4110,9 @@ public int getPressureDataCount() { } } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - public Pressure_Sample getPressureData(int index) { + public com.openpositioning.PositionMe.Traj.BarometerReading getPressureData(int index) { if (pressureDataBuilder_ == null) { return pressureData_.get(index); } else { @@ -2839,10 +4120,10 @@ public Pressure_Sample getPressureData(int index) { } } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ public Builder setPressureData( - int index, Pressure_Sample value) { + int index, com.openpositioning.PositionMe.Traj.BarometerReading value) { if (pressureDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -2856,10 +4137,10 @@ public Builder setPressureData( return this; } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ public Builder setPressureData( - int index, Pressure_Sample.Builder builderForValue) { + int index, com.openpositioning.PositionMe.Traj.BarometerReading.Builder builderForValue) { if (pressureDataBuilder_ == null) { ensurePressureDataIsMutable(); pressureData_.set(index, builderForValue.build()); @@ -2870,9 +4151,9 @@ public Builder setPressureData( return this; } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - public Builder addPressureData(Pressure_Sample value) { + public Builder addPressureData(com.openpositioning.PositionMe.Traj.BarometerReading value) { if (pressureDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -2886,10 +4167,10 @@ public Builder addPressureData(Pressure_Sample value) { return this; } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ public Builder addPressureData( - int index, Pressure_Sample value) { + int index, com.openpositioning.PositionMe.Traj.BarometerReading value) { if (pressureDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -2903,10 +4184,10 @@ public Builder addPressureData( return this; } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ public Builder addPressureData( - Pressure_Sample.Builder builderForValue) { + com.openpositioning.PositionMe.Traj.BarometerReading.Builder builderForValue) { if (pressureDataBuilder_ == null) { ensurePressureDataIsMutable(); pressureData_.add(builderForValue.build()); @@ -2917,10 +4198,10 @@ public Builder addPressureData( return this; } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ public Builder addPressureData( - int index, Pressure_Sample.Builder builderForValue) { + int index, com.openpositioning.PositionMe.Traj.BarometerReading.Builder builderForValue) { if (pressureDataBuilder_ == null) { ensurePressureDataIsMutable(); pressureData_.add(index, builderForValue.build()); @@ -2931,14 +4212,14 @@ public Builder addPressureData( return this; } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ public Builder addAllPressureData( - Iterable values) { + java.lang.Iterable values) { if (pressureDataBuilder_ == null) { ensurePressureDataIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, pressureData_); + values, pressureData_); onChanged(); } else { pressureDataBuilder_.addAllMessages(values); @@ -2946,12 +4227,12 @@ public Builder addAllPressureData( return this; } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ public Builder clearPressureData() { if (pressureDataBuilder_ == null) { pressureData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); } else { pressureDataBuilder_.clear(); @@ -2959,7 +4240,7 @@ public Builder clearPressureData() { return this; } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ public Builder removePressureData(int index) { if (pressureDataBuilder_ == null) { @@ -2972,27 +4253,27 @@ public Builder removePressureData(int index) { return this; } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - public Pressure_Sample.Builder getPressureDataBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.BarometerReading.Builder getPressureDataBuilder( + int index) { return getPressureDataFieldBuilder().getBuilder(index); } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - public Pressure_SampleOrBuilder getPressureDataOrBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.BarometerReadingOrBuilder getPressureDataOrBuilder( + int index) { if (pressureDataBuilder_ == null) { return pressureData_.get(index); } else { return pressureDataBuilder_.getMessageOrBuilder(index); } } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - public java.util.List - getPressureDataOrBuilderList() { + public java.util.List + getPressureDataOrBuilderList() { if (pressureDataBuilder_ != null) { return pressureDataBuilder_.getMessageOrBuilderList(); } else { @@ -3000,35 +4281,35 @@ public Pressure_SampleOrBuilder getPressureDataOrBuilder( } } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - public Pressure_Sample.Builder addPressureDataBuilder() { + public com.openpositioning.PositionMe.Traj.BarometerReading.Builder addPressureDataBuilder() { return getPressureDataFieldBuilder().addBuilder( - Pressure_Sample.getDefaultInstance()); + com.openpositioning.PositionMe.Traj.BarometerReading.getDefaultInstance()); } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - public Pressure_Sample.Builder addPressureDataBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.BarometerReading.Builder addPressureDataBuilder( + int index) { return getPressureDataFieldBuilder().addBuilder( - index, Pressure_Sample.getDefaultInstance()); + index, com.openpositioning.PositionMe.Traj.BarometerReading.getDefaultInstance()); } /** - * repeated .Pressure_Sample pressure_data = 5; + * repeated .BarometerReading pressure_data = 7; */ - public java.util.List - getPressureDataBuilderList() { + public java.util.List + getPressureDataBuilderList() { return getPressureDataFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - Pressure_Sample, Pressure_Sample.Builder, Pressure_SampleOrBuilder> - getPressureDataFieldBuilder() { + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.BarometerReading, com.openpositioning.PositionMe.Traj.BarometerReading.Builder, com.openpositioning.PositionMe.Traj.BarometerReadingOrBuilder> + getPressureDataFieldBuilder() { if (pressureDataBuilder_ == null) { - pressureDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - Pressure_Sample, Pressure_Sample.Builder, Pressure_SampleOrBuilder>( + pressureDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.BarometerReading, com.openpositioning.PositionMe.Traj.BarometerReading.Builder, com.openpositioning.PositionMe.Traj.BarometerReadingOrBuilder>( pressureData_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); pressureData_ = null; @@ -3036,22 +4317,22 @@ public Pressure_Sample.Builder addPressureDataBuilder( return pressureDataBuilder_; } - private java.util.List lightData_ = - java.util.Collections.emptyList(); + private java.util.List lightData_ = + java.util.Collections.emptyList(); private void ensureLightDataIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - lightData_ = new java.util.ArrayList(lightData_); - bitField0_ |= 0x00000020; - } + if (!((bitField0_ & 0x00000080) != 0)) { + lightData_ = new java.util.ArrayList(lightData_); + bitField0_ |= 0x00000080; + } } - private com.google.protobuf.RepeatedFieldBuilderV3< - Light_Sample, Light_Sample.Builder, Light_SampleOrBuilder> lightDataBuilder_; + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.LightReading, com.openpositioning.PositionMe.Traj.LightReading.Builder, com.openpositioning.PositionMe.Traj.LightReadingOrBuilder> lightDataBuilder_; /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - public java.util.List getLightDataList() { + public java.util.List getLightDataList() { if (lightDataBuilder_ == null) { return java.util.Collections.unmodifiableList(lightData_); } else { @@ -3059,7 +4340,7 @@ public java.util.List getLightDataList() { } } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ public int getLightDataCount() { if (lightDataBuilder_ == null) { @@ -3069,9 +4350,9 @@ public int getLightDataCount() { } } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - public Light_Sample getLightData(int index) { + public com.openpositioning.PositionMe.Traj.LightReading getLightData(int index) { if (lightDataBuilder_ == null) { return lightData_.get(index); } else { @@ -3079,10 +4360,10 @@ public Light_Sample getLightData(int index) { } } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ public Builder setLightData( - int index, Light_Sample value) { + int index, com.openpositioning.PositionMe.Traj.LightReading value) { if (lightDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3096,10 +4377,10 @@ public Builder setLightData( return this; } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ public Builder setLightData( - int index, Light_Sample.Builder builderForValue) { + int index, com.openpositioning.PositionMe.Traj.LightReading.Builder builderForValue) { if (lightDataBuilder_ == null) { ensureLightDataIsMutable(); lightData_.set(index, builderForValue.build()); @@ -3110,9 +4391,9 @@ public Builder setLightData( return this; } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - public Builder addLightData(Light_Sample value) { + public Builder addLightData(com.openpositioning.PositionMe.Traj.LightReading value) { if (lightDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3126,10 +4407,10 @@ public Builder addLightData(Light_Sample value) { return this; } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ public Builder addLightData( - int index, Light_Sample value) { + int index, com.openpositioning.PositionMe.Traj.LightReading value) { if (lightDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3143,10 +4424,10 @@ public Builder addLightData( return this; } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ public Builder addLightData( - Light_Sample.Builder builderForValue) { + com.openpositioning.PositionMe.Traj.LightReading.Builder builderForValue) { if (lightDataBuilder_ == null) { ensureLightDataIsMutable(); lightData_.add(builderForValue.build()); @@ -3157,10 +4438,10 @@ public Builder addLightData( return this; } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ public Builder addLightData( - int index, Light_Sample.Builder builderForValue) { + int index, com.openpositioning.PositionMe.Traj.LightReading.Builder builderForValue) { if (lightDataBuilder_ == null) { ensureLightDataIsMutable(); lightData_.add(index, builderForValue.build()); @@ -3171,14 +4452,14 @@ public Builder addLightData( return this; } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ public Builder addAllLightData( - Iterable values) { + java.lang.Iterable values) { if (lightDataBuilder_ == null) { ensureLightDataIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, lightData_); + values, lightData_); onChanged(); } else { lightDataBuilder_.addAllMessages(values); @@ -3186,12 +4467,12 @@ public Builder addAllLightData( return this; } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ public Builder clearLightData() { if (lightDataBuilder_ == null) { lightData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); } else { lightDataBuilder_.clear(); @@ -3199,7 +4480,7 @@ public Builder clearLightData() { return this; } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ public Builder removeLightData(int index) { if (lightDataBuilder_ == null) { @@ -3212,27 +4493,27 @@ public Builder removeLightData(int index) { return this; } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - public Light_Sample.Builder getLightDataBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.LightReading.Builder getLightDataBuilder( + int index) { return getLightDataFieldBuilder().getBuilder(index); } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - public Light_SampleOrBuilder getLightDataOrBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.LightReadingOrBuilder getLightDataOrBuilder( + int index) { if (lightDataBuilder_ == null) { return lightData_.get(index); } else { return lightDataBuilder_.getMessageOrBuilder(index); } } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - public java.util.List - getLightDataOrBuilderList() { + public java.util.List + getLightDataOrBuilderList() { if (lightDataBuilder_ != null) { return lightDataBuilder_.getMessageOrBuilderList(); } else { @@ -3240,35 +4521,35 @@ public Light_SampleOrBuilder getLightDataOrBuilder( } } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - public Light_Sample.Builder addLightDataBuilder() { + public com.openpositioning.PositionMe.Traj.LightReading.Builder addLightDataBuilder() { return getLightDataFieldBuilder().addBuilder( - Light_Sample.getDefaultInstance()); + com.openpositioning.PositionMe.Traj.LightReading.getDefaultInstance()); } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - public Light_Sample.Builder addLightDataBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.LightReading.Builder addLightDataBuilder( + int index) { return getLightDataFieldBuilder().addBuilder( - index, Light_Sample.getDefaultInstance()); + index, com.openpositioning.PositionMe.Traj.LightReading.getDefaultInstance()); } /** - * repeated .Light_Sample light_data = 6; + * repeated .LightReading light_data = 8; */ - public java.util.List - getLightDataBuilderList() { + public java.util.List + getLightDataBuilderList() { return getLightDataFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - Light_Sample, Light_Sample.Builder, Light_SampleOrBuilder> - getLightDataFieldBuilder() { + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.LightReading, com.openpositioning.PositionMe.Traj.LightReading.Builder, com.openpositioning.PositionMe.Traj.LightReadingOrBuilder> + getLightDataFieldBuilder() { if (lightDataBuilder_ == null) { - lightDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - Light_Sample, Light_Sample.Builder, Light_SampleOrBuilder>( + lightDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.LightReading, com.openpositioning.PositionMe.Traj.LightReading.Builder, com.openpositioning.PositionMe.Traj.LightReadingOrBuilder>( lightData_, - ((bitField0_ & 0x00000020) == 0x00000020), + ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); lightData_ = null; @@ -3276,22 +4557,262 @@ public Light_Sample.Builder addLightDataBuilder( return lightDataBuilder_; } - private java.util.List gnssData_ = - java.util.Collections.emptyList(); + private java.util.List proximityData_ = + java.util.Collections.emptyList(); + private void ensureProximityDataIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + proximityData_ = new java.util.ArrayList(proximityData_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.ProximityReading, com.openpositioning.PositionMe.Traj.ProximityReading.Builder, com.openpositioning.PositionMe.Traj.ProximityReadingOrBuilder> proximityDataBuilder_; + + /** + * repeated .ProximityReading proximity_data = 9; + */ + public java.util.List getProximityDataList() { + if (proximityDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(proximityData_); + } else { + return proximityDataBuilder_.getMessageList(); + } + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public int getProximityDataCount() { + if (proximityDataBuilder_ == null) { + return proximityData_.size(); + } else { + return proximityDataBuilder_.getCount(); + } + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public com.openpositioning.PositionMe.Traj.ProximityReading getProximityData(int index) { + if (proximityDataBuilder_ == null) { + return proximityData_.get(index); + } else { + return proximityDataBuilder_.getMessage(index); + } + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder setProximityData( + int index, com.openpositioning.PositionMe.Traj.ProximityReading value) { + if (proximityDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProximityDataIsMutable(); + proximityData_.set(index, value); + onChanged(); + } else { + proximityDataBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder setProximityData( + int index, com.openpositioning.PositionMe.Traj.ProximityReading.Builder builderForValue) { + if (proximityDataBuilder_ == null) { + ensureProximityDataIsMutable(); + proximityData_.set(index, builderForValue.build()); + onChanged(); + } else { + proximityDataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder addProximityData(com.openpositioning.PositionMe.Traj.ProximityReading value) { + if (proximityDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProximityDataIsMutable(); + proximityData_.add(value); + onChanged(); + } else { + proximityDataBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder addProximityData( + int index, com.openpositioning.PositionMe.Traj.ProximityReading value) { + if (proximityDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProximityDataIsMutable(); + proximityData_.add(index, value); + onChanged(); + } else { + proximityDataBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder addProximityData( + com.openpositioning.PositionMe.Traj.ProximityReading.Builder builderForValue) { + if (proximityDataBuilder_ == null) { + ensureProximityDataIsMutable(); + proximityData_.add(builderForValue.build()); + onChanged(); + } else { + proximityDataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder addProximityData( + int index, com.openpositioning.PositionMe.Traj.ProximityReading.Builder builderForValue) { + if (proximityDataBuilder_ == null) { + ensureProximityDataIsMutable(); + proximityData_.add(index, builderForValue.build()); + onChanged(); + } else { + proximityDataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder addAllProximityData( + java.lang.Iterable values) { + if (proximityDataBuilder_ == null) { + ensureProximityDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, proximityData_); + onChanged(); + } else { + proximityDataBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder clearProximityData() { + if (proximityDataBuilder_ == null) { + proximityData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + proximityDataBuilder_.clear(); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder removeProximityData(int index) { + if (proximityDataBuilder_ == null) { + ensureProximityDataIsMutable(); + proximityData_.remove(index); + onChanged(); + } else { + proximityDataBuilder_.remove(index); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public com.openpositioning.PositionMe.Traj.ProximityReading.Builder getProximityDataBuilder( + int index) { + return getProximityDataFieldBuilder().getBuilder(index); + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public com.openpositioning.PositionMe.Traj.ProximityReadingOrBuilder getProximityDataOrBuilder( + int index) { + if (proximityDataBuilder_ == null) { + return proximityData_.get(index); } else { + return proximityDataBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public java.util.List + getProximityDataOrBuilderList() { + if (proximityDataBuilder_ != null) { + return proximityDataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(proximityData_); + } + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public com.openpositioning.PositionMe.Traj.ProximityReading.Builder addProximityDataBuilder() { + return getProximityDataFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.ProximityReading.getDefaultInstance()); + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public com.openpositioning.PositionMe.Traj.ProximityReading.Builder addProximityDataBuilder( + int index) { + return getProximityDataFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.ProximityReading.getDefaultInstance()); + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public java.util.List + getProximityDataBuilderList() { + return getProximityDataFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.ProximityReading, com.openpositioning.PositionMe.Traj.ProximityReading.Builder, com.openpositioning.PositionMe.Traj.ProximityReadingOrBuilder> + getProximityDataFieldBuilder() { + if (proximityDataBuilder_ == null) { + proximityDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.ProximityReading, com.openpositioning.PositionMe.Traj.ProximityReading.Builder, com.openpositioning.PositionMe.Traj.ProximityReadingOrBuilder>( + proximityData_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + proximityData_ = null; + } + return proximityDataBuilder_; + } + + private java.util.List gnssData_ = + java.util.Collections.emptyList(); private void ensureGnssDataIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - gnssData_ = new java.util.ArrayList(gnssData_); - bitField0_ |= 0x00000040; - } + if (!((bitField0_ & 0x00000200) != 0)) { + gnssData_ = new java.util.ArrayList(gnssData_); + bitField0_ |= 0x00000200; + } } - private com.google.protobuf.RepeatedFieldBuilderV3< - GNSS_Sample, GNSS_Sample.Builder, GNSS_SampleOrBuilder> gnssDataBuilder_; + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSReading, com.openpositioning.PositionMe.Traj.GNSSReading.Builder, com.openpositioning.PositionMe.Traj.GNSSReadingOrBuilder> gnssDataBuilder_; /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - public java.util.List getGnssDataList() { + public java.util.List getGnssDataList() { if (gnssDataBuilder_ == null) { return java.util.Collections.unmodifiableList(gnssData_); } else { @@ -3299,7 +4820,7 @@ public java.util.List getGnssDataList() { } } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ public int getGnssDataCount() { if (gnssDataBuilder_ == null) { @@ -3309,9 +4830,9 @@ public int getGnssDataCount() { } } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - public GNSS_Sample getGnssData(int index) { + public com.openpositioning.PositionMe.Traj.GNSSReading getGnssData(int index) { if (gnssDataBuilder_ == null) { return gnssData_.get(index); } else { @@ -3319,10 +4840,10 @@ public GNSS_Sample getGnssData(int index) { } } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ public Builder setGnssData( - int index, GNSS_Sample value) { + int index, com.openpositioning.PositionMe.Traj.GNSSReading value) { if (gnssDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3336,10 +4857,10 @@ public Builder setGnssData( return this; } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ public Builder setGnssData( - int index, GNSS_Sample.Builder builderForValue) { + int index, com.openpositioning.PositionMe.Traj.GNSSReading.Builder builderForValue) { if (gnssDataBuilder_ == null) { ensureGnssDataIsMutable(); gnssData_.set(index, builderForValue.build()); @@ -3350,9 +4871,9 @@ public Builder setGnssData( return this; } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - public Builder addGnssData(GNSS_Sample value) { + public Builder addGnssData(com.openpositioning.PositionMe.Traj.GNSSReading value) { if (gnssDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3366,10 +4887,10 @@ public Builder addGnssData(GNSS_Sample value) { return this; } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ public Builder addGnssData( - int index, GNSS_Sample value) { + int index, com.openpositioning.PositionMe.Traj.GNSSReading value) { if (gnssDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3383,10 +4904,10 @@ public Builder addGnssData( return this; } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ public Builder addGnssData( - GNSS_Sample.Builder builderForValue) { + com.openpositioning.PositionMe.Traj.GNSSReading.Builder builderForValue) { if (gnssDataBuilder_ == null) { ensureGnssDataIsMutable(); gnssData_.add(builderForValue.build()); @@ -3397,10 +4918,10 @@ public Builder addGnssData( return this; } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ public Builder addGnssData( - int index, GNSS_Sample.Builder builderForValue) { + int index, com.openpositioning.PositionMe.Traj.GNSSReading.Builder builderForValue) { if (gnssDataBuilder_ == null) { ensureGnssDataIsMutable(); gnssData_.add(index, builderForValue.build()); @@ -3411,14 +4932,14 @@ public Builder addGnssData( return this; } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ public Builder addAllGnssData( - Iterable values) { + java.lang.Iterable values) { if (gnssDataBuilder_ == null) { ensureGnssDataIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, gnssData_); + values, gnssData_); onChanged(); } else { gnssDataBuilder_.addAllMessages(values); @@ -3426,12 +4947,12 @@ public Builder addAllGnssData( return this; } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ public Builder clearGnssData() { if (gnssDataBuilder_ == null) { gnssData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000200); onChanged(); } else { gnssDataBuilder_.clear(); @@ -3439,7 +4960,7 @@ public Builder clearGnssData() { return this; } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ public Builder removeGnssData(int index) { if (gnssDataBuilder_ == null) { @@ -3452,27 +4973,27 @@ public Builder removeGnssData(int index) { return this; } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - public GNSS_Sample.Builder getGnssDataBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.GNSSReading.Builder getGnssDataBuilder( + int index) { return getGnssDataFieldBuilder().getBuilder(index); } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - public GNSS_SampleOrBuilder getGnssDataOrBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.GNSSReadingOrBuilder getGnssDataOrBuilder( + int index) { if (gnssDataBuilder_ == null) { return gnssData_.get(index); } else { return gnssDataBuilder_.getMessageOrBuilder(index); } } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - public java.util.List - getGnssDataOrBuilderList() { + public java.util.List + getGnssDataOrBuilderList() { if (gnssDataBuilder_ != null) { return gnssDataBuilder_.getMessageOrBuilderList(); } else { @@ -3480,35 +5001,35 @@ public GNSS_SampleOrBuilder getGnssDataOrBuilder( } } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - public GNSS_Sample.Builder addGnssDataBuilder() { + public com.openpositioning.PositionMe.Traj.GNSSReading.Builder addGnssDataBuilder() { return getGnssDataFieldBuilder().addBuilder( - GNSS_Sample.getDefaultInstance()); + com.openpositioning.PositionMe.Traj.GNSSReading.getDefaultInstance()); } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - public GNSS_Sample.Builder addGnssDataBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.GNSSReading.Builder addGnssDataBuilder( + int index) { return getGnssDataFieldBuilder().addBuilder( - index, GNSS_Sample.getDefaultInstance()); + index, com.openpositioning.PositionMe.Traj.GNSSReading.getDefaultInstance()); } /** - * repeated .GNSS_Sample gnss_data = 7; + * repeated .GNSSReading gnss_data = 10; */ - public java.util.List - getGnssDataBuilderList() { + public java.util.List + getGnssDataBuilderList() { return getGnssDataFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - GNSS_Sample, GNSS_Sample.Builder, GNSS_SampleOrBuilder> - getGnssDataFieldBuilder() { + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSReading, com.openpositioning.PositionMe.Traj.GNSSReading.Builder, com.openpositioning.PositionMe.Traj.GNSSReadingOrBuilder> + getGnssDataFieldBuilder() { if (gnssDataBuilder_ == null) { - gnssDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - GNSS_Sample, GNSS_Sample.Builder, GNSS_SampleOrBuilder>( + gnssDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSReading, com.openpositioning.PositionMe.Traj.GNSSReading.Builder, com.openpositioning.PositionMe.Traj.GNSSReadingOrBuilder>( gnssData_, - ((bitField0_ & 0x00000040) == 0x00000040), + ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); gnssData_ = null; @@ -3516,262 +5037,262 @@ public GNSS_Sample.Builder addGnssDataBuilder( return gnssDataBuilder_; } - private java.util.List wifiData_ = - java.util.Collections.emptyList(); - private void ensureWifiDataIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { - wifiData_ = new java.util.ArrayList(wifiData_); - bitField0_ |= 0x00000080; - } + private java.util.List wifiFingerprints_ = + java.util.Collections.emptyList(); + private void ensureWifiFingerprintsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + wifiFingerprints_ = new java.util.ArrayList(wifiFingerprints_); + bitField0_ |= 0x00000400; + } } - private com.google.protobuf.RepeatedFieldBuilderV3< - WiFi_Sample, WiFi_Sample.Builder, WiFi_SampleOrBuilder> wifiDataBuilder_; + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.Fingerprint, com.openpositioning.PositionMe.Traj.Fingerprint.Builder, com.openpositioning.PositionMe.Traj.FingerprintOrBuilder> wifiFingerprintsBuilder_; /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public java.util.List getWifiDataList() { - if (wifiDataBuilder_ == null) { - return java.util.Collections.unmodifiableList(wifiData_); + public java.util.List getWifiFingerprintsList() { + if (wifiFingerprintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(wifiFingerprints_); } else { - return wifiDataBuilder_.getMessageList(); + return wifiFingerprintsBuilder_.getMessageList(); } } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public int getWifiDataCount() { - if (wifiDataBuilder_ == null) { - return wifiData_.size(); + public int getWifiFingerprintsCount() { + if (wifiFingerprintsBuilder_ == null) { + return wifiFingerprints_.size(); } else { - return wifiDataBuilder_.getCount(); + return wifiFingerprintsBuilder_.getCount(); } } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public WiFi_Sample getWifiData(int index) { - if (wifiDataBuilder_ == null) { - return wifiData_.get(index); + public com.openpositioning.PositionMe.Traj.Fingerprint getWifiFingerprints(int index) { + if (wifiFingerprintsBuilder_ == null) { + return wifiFingerprints_.get(index); } else { - return wifiDataBuilder_.getMessage(index); + return wifiFingerprintsBuilder_.getMessage(index); } } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public Builder setWifiData( - int index, WiFi_Sample value) { - if (wifiDataBuilder_ == null) { + public Builder setWifiFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint value) { + if (wifiFingerprintsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureWifiDataIsMutable(); - wifiData_.set(index, value); + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.set(index, value); onChanged(); } else { - wifiDataBuilder_.setMessage(index, value); + wifiFingerprintsBuilder_.setMessage(index, value); } return this; } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public Builder setWifiData( - int index, WiFi_Sample.Builder builderForValue) { - if (wifiDataBuilder_ == null) { - ensureWifiDataIsMutable(); - wifiData_.set(index, builderForValue.build()); + public Builder setWifiFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint.Builder builderForValue) { + if (wifiFingerprintsBuilder_ == null) { + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.set(index, builderForValue.build()); onChanged(); } else { - wifiDataBuilder_.setMessage(index, builderForValue.build()); + wifiFingerprintsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public Builder addWifiData(WiFi_Sample value) { - if (wifiDataBuilder_ == null) { + public Builder addWifiFingerprints(com.openpositioning.PositionMe.Traj.Fingerprint value) { + if (wifiFingerprintsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureWifiDataIsMutable(); - wifiData_.add(value); + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.add(value); onChanged(); } else { - wifiDataBuilder_.addMessage(value); + wifiFingerprintsBuilder_.addMessage(value); } return this; } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public Builder addWifiData( - int index, WiFi_Sample value) { - if (wifiDataBuilder_ == null) { + public Builder addWifiFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint value) { + if (wifiFingerprintsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureWifiDataIsMutable(); - wifiData_.add(index, value); + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.add(index, value); onChanged(); } else { - wifiDataBuilder_.addMessage(index, value); + wifiFingerprintsBuilder_.addMessage(index, value); } return this; } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public Builder addWifiData( - WiFi_Sample.Builder builderForValue) { - if (wifiDataBuilder_ == null) { - ensureWifiDataIsMutable(); - wifiData_.add(builderForValue.build()); + public Builder addWifiFingerprints( + com.openpositioning.PositionMe.Traj.Fingerprint.Builder builderForValue) { + if (wifiFingerprintsBuilder_ == null) { + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.add(builderForValue.build()); onChanged(); } else { - wifiDataBuilder_.addMessage(builderForValue.build()); + wifiFingerprintsBuilder_.addMessage(builderForValue.build()); } return this; } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public Builder addWifiData( - int index, WiFi_Sample.Builder builderForValue) { - if (wifiDataBuilder_ == null) { - ensureWifiDataIsMutable(); - wifiData_.add(index, builderForValue.build()); + public Builder addWifiFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint.Builder builderForValue) { + if (wifiFingerprintsBuilder_ == null) { + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.add(index, builderForValue.build()); onChanged(); } else { - wifiDataBuilder_.addMessage(index, builderForValue.build()); + wifiFingerprintsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public Builder addAllWifiData( - Iterable values) { - if (wifiDataBuilder_ == null) { - ensureWifiDataIsMutable(); + public Builder addAllWifiFingerprints( + java.lang.Iterable values) { + if (wifiFingerprintsBuilder_ == null) { + ensureWifiFingerprintsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, wifiData_); + values, wifiFingerprints_); onChanged(); } else { - wifiDataBuilder_.addAllMessages(values); + wifiFingerprintsBuilder_.addAllMessages(values); } return this; } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public Builder clearWifiData() { - if (wifiDataBuilder_ == null) { - wifiData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); + public Builder clearWifiFingerprints() { + if (wifiFingerprintsBuilder_ == null) { + wifiFingerprints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); } else { - wifiDataBuilder_.clear(); + wifiFingerprintsBuilder_.clear(); } return this; } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public Builder removeWifiData(int index) { - if (wifiDataBuilder_ == null) { - ensureWifiDataIsMutable(); - wifiData_.remove(index); + public Builder removeWifiFingerprints(int index) { + if (wifiFingerprintsBuilder_ == null) { + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.remove(index); onChanged(); } else { - wifiDataBuilder_.remove(index); + wifiFingerprintsBuilder_.remove(index); } return this; } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public WiFi_Sample.Builder getWifiDataBuilder( - int index) { - return getWifiDataFieldBuilder().getBuilder(index); + public com.openpositioning.PositionMe.Traj.Fingerprint.Builder getWifiFingerprintsBuilder( + int index) { + return getWifiFingerprintsFieldBuilder().getBuilder(index); } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public WiFi_SampleOrBuilder getWifiDataOrBuilder( - int index) { - if (wifiDataBuilder_ == null) { - return wifiData_.get(index); } else { - return wifiDataBuilder_.getMessageOrBuilder(index); + public com.openpositioning.PositionMe.Traj.FingerprintOrBuilder getWifiFingerprintsOrBuilder( + int index) { + if (wifiFingerprintsBuilder_ == null) { + return wifiFingerprints_.get(index); } else { + return wifiFingerprintsBuilder_.getMessageOrBuilder(index); } } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public java.util.List - getWifiDataOrBuilderList() { - if (wifiDataBuilder_ != null) { - return wifiDataBuilder_.getMessageOrBuilderList(); + public java.util.List + getWifiFingerprintsOrBuilderList() { + if (wifiFingerprintsBuilder_ != null) { + return wifiFingerprintsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(wifiData_); + return java.util.Collections.unmodifiableList(wifiFingerprints_); } } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public WiFi_Sample.Builder addWifiDataBuilder() { - return getWifiDataFieldBuilder().addBuilder( - WiFi_Sample.getDefaultInstance()); + public com.openpositioning.PositionMe.Traj.Fingerprint.Builder addWifiFingerprintsBuilder() { + return getWifiFingerprintsFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.Fingerprint.getDefaultInstance()); } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public WiFi_Sample.Builder addWifiDataBuilder( - int index) { - return getWifiDataFieldBuilder().addBuilder( - index, WiFi_Sample.getDefaultInstance()); + public com.openpositioning.PositionMe.Traj.Fingerprint.Builder addWifiFingerprintsBuilder( + int index) { + return getWifiFingerprintsFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.Fingerprint.getDefaultInstance()); } /** - * repeated .WiFi_Sample wifi_data = 8; + * repeated .Fingerprint wifi_fingerprints = 11; */ - public java.util.List - getWifiDataBuilderList() { - return getWifiDataFieldBuilder().getBuilderList(); + public java.util.List + getWifiFingerprintsBuilderList() { + return getWifiFingerprintsFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - WiFi_Sample, WiFi_Sample.Builder, WiFi_SampleOrBuilder> - getWifiDataFieldBuilder() { - if (wifiDataBuilder_ == null) { - wifiDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - WiFi_Sample, WiFi_Sample.Builder, WiFi_SampleOrBuilder>( - wifiData_, - ((bitField0_ & 0x00000080) == 0x00000080), + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.Fingerprint, com.openpositioning.PositionMe.Traj.Fingerprint.Builder, com.openpositioning.PositionMe.Traj.FingerprintOrBuilder> + getWifiFingerprintsFieldBuilder() { + if (wifiFingerprintsBuilder_ == null) { + wifiFingerprintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.Fingerprint, com.openpositioning.PositionMe.Traj.Fingerprint.Builder, com.openpositioning.PositionMe.Traj.FingerprintOrBuilder>( + wifiFingerprints_, + ((bitField0_ & 0x00000400) != 0), getParentForChildren(), isClean()); - wifiData_ = null; + wifiFingerprints_ = null; } - return wifiDataBuilder_; + return wifiFingerprintsBuilder_; } - private java.util.List apsData_ = - java.util.Collections.emptyList(); + private java.util.List apsData_ = + java.util.Collections.emptyList(); private void ensureApsDataIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { - apsData_ = new java.util.ArrayList(apsData_); - bitField0_ |= 0x00000100; - } + if (!((bitField0_ & 0x00000800) != 0)) { + apsData_ = new java.util.ArrayList(apsData_); + bitField0_ |= 0x00000800; + } } - private com.google.protobuf.RepeatedFieldBuilderV3< - AP_Data, AP_Data.Builder, AP_DataOrBuilder> apsDataBuilder_; + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.WiFiAPData, com.openpositioning.PositionMe.Traj.WiFiAPData.Builder, com.openpositioning.PositionMe.Traj.WiFiAPDataOrBuilder> apsDataBuilder_; /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - public java.util.List getApsDataList() { + public java.util.List getApsDataList() { if (apsDataBuilder_ == null) { return java.util.Collections.unmodifiableList(apsData_); } else { @@ -3779,7 +5300,7 @@ public java.util.List getApsDataList() { } } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ public int getApsDataCount() { if (apsDataBuilder_ == null) { @@ -3789,9 +5310,9 @@ public int getApsDataCount() { } } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - public AP_Data getApsData(int index) { + public com.openpositioning.PositionMe.Traj.WiFiAPData getApsData(int index) { if (apsDataBuilder_ == null) { return apsData_.get(index); } else { @@ -3799,10 +5320,10 @@ public AP_Data getApsData(int index) { } } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ public Builder setApsData( - int index, AP_Data value) { + int index, com.openpositioning.PositionMe.Traj.WiFiAPData value) { if (apsDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3816,10 +5337,10 @@ public Builder setApsData( return this; } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ public Builder setApsData( - int index, AP_Data.Builder builderForValue) { + int index, com.openpositioning.PositionMe.Traj.WiFiAPData.Builder builderForValue) { if (apsDataBuilder_ == null) { ensureApsDataIsMutable(); apsData_.set(index, builderForValue.build()); @@ -3830,9 +5351,9 @@ public Builder setApsData( return this; } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - public Builder addApsData(AP_Data value) { + public Builder addApsData(com.openpositioning.PositionMe.Traj.WiFiAPData value) { if (apsDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3846,10 +5367,10 @@ public Builder addApsData(AP_Data value) { return this; } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ public Builder addApsData( - int index, AP_Data value) { + int index, com.openpositioning.PositionMe.Traj.WiFiAPData value) { if (apsDataBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -3863,10 +5384,10 @@ public Builder addApsData( return this; } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ public Builder addApsData( - AP_Data.Builder builderForValue) { + com.openpositioning.PositionMe.Traj.WiFiAPData.Builder builderForValue) { if (apsDataBuilder_ == null) { ensureApsDataIsMutable(); apsData_.add(builderForValue.build()); @@ -3877,10 +5398,10 @@ public Builder addApsData( return this; } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ public Builder addApsData( - int index, AP_Data.Builder builderForValue) { + int index, com.openpositioning.PositionMe.Traj.WiFiAPData.Builder builderForValue) { if (apsDataBuilder_ == null) { ensureApsDataIsMutable(); apsData_.add(index, builderForValue.build()); @@ -3891,14 +5412,14 @@ public Builder addApsData( return this; } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ public Builder addAllApsData( - Iterable values) { + java.lang.Iterable values) { if (apsDataBuilder_ == null) { ensureApsDataIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, apsData_); + values, apsData_); onChanged(); } else { apsDataBuilder_.addAllMessages(values); @@ -3906,12 +5427,12 @@ public Builder addAllApsData( return this; } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ public Builder clearApsData() { if (apsDataBuilder_ == null) { apsData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); + bitField0_ = (bitField0_ & ~0x00000800); onChanged(); } else { apsDataBuilder_.clear(); @@ -3919,7 +5440,7 @@ public Builder clearApsData() { return this; } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ public Builder removeApsData(int index) { if (apsDataBuilder_ == null) { @@ -3932,27 +5453,27 @@ public Builder removeApsData(int index) { return this; } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - public AP_Data.Builder getApsDataBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.WiFiAPData.Builder getApsDataBuilder( + int index) { return getApsDataFieldBuilder().getBuilder(index); } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - public AP_DataOrBuilder getApsDataOrBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.WiFiAPDataOrBuilder getApsDataOrBuilder( + int index) { if (apsDataBuilder_ == null) { return apsData_.get(index); } else { return apsDataBuilder_.getMessageOrBuilder(index); } } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - public java.util.List - getApsDataOrBuilderList() { + public java.util.List + getApsDataOrBuilderList() { if (apsDataBuilder_ != null) { return apsDataBuilder_.getMessageOrBuilderList(); } else { @@ -3960,35 +5481,35 @@ public AP_DataOrBuilder getApsDataOrBuilder( } } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - public AP_Data.Builder addApsDataBuilder() { + public com.openpositioning.PositionMe.Traj.WiFiAPData.Builder addApsDataBuilder() { return getApsDataFieldBuilder().addBuilder( - AP_Data.getDefaultInstance()); + com.openpositioning.PositionMe.Traj.WiFiAPData.getDefaultInstance()); } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - public AP_Data.Builder addApsDataBuilder( - int index) { + public com.openpositioning.PositionMe.Traj.WiFiAPData.Builder addApsDataBuilder( + int index) { return getApsDataFieldBuilder().addBuilder( - index, AP_Data.getDefaultInstance()); + index, com.openpositioning.PositionMe.Traj.WiFiAPData.getDefaultInstance()); } /** - * repeated .AP_Data aps_data = 9; + * repeated .WiFiAPData aps_data = 12; */ - public java.util.List - getApsDataBuilderList() { + public java.util.List + getApsDataBuilderList() { return getApsDataFieldBuilder().getBuilderList(); } - private com.google.protobuf.RepeatedFieldBuilderV3< - AP_Data, AP_Data.Builder, AP_DataOrBuilder> - getApsDataFieldBuilder() { + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.WiFiAPData, com.openpositioning.PositionMe.Traj.WiFiAPData.Builder, com.openpositioning.PositionMe.Traj.WiFiAPDataOrBuilder> + getApsDataFieldBuilder() { if (apsDataBuilder_ == null) { - apsDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - AP_Data, AP_Data.Builder, AP_DataOrBuilder>( + apsDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.WiFiAPData, com.openpositioning.PositionMe.Traj.WiFiAPData.Builder, com.openpositioning.PositionMe.Traj.WiFiAPDataOrBuilder>( apsData_, - ((bitField0_ & 0x00000100) == 0x00000100), + ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean()); apsData_ = null; @@ -3996,1028 +5517,6772 @@ public AP_Data.Builder addApsDataBuilder( return apsDataBuilder_; } - private long startTimestamp_ ; + private java.util.List wifiRttData_ = + java.util.Collections.emptyList(); + private void ensureWifiRttDataIsMutable() { + if (!((bitField0_ & 0x00001000) != 0)) { + wifiRttData_ = new java.util.ArrayList(wifiRttData_); + bitField0_ |= 0x00001000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.WiFiRTTReading, com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder, com.openpositioning.PositionMe.Traj.WiFiRTTReadingOrBuilder> wifiRttDataBuilder_; + /** - *
-       * 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; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - public Builder clearStartTimestamp() { - - startTimestamp_ = 0L; - onChanged(); - return this; + public java.util.List getWifiRttDataList() { + if (wifiRttDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(wifiRttData_); + } else { + return wifiRttDataBuilder_.getMessageList(); + } } - - private Object dataIdentifier_ = ""; /** - * optional string data_identifier = 11; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - 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; + public int getWifiRttDataCount() { + if (wifiRttDataBuilder_ == null) { + return wifiRttData_.size(); } else { - return (String) ref; + return wifiRttDataBuilder_.getCount(); } } /** - * optional string data_identifier = 11; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - 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; + public com.openpositioning.PositionMe.Traj.WiFiRTTReading getWifiRttData(int index) { + if (wifiRttDataBuilder_ == null) { + return wifiRttData_.get(index); } else { - return (com.google.protobuf.ByteString) ref; + return wifiRttDataBuilder_.getMessage(index); } } /** - * optional string data_identifier = 11; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - public Builder setDataIdentifier( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - dataIdentifier_ = value; - onChanged(); + public Builder setWifiRttData( + int index, com.openpositioning.PositionMe.Traj.WiFiRTTReading value) { + if (wifiRttDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWifiRttDataIsMutable(); + wifiRttData_.set(index, value); + onChanged(); + } else { + wifiRttDataBuilder_.setMessage(index, value); + } return this; } /** - * optional string data_identifier = 11; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - public Builder clearDataIdentifier() { - - dataIdentifier_ = getDefaultInstance().getDataIdentifier(); - onChanged(); + public Builder setWifiRttData( + int index, com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder builderForValue) { + if (wifiRttDataBuilder_ == null) { + ensureWifiRttDataIsMutable(); + wifiRttData_.set(index, builderForValue.build()); + onChanged(); + } else { + wifiRttDataBuilder_.setMessage(index, builderForValue.build()); + } return this; } /** - * optional string data_identifier = 11; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - public Builder setDataIdentifierBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - dataIdentifier_ = value; - onChanged(); + public Builder addWifiRttData(com.openpositioning.PositionMe.Traj.WiFiRTTReading value) { + if (wifiRttDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWifiRttDataIsMutable(); + wifiRttData_.add(value); + onChanged(); + } else { + wifiRttDataBuilder_.addMessage(value); + } 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; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - public boolean hasAccelerometerInfo() { - return accelerometerInfoBuilder_ != null || accelerometerInfo_ != null; + public Builder addWifiRttData( + int index, com.openpositioning.PositionMe.Traj.WiFiRTTReading value) { + if (wifiRttDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWifiRttDataIsMutable(); + wifiRttData_.add(index, value); + onChanged(); + } else { + wifiRttDataBuilder_.addMessage(index, value); + } + return this; } /** - * optional .Sensor_Info accelerometer_info = 12; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - public Sensor_Info getAccelerometerInfo() { - if (accelerometerInfoBuilder_ == null) { - return accelerometerInfo_ == null ? Sensor_Info.getDefaultInstance() : accelerometerInfo_; + public Builder addWifiRttData( + com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder builderForValue) { + if (wifiRttDataBuilder_ == null) { + ensureWifiRttDataIsMutable(); + wifiRttData_.add(builderForValue.build()); + onChanged(); } else { - return accelerometerInfoBuilder_.getMessage(); + wifiRttDataBuilder_.addMessage(builderForValue.build()); } + return this; } /** - * optional .Sensor_Info accelerometer_info = 12; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - public Builder setAccelerometerInfo(Sensor_Info value) { - if (accelerometerInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - accelerometerInfo_ = value; + public Builder addWifiRttData( + int index, com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder builderForValue) { + if (wifiRttDataBuilder_ == null) { + ensureWifiRttDataIsMutable(); + wifiRttData_.add(index, builderForValue.build()); onChanged(); } else { - accelerometerInfoBuilder_.setMessage(value); + wifiRttDataBuilder_.addMessage(index, builderForValue.build()); } - return this; } /** - * optional .Sensor_Info accelerometer_info = 12; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - public Builder setAccelerometerInfo( - Sensor_Info.Builder builderForValue) { - if (accelerometerInfoBuilder_ == null) { - accelerometerInfo_ = builderForValue.build(); + public Builder addAllWifiRttData( + java.lang.Iterable values) { + if (wifiRttDataBuilder_ == null) { + ensureWifiRttDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, wifiRttData_); onChanged(); } else { - accelerometerInfoBuilder_.setMessage(builderForValue.build()); + wifiRttDataBuilder_.addAllMessages(values); } - return this; } /** - * optional .Sensor_Info accelerometer_info = 12; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - public Builder mergeAccelerometerInfo(Sensor_Info value) { - if (accelerometerInfoBuilder_ == null) { - if (accelerometerInfo_ != null) { - accelerometerInfo_ = - Sensor_Info.newBuilder(accelerometerInfo_).mergeFrom(value).buildPartial(); - } else { - accelerometerInfo_ = value; - } + public Builder clearWifiRttData() { + if (wifiRttDataBuilder_ == null) { + wifiRttData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); onChanged(); } else { - accelerometerInfoBuilder_.mergeFrom(value); + wifiRttDataBuilder_.clear(); } - return this; } /** - * optional .Sensor_Info accelerometer_info = 12; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - public Builder clearAccelerometerInfo() { - if (accelerometerInfoBuilder_ == null) { - accelerometerInfo_ = null; + public Builder removeWifiRttData(int index) { + if (wifiRttDataBuilder_ == null) { + ensureWifiRttDataIsMutable(); + wifiRttData_.remove(index); onChanged(); } else { - accelerometerInfo_ = null; - accelerometerInfoBuilder_ = null; + wifiRttDataBuilder_.remove(index); } - return this; } /** - * optional .Sensor_Info accelerometer_info = 12; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - public Sensor_Info.Builder getAccelerometerInfoBuilder() { - - onChanged(); - return getAccelerometerInfoFieldBuilder().getBuilder(); + public com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder getWifiRttDataBuilder( + int index) { + return getWifiRttDataFieldBuilder().getBuilder(index); } /** - * optional .Sensor_Info accelerometer_info = 12; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - public Sensor_InfoOrBuilder getAccelerometerInfoOrBuilder() { - if (accelerometerInfoBuilder_ != null) { - return accelerometerInfoBuilder_.getMessageOrBuilder(); + public com.openpositioning.PositionMe.Traj.WiFiRTTReadingOrBuilder getWifiRttDataOrBuilder( + int index) { + if (wifiRttDataBuilder_ == null) { + return wifiRttData_.get(index); } else { + return wifiRttDataBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public java.util.List + getWifiRttDataOrBuilderList() { + if (wifiRttDataBuilder_ != null) { + return wifiRttDataBuilder_.getMessageOrBuilderList(); } else { - return accelerometerInfo_ == null ? - Sensor_Info.getDefaultInstance() : accelerometerInfo_; + return java.util.Collections.unmodifiableList(wifiRttData_); } } /** - * optional .Sensor_Info accelerometer_info = 12; + * repeated .WiFiRTTReading wifi_rtt_data = 13; */ - 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(), + public com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder addWifiRttDataBuilder() { + return getWifiRttDataFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.WiFiRTTReading.getDefaultInstance()); + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder addWifiRttDataBuilder( + int index) { + return getWifiRttDataFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.WiFiRTTReading.getDefaultInstance()); + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public java.util.List + getWifiRttDataBuilderList() { + return getWifiRttDataFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.WiFiRTTReading, com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder, com.openpositioning.PositionMe.Traj.WiFiRTTReadingOrBuilder> + getWifiRttDataFieldBuilder() { + if (wifiRttDataBuilder_ == null) { + wifiRttDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.WiFiRTTReading, com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder, com.openpositioning.PositionMe.Traj.WiFiRTTReadingOrBuilder>( + wifiRttData_, + ((bitField0_ & 0x00001000) != 0), getParentForChildren(), isClean()); - accelerometerInfo_ = null; + wifiRttData_ = null; + } + return wifiRttDataBuilder_; + } + + private java.util.List bleFingerprints_ = + java.util.Collections.emptyList(); + private void ensureBleFingerprintsIsMutable() { + if (!((bitField0_ & 0x00002000) != 0)) { + bleFingerprints_ = new java.util.ArrayList(bleFingerprints_); + bitField0_ |= 0x00002000; } - return accelerometerInfoBuilder_; } - private Sensor_Info gyroscopeInfo_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder> gyroscopeInfoBuilder_; + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.Fingerprint, com.openpositioning.PositionMe.Traj.Fingerprint.Builder, com.openpositioning.PositionMe.Traj.FingerprintOrBuilder> bleFingerprintsBuilder_; + /** - * optional .Sensor_Info gyroscope_info = 13; + * repeated .Fingerprint ble_fingerprints = 14; */ - public boolean hasGyroscopeInfo() { - return gyroscopeInfoBuilder_ != null || gyroscopeInfo_ != null; + public java.util.List getBleFingerprintsList() { + if (bleFingerprintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bleFingerprints_); + } else { + return bleFingerprintsBuilder_.getMessageList(); + } } /** - * optional .Sensor_Info gyroscope_info = 13; + * repeated .Fingerprint ble_fingerprints = 14; */ - public Sensor_Info getGyroscopeInfo() { - if (gyroscopeInfoBuilder_ == null) { - return gyroscopeInfo_ == null ? Sensor_Info.getDefaultInstance() : gyroscopeInfo_; + public int getBleFingerprintsCount() { + if (bleFingerprintsBuilder_ == null) { + return bleFingerprints_.size(); } else { - return gyroscopeInfoBuilder_.getMessage(); + return bleFingerprintsBuilder_.getCount(); } } /** - * optional .Sensor_Info gyroscope_info = 13; + * repeated .Fingerprint ble_fingerprints = 14; */ - public Builder setGyroscopeInfo(Sensor_Info value) { - if (gyroscopeInfoBuilder_ == null) { + public com.openpositioning.PositionMe.Traj.Fingerprint getBleFingerprints(int index) { + if (bleFingerprintsBuilder_ == null) { + return bleFingerprints_.get(index); + } else { + return bleFingerprintsBuilder_.getMessage(index); + } + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public Builder setBleFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint value) { + if (bleFingerprintsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - gyroscopeInfo_ = value; + ensureBleFingerprintsIsMutable(); + bleFingerprints_.set(index, value); onChanged(); } else { - gyroscopeInfoBuilder_.setMessage(value); + bleFingerprintsBuilder_.setMessage(index, value); } - return this; } /** - * optional .Sensor_Info gyroscope_info = 13; + * repeated .Fingerprint ble_fingerprints = 14; */ - public Builder setGyroscopeInfo( - Sensor_Info.Builder builderForValue) { - if (gyroscopeInfoBuilder_ == null) { - gyroscopeInfo_ = builderForValue.build(); + public Builder setBleFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint.Builder builderForValue) { + if (bleFingerprintsBuilder_ == null) { + ensureBleFingerprintsIsMutable(); + bleFingerprints_.set(index, builderForValue.build()); onChanged(); } else { - gyroscopeInfoBuilder_.setMessage(builderForValue.build()); + bleFingerprintsBuilder_.setMessage(index, builderForValue.build()); } - return this; } /** - * optional .Sensor_Info gyroscope_info = 13; + * repeated .Fingerprint ble_fingerprints = 14; */ - public Builder mergeGyroscopeInfo(Sensor_Info value) { - if (gyroscopeInfoBuilder_ == null) { - if (gyroscopeInfo_ != null) { - gyroscopeInfo_ = - Sensor_Info.newBuilder(gyroscopeInfo_).mergeFrom(value).buildPartial(); - } else { - gyroscopeInfo_ = value; + public Builder addBleFingerprints(com.openpositioning.PositionMe.Traj.Fingerprint value) { + if (bleFingerprintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureBleFingerprintsIsMutable(); + bleFingerprints_.add(value); onChanged(); } else { - gyroscopeInfoBuilder_.mergeFrom(value); + bleFingerprintsBuilder_.addMessage(value); } - return this; } /** - * optional .Sensor_Info gyroscope_info = 13; + * repeated .Fingerprint ble_fingerprints = 14; */ - public Builder clearGyroscopeInfo() { - if (gyroscopeInfoBuilder_ == null) { - gyroscopeInfo_ = null; + public Builder addBleFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint value) { + if (bleFingerprintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBleFingerprintsIsMutable(); + bleFingerprints_.add(index, value); onChanged(); } else { - gyroscopeInfo_ = null; - gyroscopeInfoBuilder_ = null; + bleFingerprintsBuilder_.addMessage(index, value); } - return this; } /** - * optional .Sensor_Info gyroscope_info = 13; - */ - public Sensor_Info.Builder getGyroscopeInfoBuilder() { - - onChanged(); - return getGyroscopeInfoFieldBuilder().getBuilder(); - } - /** - * optional .Sensor_Info gyroscope_info = 13; + * repeated .Fingerprint ble_fingerprints = 14; */ - public Sensor_InfoOrBuilder getGyroscopeInfoOrBuilder() { - if (gyroscopeInfoBuilder_ != null) { - return gyroscopeInfoBuilder_.getMessageOrBuilder(); + public Builder addBleFingerprints( + com.openpositioning.PositionMe.Traj.Fingerprint.Builder builderForValue) { + if (bleFingerprintsBuilder_ == null) { + ensureBleFingerprintsIsMutable(); + bleFingerprints_.add(builderForValue.build()); + onChanged(); } else { - return gyroscopeInfo_ == null ? - Sensor_Info.getDefaultInstance() : gyroscopeInfo_; + bleFingerprintsBuilder_.addMessage(builderForValue.build()); } + return this; } /** - * optional .Sensor_Info gyroscope_info = 13; + * repeated .Fingerprint ble_fingerprints = 14; */ - 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; + public Builder addBleFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint.Builder builderForValue) { + if (bleFingerprintsBuilder_ == null) { + ensureBleFingerprintsIsMutable(); + bleFingerprints_.add(index, builderForValue.build()); + onChanged(); + } else { + bleFingerprintsBuilder_.addMessage(index, builderForValue.build()); } - 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; + return this; } /** - * optional .Sensor_Info rotation_vector_info = 14; + * repeated .Fingerprint ble_fingerprints = 14; */ - public Sensor_Info getRotationVectorInfo() { - if (rotationVectorInfoBuilder_ == null) { - return rotationVectorInfo_ == null ? Sensor_Info.getDefaultInstance() : rotationVectorInfo_; + public Builder addAllBleFingerprints( + java.lang.Iterable values) { + if (bleFingerprintsBuilder_ == null) { + ensureBleFingerprintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bleFingerprints_); + onChanged(); } else { - return rotationVectorInfoBuilder_.getMessage(); + bleFingerprintsBuilder_.addAllMessages(values); } + return this; } /** - * optional .Sensor_Info rotation_vector_info = 14; + * repeated .Fingerprint ble_fingerprints = 14; */ - public Builder setRotationVectorInfo(Sensor_Info value) { - if (rotationVectorInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - rotationVectorInfo_ = value; + public Builder clearBleFingerprints() { + if (bleFingerprintsBuilder_ == null) { + bleFingerprints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); onChanged(); } else { - rotationVectorInfoBuilder_.setMessage(value); + bleFingerprintsBuilder_.clear(); } - return this; } /** - * optional .Sensor_Info rotation_vector_info = 14; + * repeated .Fingerprint ble_fingerprints = 14; */ - public Builder setRotationVectorInfo( - Sensor_Info.Builder builderForValue) { - if (rotationVectorInfoBuilder_ == null) { - rotationVectorInfo_ = builderForValue.build(); + public Builder removeBleFingerprints(int index) { + if (bleFingerprintsBuilder_ == null) { + ensureBleFingerprintsIsMutable(); + bleFingerprints_.remove(index); onChanged(); } else { - rotationVectorInfoBuilder_.setMessage(builderForValue.build()); + bleFingerprintsBuilder_.remove(index); } - return this; } /** - * optional .Sensor_Info rotation_vector_info = 14; + * repeated .Fingerprint ble_fingerprints = 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); + public com.openpositioning.PositionMe.Traj.Fingerprint.Builder getBleFingerprintsBuilder( + int index) { + return getBleFingerprintsFieldBuilder().getBuilder(index); + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public com.openpositioning.PositionMe.Traj.FingerprintOrBuilder getBleFingerprintsOrBuilder( + int index) { + if (bleFingerprintsBuilder_ == null) { + return bleFingerprints_.get(index); } else { + return bleFingerprintsBuilder_.getMessageOrBuilder(index); } - - return this; } /** - * optional .Sensor_Info rotation_vector_info = 14; + * repeated .Fingerprint ble_fingerprints = 14; */ - public Builder clearRotationVectorInfo() { - if (rotationVectorInfoBuilder_ == null) { - rotationVectorInfo_ = null; - onChanged(); + public java.util.List + getBleFingerprintsOrBuilderList() { + if (bleFingerprintsBuilder_ != null) { + return bleFingerprintsBuilder_.getMessageOrBuilderList(); } else { - rotationVectorInfo_ = null; - rotationVectorInfoBuilder_ = null; + return java.util.Collections.unmodifiableList(bleFingerprints_); } - - return this; } /** - * optional .Sensor_Info rotation_vector_info = 14; + * repeated .Fingerprint ble_fingerprints = 14; */ - public Sensor_Info.Builder getRotationVectorInfoBuilder() { - - onChanged(); - return getRotationVectorInfoFieldBuilder().getBuilder(); + public com.openpositioning.PositionMe.Traj.Fingerprint.Builder addBleFingerprintsBuilder() { + return getBleFingerprintsFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.Fingerprint.getDefaultInstance()); } /** - * optional .Sensor_Info rotation_vector_info = 14; + * repeated .Fingerprint ble_fingerprints = 14; */ - public Sensor_InfoOrBuilder getRotationVectorInfoOrBuilder() { - if (rotationVectorInfoBuilder_ != null) { - return rotationVectorInfoBuilder_.getMessageOrBuilder(); - } else { - return rotationVectorInfo_ == null ? - Sensor_Info.getDefaultInstance() : rotationVectorInfo_; - } + public com.openpositioning.PositionMe.Traj.Fingerprint.Builder addBleFingerprintsBuilder( + int index) { + return getBleFingerprintsFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.Fingerprint.getDefaultInstance()); } /** - * optional .Sensor_Info rotation_vector_info = 14; + * repeated .Fingerprint ble_fingerprints = 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(), + public java.util.List + getBleFingerprintsBuilderList() { + return getBleFingerprintsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.Fingerprint, com.openpositioning.PositionMe.Traj.Fingerprint.Builder, com.openpositioning.PositionMe.Traj.FingerprintOrBuilder> + getBleFingerprintsFieldBuilder() { + if (bleFingerprintsBuilder_ == null) { + bleFingerprintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.Fingerprint, com.openpositioning.PositionMe.Traj.Fingerprint.Builder, com.openpositioning.PositionMe.Traj.FingerprintOrBuilder>( + bleFingerprints_, + ((bitField0_ & 0x00002000) != 0), getParentForChildren(), isClean()); - rotationVectorInfo_ = null; + bleFingerprints_ = null; + } + return bleFingerprintsBuilder_; + } + + private java.util.List bleData_ = + java.util.Collections.emptyList(); + private void ensureBleDataIsMutable() { + if (!((bitField0_ & 0x00004000) != 0)) { + bleData_ = new java.util.ArrayList(bleData_); + bitField0_ |= 0x00004000; } - return rotationVectorInfoBuilder_; } - private Sensor_Info magnetometerInfo_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder> magnetometerInfoBuilder_; + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.BleData, com.openpositioning.PositionMe.Traj.BleData.Builder, com.openpositioning.PositionMe.Traj.BleDataOrBuilder> bleDataBuilder_; + /** - * optional .Sensor_Info magnetometer_info = 15; + * repeated .BleData ble_data = 15; */ - public boolean hasMagnetometerInfo() { - return magnetometerInfoBuilder_ != null || magnetometerInfo_ != null; + public java.util.List getBleDataList() { + if (bleDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(bleData_); + } else { + return bleDataBuilder_.getMessageList(); + } } /** - * optional .Sensor_Info magnetometer_info = 15; + * repeated .BleData ble_data = 15; */ - public Sensor_Info getMagnetometerInfo() { - if (magnetometerInfoBuilder_ == null) { - return magnetometerInfo_ == null ? Sensor_Info.getDefaultInstance() : magnetometerInfo_; + public int getBleDataCount() { + if (bleDataBuilder_ == null) { + return bleData_.size(); } else { - return magnetometerInfoBuilder_.getMessage(); + return bleDataBuilder_.getCount(); } } /** - * optional .Sensor_Info magnetometer_info = 15; + * repeated .BleData ble_data = 15; */ - public Builder setMagnetometerInfo(Sensor_Info value) { - if (magnetometerInfoBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - magnetometerInfo_ = value; + public com.openpositioning.PositionMe.Traj.BleData getBleData(int index) { + if (bleDataBuilder_ == null) { + return bleData_.get(index); + } else { + return bleDataBuilder_.getMessage(index); + } + } + /** + * repeated .BleData ble_data = 15; + */ + public Builder setBleData( + int index, com.openpositioning.PositionMe.Traj.BleData value) { + if (bleDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBleDataIsMutable(); + bleData_.set(index, value); onChanged(); } else { - magnetometerInfoBuilder_.setMessage(value); + bleDataBuilder_.setMessage(index, value); } - return this; } /** - * optional .Sensor_Info magnetometer_info = 15; + * repeated .BleData ble_data = 15; */ - public Builder setMagnetometerInfo( - Sensor_Info.Builder builderForValue) { - if (magnetometerInfoBuilder_ == null) { - magnetometerInfo_ = builderForValue.build(); + public Builder setBleData( + int index, com.openpositioning.PositionMe.Traj.BleData.Builder builderForValue) { + if (bleDataBuilder_ == null) { + ensureBleDataIsMutable(); + bleData_.set(index, builderForValue.build()); onChanged(); } else { - magnetometerInfoBuilder_.setMessage(builderForValue.build()); + bleDataBuilder_.setMessage(index, builderForValue.build()); } - return this; } /** - * optional .Sensor_Info magnetometer_info = 15; + * repeated .BleData ble_data = 15; */ - public Builder mergeMagnetometerInfo(Sensor_Info value) { - if (magnetometerInfoBuilder_ == null) { - if (magnetometerInfo_ != null) { - magnetometerInfo_ = - Sensor_Info.newBuilder(magnetometerInfo_).mergeFrom(value).buildPartial(); - } else { - magnetometerInfo_ = value; + public Builder addBleData(com.openpositioning.PositionMe.Traj.BleData value) { + if (bleDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureBleDataIsMutable(); + bleData_.add(value); onChanged(); } else { - magnetometerInfoBuilder_.mergeFrom(value); + bleDataBuilder_.addMessage(value); } - return this; } /** - * optional .Sensor_Info magnetometer_info = 15; + * repeated .BleData ble_data = 15; */ - public Builder clearMagnetometerInfo() { - if (magnetometerInfoBuilder_ == null) { - magnetometerInfo_ = null; + public Builder addBleData( + int index, com.openpositioning.PositionMe.Traj.BleData value) { + if (bleDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBleDataIsMutable(); + bleData_.add(index, value); onChanged(); } else { - magnetometerInfo_ = null; - magnetometerInfoBuilder_ = null; + bleDataBuilder_.addMessage(index, value); } - return this; } /** - * optional .Sensor_Info magnetometer_info = 15; + * repeated .BleData ble_data = 15; */ - public Sensor_Info.Builder getMagnetometerInfoBuilder() { - - onChanged(); - return getMagnetometerInfoFieldBuilder().getBuilder(); + public Builder addBleData( + com.openpositioning.PositionMe.Traj.BleData.Builder builderForValue) { + if (bleDataBuilder_ == null) { + ensureBleDataIsMutable(); + bleData_.add(builderForValue.build()); + onChanged(); + } else { + bleDataBuilder_.addMessage(builderForValue.build()); + } + return this; } /** - * optional .Sensor_Info magnetometer_info = 15; + * repeated .BleData ble_data = 15; */ - public Sensor_InfoOrBuilder getMagnetometerInfoOrBuilder() { - if (magnetometerInfoBuilder_ != null) { - return magnetometerInfoBuilder_.getMessageOrBuilder(); + public Builder addBleData( + int index, com.openpositioning.PositionMe.Traj.BleData.Builder builderForValue) { + if (bleDataBuilder_ == null) { + ensureBleDataIsMutable(); + bleData_.add(index, builderForValue.build()); + onChanged(); } else { - return magnetometerInfo_ == null ? - Sensor_Info.getDefaultInstance() : magnetometerInfo_; + bleDataBuilder_.addMessage(index, builderForValue.build()); } + return this; } /** - * optional .Sensor_Info magnetometer_info = 15; + * repeated .BleData ble_data = 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(), + public Builder addAllBleData( + java.lang.Iterable values) { + if (bleDataBuilder_ == null) { + ensureBleDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bleData_); + onChanged(); + } else { + bleDataBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .BleData ble_data = 15; + */ + public Builder clearBleData() { + if (bleDataBuilder_ == null) { + bleData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + } else { + bleDataBuilder_.clear(); + } + return this; + } + /** + * repeated .BleData ble_data = 15; + */ + public Builder removeBleData(int index) { + if (bleDataBuilder_ == null) { + ensureBleDataIsMutable(); + bleData_.remove(index); + onChanged(); + } else { + bleDataBuilder_.remove(index); + } + return this; + } + /** + * repeated .BleData ble_data = 15; + */ + public com.openpositioning.PositionMe.Traj.BleData.Builder getBleDataBuilder( + int index) { + return getBleDataFieldBuilder().getBuilder(index); + } + /** + * repeated .BleData ble_data = 15; + */ + public com.openpositioning.PositionMe.Traj.BleDataOrBuilder getBleDataOrBuilder( + int index) { + if (bleDataBuilder_ == null) { + return bleData_.get(index); } else { + return bleDataBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .BleData ble_data = 15; + */ + public java.util.List + getBleDataOrBuilderList() { + if (bleDataBuilder_ != null) { + return bleDataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bleData_); + } + } + /** + * repeated .BleData ble_data = 15; + */ + public com.openpositioning.PositionMe.Traj.BleData.Builder addBleDataBuilder() { + return getBleDataFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.BleData.getDefaultInstance()); + } + /** + * repeated .BleData ble_data = 15; + */ + public com.openpositioning.PositionMe.Traj.BleData.Builder addBleDataBuilder( + int index) { + return getBleDataFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.BleData.getDefaultInstance()); + } + /** + * repeated .BleData ble_data = 15; + */ + public java.util.List + getBleDataBuilderList() { + return getBleDataFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.BleData, com.openpositioning.PositionMe.Traj.BleData.Builder, com.openpositioning.PositionMe.Traj.BleDataOrBuilder> + getBleDataFieldBuilder() { + if (bleDataBuilder_ == null) { + bleDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.BleData, com.openpositioning.PositionMe.Traj.BleData.Builder, com.openpositioning.PositionMe.Traj.BleDataOrBuilder>( + bleData_, + ((bitField0_ & 0x00004000) != 0), getParentForChildren(), isClean()); - magnetometerInfo_ = null; + bleData_ = null; } - return magnetometerInfoBuilder_; + return bleDataBuilder_; } - private Sensor_Info barometerInfo_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder> barometerInfoBuilder_; + private long startTimestamp_ ; /** - * optional .Sensor_Info barometer_info = 16; + *
+       * 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)
+       * 
+ * + * int64 start_timestamp = 16; + * @return The startTimestamp. */ - public boolean hasBarometerInfo() { - return barometerInfoBuilder_ != null || barometerInfo_ != null; + @java.lang.Override + public long getStartTimestamp() { + return startTimestamp_; } /** - * optional .Sensor_Info barometer_info = 16; + *
+       * 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)
+       * 
+ * + * int64 start_timestamp = 16; + * @param value The startTimestamp to set. + * @return This builder for chaining. */ - public Sensor_Info getBarometerInfo() { - if (barometerInfoBuilder_ == null) { - return barometerInfo_ == null ? Sensor_Info.getDefaultInstance() : barometerInfo_; + public Builder setStartTimestamp(long value) { + + startTimestamp_ = value; + bitField0_ |= 0x00008000; + 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)
+       * 
+ * + * int64 start_timestamp = 16; + * @return This builder for chaining. + */ + public Builder clearStartTimestamp() { + bitField0_ = (bitField0_ & ~0x00008000); + startTimestamp_ = 0L; + onChanged(); + return this; + } + + private com.openpositioning.PositionMe.Traj.GNSSPosition initialPosition_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> initialPositionBuilder_; + /** + * .GNSSPosition initial_position = 17; + * @return Whether the initialPosition field is set. + */ + public boolean hasInitialPosition() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * .GNSSPosition initial_position = 17; + * @return The initialPosition. + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition getInitialPosition() { + if (initialPositionBuilder_ == null) { + return initialPosition_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : initialPosition_; } else { - return barometerInfoBuilder_.getMessage(); + return initialPositionBuilder_.getMessage(); } } /** - * optional .Sensor_Info barometer_info = 16; + * .GNSSPosition initial_position = 17; */ - public Builder setBarometerInfo(Sensor_Info value) { - if (barometerInfoBuilder_ == null) { + public Builder setInitialPosition(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (initialPositionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - barometerInfo_ = value; - onChanged(); + initialPosition_ = value; } else { - barometerInfoBuilder_.setMessage(value); + initialPositionBuilder_.setMessage(value); } - + bitField0_ |= 0x00010000; + onChanged(); return this; } /** - * optional .Sensor_Info barometer_info = 16; + * .GNSSPosition initial_position = 17; */ - public Builder setBarometerInfo( - Sensor_Info.Builder builderForValue) { - if (barometerInfoBuilder_ == null) { - barometerInfo_ = builderForValue.build(); - onChanged(); + public Builder setInitialPosition( + com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (initialPositionBuilder_ == null) { + initialPosition_ = builderForValue.build(); } else { - barometerInfoBuilder_.setMessage(builderForValue.build()); + initialPositionBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00010000; + onChanged(); return this; } /** - * optional .Sensor_Info barometer_info = 16; + * .GNSSPosition initial_position = 17; */ - public Builder mergeBarometerInfo(Sensor_Info value) { - if (barometerInfoBuilder_ == null) { - if (barometerInfo_ != null) { - barometerInfo_ = - Sensor_Info.newBuilder(barometerInfo_).mergeFrom(value).buildPartial(); + public Builder mergeInitialPosition(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (initialPositionBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) && + initialPosition_ != null && + initialPosition_ != com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()) { + getInitialPositionBuilder().mergeFrom(value); } else { - barometerInfo_ = value; + initialPosition_ = value; } - onChanged(); } else { - barometerInfoBuilder_.mergeFrom(value); + initialPositionBuilder_.mergeFrom(value); + } + if (initialPosition_ != null) { + bitField0_ |= 0x00010000; + onChanged(); } - return this; } /** - * optional .Sensor_Info barometer_info = 16; + * .GNSSPosition initial_position = 17; */ - public Builder clearBarometerInfo() { - if (barometerInfoBuilder_ == null) { - barometerInfo_ = null; - onChanged(); - } else { - barometerInfo_ = null; - barometerInfoBuilder_ = null; + public Builder clearInitialPosition() { + bitField0_ = (bitField0_ & ~0x00010000); + initialPosition_ = null; + if (initialPositionBuilder_ != null) { + initialPositionBuilder_.dispose(); + initialPositionBuilder_ = null; } - + onChanged(); return this; } /** - * optional .Sensor_Info barometer_info = 16; + * .GNSSPosition initial_position = 17; */ - public Sensor_Info.Builder getBarometerInfoBuilder() { - + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder getInitialPositionBuilder() { + bitField0_ |= 0x00010000; onChanged(); - return getBarometerInfoFieldBuilder().getBuilder(); + return getInitialPositionFieldBuilder().getBuilder(); } /** - * optional .Sensor_Info barometer_info = 16; + * .GNSSPosition initial_position = 17; */ - public Sensor_InfoOrBuilder getBarometerInfoOrBuilder() { - if (barometerInfoBuilder_ != null) { - return barometerInfoBuilder_.getMessageOrBuilder(); + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getInitialPositionOrBuilder() { + if (initialPositionBuilder_ != null) { + return initialPositionBuilder_.getMessageOrBuilder(); } else { - return barometerInfo_ == null ? - Sensor_Info.getDefaultInstance() : barometerInfo_; + return initialPosition_ == null ? + com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : initialPosition_; } } /** - * optional .Sensor_Info barometer_info = 16; + * .GNSSPosition initial_position = 17; */ - 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(), + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> + getInitialPositionFieldBuilder() { + if (initialPositionBuilder_ == null) { + initialPositionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder>( + getInitialPosition(), getParentForChildren(), isClean()); - barometerInfo_ = null; + initialPosition_ = null; + } + return initialPositionBuilder_; + } + + private java.util.List correctedPositions_ = + java.util.Collections.emptyList(); + private void ensureCorrectedPositionsIsMutable() { + if (!((bitField0_ & 0x00020000) != 0)) { + correctedPositions_ = new java.util.ArrayList(correctedPositions_); + bitField0_ |= 0x00020000; } - return barometerInfoBuilder_; } - private Sensor_Info lightSensorInfo_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - Sensor_Info, Sensor_Info.Builder, Sensor_InfoOrBuilder> lightSensorInfoBuilder_; + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> correctedPositionsBuilder_; + /** - * optional .Sensor_Info light_sensor_info = 17; + * repeated .GNSSPosition corrected_positions = 18; */ - public boolean hasLightSensorInfo() { - return lightSensorInfoBuilder_ != null || lightSensorInfo_ != null; + public java.util.List getCorrectedPositionsList() { + if (correctedPositionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(correctedPositions_); + } else { + return correctedPositionsBuilder_.getMessageList(); + } } /** - * optional .Sensor_Info light_sensor_info = 17; + * repeated .GNSSPosition corrected_positions = 18; */ - public Sensor_Info getLightSensorInfo() { - if (lightSensorInfoBuilder_ == null) { - return lightSensorInfo_ == null ? Sensor_Info.getDefaultInstance() : lightSensorInfo_; + public int getCorrectedPositionsCount() { + if (correctedPositionsBuilder_ == null) { + return correctedPositions_.size(); } else { - return lightSensorInfoBuilder_.getMessage(); + return correctedPositionsBuilder_.getCount(); } } /** - * optional .Sensor_Info light_sensor_info = 17; + * repeated .GNSSPosition corrected_positions = 18; */ - public Builder setLightSensorInfo(Sensor_Info value) { - if (lightSensorInfoBuilder_ == null) { + public com.openpositioning.PositionMe.Traj.GNSSPosition getCorrectedPositions(int index) { + if (correctedPositionsBuilder_ == null) { + return correctedPositions_.get(index); + } else { + return correctedPositionsBuilder_.getMessage(index); + } + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public Builder setCorrectedPositions( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (correctedPositionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - lightSensorInfo_ = value; + ensureCorrectedPositionsIsMutable(); + correctedPositions_.set(index, value); onChanged(); } else { - lightSensorInfoBuilder_.setMessage(value); + correctedPositionsBuilder_.setMessage(index, value); } - return this; } /** - * optional .Sensor_Info light_sensor_info = 17; + * repeated .GNSSPosition corrected_positions = 18; */ - public Builder setLightSensorInfo( - Sensor_Info.Builder builderForValue) { - if (lightSensorInfoBuilder_ == null) { - lightSensorInfo_ = builderForValue.build(); + public Builder setCorrectedPositions( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (correctedPositionsBuilder_ == null) { + ensureCorrectedPositionsIsMutable(); + correctedPositions_.set(index, builderForValue.build()); onChanged(); } else { - lightSensorInfoBuilder_.setMessage(builderForValue.build()); + correctedPositionsBuilder_.setMessage(index, builderForValue.build()); } - return this; } /** - * optional .Sensor_Info light_sensor_info = 17; + * repeated .GNSSPosition corrected_positions = 18; */ - public Builder mergeLightSensorInfo(Sensor_Info value) { - if (lightSensorInfoBuilder_ == null) { - if (lightSensorInfo_ != null) { - lightSensorInfo_ = - Sensor_Info.newBuilder(lightSensorInfo_).mergeFrom(value).buildPartial(); - } else { - lightSensorInfo_ = value; + public Builder addCorrectedPositions(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (correctedPositionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureCorrectedPositionsIsMutable(); + correctedPositions_.add(value); onChanged(); } else { - lightSensorInfoBuilder_.mergeFrom(value); + correctedPositionsBuilder_.addMessage(value); } - return this; } /** - * optional .Sensor_Info light_sensor_info = 17; + * repeated .GNSSPosition corrected_positions = 18; */ - public Builder clearLightSensorInfo() { - if (lightSensorInfoBuilder_ == null) { - lightSensorInfo_ = null; + public Builder addCorrectedPositions( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (correctedPositionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCorrectedPositionsIsMutable(); + correctedPositions_.add(index, value); onChanged(); } else { - lightSensorInfo_ = null; - lightSensorInfoBuilder_ = null; + correctedPositionsBuilder_.addMessage(index, value); } - return this; } /** - * optional .Sensor_Info light_sensor_info = 17; + * repeated .GNSSPosition corrected_positions = 18; */ - public Sensor_Info.Builder getLightSensorInfoBuilder() { - - onChanged(); - return getLightSensorInfoFieldBuilder().getBuilder(); + public Builder addCorrectedPositions( + com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (correctedPositionsBuilder_ == null) { + ensureCorrectedPositionsIsMutable(); + correctedPositions_.add(builderForValue.build()); + onChanged(); + } else { + correctedPositionsBuilder_.addMessage(builderForValue.build()); + } + return this; } /** - * optional .Sensor_Info light_sensor_info = 17; + * repeated .GNSSPosition corrected_positions = 18; */ - public Sensor_InfoOrBuilder getLightSensorInfoOrBuilder() { - if (lightSensorInfoBuilder_ != null) { - return lightSensorInfoBuilder_.getMessageOrBuilder(); + public Builder addCorrectedPositions( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (correctedPositionsBuilder_ == null) { + ensureCorrectedPositionsIsMutable(); + correctedPositions_.add(index, builderForValue.build()); + onChanged(); } else { - return lightSensorInfo_ == null ? - Sensor_Info.getDefaultInstance() : lightSensorInfo_; + correctedPositionsBuilder_.addMessage(index, builderForValue.build()); } + return this; } /** - * optional .Sensor_Info light_sensor_info = 17; + * repeated .GNSSPosition corrected_positions = 18; */ - 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; + public Builder addAllCorrectedPositions( + java.lang.Iterable values) { + if (correctedPositionsBuilder_ == null) { + ensureCorrectedPositionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, correctedPositions_); + onChanged(); + } else { + correctedPositionsBuilder_.addAllMessages(values); } - return lightSensorInfoBuilder_; + return this; } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public Builder clearCorrectedPositions() { + if (correctedPositionsBuilder_ == null) { + correctedPositions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + } else { + correctedPositionsBuilder_.clear(); + } return this; } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public Builder removeCorrectedPositions(int index) { + if (correctedPositionsBuilder_ == null) { + ensureCorrectedPositionsIsMutable(); + correctedPositions_.remove(index); + onChanged(); + } else { + correctedPositionsBuilder_.remove(index); + } return this; } - - - // @@protoc_insertion_point(builder_scope:Trajectory) - } - - // @@protoc_insertion_point(class_scope:Trajectory) - private static final Trajectory DEFAULT_INSTANCE; + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder getCorrectedPositionsBuilder( + int index) { + return getCorrectedPositionsFieldBuilder().getBuilder(index); + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getCorrectedPositionsOrBuilder( + int index) { + if (correctedPositionsBuilder_ == null) { + return correctedPositions_.get(index); } else { + return correctedPositionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public java.util.List + getCorrectedPositionsOrBuilderList() { + if (correctedPositionsBuilder_ != null) { + return correctedPositionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(correctedPositions_); + } + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder addCorrectedPositionsBuilder() { + return getCorrectedPositionsFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()); + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder addCorrectedPositionsBuilder( + int index) { + return getCorrectedPositionsFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()); + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public java.util.List + getCorrectedPositionsBuilderList() { + return getCorrectedPositionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> + getCorrectedPositionsFieldBuilder() { + if (correctedPositionsBuilder_ == null) { + correctedPositionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder>( + correctedPositions_, + ((bitField0_ & 0x00020000) != 0), + getParentForChildren(), + isClean()); + correctedPositions_ = null; + } + return correctedPositionsBuilder_; + } + + private com.openpositioning.PositionMe.Traj.SensorInfo accelerometerInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> accelerometerInfoBuilder_; + /** + * .SensorInfo accelerometer_info = 19; + * @return Whether the accelerometerInfo field is set. + */ + public boolean hasAccelerometerInfo() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + * .SensorInfo accelerometer_info = 19; + * @return The accelerometerInfo. + */ + public com.openpositioning.PositionMe.Traj.SensorInfo getAccelerometerInfo() { + if (accelerometerInfoBuilder_ == null) { + return accelerometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : accelerometerInfo_; + } else { + return accelerometerInfoBuilder_.getMessage(); + } + } + /** + * .SensorInfo accelerometer_info = 19; + */ + public Builder setAccelerometerInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (accelerometerInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accelerometerInfo_ = value; + } else { + accelerometerInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * .SensorInfo accelerometer_info = 19; + */ + public Builder setAccelerometerInfo( + com.openpositioning.PositionMe.Traj.SensorInfo.Builder builderForValue) { + if (accelerometerInfoBuilder_ == null) { + accelerometerInfo_ = builderForValue.build(); + } else { + accelerometerInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * .SensorInfo accelerometer_info = 19; + */ + public Builder mergeAccelerometerInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (accelerometerInfoBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) && + accelerometerInfo_ != null && + accelerometerInfo_ != com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) { + getAccelerometerInfoBuilder().mergeFrom(value); + } else { + accelerometerInfo_ = value; + } + } else { + accelerometerInfoBuilder_.mergeFrom(value); + } + if (accelerometerInfo_ != null) { + bitField0_ |= 0x00040000; + onChanged(); + } + return this; + } + /** + * .SensorInfo accelerometer_info = 19; + */ + public Builder clearAccelerometerInfo() { + bitField0_ = (bitField0_ & ~0x00040000); + accelerometerInfo_ = null; + if (accelerometerInfoBuilder_ != null) { + accelerometerInfoBuilder_.dispose(); + accelerometerInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SensorInfo accelerometer_info = 19; + */ + public com.openpositioning.PositionMe.Traj.SensorInfo.Builder getAccelerometerInfoBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getAccelerometerInfoFieldBuilder().getBuilder(); + } + /** + * .SensorInfo accelerometer_info = 19; + */ + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getAccelerometerInfoOrBuilder() { + if (accelerometerInfoBuilder_ != null) { + return accelerometerInfoBuilder_.getMessageOrBuilder(); + } else { + return accelerometerInfo_ == null ? + com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : accelerometerInfo_; + } + } + /** + * .SensorInfo accelerometer_info = 19; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> + getAccelerometerInfoFieldBuilder() { + if (accelerometerInfoBuilder_ == null) { + accelerometerInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder>( + getAccelerometerInfo(), + getParentForChildren(), + isClean()); + accelerometerInfo_ = null; + } + return accelerometerInfoBuilder_; + } + + private com.openpositioning.PositionMe.Traj.SensorInfo gyroscopeInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> gyroscopeInfoBuilder_; + /** + * .SensorInfo gyroscope_info = 20; + * @return Whether the gyroscopeInfo field is set. + */ + public boolean hasGyroscopeInfo() { + return ((bitField0_ & 0x00080000) != 0); + } + /** + * .SensorInfo gyroscope_info = 20; + * @return The gyroscopeInfo. + */ + public com.openpositioning.PositionMe.Traj.SensorInfo getGyroscopeInfo() { + if (gyroscopeInfoBuilder_ == null) { + return gyroscopeInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : gyroscopeInfo_; + } else { + return gyroscopeInfoBuilder_.getMessage(); + } + } + /** + * .SensorInfo gyroscope_info = 20; + */ + public Builder setGyroscopeInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (gyroscopeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gyroscopeInfo_ = value; + } else { + gyroscopeInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * .SensorInfo gyroscope_info = 20; + */ + public Builder setGyroscopeInfo( + com.openpositioning.PositionMe.Traj.SensorInfo.Builder builderForValue) { + if (gyroscopeInfoBuilder_ == null) { + gyroscopeInfo_ = builderForValue.build(); + } else { + gyroscopeInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * .SensorInfo gyroscope_info = 20; + */ + public Builder mergeGyroscopeInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (gyroscopeInfoBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0) && + gyroscopeInfo_ != null && + gyroscopeInfo_ != com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) { + getGyroscopeInfoBuilder().mergeFrom(value); + } else { + gyroscopeInfo_ = value; + } + } else { + gyroscopeInfoBuilder_.mergeFrom(value); + } + if (gyroscopeInfo_ != null) { + bitField0_ |= 0x00080000; + onChanged(); + } + return this; + } + /** + * .SensorInfo gyroscope_info = 20; + */ + public Builder clearGyroscopeInfo() { + bitField0_ = (bitField0_ & ~0x00080000); + gyroscopeInfo_ = null; + if (gyroscopeInfoBuilder_ != null) { + gyroscopeInfoBuilder_.dispose(); + gyroscopeInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SensorInfo gyroscope_info = 20; + */ + public com.openpositioning.PositionMe.Traj.SensorInfo.Builder getGyroscopeInfoBuilder() { + bitField0_ |= 0x00080000; + onChanged(); + return getGyroscopeInfoFieldBuilder().getBuilder(); + } + /** + * .SensorInfo gyroscope_info = 20; + */ + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getGyroscopeInfoOrBuilder() { + if (gyroscopeInfoBuilder_ != null) { + return gyroscopeInfoBuilder_.getMessageOrBuilder(); + } else { + return gyroscopeInfo_ == null ? + com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : gyroscopeInfo_; + } + } + /** + * .SensorInfo gyroscope_info = 20; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> + getGyroscopeInfoFieldBuilder() { + if (gyroscopeInfoBuilder_ == null) { + gyroscopeInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder>( + getGyroscopeInfo(), + getParentForChildren(), + isClean()); + gyroscopeInfo_ = null; + } + return gyroscopeInfoBuilder_; + } + + private com.openpositioning.PositionMe.Traj.SensorInfo rotationVectorInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> rotationVectorInfoBuilder_; + /** + * .SensorInfo rotation_vector_info = 21; + * @return Whether the rotationVectorInfo field is set. + */ + public boolean hasRotationVectorInfo() { + return ((bitField0_ & 0x00100000) != 0); + } + /** + * .SensorInfo rotation_vector_info = 21; + * @return The rotationVectorInfo. + */ + public com.openpositioning.PositionMe.Traj.SensorInfo getRotationVectorInfo() { + if (rotationVectorInfoBuilder_ == null) { + return rotationVectorInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : rotationVectorInfo_; + } else { + return rotationVectorInfoBuilder_.getMessage(); + } + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + public Builder setRotationVectorInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (rotationVectorInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rotationVectorInfo_ = value; + } else { + rotationVectorInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + public Builder setRotationVectorInfo( + com.openpositioning.PositionMe.Traj.SensorInfo.Builder builderForValue) { + if (rotationVectorInfoBuilder_ == null) { + rotationVectorInfo_ = builderForValue.build(); + } else { + rotationVectorInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + public Builder mergeRotationVectorInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (rotationVectorInfoBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0) && + rotationVectorInfo_ != null && + rotationVectorInfo_ != com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) { + getRotationVectorInfoBuilder().mergeFrom(value); + } else { + rotationVectorInfo_ = value; + } + } else { + rotationVectorInfoBuilder_.mergeFrom(value); + } + if (rotationVectorInfo_ != null) { + bitField0_ |= 0x00100000; + onChanged(); + } + return this; + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + public Builder clearRotationVectorInfo() { + bitField0_ = (bitField0_ & ~0x00100000); + rotationVectorInfo_ = null; + if (rotationVectorInfoBuilder_ != null) { + rotationVectorInfoBuilder_.dispose(); + rotationVectorInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + public com.openpositioning.PositionMe.Traj.SensorInfo.Builder getRotationVectorInfoBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return getRotationVectorInfoFieldBuilder().getBuilder(); + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getRotationVectorInfoOrBuilder() { + if (rotationVectorInfoBuilder_ != null) { + return rotationVectorInfoBuilder_.getMessageOrBuilder(); + } else { + return rotationVectorInfo_ == null ? + com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : rotationVectorInfo_; + } + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> + getRotationVectorInfoFieldBuilder() { + if (rotationVectorInfoBuilder_ == null) { + rotationVectorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder>( + getRotationVectorInfo(), + getParentForChildren(), + isClean()); + rotationVectorInfo_ = null; + } + return rotationVectorInfoBuilder_; + } + + private com.openpositioning.PositionMe.Traj.SensorInfo magnetometerInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> magnetometerInfoBuilder_; + /** + * .SensorInfo magnetometer_info = 22; + * @return Whether the magnetometerInfo field is set. + */ + public boolean hasMagnetometerInfo() { + return ((bitField0_ & 0x00200000) != 0); + } + /** + * .SensorInfo magnetometer_info = 22; + * @return The magnetometerInfo. + */ + public com.openpositioning.PositionMe.Traj.SensorInfo getMagnetometerInfo() { + if (magnetometerInfoBuilder_ == null) { + return magnetometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : magnetometerInfo_; + } else { + return magnetometerInfoBuilder_.getMessage(); + } + } + /** + * .SensorInfo magnetometer_info = 22; + */ + public Builder setMagnetometerInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (magnetometerInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + magnetometerInfo_ = value; + } else { + magnetometerInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * .SensorInfo magnetometer_info = 22; + */ + public Builder setMagnetometerInfo( + com.openpositioning.PositionMe.Traj.SensorInfo.Builder builderForValue) { + if (magnetometerInfoBuilder_ == null) { + magnetometerInfo_ = builderForValue.build(); + } else { + magnetometerInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * .SensorInfo magnetometer_info = 22; + */ + public Builder mergeMagnetometerInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (magnetometerInfoBuilder_ == null) { + if (((bitField0_ & 0x00200000) != 0) && + magnetometerInfo_ != null && + magnetometerInfo_ != com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) { + getMagnetometerInfoBuilder().mergeFrom(value); + } else { + magnetometerInfo_ = value; + } + } else { + magnetometerInfoBuilder_.mergeFrom(value); + } + if (magnetometerInfo_ != null) { + bitField0_ |= 0x00200000; + onChanged(); + } + return this; + } + /** + * .SensorInfo magnetometer_info = 22; + */ + public Builder clearMagnetometerInfo() { + bitField0_ = (bitField0_ & ~0x00200000); + magnetometerInfo_ = null; + if (magnetometerInfoBuilder_ != null) { + magnetometerInfoBuilder_.dispose(); + magnetometerInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SensorInfo magnetometer_info = 22; + */ + public com.openpositioning.PositionMe.Traj.SensorInfo.Builder getMagnetometerInfoBuilder() { + bitField0_ |= 0x00200000; + onChanged(); + return getMagnetometerInfoFieldBuilder().getBuilder(); + } + /** + * .SensorInfo magnetometer_info = 22; + */ + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getMagnetometerInfoOrBuilder() { + if (magnetometerInfoBuilder_ != null) { + return magnetometerInfoBuilder_.getMessageOrBuilder(); + } else { + return magnetometerInfo_ == null ? + com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : magnetometerInfo_; + } + } + /** + * .SensorInfo magnetometer_info = 22; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> + getMagnetometerInfoFieldBuilder() { + if (magnetometerInfoBuilder_ == null) { + magnetometerInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder>( + getMagnetometerInfo(), + getParentForChildren(), + isClean()); + magnetometerInfo_ = null; + } + return magnetometerInfoBuilder_; + } + + private com.openpositioning.PositionMe.Traj.SensorInfo barometerInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> barometerInfoBuilder_; + /** + * .SensorInfo barometer_info = 23; + * @return Whether the barometerInfo field is set. + */ + public boolean hasBarometerInfo() { + return ((bitField0_ & 0x00400000) != 0); + } + /** + * .SensorInfo barometer_info = 23; + * @return The barometerInfo. + */ + public com.openpositioning.PositionMe.Traj.SensorInfo getBarometerInfo() { + if (barometerInfoBuilder_ == null) { + return barometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : barometerInfo_; + } else { + return barometerInfoBuilder_.getMessage(); + } + } + /** + * .SensorInfo barometer_info = 23; + */ + public Builder setBarometerInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (barometerInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + barometerInfo_ = value; + } else { + barometerInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * .SensorInfo barometer_info = 23; + */ + public Builder setBarometerInfo( + com.openpositioning.PositionMe.Traj.SensorInfo.Builder builderForValue) { + if (barometerInfoBuilder_ == null) { + barometerInfo_ = builderForValue.build(); + } else { + barometerInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * .SensorInfo barometer_info = 23; + */ + public Builder mergeBarometerInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (barometerInfoBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0) && + barometerInfo_ != null && + barometerInfo_ != com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) { + getBarometerInfoBuilder().mergeFrom(value); + } else { + barometerInfo_ = value; + } + } else { + barometerInfoBuilder_.mergeFrom(value); + } + if (barometerInfo_ != null) { + bitField0_ |= 0x00400000; + onChanged(); + } + return this; + } + /** + * .SensorInfo barometer_info = 23; + */ + public Builder clearBarometerInfo() { + bitField0_ = (bitField0_ & ~0x00400000); + barometerInfo_ = null; + if (barometerInfoBuilder_ != null) { + barometerInfoBuilder_.dispose(); + barometerInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SensorInfo barometer_info = 23; + */ + public com.openpositioning.PositionMe.Traj.SensorInfo.Builder getBarometerInfoBuilder() { + bitField0_ |= 0x00400000; + onChanged(); + return getBarometerInfoFieldBuilder().getBuilder(); + } + /** + * .SensorInfo barometer_info = 23; + */ + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getBarometerInfoOrBuilder() { + if (barometerInfoBuilder_ != null) { + return barometerInfoBuilder_.getMessageOrBuilder(); + } else { + return barometerInfo_ == null ? + com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : barometerInfo_; + } + } + /** + * .SensorInfo barometer_info = 23; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> + getBarometerInfoFieldBuilder() { + if (barometerInfoBuilder_ == null) { + barometerInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder>( + getBarometerInfo(), + getParentForChildren(), + isClean()); + barometerInfo_ = null; + } + return barometerInfoBuilder_; + } + + private com.openpositioning.PositionMe.Traj.SensorInfo lightSensorInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> lightSensorInfoBuilder_; + /** + * .SensorInfo light_SensorInfo = 24; + * @return Whether the lightSensorInfo field is set. + */ + public boolean hasLightSensorInfo() { + return ((bitField0_ & 0x00800000) != 0); + } + /** + * .SensorInfo light_SensorInfo = 24; + * @return The lightSensorInfo. + */ + public com.openpositioning.PositionMe.Traj.SensorInfo getLightSensorInfo() { + if (lightSensorInfoBuilder_ == null) { + return lightSensorInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : lightSensorInfo_; + } else { + return lightSensorInfoBuilder_.getMessage(); + } + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + public Builder setLightSensorInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (lightSensorInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lightSensorInfo_ = value; + } else { + lightSensorInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + public Builder setLightSensorInfo( + com.openpositioning.PositionMe.Traj.SensorInfo.Builder builderForValue) { + if (lightSensorInfoBuilder_ == null) { + lightSensorInfo_ = builderForValue.build(); + } else { + lightSensorInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + public Builder mergeLightSensorInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (lightSensorInfoBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0) && + lightSensorInfo_ != null && + lightSensorInfo_ != com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) { + getLightSensorInfoBuilder().mergeFrom(value); + } else { + lightSensorInfo_ = value; + } + } else { + lightSensorInfoBuilder_.mergeFrom(value); + } + if (lightSensorInfo_ != null) { + bitField0_ |= 0x00800000; + onChanged(); + } + return this; + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + public Builder clearLightSensorInfo() { + bitField0_ = (bitField0_ & ~0x00800000); + lightSensorInfo_ = null; + if (lightSensorInfoBuilder_ != null) { + lightSensorInfoBuilder_.dispose(); + lightSensorInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + public com.openpositioning.PositionMe.Traj.SensorInfo.Builder getLightSensorInfoBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return getLightSensorInfoFieldBuilder().getBuilder(); + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getLightSensorInfoOrBuilder() { + if (lightSensorInfoBuilder_ != null) { + return lightSensorInfoBuilder_.getMessageOrBuilder(); + } else { + return lightSensorInfo_ == null ? + com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : lightSensorInfo_; + } + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> + getLightSensorInfoFieldBuilder() { + if (lightSensorInfoBuilder_ == null) { + lightSensorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder>( + getLightSensorInfo(), + getParentForChildren(), + isClean()); + lightSensorInfo_ = null; + } + return lightSensorInfoBuilder_; + } + + private com.openpositioning.PositionMe.Traj.SensorInfo proximityInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> proximityInfoBuilder_; + /** + * .SensorInfo proximity_info = 25; + * @return Whether the proximityInfo field is set. + */ + public boolean hasProximityInfo() { + return ((bitField0_ & 0x01000000) != 0); + } + /** + * .SensorInfo proximity_info = 25; + * @return The proximityInfo. + */ + public com.openpositioning.PositionMe.Traj.SensorInfo getProximityInfo() { + if (proximityInfoBuilder_ == null) { + return proximityInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : proximityInfo_; + } else { + return proximityInfoBuilder_.getMessage(); + } + } + /** + * .SensorInfo proximity_info = 25; + */ + public Builder setProximityInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (proximityInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + proximityInfo_ = value; + } else { + proximityInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * .SensorInfo proximity_info = 25; + */ + public Builder setProximityInfo( + com.openpositioning.PositionMe.Traj.SensorInfo.Builder builderForValue) { + if (proximityInfoBuilder_ == null) { + proximityInfo_ = builderForValue.build(); + } else { + proximityInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * .SensorInfo proximity_info = 25; + */ + public Builder mergeProximityInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (proximityInfoBuilder_ == null) { + if (((bitField0_ & 0x01000000) != 0) && + proximityInfo_ != null && + proximityInfo_ != com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) { + getProximityInfoBuilder().mergeFrom(value); + } else { + proximityInfo_ = value; + } + } else { + proximityInfoBuilder_.mergeFrom(value); + } + if (proximityInfo_ != null) { + bitField0_ |= 0x01000000; + onChanged(); + } + return this; + } + /** + * .SensorInfo proximity_info = 25; + */ + public Builder clearProximityInfo() { + bitField0_ = (bitField0_ & ~0x01000000); + proximityInfo_ = null; + if (proximityInfoBuilder_ != null) { + proximityInfoBuilder_.dispose(); + proximityInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SensorInfo proximity_info = 25; + */ + public com.openpositioning.PositionMe.Traj.SensorInfo.Builder getProximityInfoBuilder() { + bitField0_ |= 0x01000000; + onChanged(); + return getProximityInfoFieldBuilder().getBuilder(); + } + /** + * .SensorInfo proximity_info = 25; + */ + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getProximityInfoOrBuilder() { + if (proximityInfoBuilder_ != null) { + return proximityInfoBuilder_.getMessageOrBuilder(); + } else { + return proximityInfo_ == null ? + com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : proximityInfo_; + } + } + /** + * .SensorInfo proximity_info = 25; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> + getProximityInfoFieldBuilder() { + if (proximityInfoBuilder_ == null) { + proximityInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder>( + getProximityInfo(), + getParentForChildren(), + isClean()); + proximityInfo_ = null; + } + return proximityInfoBuilder_; + } + + private java.util.List testPoints_ = + java.util.Collections.emptyList(); + private void ensureTestPointsIsMutable() { + if (!((bitField0_ & 0x02000000) != 0)) { + testPoints_ = new java.util.ArrayList(testPoints_); + bitField0_ |= 0x02000000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> testPointsBuilder_; + + /** + * repeated .GNSSPosition test_points = 26; + */ + public java.util.List getTestPointsList() { + if (testPointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(testPoints_); + } else { + return testPointsBuilder_.getMessageList(); + } + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public int getTestPointsCount() { + if (testPointsBuilder_ == null) { + return testPoints_.size(); + } else { + return testPointsBuilder_.getCount(); + } + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition getTestPoints(int index) { + if (testPointsBuilder_ == null) { + return testPoints_.get(index); + } else { + return testPointsBuilder_.getMessage(index); + } + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder setTestPoints( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (testPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestPointsIsMutable(); + testPoints_.set(index, value); + onChanged(); + } else { + testPointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder setTestPoints( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (testPointsBuilder_ == null) { + ensureTestPointsIsMutable(); + testPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + testPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder addTestPoints(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (testPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestPointsIsMutable(); + testPoints_.add(value); + onChanged(); + } else { + testPointsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder addTestPoints( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (testPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestPointsIsMutable(); + testPoints_.add(index, value); + onChanged(); + } else { + testPointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder addTestPoints( + com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (testPointsBuilder_ == null) { + ensureTestPointsIsMutable(); + testPoints_.add(builderForValue.build()); + onChanged(); + } else { + testPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder addTestPoints( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (testPointsBuilder_ == null) { + ensureTestPointsIsMutable(); + testPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + testPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder addAllTestPoints( + java.lang.Iterable values) { + if (testPointsBuilder_ == null) { + ensureTestPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, testPoints_); + onChanged(); + } else { + testPointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder clearTestPoints() { + if (testPointsBuilder_ == null) { + testPoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x02000000); + onChanged(); + } else { + testPointsBuilder_.clear(); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder removeTestPoints(int index) { + if (testPointsBuilder_ == null) { + ensureTestPointsIsMutable(); + testPoints_.remove(index); + onChanged(); + } else { + testPointsBuilder_.remove(index); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder getTestPointsBuilder( + int index) { + return getTestPointsFieldBuilder().getBuilder(index); + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getTestPointsOrBuilder( + int index) { + if (testPointsBuilder_ == null) { + return testPoints_.get(index); } else { + return testPointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public java.util.List + getTestPointsOrBuilderList() { + if (testPointsBuilder_ != null) { + return testPointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(testPoints_); + } + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder addTestPointsBuilder() { + return getTestPointsFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()); + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder addTestPointsBuilder( + int index) { + return getTestPointsFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()); + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public java.util.List + getTestPointsBuilderList() { + return getTestPointsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> + getTestPointsFieldBuilder() { + if (testPointsBuilder_ == null) { + testPointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder>( + testPoints_, + ((bitField0_ & 0x02000000) != 0), + getParentForChildren(), + isClean()); + testPoints_ = null; + } + return testPointsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:Trajectory) + } + + // @@protoc_insertion_point(class_scope:Trajectory) + private static final com.openpositioning.PositionMe.Traj.Trajectory DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.Trajectory(); + } + + public static com.openpositioning.PositionMe.Traj.Trajectory getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Trajectory parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Trajectory getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RelativePositionOrBuilder extends + // @@protoc_insertion_point(interface_extends:RelativePosition) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * milliseconds from the start_timestamp
+     * 
+ * + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + 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
+     * 
+ * + * float x = 2; + * @return The x. + */ + float getX(); + + /** + * float y = 3; + * @return The y. + */ + float getY(); + } + /** + * Protobuf type {@code RelativePosition} + */ + public static final class RelativePosition extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:RelativePosition) + RelativePositionOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + RelativePosition.class.getName()); + } + // Use RelativePosition.newBuilder() to construct. + private RelativePosition(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private RelativePosition() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_RelativePosition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_RelativePosition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.RelativePosition.class, com.openpositioning.PositionMe.Traj.RelativePosition.Builder.class); + } + + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + *
+     * milliseconds from the start_timestamp
+     * 
+ * + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int X_FIELD_NUMBER = 2; + private float x_ = 0F; + /** + *
+     * 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
+     * 
+ * + * float x = 2; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 3; + private float y_ = 0F; + /** + * float y = 3; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relativeTimestamp_ != 0L) { + output.writeInt64(1, relativeTimestamp_); + } + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(2, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(3, y_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, y_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.RelativePosition)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.RelativePosition other = (com.openpositioning.PositionMe.Traj.RelativePosition) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().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) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.RelativePosition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.RelativePosition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.RelativePosition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code RelativePosition} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:RelativePosition) + com.openpositioning.PositionMe.Traj.RelativePositionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_RelativePosition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_RelativePosition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.RelativePosition.class, com.openpositioning.PositionMe.Traj.RelativePosition.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.RelativePosition.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + x_ = 0F; + y_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_RelativePosition_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RelativePosition getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.RelativePosition.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RelativePosition build() { + com.openpositioning.PositionMe.Traj.RelativePosition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RelativePosition buildPartial() { + com.openpositioning.PositionMe.Traj.RelativePosition result = new com.openpositioning.PositionMe.Traj.RelativePosition(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.RelativePosition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.y_ = y_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.RelativePosition) { + return mergeFrom((com.openpositioning.PositionMe.Traj.RelativePosition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.RelativePosition other) { + if (other == com.openpositioning.PositionMe.Traj.RelativePosition.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 21: { + x_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: { + y_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + *
+       * milliseconds from the start_timestamp
+       * 
+ * + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + *
+       * milliseconds from the start_timestamp
+       * 
+ * + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * milliseconds from the start_timestamp
+       * 
+ * + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + 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
+       * 
+ * + * float x = 2; + * @return The x. + */ + @java.lang.Override + 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
+       * 
+ * + * float x = 2; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + bitField0_ |= 0x00000002; + 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
+       * 
+ * + * float x = 2; + * @return This builder for chaining. + */ + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000002); + x_ = 0F; + onChanged(); + return this; + } + + private float y_ ; + /** + * float y = 3; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + * float y = 3; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * float y = 3; + * @return This builder for chaining. + */ + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000004); + y_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:RelativePosition) + } + + // @@protoc_insertion_point(class_scope:RelativePosition) + private static final com.openpositioning.PositionMe.Traj.RelativePosition DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.RelativePosition(); + } + + public static com.openpositioning.PositionMe.Traj.RelativePosition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelativePosition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RelativePosition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface IMUReadingOrBuilder extends + // @@protoc_insertion_point(interface_extends:IMUReading) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * milliseconds
+     * 
+ * + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); + + /** + *
+     * Accelerometer [m/s^2]
+     * 
+ * + * .Vector3 acc = 2; + * @return Whether the acc field is set. + */ + boolean hasAcc(); + /** + *
+     * Accelerometer [m/s^2]
+     * 
+ * + * .Vector3 acc = 2; + * @return The acc. + */ + com.openpositioning.PositionMe.Traj.Vector3 getAcc(); + /** + *
+     * Accelerometer [m/s^2]
+     * 
+ * + * .Vector3 acc = 2; + */ + com.openpositioning.PositionMe.Traj.Vector3OrBuilder getAccOrBuilder(); + + /** + *
+     * Gyroscope [radians/s]
+     * 
+ * + * .Vector3 gyr = 3; + * @return Whether the gyr field is set. + */ + boolean hasGyr(); + /** + *
+     * Gyroscope [radians/s]
+     * 
+ * + * .Vector3 gyr = 3; + * @return The gyr. + */ + com.openpositioning.PositionMe.Traj.Vector3 getGyr(); + /** + *
+     * Gyroscope [radians/s]
+     * 
+ * + * .Vector3 gyr = 3; + */ + com.openpositioning.PositionMe.Traj.Vector3OrBuilder getGyrOrBuilder(); + + /** + *
+     * Orientation [unitless], 4 components should square sum to ~1
+     * 
+ * + * .Quaternion rotation_vector = 4; + * @return Whether the rotationVector field is set. + */ + boolean hasRotationVector(); + /** + *
+     * Orientation [unitless], 4 components should square sum to ~1
+     * 
+ * + * .Quaternion rotation_vector = 4; + * @return The rotationVector. + */ + com.openpositioning.PositionMe.Traj.Quaternion getRotationVector(); + /** + *
+     * Orientation [unitless], 4 components should square sum to ~1
+     * 
+ * + * .Quaternion rotation_vector = 4; + */ + com.openpositioning.PositionMe.Traj.QuaternionOrBuilder getRotationVectorOrBuilder(); + + /** + *
+     * Number of steps so far
+     * 
+ * + * int32 step_count = 5; + * @return The stepCount. + */ + int getStepCount(); + } + /** + * Protobuf type {@code IMUReading} + */ + public static final class IMUReading extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:IMUReading) + IMUReadingOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + IMUReading.class.getName()); + } + // Use IMUReading.newBuilder() to construct. + private IMUReading(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private IMUReading() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_IMUReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_IMUReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.IMUReading.class, com.openpositioning.PositionMe.Traj.IMUReading.Builder.class); + } + + private int bitField0_; + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + *
+     * milliseconds
+     * 
+ * + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int ACC_FIELD_NUMBER = 2; + private com.openpositioning.PositionMe.Traj.Vector3 acc_; + /** + *
+     * Accelerometer [m/s^2]
+     * 
+ * + * .Vector3 acc = 2; + * @return Whether the acc field is set. + */ + @java.lang.Override + public boolean hasAcc() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Accelerometer [m/s^2]
+     * 
+ * + * .Vector3 acc = 2; + * @return The acc. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3 getAcc() { + return acc_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : acc_; + } + /** + *
+     * Accelerometer [m/s^2]
+     * 
+ * + * .Vector3 acc = 2; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3OrBuilder getAccOrBuilder() { + return acc_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : acc_; + } + + public static final int GYR_FIELD_NUMBER = 3; + private com.openpositioning.PositionMe.Traj.Vector3 gyr_; + /** + *
+     * Gyroscope [radians/s]
+     * 
+ * + * .Vector3 gyr = 3; + * @return Whether the gyr field is set. + */ + @java.lang.Override + public boolean hasGyr() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Gyroscope [radians/s]
+     * 
+ * + * .Vector3 gyr = 3; + * @return The gyr. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3 getGyr() { + return gyr_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : gyr_; + } + /** + *
+     * Gyroscope [radians/s]
+     * 
+ * + * .Vector3 gyr = 3; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3OrBuilder getGyrOrBuilder() { + return gyr_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : gyr_; + } + + public static final int ROTATION_VECTOR_FIELD_NUMBER = 4; + private com.openpositioning.PositionMe.Traj.Quaternion rotationVector_; + /** + *
+     * Orientation [unitless], 4 components should square sum to ~1
+     * 
+ * + * .Quaternion rotation_vector = 4; + * @return Whether the rotationVector field is set. + */ + @java.lang.Override + public boolean hasRotationVector() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Orientation [unitless], 4 components should square sum to ~1
+     * 
+ * + * .Quaternion rotation_vector = 4; + * @return The rotationVector. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Quaternion getRotationVector() { + return rotationVector_ == null ? com.openpositioning.PositionMe.Traj.Quaternion.getDefaultInstance() : rotationVector_; + } + /** + *
+     * Orientation [unitless], 4 components should square sum to ~1
+     * 
+ * + * .Quaternion rotation_vector = 4; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.QuaternionOrBuilder getRotationVectorOrBuilder() { + return rotationVector_ == null ? com.openpositioning.PositionMe.Traj.Quaternion.getDefaultInstance() : rotationVector_; + } + + public static final int STEP_COUNT_FIELD_NUMBER = 5; + private int stepCount_ = 0; + /** + *
+     * Number of steps so far
+     * 
+ * + * int32 step_count = 5; + * @return The stepCount. + */ + @java.lang.Override + public int getStepCount() { + return stepCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relativeTimestamp_ != 0L) { + output.writeInt64(1, relativeTimestamp_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getAcc()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getGyr()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getRotationVector()); + } + if (stepCount_ != 0) { + output.writeInt32(5, stepCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getAcc()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getGyr()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getRotationVector()); + } + if (stepCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, stepCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.IMUReading)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.IMUReading other = (com.openpositioning.PositionMe.Traj.IMUReading) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (hasAcc() != other.hasAcc()) return false; + if (hasAcc()) { + if (!getAcc() + .equals(other.getAcc())) return false; + } + if (hasGyr() != other.hasGyr()) return false; + if (hasGyr()) { + if (!getGyr() + .equals(other.getGyr())) return false; + } + if (hasRotationVector() != other.hasRotationVector()) return false; + if (hasRotationVector()) { + if (!getRotationVector() + .equals(other.getRotationVector())) return false; + } + if (getStepCount() + != other.getStepCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRelativeTimestamp()); + if (hasAcc()) { + hash = (37 * hash) + ACC_FIELD_NUMBER; + hash = (53 * hash) + getAcc().hashCode(); + } + if (hasGyr()) { + hash = (37 * hash) + GYR_FIELD_NUMBER; + hash = (53 * hash) + getGyr().hashCode(); + } + if (hasRotationVector()) { + hash = (37 * hash) + ROTATION_VECTOR_FIELD_NUMBER; + hash = (53 * hash) + getRotationVector().hashCode(); + } + hash = (37 * hash) + STEP_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getStepCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.IMUReading parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.IMUReading parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.IMUReading prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code IMUReading} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:IMUReading) + com.openpositioning.PositionMe.Traj.IMUReadingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_IMUReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_IMUReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.IMUReading.class, com.openpositioning.PositionMe.Traj.IMUReading.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.IMUReading.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccFieldBuilder(); + getGyrFieldBuilder(); + getRotationVectorFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + acc_ = null; + if (accBuilder_ != null) { + accBuilder_.dispose(); + accBuilder_ = null; + } + gyr_ = null; + if (gyrBuilder_ != null) { + gyrBuilder_.dispose(); + gyrBuilder_ = null; + } + rotationVector_ = null; + if (rotationVectorBuilder_ != null) { + rotationVectorBuilder_.dispose(); + rotationVectorBuilder_ = null; + } + stepCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_IMUReading_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.IMUReading getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.IMUReading.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.IMUReading build() { + com.openpositioning.PositionMe.Traj.IMUReading result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.IMUReading buildPartial() { + com.openpositioning.PositionMe.Traj.IMUReading result = new com.openpositioning.PositionMe.Traj.IMUReading(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.IMUReading result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.acc_ = accBuilder_ == null + ? acc_ + : accBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.gyr_ = gyrBuilder_ == null + ? gyr_ + : gyrBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.rotationVector_ = rotationVectorBuilder_ == null + ? rotationVector_ + : rotationVectorBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.stepCount_ = stepCount_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.IMUReading) { + return mergeFrom((com.openpositioning.PositionMe.Traj.IMUReading)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.IMUReading other) { + if (other == com.openpositioning.PositionMe.Traj.IMUReading.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.hasAcc()) { + mergeAcc(other.getAcc()); + } + if (other.hasGyr()) { + mergeGyr(other.getGyr()); + } + if (other.hasRotationVector()) { + mergeRotationVector(other.getRotationVector()); + } + if (other.getStepCount() != 0) { + setStepCount(other.getStepCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getAccFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getGyrFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getRotationVectorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + stepCount_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + *
+       * milliseconds
+       * 
+ * + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + *
+       * milliseconds
+       * 
+ * + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * milliseconds
+       * 
+ * + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private com.openpositioning.PositionMe.Traj.Vector3 acc_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder> accBuilder_; + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + * @return Whether the acc field is set. + */ + public boolean hasAcc() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + * @return The acc. + */ + public com.openpositioning.PositionMe.Traj.Vector3 getAcc() { + if (accBuilder_ == null) { + return acc_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : acc_; + } else { + return accBuilder_.getMessage(); + } + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + */ + public Builder setAcc(com.openpositioning.PositionMe.Traj.Vector3 value) { + if (accBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + acc_ = value; + } else { + accBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + */ + public Builder setAcc( + com.openpositioning.PositionMe.Traj.Vector3.Builder builderForValue) { + if (accBuilder_ == null) { + acc_ = builderForValue.build(); + } else { + accBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + */ + public Builder mergeAcc(com.openpositioning.PositionMe.Traj.Vector3 value) { + if (accBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + acc_ != null && + acc_ != com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance()) { + getAccBuilder().mergeFrom(value); + } else { + acc_ = value; + } + } else { + accBuilder_.mergeFrom(value); + } + if (acc_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + */ + public Builder clearAcc() { + bitField0_ = (bitField0_ & ~0x00000002); + acc_ = null; + if (accBuilder_ != null) { + accBuilder_.dispose(); + accBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + */ + public com.openpositioning.PositionMe.Traj.Vector3.Builder getAccBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAccFieldBuilder().getBuilder(); + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + */ + public com.openpositioning.PositionMe.Traj.Vector3OrBuilder getAccOrBuilder() { + if (accBuilder_ != null) { + return accBuilder_.getMessageOrBuilder(); + } else { + return acc_ == null ? + com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : acc_; + } + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder> + getAccFieldBuilder() { + if (accBuilder_ == null) { + accBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder>( + getAcc(), + getParentForChildren(), + isClean()); + acc_ = null; + } + return accBuilder_; + } + + private com.openpositioning.PositionMe.Traj.Vector3 gyr_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder> gyrBuilder_; + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + * @return Whether the gyr field is set. + */ + public boolean hasGyr() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + * @return The gyr. + */ + public com.openpositioning.PositionMe.Traj.Vector3 getGyr() { + if (gyrBuilder_ == null) { + return gyr_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : gyr_; + } else { + return gyrBuilder_.getMessage(); + } + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + */ + public Builder setGyr(com.openpositioning.PositionMe.Traj.Vector3 value) { + if (gyrBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gyr_ = value; + } else { + gyrBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + */ + public Builder setGyr( + com.openpositioning.PositionMe.Traj.Vector3.Builder builderForValue) { + if (gyrBuilder_ == null) { + gyr_ = builderForValue.build(); + } else { + gyrBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + */ + public Builder mergeGyr(com.openpositioning.PositionMe.Traj.Vector3 value) { + if (gyrBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + gyr_ != null && + gyr_ != com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance()) { + getGyrBuilder().mergeFrom(value); + } else { + gyr_ = value; + } + } else { + gyrBuilder_.mergeFrom(value); + } + if (gyr_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + */ + public Builder clearGyr() { + bitField0_ = (bitField0_ & ~0x00000004); + gyr_ = null; + if (gyrBuilder_ != null) { + gyrBuilder_.dispose(); + gyrBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + */ + public com.openpositioning.PositionMe.Traj.Vector3.Builder getGyrBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getGyrFieldBuilder().getBuilder(); + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + */ + public com.openpositioning.PositionMe.Traj.Vector3OrBuilder getGyrOrBuilder() { + if (gyrBuilder_ != null) { + return gyrBuilder_.getMessageOrBuilder(); + } else { + return gyr_ == null ? + com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : gyr_; + } + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder> + getGyrFieldBuilder() { + if (gyrBuilder_ == null) { + gyrBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder>( + getGyr(), + getParentForChildren(), + isClean()); + gyr_ = null; + } + return gyrBuilder_; + } + + private com.openpositioning.PositionMe.Traj.Quaternion rotationVector_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Quaternion, com.openpositioning.PositionMe.Traj.Quaternion.Builder, com.openpositioning.PositionMe.Traj.QuaternionOrBuilder> rotationVectorBuilder_; + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + * @return Whether the rotationVector field is set. + */ + public boolean hasRotationVector() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + * @return The rotationVector. + */ + public com.openpositioning.PositionMe.Traj.Quaternion getRotationVector() { + if (rotationVectorBuilder_ == null) { + return rotationVector_ == null ? com.openpositioning.PositionMe.Traj.Quaternion.getDefaultInstance() : rotationVector_; + } else { + return rotationVectorBuilder_.getMessage(); + } + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + */ + public Builder setRotationVector(com.openpositioning.PositionMe.Traj.Quaternion value) { + if (rotationVectorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rotationVector_ = value; + } else { + rotationVectorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + */ + public Builder setRotationVector( + com.openpositioning.PositionMe.Traj.Quaternion.Builder builderForValue) { + if (rotationVectorBuilder_ == null) { + rotationVector_ = builderForValue.build(); + } else { + rotationVectorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + */ + public Builder mergeRotationVector(com.openpositioning.PositionMe.Traj.Quaternion value) { + if (rotationVectorBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + rotationVector_ != null && + rotationVector_ != com.openpositioning.PositionMe.Traj.Quaternion.getDefaultInstance()) { + getRotationVectorBuilder().mergeFrom(value); + } else { + rotationVector_ = value; + } + } else { + rotationVectorBuilder_.mergeFrom(value); + } + if (rotationVector_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + */ + public Builder clearRotationVector() { + bitField0_ = (bitField0_ & ~0x00000008); + rotationVector_ = null; + if (rotationVectorBuilder_ != null) { + rotationVectorBuilder_.dispose(); + rotationVectorBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + */ + public com.openpositioning.PositionMe.Traj.Quaternion.Builder getRotationVectorBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getRotationVectorFieldBuilder().getBuilder(); + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + */ + public com.openpositioning.PositionMe.Traj.QuaternionOrBuilder getRotationVectorOrBuilder() { + if (rotationVectorBuilder_ != null) { + return rotationVectorBuilder_.getMessageOrBuilder(); + } else { + return rotationVector_ == null ? + com.openpositioning.PositionMe.Traj.Quaternion.getDefaultInstance() : rotationVector_; + } + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Quaternion, com.openpositioning.PositionMe.Traj.Quaternion.Builder, com.openpositioning.PositionMe.Traj.QuaternionOrBuilder> + getRotationVectorFieldBuilder() { + if (rotationVectorBuilder_ == null) { + rotationVectorBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Quaternion, com.openpositioning.PositionMe.Traj.Quaternion.Builder, com.openpositioning.PositionMe.Traj.QuaternionOrBuilder>( + getRotationVector(), + getParentForChildren(), + isClean()); + rotationVector_ = null; + } + return rotationVectorBuilder_; + } + + private int stepCount_ ; + /** + *
+       * Number of steps so far
+       * 
+ * + * int32 step_count = 5; + * @return The stepCount. + */ + @java.lang.Override + public int getStepCount() { + return stepCount_; + } + /** + *
+       * Number of steps so far
+       * 
+ * + * int32 step_count = 5; + * @param value The stepCount to set. + * @return This builder for chaining. + */ + public Builder setStepCount(int value) { + + stepCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * Number of steps so far
+       * 
+ * + * int32 step_count = 5; + * @return This builder for chaining. + */ + public Builder clearStepCount() { + bitField0_ = (bitField0_ & ~0x00000010); + stepCount_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:IMUReading) + } + + // @@protoc_insertion_point(class_scope:IMUReading) + private static final com.openpositioning.PositionMe.Traj.IMUReading DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.IMUReading(); + } + + public static com.openpositioning.PositionMe.Traj.IMUReading getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IMUReading parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.IMUReading getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MagnetometerReadingOrBuilder extends + // @@protoc_insertion_point(interface_extends:MagnetometerReading) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); + + /** + *
+     * Magnetometer [uT]
+     * 
+ * + * .Vector3 mag = 2; + * @return Whether the mag field is set. + */ + boolean hasMag(); + /** + *
+     * Magnetometer [uT]
+     * 
+ * + * .Vector3 mag = 2; + * @return The mag. + */ + com.openpositioning.PositionMe.Traj.Vector3 getMag(); + /** + *
+     * Magnetometer [uT]
+     * 
+ * + * .Vector3 mag = 2; + */ + com.openpositioning.PositionMe.Traj.Vector3OrBuilder getMagOrBuilder(); + } + /** + * Protobuf type {@code MagnetometerReading} + */ + public static final class MagnetometerReading extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:MagnetometerReading) + MagnetometerReadingOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + MagnetometerReading.class.getName()); + } + // Use MagnetometerReading.newBuilder() to construct. + private MagnetometerReading(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MagnetometerReading() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_MagnetometerReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_MagnetometerReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.MagnetometerReading.class, com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder.class); + } + + private int bitField0_; + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int MAG_FIELD_NUMBER = 2; + private com.openpositioning.PositionMe.Traj.Vector3 mag_; + /** + *
+     * Magnetometer [uT]
+     * 
+ * + * .Vector3 mag = 2; + * @return Whether the mag field is set. + */ + @java.lang.Override + public boolean hasMag() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Magnetometer [uT]
+     * 
+ * + * .Vector3 mag = 2; + * @return The mag. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3 getMag() { + return mag_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : mag_; + } + /** + *
+     * Magnetometer [uT]
+     * 
+ * + * .Vector3 mag = 2; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3OrBuilder getMagOrBuilder() { + return mag_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : mag_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relativeTimestamp_ != 0L) { + output.writeInt64(1, relativeTimestamp_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getMag()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMag()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.MagnetometerReading)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.MagnetometerReading other = (com.openpositioning.PositionMe.Traj.MagnetometerReading) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (hasMag() != other.hasMag()) return false; + if (hasMag()) { + if (!getMag() + .equals(other.getMag())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRelativeTimestamp()); + if (hasMag()) { + hash = (37 * hash) + MAG_FIELD_NUMBER; + hash = (53 * hash) + getMag().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.MagnetometerReading prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code MagnetometerReading} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:MagnetometerReading) + com.openpositioning.PositionMe.Traj.MagnetometerReadingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_MagnetometerReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_MagnetometerReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.MagnetometerReading.class, com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.MagnetometerReading.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getMagFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + mag_ = null; + if (magBuilder_ != null) { + magBuilder_.dispose(); + magBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_MagnetometerReading_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.MagnetometerReading getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.MagnetometerReading.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.MagnetometerReading build() { + com.openpositioning.PositionMe.Traj.MagnetometerReading result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.MagnetometerReading buildPartial() { + com.openpositioning.PositionMe.Traj.MagnetometerReading result = new com.openpositioning.PositionMe.Traj.MagnetometerReading(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.MagnetometerReading result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.mag_ = magBuilder_ == null + ? mag_ + : magBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.MagnetometerReading) { + return mergeFrom((com.openpositioning.PositionMe.Traj.MagnetometerReading)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.MagnetometerReading other) { + if (other == com.openpositioning.PositionMe.Traj.MagnetometerReading.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.hasMag()) { + mergeMag(other.getMag()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getMagFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private com.openpositioning.PositionMe.Traj.Vector3 mag_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder> magBuilder_; + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + * @return Whether the mag field is set. + */ + public boolean hasMag() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + * @return The mag. + */ + public com.openpositioning.PositionMe.Traj.Vector3 getMag() { + if (magBuilder_ == null) { + return mag_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : mag_; + } else { + return magBuilder_.getMessage(); + } + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + */ + public Builder setMag(com.openpositioning.PositionMe.Traj.Vector3 value) { + if (magBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mag_ = value; + } else { + magBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + */ + public Builder setMag( + com.openpositioning.PositionMe.Traj.Vector3.Builder builderForValue) { + if (magBuilder_ == null) { + mag_ = builderForValue.build(); + } else { + magBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + */ + public Builder mergeMag(com.openpositioning.PositionMe.Traj.Vector3 value) { + if (magBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + mag_ != null && + mag_ != com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance()) { + getMagBuilder().mergeFrom(value); + } else { + mag_ = value; + } + } else { + magBuilder_.mergeFrom(value); + } + if (mag_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + */ + public Builder clearMag() { + bitField0_ = (bitField0_ & ~0x00000002); + mag_ = null; + if (magBuilder_ != null) { + magBuilder_.dispose(); + magBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + */ + public com.openpositioning.PositionMe.Traj.Vector3.Builder getMagBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMagFieldBuilder().getBuilder(); + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + */ + public com.openpositioning.PositionMe.Traj.Vector3OrBuilder getMagOrBuilder() { + if (magBuilder_ != null) { + return magBuilder_.getMessageOrBuilder(); + } else { + return mag_ == null ? + com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : mag_; + } + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder> + getMagFieldBuilder() { + if (magBuilder_ == null) { + magBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder>( + getMag(), + getParentForChildren(), + isClean()); + mag_ = null; + } + return magBuilder_; + } + + // @@protoc_insertion_point(builder_scope:MagnetometerReading) + } + + // @@protoc_insertion_point(class_scope:MagnetometerReading) + private static final com.openpositioning.PositionMe.Traj.MagnetometerReading DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.MagnetometerReading(); + } + + public static com.openpositioning.PositionMe.Traj.MagnetometerReading getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MagnetometerReading parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.MagnetometerReading getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BarometerReadingOrBuilder extends + // @@protoc_insertion_point(interface_extends:BarometerReading) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); + + /** + *
+     * mbar
+     * 
+ * + * float pressure = 2; + * @return The pressure. + */ + float getPressure(); + } + /** + * Protobuf type {@code BarometerReading} + */ + public static final class BarometerReading extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:BarometerReading) + BarometerReadingOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + BarometerReading.class.getName()); + } + // Use BarometerReading.newBuilder() to construct. + private BarometerReading(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BarometerReading() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_BarometerReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_BarometerReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.BarometerReading.class, com.openpositioning.PositionMe.Traj.BarometerReading.Builder.class); + } + + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int PRESSURE_FIELD_NUMBER = 2; + private float pressure_ = 0F; + /** + *
+     * mbar
+     * 
+ * + * float pressure = 2; + * @return The pressure. + */ + @java.lang.Override + public float getPressure() { + return pressure_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relativeTimestamp_ != 0L) { + output.writeInt64(1, relativeTimestamp_); + } + if (java.lang.Float.floatToRawIntBits(pressure_) != 0) { + output.writeFloat(2, pressure_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (java.lang.Float.floatToRawIntBits(pressure_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, pressure_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.BarometerReading)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.BarometerReading other = (com.openpositioning.PositionMe.Traj.BarometerReading) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (java.lang.Float.floatToIntBits(getPressure()) + != java.lang.Float.floatToIntBits( + other.getPressure())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().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) + java.lang.Float.floatToIntBits( + getPressure()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.BarometerReading parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.BarometerReading parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.BarometerReading prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code BarometerReading} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:BarometerReading) + com.openpositioning.PositionMe.Traj.BarometerReadingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_BarometerReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_BarometerReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.BarometerReading.class, com.openpositioning.PositionMe.Traj.BarometerReading.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.BarometerReading.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + pressure_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_BarometerReading_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BarometerReading getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.BarometerReading.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BarometerReading build() { + com.openpositioning.PositionMe.Traj.BarometerReading result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BarometerReading buildPartial() { + com.openpositioning.PositionMe.Traj.BarometerReading result = new com.openpositioning.PositionMe.Traj.BarometerReading(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.BarometerReading result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pressure_ = pressure_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.BarometerReading) { + return mergeFrom((com.openpositioning.PositionMe.Traj.BarometerReading)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.BarometerReading other) { + if (other == com.openpositioning.PositionMe.Traj.BarometerReading.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.getPressure() != 0F) { + setPressure(other.getPressure()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 21: { + pressure_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private float pressure_ ; + /** + *
+       * mbar
+       * 
+ * + * float pressure = 2; + * @return The pressure. + */ + @java.lang.Override + public float getPressure() { + return pressure_; + } + /** + *
+       * mbar
+       * 
+ * + * float pressure = 2; + * @param value The pressure to set. + * @return This builder for chaining. + */ + public Builder setPressure(float value) { + + pressure_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * mbar
+       * 
+ * + * float pressure = 2; + * @return This builder for chaining. + */ + public Builder clearPressure() { + bitField0_ = (bitField0_ & ~0x00000002); + pressure_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:BarometerReading) + } + + // @@protoc_insertion_point(class_scope:BarometerReading) + private static final com.openpositioning.PositionMe.Traj.BarometerReading DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.BarometerReading(); + } + + public static com.openpositioning.PositionMe.Traj.BarometerReading getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BarometerReading parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BarometerReading getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LightReadingOrBuilder extends + // @@protoc_insertion_point(interface_extends:LightReading) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); + + /** + *
+     * lux
+     * 
+ * + * float light = 2; + * @return The light. + */ + float getLight(); + } + /** + * Protobuf type {@code LightReading} + */ + public static final class LightReading extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:LightReading) + LightReadingOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + LightReading.class.getName()); + } + // Use LightReading.newBuilder() to construct. + private LightReading(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LightReading() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_LightReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_LightReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.LightReading.class, com.openpositioning.PositionMe.Traj.LightReading.Builder.class); + } + + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int LIGHT_FIELD_NUMBER = 2; + private float light_ = 0F; + /** + *
+     * lux
+     * 
+ * + * float light = 2; + * @return The light. + */ + @java.lang.Override + public float getLight() { + return light_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relativeTimestamp_ != 0L) { + output.writeInt64(1, relativeTimestamp_); + } + if (java.lang.Float.floatToRawIntBits(light_) != 0) { + output.writeFloat(2, light_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (java.lang.Float.floatToRawIntBits(light_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, light_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.LightReading)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.LightReading other = (com.openpositioning.PositionMe.Traj.LightReading) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (java.lang.Float.floatToIntBits(getLight()) + != java.lang.Float.floatToIntBits( + other.getLight())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().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) + java.lang.Float.floatToIntBits( + getLight()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.LightReading parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.LightReading parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.LightReading prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code LightReading} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:LightReading) + com.openpositioning.PositionMe.Traj.LightReadingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_LightReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_LightReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.LightReading.class, com.openpositioning.PositionMe.Traj.LightReading.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.LightReading.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + light_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_LightReading_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.LightReading getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.LightReading.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.LightReading build() { + com.openpositioning.PositionMe.Traj.LightReading result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.LightReading buildPartial() { + com.openpositioning.PositionMe.Traj.LightReading result = new com.openpositioning.PositionMe.Traj.LightReading(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.LightReading result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.light_ = light_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.LightReading) { + return mergeFrom((com.openpositioning.PositionMe.Traj.LightReading)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.LightReading other) { + if (other == com.openpositioning.PositionMe.Traj.LightReading.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.getLight() != 0F) { + setLight(other.getLight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 21: { + light_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private float light_ ; + /** + *
+       * lux
+       * 
+ * + * float light = 2; + * @return The light. + */ + @java.lang.Override + public float getLight() { + return light_; + } + /** + *
+       * lux
+       * 
+ * + * float light = 2; + * @param value The light to set. + * @return This builder for chaining. + */ + public Builder setLight(float value) { + + light_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * lux
+       * 
+ * + * float light = 2; + * @return This builder for chaining. + */ + public Builder clearLight() { + bitField0_ = (bitField0_ & ~0x00000002); + light_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:LightReading) + } + + // @@protoc_insertion_point(class_scope:LightReading) + private static final com.openpositioning.PositionMe.Traj.LightReading DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.LightReading(); + } + + public static com.openpositioning.PositionMe.Traj.LightReading getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LightReading parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.LightReading getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ProximityReadingOrBuilder extends + // @@protoc_insertion_point(interface_extends:ProximityReading) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); + + /** + *
+     * cm
+     * 
+ * + * float distance = 2; + * @return The distance. + */ + float getDistance(); + } + /** + * Protobuf type {@code ProximityReading} + */ + public static final class ProximityReading extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:ProximityReading) + ProximityReadingOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + ProximityReading.class.getName()); + } + // Use ProximityReading.newBuilder() to construct. + private ProximityReading(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ProximityReading() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_ProximityReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_ProximityReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.ProximityReading.class, com.openpositioning.PositionMe.Traj.ProximityReading.Builder.class); + } + + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int DISTANCE_FIELD_NUMBER = 2; + private float distance_ = 0F; + /** + *
+     * cm
+     * 
+ * + * float distance = 2; + * @return The distance. + */ + @java.lang.Override + public float getDistance() { + return distance_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relativeTimestamp_ != 0L) { + output.writeInt64(1, relativeTimestamp_); + } + if (java.lang.Float.floatToRawIntBits(distance_) != 0) { + output.writeFloat(2, distance_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (java.lang.Float.floatToRawIntBits(distance_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, distance_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.ProximityReading)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.ProximityReading other = (com.openpositioning.PositionMe.Traj.ProximityReading) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (java.lang.Float.floatToIntBits(getDistance()) + != java.lang.Float.floatToIntBits( + other.getDistance())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRelativeTimestamp()); + hash = (37 * hash) + DISTANCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getDistance()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.ProximityReading parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.ProximityReading parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.ProximityReading prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code ProximityReading} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:ProximityReading) + com.openpositioning.PositionMe.Traj.ProximityReadingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_ProximityReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_ProximityReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.ProximityReading.class, com.openpositioning.PositionMe.Traj.ProximityReading.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.ProximityReading.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + distance_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_ProximityReading_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.ProximityReading getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.ProximityReading.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.ProximityReading build() { + com.openpositioning.PositionMe.Traj.ProximityReading result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.ProximityReading buildPartial() { + com.openpositioning.PositionMe.Traj.ProximityReading result = new com.openpositioning.PositionMe.Traj.ProximityReading(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.ProximityReading result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.distance_ = distance_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.ProximityReading) { + return mergeFrom((com.openpositioning.PositionMe.Traj.ProximityReading)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.ProximityReading other) { + if (other == com.openpositioning.PositionMe.Traj.ProximityReading.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.getDistance() != 0F) { + setDistance(other.getDistance()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 21: { + distance_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private float distance_ ; + /** + *
+       * cm
+       * 
+ * + * float distance = 2; + * @return The distance. + */ + @java.lang.Override + public float getDistance() { + return distance_; + } + /** + *
+       * cm
+       * 
+ * + * float distance = 2; + * @param value The distance to set. + * @return This builder for chaining. + */ + public Builder setDistance(float value) { + + distance_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * cm
+       * 
+ * + * float distance = 2; + * @return This builder for chaining. + */ + public Builder clearDistance() { + bitField0_ = (bitField0_ & ~0x00000002); + distance_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ProximityReading) + } + + // @@protoc_insertion_point(class_scope:ProximityReading) + private static final com.openpositioning.PositionMe.Traj.ProximityReading DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new Trajectory(); + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.ProximityReading(); } - public static Trajectory getDefaultInstance() { + public static com.openpositioning.PositionMe.Traj.ProximityReading getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Trajectory parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Trajectory(input, extensionRegistry); + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProximityReading parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } - @Override - public com.google.protobuf.Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } - public Trajectory getDefaultInstanceForType() { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.ProximityReading getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface Pdr_SampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:Pdr_Sample) - com.google.protobuf.MessageOrBuilder { + public interface GNSSPositionOrBuilder extends + // @@protoc_insertion_point(interface_extends:GNSSPosition) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); /** *
-     * milliseconds from the start_timestamp
+     * degrees (minimum 6 significant figures)
+     * latitude between -90 and 90
      * 
* - * optional int64 relative_timestamp = 1; + * double latitude = 2; + * @return The latitude. */ - long getRelativeTimestamp(); + double getLatitude(); /** *
-     * 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
+     * longitude between -180 and 180
      * 
* - * optional float x = 2; + * double longitude = 3; + * @return The longitude. */ - float getX(); + double getLongitude(); /** - * optional float y = 3; + *
+     * metres
+     * 
+ * + * double altitude = 4; + * @return The altitude. */ - float getY(); + double getAltitude(); + + /** + *
+     * floor name
+     * 
+ * + * optional string floor = 5; + * @return Whether the floor field is set. + */ + boolean hasFloor(); + /** + *
+     * floor name
+     * 
+ * + * optional string floor = 5; + * @return The floor. + */ + java.lang.String getFloor(); + /** + *
+     * floor name
+     * 
+ * + * optional string floor = 5; + * @return The bytes for floor. + */ + com.google.protobuf.ByteString + getFloorBytes(); } /** - * Protobuf type {@code Pdr_Sample} + * Protobuf type {@code GNSSPosition} */ - 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) { + public static final class GNSSPosition extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:GNSSPosition) + GNSSPositionOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + GNSSPosition.class.getName()); + } + // Use GNSSPosition.newBuilder() to construct. + private GNSSPosition(com.google.protobuf.GeneratedMessage.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: { + private GNSSPosition() { + floor_ = ""; + } - relativeTimestamp_ = input.readInt64(); - break; - } - case 21: { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSPosition_descriptor; + } - x_ = input.readFloat(); - break; - } - case 29: { + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSPosition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.GNSSPosition.class, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder.class); + } - 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(); - } + private int bitField0_; + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_Pdr_Sample_descriptor; + + public static final int LATITUDE_FIELD_NUMBER = 2; + private double latitude_ = 0D; + /** + *
+     * degrees (minimum 6 significant figures)
+     * latitude between -90 and 90
+     * 
+ * + * double latitude = 2; + * @return The latitude. + */ + @java.lang.Override + public double getLatitude() { + return latitude_; + } + + public static final int LONGITUDE_FIELD_NUMBER = 3; + private double longitude_ = 0D; + /** + *
+     * longitude between -180 and 180
+     * 
+ * + * double longitude = 3; + * @return The longitude. + */ + @java.lang.Override + public double getLongitude() { + return longitude_; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Pdr_Sample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Pdr_Sample.class, Builder.class); + public static final int ALTITUDE_FIELD_NUMBER = 4; + private double altitude_ = 0D; + /** + *
+     * metres
+     * 
+ * + * double altitude = 4; + * @return The altitude. + */ + @java.lang.Override + public double getAltitude() { + return altitude_; } - public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; - private long relativeTimestamp_; + public static final int FLOOR_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object floor_ = ""; /** *
-     * milliseconds from the start_timestamp
+     * floor name
      * 
* - * optional int64 relative_timestamp = 1; + * optional string floor = 5; + * @return Whether the floor field is set. */ - public long getRelativeTimestamp() { - return relativeTimestamp_; + @java.lang.Override + public boolean hasFloor() { + return ((bitField0_ & 0x00000001) != 0); } - - 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
+     * floor name
      * 
* - * optional float x = 2; + * optional string floor = 5; + * @return The floor. */ - public float getX() { - return x_; + @java.lang.Override + public java.lang.String getFloor() { + java.lang.Object ref = floor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + floor_ = s; + return s; + } } - - public static final int Y_FIELD_NUMBER = 3; - private float y_; /** - * optional float y = 3; + *
+     * floor name
+     * 
+ * + * optional string floor = 5; + * @return The bytes for floor. */ - public float getY() { - return y_; + @java.lang.Override + public com.google.protobuf.ByteString + getFloorBytes() { + java.lang.Object ref = floor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + floor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -5027,19 +12292,28 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { if (relativeTimestamp_ != 0L) { output.writeInt64(1, relativeTimestamp_); } - if (x_ != 0F) { - output.writeFloat(2, x_); + if (java.lang.Double.doubleToRawLongBits(latitude_) != 0) { + output.writeDouble(2, latitude_); } - if (y_ != 0F) { - output.writeFloat(3, y_); + if (java.lang.Double.doubleToRawLongBits(longitude_) != 0) { + output.writeDouble(3, longitude_); + } + if (java.lang.Double.doubleToRawLongBits(altitude_) != 0) { + output.writeDouble(4, altitude_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, floor_); } + getUnknownFields().writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -5047,789 +12321,916 @@ public int getSerializedSize() { size = 0; if (relativeTimestamp_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, relativeTimestamp_); + .computeInt64Size(1, relativeTimestamp_); } - if (x_ != 0F) { + if (java.lang.Double.doubleToRawLongBits(latitude_) != 0) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, x_); + .computeDoubleSize(2, latitude_); } - if (y_ != 0F) { + if (java.lang.Double.doubleToRawLongBits(longitude_) != 0) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, y_); + .computeDoubleSize(3, longitude_); } + if (java.lang.Double.doubleToRawLongBits(altitude_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(4, altitude_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, floor_); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj instanceof Pdr_Sample)) { + if (!(obj instanceof com.openpositioning.PositionMe.Traj.GNSSPosition)) { 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; + com.openpositioning.PositionMe.Traj.GNSSPosition other = (com.openpositioning.PositionMe.Traj.GNSSPosition) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (java.lang.Double.doubleToLongBits(getLatitude()) + != java.lang.Double.doubleToLongBits( + other.getLatitude())) return false; + if (java.lang.Double.doubleToLongBits(getLongitude()) + != java.lang.Double.doubleToLongBits( + other.getLongitude())) return false; + if (java.lang.Double.doubleToLongBits(getAltitude()) + != java.lang.Double.doubleToLongBits( + other.getAltitude())) return false; + if (hasFloor() != other.hasFloor()) return false; + if (hasFloor()) { + if (!getFloor() + .equals(other.getFloor())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - @Override + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (19 * hash) + getDescriptor().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(); + getRelativeTimestamp()); + hash = (37 * hash) + LATITUDE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLatitude())); + hash = (37 * hash) + LONGITUDE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLongitude())); + hash = (37 * hash) + ALTITUDE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getAltitude())); + if (hasFloor()) { + hash = (37 * hash) + FLOOR_FIELD_NUMBER; + hash = (53 * hash) + getFloor().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static Pdr_Sample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.GNSSPosition 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 { + public static com.openpositioning.PositionMe.Traj.GNSSPosition 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 { + public static com.openpositioning.PositionMe.Traj.GNSSPosition 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 { + public static com.openpositioning.PositionMe.Traj.GNSSPosition 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 static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(Pdr_Sample prototype) { + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.GNSSPosition prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code Pdr_Sample} + * Protobuf type {@code GNSSPosition} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:Pdr_Sample) - Pdr_SampleOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:GNSSPosition) + com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_Pdr_Sample_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSPosition_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Pdr_Sample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Pdr_Sample.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSPosition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.GNSSPosition.class, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder.class); } - // Construct using Traj.Pdr_Sample.newBuilder() + // Construct using com.openpositioning.PositionMe.Traj.GNSSPosition.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } + @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; relativeTimestamp_ = 0L; - - x_ = 0F; - - y_ = 0F; - + latitude_ = 0D; + longitude_ = 0D; + altitude_ = 0D; + floor_ = ""; return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Traj.internal_static_Pdr_Sample_descriptor; + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSPosition_descriptor; } - public Pdr_Sample getDefaultInstanceForType() { - return Pdr_Sample.getDefaultInstance(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance(); } - public Pdr_Sample build() { - Pdr_Sample result = buildPartial(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition build() { + com.openpositioning.PositionMe.Traj.GNSSPosition result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public Pdr_Sample buildPartial() { - Pdr_Sample result = new Pdr_Sample(this); - result.relativeTimestamp_ = relativeTimestamp_; - result.x_ = x_; - result.y_ = y_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition buildPartial() { + com.openpositioning.PositionMe.Traj.GNSSPosition result = new com.openpositioning.PositionMe.Traj.GNSSPosition(this); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.openpositioning.PositionMe.Traj.GNSSPosition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.latitude_ = latitude_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.longitude_ = longitude_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.altitude_ = altitude_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.floor_ = floor_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } + + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Pdr_Sample) { - return mergeFrom((Pdr_Sample)other); + if (other instanceof com.openpositioning.PositionMe.Traj.GNSSPosition) { + return mergeFrom((com.openpositioning.PositionMe.Traj.GNSSPosition)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(Pdr_Sample other) { - if (other == Pdr_Sample.getDefaultInstance()) return this; + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.GNSSPosition other) { + if (other == com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()) return this; if (other.getRelativeTimestamp() != 0L) { setRelativeTimestamp(other.getRelativeTimestamp()); } - if (other.getX() != 0F) { - setX(other.getX()); + if (other.getLatitude() != 0D) { + setLatitude(other.getLatitude()); } - if (other.getY() != 0F) { - setY(other.getY()); + if (other.getLongitude() != 0D) { + setLongitude(other.getLongitude()); } + if (other.getAltitude() != 0D) { + setAltitude(other.getAltitude()); + } + if (other.hasFloor()) { + floor_ = other.floor_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } + @java.lang.Override public final boolean isInitialized() { return true; } + @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Pdr_Sample parsedMessage = null; + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 17: { + latitude_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: { + longitude_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + case 33: { + altitude_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + case 42: { + floor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Pdr_Sample) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private long relativeTimestamp_ ; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private double latitude_ ; /** *
-       * milliseconds from the start_timestamp
+       * degrees (minimum 6 significant figures)
+       * latitude between -90 and 90
        * 
* - * optional int64 relative_timestamp = 1; + * double latitude = 2; + * @return The latitude. */ - public long getRelativeTimestamp() { - return relativeTimestamp_; + @java.lang.Override + public double getLatitude() { + return latitude_; } /** *
-       * milliseconds from the start_timestamp
+       * degrees (minimum 6 significant figures)
+       * latitude between -90 and 90
        * 
* - * optional int64 relative_timestamp = 1; + * double latitude = 2; + * @param value The latitude to set. + * @return This builder for chaining. */ - public Builder setRelativeTimestamp(long value) { - - relativeTimestamp_ = value; + public Builder setLatitude(double value) { + + latitude_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** *
-       * milliseconds from the start_timestamp
+       * degrees (minimum 6 significant figures)
+       * latitude between -90 and 90
        * 
* - * optional int64 relative_timestamp = 1; + * double latitude = 2; + * @return This builder for chaining. */ - public Builder clearRelativeTimestamp() { - - relativeTimestamp_ = 0L; + public Builder clearLatitude() { + bitField0_ = (bitField0_ & ~0x00000002); + latitude_ = 0D; onChanged(); return this; } - private float x_ ; + private double longitude_ ; /** *
-       * 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
+       * longitude between -180 and 180
        * 
* - * optional float x = 2; + * double longitude = 3; + * @return The longitude. */ - public float getX() { - return x_; + @java.lang.Override + public double getLongitude() { + return longitude_; } /** *
-       * 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
+       * longitude between -180 and 180
        * 
* - * optional float x = 2; + * double longitude = 3; + * @param value The longitude to set. + * @return This builder for chaining. */ - public Builder setX(float value) { - - x_ = value; + public Builder setLongitude(double value) { + + longitude_ = value; + bitField0_ |= 0x00000004; 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
+       * longitude between -180 and 180
        * 
* - * optional float x = 2; + * double longitude = 3; + * @return This builder for chaining. */ - public Builder clearX() { - - x_ = 0F; + public Builder clearLongitude() { + bitField0_ = (bitField0_ & ~0x00000004); + longitude_ = 0D; onChanged(); return this; } - private float y_ ; + private double altitude_ ; /** - * optional float y = 3; + *
+       * metres
+       * 
+ * + * double altitude = 4; + * @return The altitude. */ - public float getY() { - return y_; + @java.lang.Override + public double getAltitude() { + return altitude_; } /** - * optional float y = 3; + *
+       * metres
+       * 
+ * + * double altitude = 4; + * @param value The altitude to set. + * @return This builder for chaining. */ - public Builder setY(float value) { - - y_ = value; + public Builder setAltitude(double value) { + + altitude_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } /** - * optional float y = 3; + *
+       * metres
+       * 
+ * + * double altitude = 4; + * @return This builder for chaining. */ - public Builder clearY() { - - y_ = 0F; + public Builder clearAltitude() { + bitField0_ = (bitField0_ & ~0x00000008); + altitude_ = 0D; + onChanged(); + return this; + } + + private java.lang.Object floor_ = ""; + /** + *
+       * floor name
+       * 
+ * + * optional string floor = 5; + * @return Whether the floor field is set. + */ + public boolean hasFloor() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+       * floor name
+       * 
+ * + * optional string floor = 5; + * @return The floor. + */ + public java.lang.String getFloor() { + java.lang.Object ref = floor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + floor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * floor name
+       * 
+ * + * optional string floor = 5; + * @return The bytes for floor. + */ + public com.google.protobuf.ByteString + getFloorBytes() { + java.lang.Object ref = floor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + floor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * floor name
+       * 
+ * + * optional string floor = 5; + * @param value The floor to set. + * @return This builder for chaining. + */ + public Builder setFloor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + floor_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + /** + *
+       * floor name
+       * 
+ * + * optional string floor = 5; + * @return This builder for chaining. + */ + public Builder clearFloor() { + floor_ = getDefaultInstance().getFloor(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); return this; } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + /** + *
+       * floor name
+       * 
+ * + * optional string floor = 5; + * @param value The bytes for floor to set. + * @return This builder for chaining. + */ + public Builder setFloorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + floor_ = value; + bitField0_ |= 0x00000010; + onChanged(); return this; } - - // @@protoc_insertion_point(builder_scope:Pdr_Sample) + // @@protoc_insertion_point(builder_scope:GNSSPosition) } - // @@protoc_insertion_point(class_scope:Pdr_Sample) - private static final Pdr_Sample DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:GNSSPosition) + private static final com.openpositioning.PositionMe.Traj.GNSSPosition DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new Pdr_Sample(); + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.GNSSPosition(); } - public static Pdr_Sample getDefaultInstance() { + public static com.openpositioning.PositionMe.Traj.GNSSPosition getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Pdr_Sample parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Pdr_Sample(input, extensionRegistry); + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GNSSPosition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } - @Override - public com.google.protobuf.Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } - public Pdr_Sample getDefaultInstanceForType() { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - } - - public interface Motion_SampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:Motion_Sample) - com.google.protobuf.MessageOrBuilder { - - /** - *
-     * 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(); + public interface GNSSReadingOrBuilder extends + // @@protoc_insertion_point(interface_extends:GNSSReading) + com.google.protobuf.MessageOrBuilder { /** - *
-     * radians/s
-     * 
- * - * optional float gyr_x = 5; + * .GNSSPosition position = 1; + * @return Whether the position field is set. */ - float getGyrX(); - + boolean hasPosition(); /** - * optional float gyr_y = 6; + * .GNSSPosition position = 1; + * @return The position. */ - float getGyrY(); - + com.openpositioning.PositionMe.Traj.GNSSPosition getPosition(); /** - * optional float gyr_z = 7; + * .GNSSPosition position = 1; */ - float getGyrZ(); + com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getPositionOrBuilder(); /** *
-     * unitless, 4 components should sum to ~1
+     * metres
      * 
* - * optional float rotation_vector_x = 8; + * float accuracy = 2; + * @return The accuracy. */ - float getRotationVectorX(); + float getAccuracy(); /** - * optional float rotation_vector_y = 9; + *
+     * m/s
+     * 
+ * + * float speed = 3; + * @return The speed. */ - float getRotationVectorY(); + float getSpeed(); /** - * optional float rotation_vector_z = 10; + *
+     * degrees
+     * 
+ * + * float bearing = 4; + * @return The bearing. */ - float getRotationVectorZ(); + float getBearing(); /** - * optional float rotation_vector_w = 11; + *
+     * e.g 'gps' or 'network'
+     * 
+ * + * string provider = 5; + * @return The provider. */ - float getRotationVectorW(); - + java.lang.String getProvider(); /** *
-     * Integer
+     * e.g 'gps' or 'network'
      * 
* - * optional int32 step_count = 12; + * string provider = 5; + * @return The bytes for provider. */ - int getStepCount(); + com.google.protobuf.ByteString + getProviderBytes(); } /** - * Protobuf type {@code Motion_Sample} + * Protobuf type {@code GNSSReading} */ - 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) { + public static final class GNSSReading extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:GNSSReading) + GNSSReadingOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + GNSSReading.class.getName()); + } + // Use GNSSReading.newBuilder() to construct. + private GNSSReading(com.google.protobuf.GeneratedMessage.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; + private GNSSReading() { + provider_ = ""; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Motion_Sample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Motion_Sample.class, Builder.class); + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSReading_descriptor; } - public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; - private long relativeTimestamp_; - /** - *
-     * milliseconds
-     * 
- * - * optional int64 relative_timestamp = 1; - */ - public long getRelativeTimestamp() { - return relativeTimestamp_; + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.GNSSReading.class, com.openpositioning.PositionMe.Traj.GNSSReading.Builder.class); } - public static final int ACC_X_FIELD_NUMBER = 2; - private float accX_; + private int bitField0_; + public static final int POSITION_FIELD_NUMBER = 1; + private com.openpositioning.PositionMe.Traj.GNSSPosition position_; /** - *
-     * m/s^2
-     * 
- * - * optional float acc_x = 2; + * .GNSSPosition position = 1; + * @return Whether the position field is set. */ - public float getAccX() { - return accX_; + @java.lang.Override + public boolean hasPosition() { + return ((bitField0_ & 0x00000001) != 0); } - - public static final int ACC_Y_FIELD_NUMBER = 3; - private float accY_; /** - * optional float acc_y = 3; + * .GNSSPosition position = 1; + * @return The position. */ - public float getAccY() { - return accY_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition getPosition() { + return position_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; } - - public static final int ACC_Z_FIELD_NUMBER = 4; - private float accZ_; /** - * optional float acc_z = 4; + * .GNSSPosition position = 1; */ - public float getAccZ() { - return accZ_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getPositionOrBuilder() { + return position_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; } - public static final int GYR_X_FIELD_NUMBER = 5; - private float gyrX_; + public static final int ACCURACY_FIELD_NUMBER = 2; + private float accuracy_ = 0F; /** *
-     * radians/s
+     * metres
      * 
* - * 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; + * float accuracy = 2; + * @return The accuracy. */ - public float getGyrZ() { - return gyrZ_; + @java.lang.Override + public float getAccuracy() { + return accuracy_; } - public static final int ROTATION_VECTOR_X_FIELD_NUMBER = 8; - private float rotationVectorX_; + public static final int SPEED_FIELD_NUMBER = 3; + private float speed_ = 0F; /** *
-     * unitless, 4 components should sum to ~1
+     * m/s
      * 
* - * optional float rotation_vector_x = 8; + * float speed = 3; + * @return The speed. */ - 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_; + @java.lang.Override + public float getSpeed() { + return speed_; } - public static final int ROTATION_VECTOR_Z_FIELD_NUMBER = 10; - private float rotationVectorZ_; + public static final int BEARING_FIELD_NUMBER = 4; + private float bearing_ = 0F; /** - * optional float rotation_vector_z = 10; + *
+     * degrees
+     * 
+ * + * float bearing = 4; + * @return The bearing. */ - public float getRotationVectorZ() { - return rotationVectorZ_; + @java.lang.Override + public float getBearing() { + return bearing_; } - public static final int ROTATION_VECTOR_W_FIELD_NUMBER = 11; - private float rotationVectorW_; + public static final int PROVIDER_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object provider_ = ""; /** - * optional float rotation_vector_w = 11; + *
+     * e.g 'gps' or 'network'
+     * 
+ * + * string provider = 5; + * @return The provider. */ - public float getRotationVectorW() { - return rotationVectorW_; + @java.lang.Override + public java.lang.String getProvider() { + java.lang.Object ref = provider_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provider_ = s; + return s; + } } - - public static final int STEP_COUNT_FIELD_NUMBER = 12; - private int stepCount_; /** *
-     * Integer
+     * e.g 'gps' or 'network'
      * 
* - * optional int32 step_count = 12; + * string provider = 5; + * @return The bytes for provider. */ - public int getStepCount() { - return stepCount_; + @java.lang.Override + public com.google.protobuf.ByteString + getProviderBytes() { + java.lang.Object ref = provider_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + provider_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -5839,1058 +13240,931 @@ public final boolean isInitialized() { return true; } + @java.lang.Override 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_); + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPosition()); } - if (gyrX_ != 0F) { - output.writeFloat(5, gyrX_); + if (java.lang.Float.floatToRawIntBits(accuracy_) != 0) { + output.writeFloat(2, accuracy_); } - if (gyrY_ != 0F) { - output.writeFloat(6, gyrY_); + if (java.lang.Float.floatToRawIntBits(speed_) != 0) { + output.writeFloat(3, speed_); } - if (gyrZ_ != 0F) { - output.writeFloat(7, gyrZ_); + if (java.lang.Float.floatToRawIntBits(bearing_) != 0) { + output.writeFloat(4, bearing_); } - 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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(provider_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, provider_); } + getUnknownFields().writeTo(output); } + @java.lang.Override 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) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, accX_); + .computeMessageSize(1, getPosition()); } - if (accY_ != 0F) { + if (java.lang.Float.floatToRawIntBits(accuracy_) != 0) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, accY_); + .computeFloatSize(2, accuracy_); } - if (accZ_ != 0F) { + if (java.lang.Float.floatToRawIntBits(speed_) != 0) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, accZ_); + .computeFloatSize(3, speed_); } - if (gyrX_ != 0F) { + if (java.lang.Float.floatToRawIntBits(bearing_) != 0) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, gyrX_); + .computeFloatSize(4, bearing_); } - 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_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(provider_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, provider_); } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj instanceof Motion_Sample)) { + if (!(obj instanceof com.openpositioning.PositionMe.Traj.GNSSReading)) { 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 + com.openpositioning.PositionMe.Traj.GNSSReading other = (com.openpositioning.PositionMe.Traj.GNSSReading) obj; + + if (hasPosition() != other.hasPosition()) return false; + if (hasPosition()) { + if (!getPosition() + .equals(other.getPosition())) return false; + } + if (java.lang.Float.floatToIntBits(getAccuracy()) + != java.lang.Float.floatToIntBits( + other.getAccuracy())) return false; + if (java.lang.Float.floatToIntBits(getSpeed()) + != java.lang.Float.floatToIntBits( + other.getSpeed())) return false; + if (java.lang.Float.floatToIntBits(getBearing()) + != java.lang.Float.floatToIntBits( + other.getBearing())) return false; + if (!getProvider() + .equals(other.getProvider())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.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(); + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPosition()) { + hash = (37 * hash) + POSITION_FIELD_NUMBER; + hash = (53 * hash) + getPosition().hashCode(); + } + hash = (37 * hash) + ACCURACY_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getAccuracy()); + hash = (37 * hash) + SPEED_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getSpeed()); + hash = (37 * hash) + BEARING_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getBearing()); + hash = (37 * hash) + PROVIDER_FIELD_NUMBER; + hash = (53 * hash) + getProvider().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static Motion_Sample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.GNSSReading 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 { + public static com.openpositioning.PositionMe.Traj.GNSSReading 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 { + public static com.openpositioning.PositionMe.Traj.GNSSReading 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 { + public static com.openpositioning.PositionMe.Traj.GNSSReading 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 static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.GNSSReading parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.GNSSReading parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(Motion_Sample prototype) { + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.GNSSReading prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code Motion_Sample} + * Protobuf type {@code GNSSReading} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:Motion_Sample) - Motion_SampleOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:GNSSReading) + com.openpositioning.PositionMe.Traj.GNSSReadingOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_Motion_Sample_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSReading_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Motion_Sample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Motion_Sample.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.GNSSReading.class, com.openpositioning.PositionMe.Traj.GNSSReading.Builder.class); } - // Construct using Traj.Motion_Sample.newBuilder() + // Construct using com.openpositioning.PositionMe.Traj.GNSSReading.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { + getPositionFieldBuilder(); } } + @java.lang.Override public Builder clear() { super.clear(); - relativeTimestamp_ = 0L; - - accX_ = 0F; - - accY_ = 0F; - - accZ_ = 0F; - - gyrX_ = 0F; - - gyrY_ = 0F; - - gyrZ_ = 0F; - - rotationVectorX_ = 0F; - - rotationVectorY_ = 0F; - - rotationVectorZ_ = 0F; - - rotationVectorW_ = 0F; - - stepCount_ = 0; - + bitField0_ = 0; + position_ = null; + if (positionBuilder_ != null) { + positionBuilder_.dispose(); + positionBuilder_ = null; + } + accuracy_ = 0F; + speed_ = 0F; + bearing_ = 0F; + provider_ = ""; return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Traj.internal_static_Motion_Sample_descriptor; + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSReading_descriptor; } - public Motion_Sample getDefaultInstanceForType() { - return Motion_Sample.getDefaultInstance(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSReading getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.GNSSReading.getDefaultInstance(); } - public Motion_Sample build() { - Motion_Sample result = buildPartial(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSReading build() { + com.openpositioning.PositionMe.Traj.GNSSReading result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public Motion_Sample buildPartial() { - Motion_Sample result = new Motion_Sample(this); - result.relativeTimestamp_ = relativeTimestamp_; - result.accX_ = accX_; - result.accY_ = accY_; - result.accZ_ = accZ_; - result.gyrX_ = gyrX_; - result.gyrY_ = gyrY_; - result.gyrZ_ = gyrZ_; - result.rotationVectorX_ = rotationVectorX_; - result.rotationVectorY_ = rotationVectorY_; - result.rotationVectorZ_ = rotationVectorZ_; - result.rotationVectorW_ = rotationVectorW_; - result.stepCount_ = stepCount_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSReading buildPartial() { + com.openpositioning.PositionMe.Traj.GNSSReading result = new com.openpositioning.PositionMe.Traj.GNSSReading(this); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.openpositioning.PositionMe.Traj.GNSSReading result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.position_ = positionBuilder_ == null + ? position_ + : positionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.accuracy_ = accuracy_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.speed_ = speed_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.bearing_ = bearing_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.provider_ = provider_; + } + result.bitField0_ |= to_bitField0_; } + + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Motion_Sample) { - return mergeFrom((Motion_Sample)other); + if (other instanceof com.openpositioning.PositionMe.Traj.GNSSReading) { + return mergeFrom((com.openpositioning.PositionMe.Traj.GNSSReading)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(Motion_Sample other) { - if (other == Motion_Sample.getDefaultInstance()) return this; - if (other.getRelativeTimestamp() != 0L) { - setRelativeTimestamp(other.getRelativeTimestamp()); - } - if (other.getAccX() != 0F) { - setAccX(other.getAccX()); - } - if (other.getAccY() != 0F) { - setAccY(other.getAccY()); - } - if (other.getAccZ() != 0F) { - setAccZ(other.getAccZ()); - } - if (other.getGyrX() != 0F) { - setGyrX(other.getGyrX()); - } - if (other.getGyrY() != 0F) { - setGyrY(other.getGyrY()); - } - if (other.getGyrZ() != 0F) { - setGyrZ(other.getGyrZ()); - } - if (other.getRotationVectorX() != 0F) { - setRotationVectorX(other.getRotationVectorX()); + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.GNSSReading other) { + if (other == com.openpositioning.PositionMe.Traj.GNSSReading.getDefaultInstance()) return this; + if (other.hasPosition()) { + mergePosition(other.getPosition()); } - if (other.getRotationVectorY() != 0F) { - setRotationVectorY(other.getRotationVectorY()); + if (other.getAccuracy() != 0F) { + setAccuracy(other.getAccuracy()); } - if (other.getRotationVectorZ() != 0F) { - setRotationVectorZ(other.getRotationVectorZ()); + if (other.getSpeed() != 0F) { + setSpeed(other.getSpeed()); } - if (other.getRotationVectorW() != 0F) { - setRotationVectorW(other.getRotationVectorW()); + if (other.getBearing() != 0F) { + setBearing(other.getBearing()); } - if (other.getStepCount() != 0) { - setStepCount(other.getStepCount()); + if (!other.getProvider().isEmpty()) { + provider_ = other.provider_; + bitField0_ |= 0x00000010; + onChanged(); } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } + @java.lang.Override public final boolean isInitialized() { return true; } + @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Motion_Sample parsedMessage = null; + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getPositionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: { + accuracy_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: { + speed_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 37: { + bearing_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + case 42: { + provider_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Motion_Sample) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long relativeTimestamp_ ; - /** - *
-       * 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(); + onChanged(); + } // finally return this; } + private int bitField0_; - private float accX_ ; + private com.openpositioning.PositionMe.Traj.GNSSPosition position_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> positionBuilder_; /** - *
-       * m/s^2
-       * 
- * - * optional float acc_x = 2; + * .GNSSPosition position = 1; + * @return Whether the position field is set. */ - public float getAccX() { - return accX_; + public boolean hasPosition() { + return ((bitField0_ & 0x00000001) != 0); } /** - *
-       * m/s^2
-       * 
- * - * optional float acc_x = 2; + * .GNSSPosition position = 1; + * @return The position. */ - public Builder setAccX(float value) { - - accX_ = value; - onChanged(); - return this; + public com.openpositioning.PositionMe.Traj.GNSSPosition getPosition() { + if (positionBuilder_ == null) { + return position_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; + } else { + return positionBuilder_.getMessage(); + } } /** - *
-       * m/s^2
-       * 
- * - * optional float acc_x = 2; + * .GNSSPosition position = 1; */ - public Builder clearAccX() { - - accX_ = 0F; + public Builder setPosition(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (positionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + position_ = value; + } else { + positionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; onChanged(); return this; } - - private float accY_ ; /** - * optional float acc_y = 3; + * .GNSSPosition position = 1; */ - public float getAccY() { - return accY_; + public Builder setPosition( + com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (positionBuilder_ == null) { + position_ = builderForValue.build(); + } else { + positionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; } /** - * optional float acc_y = 3; + * .GNSSPosition position = 1; */ - public Builder setAccY(float value) { - - accY_ = value; - onChanged(); + public Builder mergePosition(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (positionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + position_ != null && + position_ != com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()) { + getPositionBuilder().mergeFrom(value); + } else { + position_ = value; + } + } else { + positionBuilder_.mergeFrom(value); + } + if (position_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** - * optional float acc_y = 3; + * .GNSSPosition position = 1; */ - public Builder clearAccY() { - - accY_ = 0F; + public Builder clearPosition() { + bitField0_ = (bitField0_ & ~0x00000001); + position_ = null; + if (positionBuilder_ != null) { + positionBuilder_.dispose(); + positionBuilder_ = null; + } onChanged(); return this; } - - private float accZ_ ; /** - * optional float acc_z = 4; + * .GNSSPosition position = 1; */ - public float getAccZ() { - return accZ_; + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder getPositionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPositionFieldBuilder().getBuilder(); } /** - * optional float acc_z = 4; + * .GNSSPosition position = 1; */ - public Builder setAccZ(float value) { - - accZ_ = value; - onChanged(); - return this; + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getPositionOrBuilder() { + if (positionBuilder_ != null) { + return positionBuilder_.getMessageOrBuilder(); + } else { + return position_ == null ? + com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; + } } /** - * optional float acc_z = 4; + * .GNSSPosition position = 1; */ - public Builder clearAccZ() { - - accZ_ = 0F; - onChanged(); - return this; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> + getPositionFieldBuilder() { + if (positionBuilder_ == null) { + positionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder>( + getPosition(), + getParentForChildren(), + isClean()); + position_ = null; + } + return positionBuilder_; } - private float gyrX_ ; + private float accuracy_ ; /** *
-       * radians/s
+       * metres
        * 
* - * optional float gyr_x = 5; + * float accuracy = 2; + * @return The accuracy. */ - public float getGyrX() { - return gyrX_; + @java.lang.Override + public float getAccuracy() { + return accuracy_; } /** *
-       * radians/s
+       * metres
        * 
* - * optional float gyr_x = 5; + * float accuracy = 2; + * @param value The accuracy to set. + * @return This builder for chaining. */ - public Builder setGyrX(float value) { - - gyrX_ = value; + public Builder setAccuracy(float value) { + + accuracy_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** *
-       * radians/s
+       * metres
        * 
* - * 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; + * float accuracy = 2; + * @return This builder for chaining. */ - public Builder clearGyrZ() { - - gyrZ_ = 0F; + public Builder clearAccuracy() { + bitField0_ = (bitField0_ & ~0x00000002); + accuracy_ = 0F; onChanged(); return this; } - private float rotationVectorX_ ; + private float speed_ ; /** *
-       * unitless, 4 components should sum to ~1
+       * m/s
        * 
* - * optional float rotation_vector_x = 8; + * float speed = 3; + * @return The speed. */ - public float getRotationVectorX() { - return rotationVectorX_; + @java.lang.Override + public float getSpeed() { + return speed_; } /** *
-       * unitless, 4 components should sum to ~1
+       * m/s
        * 
* - * optional float rotation_vector_x = 8; + * float speed = 3; + * @param value The speed to set. + * @return This builder for chaining. */ - public Builder setRotationVectorX(float value) { - - rotationVectorX_ = value; + public Builder setSpeed(float value) { + + speed_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** *
-       * unitless, 4 components should sum to ~1
+       * m/s
        * 
* - * optional float rotation_vector_x = 8; + * float speed = 3; + * @return This builder for chaining. */ - public Builder clearRotationVectorX() { - - rotationVectorX_ = 0F; + public Builder clearSpeed() { + bitField0_ = (bitField0_ & ~0x00000004); + speed_ = 0F; onChanged(); return this; } - private float rotationVectorY_ ; - /** - * optional float rotation_vector_y = 9; - */ - public float getRotationVectorY() { - return rotationVectorY_; - } + private float bearing_ ; /** - * optional float rotation_vector_y = 9; + *
+       * degrees
+       * 
+ * + * float bearing = 4; + * @return The bearing. */ - public Builder setRotationVectorY(float value) { - - rotationVectorY_ = value; - onChanged(); - return this; + @java.lang.Override + public float getBearing() { + return bearing_; } /** - * optional float rotation_vector_y = 9; + *
+       * degrees
+       * 
+ * + * float bearing = 4; + * @param value The bearing to set. + * @return This builder for chaining. */ - public Builder clearRotationVectorY() { - - rotationVectorY_ = 0F; - onChanged(); - return this; - } + public Builder setBearing(float value) { - 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; + bearing_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } /** - * optional float rotation_vector_z = 10; + *
+       * degrees
+       * 
+ * + * float bearing = 4; + * @return This builder for chaining. */ - public Builder clearRotationVectorZ() { - - rotationVectorZ_ = 0F; + public Builder clearBearing() { + bitField0_ = (bitField0_ & ~0x00000008); + bearing_ = 0F; onChanged(); return this; } - private float rotationVectorW_ ; - /** - * optional float rotation_vector_w = 11; - */ - public float getRotationVectorW() { - return rotationVectorW_; - } + private java.lang.Object provider_ = ""; /** - * optional float rotation_vector_w = 11; + *
+       * e.g 'gps' or 'network'
+       * 
+ * + * string provider = 5; + * @return The provider. */ - public Builder setRotationVectorW(float value) { - - rotationVectorW_ = value; - onChanged(); - return this; + public java.lang.String getProvider() { + java.lang.Object ref = provider_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provider_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** - * optional float rotation_vector_w = 11; + *
+       * e.g 'gps' or 'network'
+       * 
+ * + * string provider = 5; + * @return The bytes for provider. */ - public Builder clearRotationVectorW() { - - rotationVectorW_ = 0F; - onChanged(); - return this; + public com.google.protobuf.ByteString + getProviderBytes() { + java.lang.Object ref = provider_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + provider_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - - private int stepCount_ ; /** *
-       * Integer
+       * e.g 'gps' or 'network'
        * 
* - * optional int32 step_count = 12; + * string provider = 5; + * @param value The provider to set. + * @return This builder for chaining. */ - public int getStepCount() { - return stepCount_; + public Builder setProvider( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + provider_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; } /** *
-       * Integer
+       * e.g 'gps' or 'network'
        * 
* - * optional int32 step_count = 12; + * string provider = 5; + * @return This builder for chaining. */ - public Builder setStepCount(int value) { - - stepCount_ = value; + public Builder clearProvider() { + provider_ = getDefaultInstance().getProvider(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** *
-       * Integer
+       * e.g 'gps' or 'network'
        * 
* - * optional int32 step_count = 12; + * string provider = 5; + * @param value The bytes for provider to set. + * @return This builder for chaining. */ - public Builder clearStepCount() { - - stepCount_ = 0; + public Builder setProviderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + provider_ = value; + bitField0_ |= 0x00000010; 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(builder_scope:GNSSReading) } - // @@protoc_insertion_point(class_scope:Motion_Sample) - private static final Motion_Sample DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:GNSSReading) + private static final com.openpositioning.PositionMe.Traj.GNSSReading DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new Motion_Sample(); + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.GNSSReading(); } - public static Motion_Sample getDefaultInstance() { + public static com.openpositioning.PositionMe.Traj.GNSSReading getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Motion_Sample parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Motion_Sample(input, extensionRegistry); + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GNSSReading parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } - @Override - public com.google.protobuf.Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } - public Motion_Sample getDefaultInstanceForType() { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSReading getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface Position_SampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:Position_Sample) - com.google.protobuf.MessageOrBuilder { + public interface FingerprintOrBuilder extends + // @@protoc_insertion_point(interface_extends:Fingerprint) + com.google.protobuf.MessageOrBuilder { /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. */ long getRelativeTimestamp(); /** - *
-     * uT
-     * 
- * - * optional float mag_x = 2; + * repeated .RFScan rf_scans = 2; */ - float getMagX(); - + java.util.List + getRfScansList(); /** - * optional float mag_y = 3; + * repeated .RFScan rf_scans = 2; */ - float getMagY(); - + com.openpositioning.PositionMe.Traj.RFScan getRfScans(int index); + /** + * repeated .RFScan rf_scans = 2; + */ + int getRfScansCount(); + /** + * repeated .RFScan rf_scans = 2; + */ + java.util.List + getRfScansOrBuilderList(); /** - * optional float mag_z = 4; + * repeated .RFScan rf_scans = 2; */ - float getMagZ(); + com.openpositioning.PositionMe.Traj.RFScanOrBuilder getRfScansOrBuilder( + int index); } /** - * Protobuf type {@code Position_Sample} + * Protobuf type {@code Fingerprint} */ - 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) { + public static final class Fingerprint extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Fingerprint) + FingerprintOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + Fingerprint.class.getName()); + } + // Use Fingerprint.newBuilder() to construct. + private Fingerprint(com.google.protobuf.GeneratedMessage.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(); - } + private Fingerprint() { + rfScans_ = java.util.Collections.emptyList(); } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_Position_Sample_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Fingerprint_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Position_Sample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Position_Sample.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Fingerprint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Fingerprint.class, com.openpositioning.PositionMe.Traj.Fingerprint.Builder.class); } public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; - private long relativeTimestamp_; + private long relativeTimestamp_ = 0L; /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. */ + @java.lang.Override public long getRelativeTimestamp() { return relativeTimestamp_; } - public static final int MAG_X_FIELD_NUMBER = 2; - private float magX_; + public static final int RF_SCANS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List rfScans_; /** - *
-     * uT
-     * 
- * - * optional float mag_x = 2; + * repeated .RFScan rf_scans = 2; */ - public float getMagX() { - return magX_; + @java.lang.Override + public java.util.List getRfScansList() { + return rfScans_; } - - public static final int MAG_Y_FIELD_NUMBER = 3; - private float magY_; /** - * optional float mag_y = 3; + * repeated .RFScan rf_scans = 2; */ - public float getMagY() { - return magY_; + @java.lang.Override + public java.util.List + getRfScansOrBuilderList() { + return rfScans_; } - - public static final int MAG_Z_FIELD_NUMBER = 4; - private float magZ_; /** - * optional float mag_z = 4; + * repeated .RFScan rf_scans = 2; */ - public float getMagZ() { - return magZ_; + @java.lang.Override + public int getRfScansCount() { + return rfScans_.size(); + } + /** + * repeated .RFScan rf_scans = 2; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RFScan getRfScans(int index) { + return rfScans_.get(index); + } + /** + * repeated .RFScan rf_scans = 2; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RFScanOrBuilder getRfScansOrBuilder( + int index) { + return rfScans_.get(index); } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -6900,22 +14174,19 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + 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_); + for (int i = 0; i < rfScans_.size(); i++) { + output.writeMessage(2, rfScans_.get(i)); } + getUnknownFields().writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -6923,582 +14194,844 @@ public int getSerializedSize() { size = 0; if (relativeTimestamp_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, relativeTimestamp_); + .computeInt64Size(1, relativeTimestamp_); } - if (magX_ != 0F) { + for (int i = 0; i < rfScans_.size(); i++) { 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_); + .computeMessageSize(2, rfScans_.get(i)); } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj instanceof Position_Sample)) { + if (!(obj instanceof com.openpositioning.PositionMe.Traj.Fingerprint)) { 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 + com.openpositioning.PositionMe.Traj.Fingerprint other = (com.openpositioning.PositionMe.Traj.Fingerprint) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (!getRfScansList() + .equals(other.getRfScansList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (19 * hash) + getDescriptor().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(); + getRelativeTimestamp()); + if (getRfScansCount() > 0) { + hash = (37 * hash) + RF_SCANS_FIELD_NUMBER; + hash = (53 * hash) + getRfScansList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static Position_Sample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Fingerprint 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 { + public static com.openpositioning.PositionMe.Traj.Fingerprint 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 { + public static com.openpositioning.PositionMe.Traj.Fingerprint 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 { + public static com.openpositioning.PositionMe.Traj.Fingerprint 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 static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.openpositioning.PositionMe.Traj.Fingerprint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.Fingerprint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(Position_Sample prototype) { + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.Fingerprint prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code Position_Sample} + * Protobuf type {@code Fingerprint} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:Position_Sample) - Position_SampleOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Fingerprint) + com.openpositioning.PositionMe.Traj.FingerprintOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_Position_Sample_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Fingerprint_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Position_Sample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Position_Sample.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Fingerprint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Fingerprint.class, com.openpositioning.PositionMe.Traj.Fingerprint.Builder.class); } - // Construct using Traj.Position_Sample.newBuilder() + // Construct using com.openpositioning.PositionMe.Traj.Fingerprint.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } + @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; relativeTimestamp_ = 0L; - - magX_ = 0F; - - magY_ = 0F; - - magZ_ = 0F; - + if (rfScansBuilder_ == null) { + rfScans_ = java.util.Collections.emptyList(); + } else { + rfScans_ = null; + rfScansBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Traj.internal_static_Position_Sample_descriptor; + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_Fingerprint_descriptor; } - public Position_Sample getDefaultInstanceForType() { - return Position_Sample.getDefaultInstance(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Fingerprint getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.Fingerprint.getDefaultInstance(); } - public Position_Sample build() { - Position_Sample result = buildPartial(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Fingerprint build() { + com.openpositioning.PositionMe.Traj.Fingerprint result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public Position_Sample buildPartial() { - Position_Sample result = new Position_Sample(this); - result.relativeTimestamp_ = relativeTimestamp_; - result.magX_ = magX_; - result.magY_ = magY_; - result.magZ_ = magZ_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Fingerprint buildPartial() { + com.openpositioning.PositionMe.Traj.Fingerprint result = new com.openpositioning.PositionMe.Traj.Fingerprint(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return (Builder) super.setRepeatedField(field, index, value); + private void buildPartialRepeatedFields(com.openpositioning.PositionMe.Traj.Fingerprint result) { + if (rfScansBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + rfScans_ = java.util.Collections.unmodifiableList(rfScans_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.rfScans_ = rfScans_; + } else { + result.rfScans_ = rfScansBuilder_.build(); + } } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.addRepeatedField(field, value); + + private void buildPartial0(com.openpositioning.PositionMe.Traj.Fingerprint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } } + + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Position_Sample) { - return mergeFrom((Position_Sample)other); + if (other instanceof com.openpositioning.PositionMe.Traj.Fingerprint) { + return mergeFrom((com.openpositioning.PositionMe.Traj.Fingerprint)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(Position_Sample other) { - if (other == Position_Sample.getDefaultInstance()) return this; + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.Fingerprint other) { + if (other == com.openpositioning.PositionMe.Traj.Fingerprint.getDefaultInstance()) return this; if (other.getRelativeTimestamp() != 0L) { setRelativeTimestamp(other.getRelativeTimestamp()); } - if (other.getMagX() != 0F) { - setMagX(other.getMagX()); - } - if (other.getMagY() != 0F) { - setMagY(other.getMagY()); - } - if (other.getMagZ() != 0F) { - setMagZ(other.getMagZ()); + if (rfScansBuilder_ == null) { + if (!other.rfScans_.isEmpty()) { + if (rfScans_.isEmpty()) { + rfScans_ = other.rfScans_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRfScansIsMutable(); + rfScans_.addAll(other.rfScans_); + } + onChanged(); + } + } else { + if (!other.rfScans_.isEmpty()) { + if (rfScansBuilder_.isEmpty()) { + rfScansBuilder_.dispose(); + rfScansBuilder_ = null; + rfScans_ = other.rfScans_; + bitField0_ = (bitField0_ & ~0x00000002); + rfScansBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRfScansFieldBuilder() : null; + } else { + rfScansBuilder_.addAllMessages(other.rfScans_); + } + } } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } + @java.lang.Override public final boolean isInitialized() { return true; } + @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Position_Sample parsedMessage = null; + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + com.openpositioning.PositionMe.Traj.RFScan m = + input.readMessage( + com.openpositioning.PositionMe.Traj.RFScan.parser(), + extensionRegistry); + if (rfScansBuilder_ == null) { + ensureRfScansIsMutable(); + rfScans_.add(m); + } else { + rfScansBuilder_.addMessage(m); + } + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Position_Sample) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private long relativeTimestamp_ ; /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. */ + @java.lang.Override public long getRelativeTimestamp() { return relativeTimestamp_; } /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. */ public Builder setRelativeTimestamp(long value) { - + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @return This builder for chaining. */ public Builder clearRelativeTimestamp() { - + bitField0_ = (bitField0_ & ~0x00000001); relativeTimestamp_ = 0L; onChanged(); return this; } - private float magX_ ; + private java.util.List rfScans_ = + java.util.Collections.emptyList(); + private void ensureRfScansIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + rfScans_ = new java.util.ArrayList(rfScans_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.RFScan, com.openpositioning.PositionMe.Traj.RFScan.Builder, com.openpositioning.PositionMe.Traj.RFScanOrBuilder> rfScansBuilder_; + /** - *
-       * uT
-       * 
- * - * optional float mag_x = 2; + * repeated .RFScan rf_scans = 2; */ - public float getMagX() { - return magX_; + public java.util.List getRfScansList() { + if (rfScansBuilder_ == null) { + return java.util.Collections.unmodifiableList(rfScans_); + } else { + return rfScansBuilder_.getMessageList(); + } } /** - *
-       * uT
-       * 
- * - * optional float mag_x = 2; + * repeated .RFScan rf_scans = 2; */ - public Builder setMagX(float value) { - - magX_ = value; - onChanged(); - return this; + public int getRfScansCount() { + if (rfScansBuilder_ == null) { + return rfScans_.size(); + } else { + return rfScansBuilder_.getCount(); + } } /** - *
-       * uT
-       * 
- * - * optional float mag_x = 2; + * repeated .RFScan rf_scans = 2; */ - public Builder clearMagX() { - - magX_ = 0F; - onChanged(); + public com.openpositioning.PositionMe.Traj.RFScan getRfScans(int index) { + if (rfScansBuilder_ == null) { + return rfScans_.get(index); + } else { + return rfScansBuilder_.getMessage(index); + } + } + /** + * repeated .RFScan rf_scans = 2; + */ + public Builder setRfScans( + int index, com.openpositioning.PositionMe.Traj.RFScan value) { + if (rfScansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRfScansIsMutable(); + rfScans_.set(index, value); + onChanged(); + } else { + rfScansBuilder_.setMessage(index, value); + } return this; } - - private float magY_ ; /** - * optional float mag_y = 3; + * repeated .RFScan rf_scans = 2; */ - public float getMagY() { - return magY_; + public Builder setRfScans( + int index, com.openpositioning.PositionMe.Traj.RFScan.Builder builderForValue) { + if (rfScansBuilder_ == null) { + ensureRfScansIsMutable(); + rfScans_.set(index, builderForValue.build()); + onChanged(); + } else { + rfScansBuilder_.setMessage(index, builderForValue.build()); + } + return this; } /** - * optional float mag_y = 3; + * repeated .RFScan rf_scans = 2; */ - public Builder setMagY(float value) { - - magY_ = value; - onChanged(); + public Builder addRfScans(com.openpositioning.PositionMe.Traj.RFScan value) { + if (rfScansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRfScansIsMutable(); + rfScans_.add(value); + onChanged(); + } else { + rfScansBuilder_.addMessage(value); + } return this; } /** - * optional float mag_y = 3; + * repeated .RFScan rf_scans = 2; */ - public Builder clearMagY() { - - magY_ = 0F; - onChanged(); + public Builder addRfScans( + int index, com.openpositioning.PositionMe.Traj.RFScan value) { + if (rfScansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRfScansIsMutable(); + rfScans_.add(index, value); + onChanged(); + } else { + rfScansBuilder_.addMessage(index, value); + } return this; } - - private float magZ_ ; /** - * optional float mag_z = 4; + * repeated .RFScan rf_scans = 2; */ - public float getMagZ() { - return magZ_; + public Builder addRfScans( + com.openpositioning.PositionMe.Traj.RFScan.Builder builderForValue) { + if (rfScansBuilder_ == null) { + ensureRfScansIsMutable(); + rfScans_.add(builderForValue.build()); + onChanged(); + } else { + rfScansBuilder_.addMessage(builderForValue.build()); + } + return this; } /** - * optional float mag_z = 4; + * repeated .RFScan rf_scans = 2; */ - public Builder setMagZ(float value) { - - magZ_ = value; - onChanged(); + public Builder addRfScans( + int index, com.openpositioning.PositionMe.Traj.RFScan.Builder builderForValue) { + if (rfScansBuilder_ == null) { + ensureRfScansIsMutable(); + rfScans_.add(index, builderForValue.build()); + onChanged(); + } else { + rfScansBuilder_.addMessage(index, builderForValue.build()); + } return this; } /** - * optional float mag_z = 4; + * repeated .RFScan rf_scans = 2; */ - public Builder clearMagZ() { - - magZ_ = 0F; - onChanged(); + public Builder addAllRfScans( + java.lang.Iterable values) { + if (rfScansBuilder_ == null) { + ensureRfScansIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rfScans_); + onChanged(); + } else { + rfScansBuilder_.addAllMessages(values); + } return this; } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + /** + * repeated .RFScan rf_scans = 2; + */ + public Builder clearRfScans() { + if (rfScansBuilder_ == null) { + rfScans_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + rfScansBuilder_.clear(); + } return this; } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + /** + * repeated .RFScan rf_scans = 2; + */ + public Builder removeRfScans(int index) { + if (rfScansBuilder_ == null) { + ensureRfScansIsMutable(); + rfScans_.remove(index); + onChanged(); + } else { + rfScansBuilder_.remove(index); + } return this; } + /** + * repeated .RFScan rf_scans = 2; + */ + public com.openpositioning.PositionMe.Traj.RFScan.Builder getRfScansBuilder( + int index) { + return getRfScansFieldBuilder().getBuilder(index); + } + /** + * repeated .RFScan rf_scans = 2; + */ + public com.openpositioning.PositionMe.Traj.RFScanOrBuilder getRfScansOrBuilder( + int index) { + if (rfScansBuilder_ == null) { + return rfScans_.get(index); } else { + return rfScansBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .RFScan rf_scans = 2; + */ + public java.util.List + getRfScansOrBuilderList() { + if (rfScansBuilder_ != null) { + return rfScansBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rfScans_); + } + } + /** + * repeated .RFScan rf_scans = 2; + */ + public com.openpositioning.PositionMe.Traj.RFScan.Builder addRfScansBuilder() { + return getRfScansFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.RFScan.getDefaultInstance()); + } + /** + * repeated .RFScan rf_scans = 2; + */ + public com.openpositioning.PositionMe.Traj.RFScan.Builder addRfScansBuilder( + int index) { + return getRfScansFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.RFScan.getDefaultInstance()); + } + /** + * repeated .RFScan rf_scans = 2; + */ + public java.util.List + getRfScansBuilderList() { + return getRfScansFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.RFScan, com.openpositioning.PositionMe.Traj.RFScan.Builder, com.openpositioning.PositionMe.Traj.RFScanOrBuilder> + getRfScansFieldBuilder() { + if (rfScansBuilder_ == null) { + rfScansBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.RFScan, com.openpositioning.PositionMe.Traj.RFScan.Builder, com.openpositioning.PositionMe.Traj.RFScanOrBuilder>( + rfScans_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + rfScans_ = null; + } + return rfScansBuilder_; + } - - // @@protoc_insertion_point(builder_scope:Position_Sample) + // @@protoc_insertion_point(builder_scope:Fingerprint) } - // @@protoc_insertion_point(class_scope:Position_Sample) - private static final Position_Sample DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:Fingerprint) + private static final com.openpositioning.PositionMe.Traj.Fingerprint DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new Position_Sample(); + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.Fingerprint(); } - public static Position_Sample getDefaultInstance() { + public static com.openpositioning.PositionMe.Traj.Fingerprint getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Position_Sample parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Position_Sample(input, extensionRegistry); + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Fingerprint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } - @Override - public com.google.protobuf.Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } - public Position_Sample getDefaultInstanceForType() { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Fingerprint getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface Pressure_SampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:Pressure_Sample) - com.google.protobuf.MessageOrBuilder { + public interface RFScanOrBuilder extends + // @@protoc_insertion_point(interface_extends:RFScan) + com.google.protobuf.MessageOrBuilder { /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. */ long getRelativeTimestamp(); /** *
-     * mbar
+     * Integer encoding of the hex mac address (BSSID)
+     * e.g. 207394925843984
      * 
* - * optional float pressure = 2; + * int64 mac = 2; + * @return The mac. */ - float getPressure(); + long getMac(); + + /** + *
+     * rssi integer in dBm.
+     * typically between -120 and -10
+     * 
+ * + * int32 rssi = 3; + * @return The rssi. + */ + int getRssi(); + + /** + *
+     * returned position
+     * 
+ * + * optional .GNSSPosition position = 4; + * @return Whether the position field is set. + */ + boolean hasPosition(); + /** + *
+     * returned position
+     * 
+ * + * optional .GNSSPosition position = 4; + * @return The position. + */ + com.openpositioning.PositionMe.Traj.GNSSPosition getPosition(); + /** + *
+     * returned position
+     * 
+ * + * optional .GNSSPosition position = 4; + */ + com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getPositionOrBuilder(); } /** - * Protobuf type {@code Pressure_Sample} + * Protobuf type {@code RFScan} */ - 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) { + public static final class RFScan extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:RFScan) + RFScanOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + RFScan.class.getName()); + } + // Use RFScan.newBuilder() to construct. + private RFScan(com.google.protobuf.GeneratedMessage.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(); - } + private RFScan() { } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_Pressure_Sample_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_RFScan_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Pressure_Sample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Pressure_Sample.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_RFScan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.RFScan.class, com.openpositioning.PositionMe.Traj.RFScan.Builder.class); } + private int bitField0_; public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; - private long relativeTimestamp_; + private long relativeTimestamp_ = 0L; /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. */ + @java.lang.Override public long getRelativeTimestamp() { return relativeTimestamp_; } - public static final int PRESSURE_FIELD_NUMBER = 2; - private float pressure_; + public static final int MAC_FIELD_NUMBER = 2; + private long mac_ = 0L; /** *
-     * mbar
+     * Integer encoding of the hex mac address (BSSID)
+     * e.g. 207394925843984
      * 
* - * optional float pressure = 2; + * int64 mac = 2; + * @return The mac. */ - public float getPressure() { - return pressure_; + @java.lang.Override + public long getMac() { + return mac_; + } + + public static final int RSSI_FIELD_NUMBER = 3; + private int rssi_ = 0; + /** + *
+     * rssi integer in dBm.
+     * typically between -120 and -10
+     * 
+ * + * int32 rssi = 3; + * @return The rssi. + */ + @java.lang.Override + public int getRssi() { + return rssi_; + } + + public static final int POSITION_FIELD_NUMBER = 4; + private com.openpositioning.PositionMe.Traj.GNSSPosition position_; + /** + *
+     * returned position
+     * 
+ * + * optional .GNSSPosition position = 4; + * @return Whether the position field is set. + */ + @java.lang.Override + public boolean hasPosition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * returned position
+     * 
+ * + * optional .GNSSPosition position = 4; + * @return The position. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition getPosition() { + return position_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; + } + /** + *
+     * returned position
+     * 
+ * + * optional .GNSSPosition position = 4; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getPositionOrBuilder() { + return position_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -7508,16 +15041,25 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { if (relativeTimestamp_ != 0L) { output.writeInt64(1, relativeTimestamp_); } - if (pressure_ != 0F) { - output.writeFloat(2, pressure_); + if (mac_ != 0L) { + output.writeInt64(2, mac_); + } + if (rssi_ != 0) { + output.writeInt32(3, rssi_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getPosition()); } + getUnknownFields().writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -7525,496 +15067,853 @@ public int getSerializedSize() { size = 0; if (relativeTimestamp_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, relativeTimestamp_); + .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_); } - if (pressure_ != 0F) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, pressure_); + .computeMessageSize(4, getPosition()); } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj instanceof Pressure_Sample)) { + if (!(obj instanceof com.openpositioning.PositionMe.Traj.RFScan)) { return super.equals(obj); } - Pressure_Sample other = (Pressure_Sample) obj; + com.openpositioning.PositionMe.Traj.RFScan other = (com.openpositioning.PositionMe.Traj.RFScan) obj; - boolean result = true; - result = result && (getRelativeTimestamp() - == other.getRelativeTimestamp()); - result = result && ( - Float.floatToIntBits(getPressure()) - == Float.floatToIntBits( - other.getPressure())); - return result; + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (getMac() + != other.getMac()) return false; + if (getRssi() + != other.getRssi()) return false; + if (hasPosition() != other.hasPosition()) return false; + if (hasPosition()) { + if (!getPosition() + .equals(other.getPosition())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - @Override + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (19 * hash) + getDescriptor().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(); + 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(); + if (hasPosition()) { + hash = (37 * hash) + POSITION_FIELD_NUMBER; + hash = (53 * hash) + getPosition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static Pressure_Sample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.RFScan 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 { + public static com.openpositioning.PositionMe.Traj.RFScan 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 { + public static com.openpositioning.PositionMe.Traj.RFScan 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 { + public static com.openpositioning.PositionMe.Traj.RFScan 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 static com.openpositioning.PositionMe.Traj.RFScan parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.RFScan parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.RFScan parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(Pressure_Sample prototype) { + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.RFScan prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code Pressure_Sample} + * Protobuf type {@code RFScan} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:Pressure_Sample) - Pressure_SampleOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:RFScan) + com.openpositioning.PositionMe.Traj.RFScanOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_Pressure_Sample_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_RFScan_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Pressure_Sample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Pressure_Sample.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_RFScan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.RFScan.class, com.openpositioning.PositionMe.Traj.RFScan.Builder.class); } - // Construct using Traj.Pressure_Sample.newBuilder() + // Construct using com.openpositioning.PositionMe.Traj.RFScan.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 + if (com.google.protobuf.GeneratedMessage .alwaysUseFieldBuilders) { + getPositionFieldBuilder(); } } + @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; relativeTimestamp_ = 0L; - - pressure_ = 0F; - + mac_ = 0L; + rssi_ = 0; + position_ = null; + if (positionBuilder_ != null) { + positionBuilder_.dispose(); + positionBuilder_ = null; + } return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Traj.internal_static_Pressure_Sample_descriptor; + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_RFScan_descriptor; } - public Pressure_Sample getDefaultInstanceForType() { - return Pressure_Sample.getDefaultInstance(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RFScan getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.RFScan.getDefaultInstance(); } - public Pressure_Sample build() { - Pressure_Sample result = buildPartial(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RFScan build() { + com.openpositioning.PositionMe.Traj.RFScan result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public Pressure_Sample buildPartial() { - Pressure_Sample result = new Pressure_Sample(this); - result.relativeTimestamp_ = relativeTimestamp_; - result.pressure_ = pressure_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RFScan buildPartial() { + com.openpositioning.PositionMe.Traj.RFScan result = new com.openpositioning.PositionMe.Traj.RFScan(this); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.openpositioning.PositionMe.Traj.RFScan result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.mac_ = mac_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.rssi_ = rssi_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.position_ = positionBuilder_ == null + ? position_ + : positionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; } + + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Pressure_Sample) { - return mergeFrom((Pressure_Sample)other); + if (other instanceof com.openpositioning.PositionMe.Traj.RFScan) { + return mergeFrom((com.openpositioning.PositionMe.Traj.RFScan)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(Pressure_Sample other) { - if (other == Pressure_Sample.getDefaultInstance()) return this; + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.RFScan other) { + if (other == com.openpositioning.PositionMe.Traj.RFScan.getDefaultInstance()) return this; if (other.getRelativeTimestamp() != 0L) { setRelativeTimestamp(other.getRelativeTimestamp()); } - if (other.getPressure() != 0F) { - setPressure(other.getPressure()); + if (other.getMac() != 0L) { + setMac(other.getMac()); } + if (other.getRssi() != 0) { + setRssi(other.getRssi()); + } + if (other.hasPosition()) { + mergePosition(other.getPosition()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } + @java.lang.Override public final boolean isInitialized() { return true; } + @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Pressure_Sample parsedMessage = null; + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + mac_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + rssi_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + input.readMessage( + getPositionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Pressure_Sample) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private long relativeTimestamp_ ; /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. */ + @java.lang.Override public long getRelativeTimestamp() { return relativeTimestamp_; } /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. */ public Builder setRelativeTimestamp(long value) { - + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @return This builder for chaining. */ public Builder clearRelativeTimestamp() { - + bitField0_ = (bitField0_ & ~0x00000001); relativeTimestamp_ = 0L; onChanged(); return this; } - private float pressure_ ; + private long mac_ ; /** *
-       * mbar
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
        * 
* - * optional float pressure = 2; + * int64 mac = 2; + * @return The mac. */ - public float getPressure() { - return pressure_; + @java.lang.Override + public long getMac() { + return mac_; } /** *
-       * mbar
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
        * 
* - * optional float pressure = 2; + * int64 mac = 2; + * @param value The mac to set. + * @return This builder for chaining. */ - public Builder setPressure(float value) { - - pressure_ = value; + public Builder setMac(long value) { + + mac_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** *
-       * mbar
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
        * 
* - * optional float pressure = 2; + * int64 mac = 2; + * @return This builder for chaining. */ - public Builder clearPressure() { - - pressure_ = 0F; + public Builder clearMac() { + bitField0_ = (bitField0_ & ~0x00000002); + mac_ = 0L; onChanged(); return this; } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + + private int rssi_ ; + /** + *
+       * rssi integer in dBm.
+       * typically between -120 and -10
+       * 
+ * + * int32 rssi = 3; + * @return The rssi. + */ + @java.lang.Override + public int getRssi() { + return rssi_; } + /** + *
+       * rssi integer in dBm.
+       * typically between -120 and -10
+       * 
+ * + * int32 rssi = 3; + * @param value The rssi to set. + * @return This builder for chaining. + */ + public Builder setRssi(int value) { - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + rssi_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * rssi integer in dBm.
+       * typically between -120 and -10
+       * 
+ * + * int32 rssi = 3; + * @return This builder for chaining. + */ + public Builder clearRssi() { + bitField0_ = (bitField0_ & ~0x00000004); + rssi_ = 0; + onChanged(); return this; } + private com.openpositioning.PositionMe.Traj.GNSSPosition position_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> positionBuilder_; + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + * @return Whether the position field is set. + */ + public boolean hasPosition() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + * @return The position. + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition getPosition() { + if (positionBuilder_ == null) { + return position_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; + } else { + return positionBuilder_.getMessage(); + } + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + */ + public Builder setPosition(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (positionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + position_ = value; + } else { + positionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + */ + public Builder setPosition( + com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (positionBuilder_ == null) { + position_ = builderForValue.build(); + } else { + positionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + */ + public Builder mergePosition(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (positionBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + position_ != null && + position_ != com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()) { + getPositionBuilder().mergeFrom(value); + } else { + position_ = value; + } + } else { + positionBuilder_.mergeFrom(value); + } + if (position_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + */ + public Builder clearPosition() { + bitField0_ = (bitField0_ & ~0x00000008); + position_ = null; + if (positionBuilder_ != null) { + positionBuilder_.dispose(); + positionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder getPositionBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPositionFieldBuilder().getBuilder(); + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + */ + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getPositionOrBuilder() { + if (positionBuilder_ != null) { + return positionBuilder_.getMessageOrBuilder(); + } else { + return position_ == null ? + com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; + } + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> + getPositionFieldBuilder() { + if (positionBuilder_ == null) { + positionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder>( + getPosition(), + getParentForChildren(), + isClean()); + position_ = null; + } + return positionBuilder_; + } - // @@protoc_insertion_point(builder_scope:Pressure_Sample) + // @@protoc_insertion_point(builder_scope:RFScan) } - // @@protoc_insertion_point(class_scope:Pressure_Sample) - private static final Pressure_Sample DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:RFScan) + private static final com.openpositioning.PositionMe.Traj.RFScan DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new Pressure_Sample(); + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.RFScan(); } - public static Pressure_Sample getDefaultInstance() { + public static com.openpositioning.PositionMe.Traj.RFScan getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Pressure_Sample parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Pressure_Sample(input, extensionRegistry); + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RFScan parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } - @Override - public com.google.protobuf.Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } - public Pressure_Sample getDefaultInstanceForType() { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RFScan getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface Light_SampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:Light_Sample) - com.google.protobuf.MessageOrBuilder { + public interface WiFiRTTReadingOrBuilder extends + // @@protoc_insertion_point(interface_extends:WiFiRTTReading) + com.google.protobuf.MessageOrBuilder { /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. */ long getRelativeTimestamp(); /** *
-     * lux
+     * Integer encoding of the hex mac address (BSSID)
+     * e.g. 207394925843984
      * 
* - * optional float light = 2; + * int64 mac = 2; + * @return The mac. */ - float getLight(); + long getMac(); + + /** + *
+     * in mm
+     * 
+ * + * float distance = 3; + * @return The distance. + */ + float getDistance(); + + /** + *
+     * in mm
+     * 
+ * + * float distance_std = 4; + * @return The distanceStd. + */ + float getDistanceStd(); + + /** + *
+     * rssi integer in dBm.
+     * typically between -120 and -10
+     * 
+ * + * int32 rssi = 5; + * @return The rssi. + */ + int getRssi(); } /** - * Protobuf type {@code Light_Sample} + * Protobuf type {@code WiFiRTTReading} */ - 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) { + public static final class WiFiRTTReading extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:WiFiRTTReading) + WiFiRTTReadingOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + WiFiRTTReading.class.getName()); + } + // Use WiFiRTTReading.newBuilder() to construct. + private WiFiRTTReading(com.google.protobuf.GeneratedMessage.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(); - } + private WiFiRTTReading() { } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_Light_Sample_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiRTTReading_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Light_Sample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Light_Sample.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiRTTReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.WiFiRTTReading.class, com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder.class); } public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; - private long relativeTimestamp_; + private long relativeTimestamp_ = 0L; /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. */ + @java.lang.Override public long getRelativeTimestamp() { return relativeTimestamp_; } - public static final int LIGHT_FIELD_NUMBER = 2; - private float light_; + public static final int MAC_FIELD_NUMBER = 2; + private long mac_ = 0L; /** *
-     * lux
+     * Integer encoding of the hex mac address (BSSID)
+     * e.g. 207394925843984
      * 
* - * optional float light = 2; + * int64 mac = 2; + * @return The mac. */ - public float getLight() { - return light_; + @java.lang.Override + public long getMac() { + return mac_; + } + + public static final int DISTANCE_FIELD_NUMBER = 3; + private float distance_ = 0F; + /** + *
+     * in mm
+     * 
+ * + * float distance = 3; + * @return The distance. + */ + @java.lang.Override + public float getDistance() { + return distance_; + } + + public static final int DISTANCE_STD_FIELD_NUMBER = 4; + private float distanceStd_ = 0F; + /** + *
+     * in mm
+     * 
+ * + * float distance_std = 4; + * @return The distanceStd. + */ + @java.lang.Override + public float getDistanceStd() { + return distanceStd_; + } + + public static final int RSSI_FIELD_NUMBER = 5; + private int rssi_ = 0; + /** + *
+     * rssi integer in dBm.
+     * typically between -120 and -10
+     * 
+ * + * int32 rssi = 5; + * @return The rssi. + */ + @java.lang.Override + public int getRssi() { + return rssi_; } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -8024,16 +15923,28 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { + throws java.io.IOException { if (relativeTimestamp_ != 0L) { output.writeInt64(1, relativeTimestamp_); } - if (light_ != 0F) { - output.writeFloat(2, light_); + if (mac_ != 0L) { + output.writeInt64(2, mac_); } + if (java.lang.Float.floatToRawIntBits(distance_) != 0) { + output.writeFloat(3, distance_); + } + if (java.lang.Float.floatToRawIntBits(distanceStd_) != 0) { + output.writeFloat(4, distanceStd_); + } + if (rssi_ != 0) { + output.writeInt32(5, rssi_); + } + getUnknownFields().writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -8041,677 +15952,810 @@ public int getSerializedSize() { size = 0; if (relativeTimestamp_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, relativeTimestamp_); + .computeInt64Size(1, relativeTimestamp_); + } + if (mac_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(2, mac_); + } + if (java.lang.Float.floatToRawIntBits(distance_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, distance_); + } + if (java.lang.Float.floatToRawIntBits(distanceStd_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, distanceStd_); } - if (light_ != 0F) { + if (rssi_ != 0) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(2, light_); + .computeInt32Size(5, rssi_); } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj instanceof Light_Sample)) { + if (!(obj instanceof com.openpositioning.PositionMe.Traj.WiFiRTTReading)) { 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; + com.openpositioning.PositionMe.Traj.WiFiRTTReading other = (com.openpositioning.PositionMe.Traj.WiFiRTTReading) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (getMac() + != other.getMac()) return false; + if (java.lang.Float.floatToIntBits(getDistance()) + != java.lang.Float.floatToIntBits( + other.getDistance())) return false; + if (java.lang.Float.floatToIntBits(getDistanceStd()) + != java.lang.Float.floatToIntBits( + other.getDistanceStd())) return false; + if (getRssi() + != other.getRssi()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - @Override + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (19 * hash) + getDescriptor().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(); + getRelativeTimestamp()); + hash = (37 * hash) + MAC_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMac()); + hash = (37 * hash) + DISTANCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getDistance()); + hash = (37 * hash) + DISTANCE_STD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getDistanceStd()); + hash = (37 * hash) + RSSI_FIELD_NUMBER; + hash = (53 * hash) + getRssi(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - - public static Light_Sample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading 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 { + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading 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 { + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading 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 { + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading 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 static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(Light_Sample prototype) { + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.WiFiRTTReading prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code Light_Sample} + * Protobuf type {@code WiFiRTTReading} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:Light_Sample) - Light_SampleOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:WiFiRTTReading) + com.openpositioning.PositionMe.Traj.WiFiRTTReadingOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_Light_Sample_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiRTTReading_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Light_Sample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Light_Sample.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiRTTReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.WiFiRTTReading.class, com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder.class); } - // Construct using Traj.Light_Sample.newBuilder() + // Construct using com.openpositioning.PositionMe.Traj.WiFiRTTReading.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } + @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; relativeTimestamp_ = 0L; - - light_ = 0F; - + mac_ = 0L; + distance_ = 0F; + distanceStd_ = 0F; + rssi_ = 0; return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Traj.internal_static_Light_Sample_descriptor; + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiRTTReading_descriptor; } - public Light_Sample getDefaultInstanceForType() { - return Light_Sample.getDefaultInstance(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiRTTReading getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.WiFiRTTReading.getDefaultInstance(); } - public Light_Sample build() { - Light_Sample result = buildPartial(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiRTTReading build() { + com.openpositioning.PositionMe.Traj.WiFiRTTReading result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public Light_Sample buildPartial() { - Light_Sample result = new Light_Sample(this); - result.relativeTimestamp_ = relativeTimestamp_; - result.light_ = light_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiRTTReading buildPartial() { + com.openpositioning.PositionMe.Traj.WiFiRTTReading result = new com.openpositioning.PositionMe.Traj.WiFiRTTReading(this); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.openpositioning.PositionMe.Traj.WiFiRTTReading result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.mac_ = mac_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.distance_ = distance_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.distanceStd_ = distanceStd_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.rssi_ = rssi_; + } } + + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Light_Sample) { - return mergeFrom((Light_Sample)other); + if (other instanceof com.openpositioning.PositionMe.Traj.WiFiRTTReading) { + return mergeFrom((com.openpositioning.PositionMe.Traj.WiFiRTTReading)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(Light_Sample other) { - if (other == Light_Sample.getDefaultInstance()) return this; + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.WiFiRTTReading other) { + if (other == com.openpositioning.PositionMe.Traj.WiFiRTTReading.getDefaultInstance()) return this; if (other.getRelativeTimestamp() != 0L) { setRelativeTimestamp(other.getRelativeTimestamp()); } - if (other.getLight() != 0F) { - setLight(other.getLight()); + if (other.getMac() != 0L) { + setMac(other.getMac()); } + if (other.getDistance() != 0F) { + setDistance(other.getDistance()); + } + if (other.getDistanceStd() != 0F) { + setDistanceStd(other.getDistanceStd()); + } + if (other.getRssi() != 0) { + setRssi(other.getRssi()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } + @java.lang.Override public final boolean isInitialized() { return true; } + @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Light_Sample parsedMessage = null; + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + mac_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 29: { + distance_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 37: { + distanceStd_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + case 40: { + rssi_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Light_Sample) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private long relativeTimestamp_ ; /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. */ + @java.lang.Override public long getRelativeTimestamp() { return relativeTimestamp_; } /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. */ public Builder setRelativeTimestamp(long value) { - + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * optional int64 relative_timestamp = 1; + * int64 relative_timestamp = 1; + * @return This builder for chaining. */ public Builder clearRelativeTimestamp() { - + bitField0_ = (bitField0_ & ~0x00000001); relativeTimestamp_ = 0L; onChanged(); return this; } - private float light_ ; + private long mac_ ; /** *
-       * lux
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
        * 
* - * optional float light = 2; + * int64 mac = 2; + * @return The mac. */ - public float getLight() { - return light_; + @java.lang.Override + public long getMac() { + return mac_; } /** *
-       * lux
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
        * 
* - * optional float light = 2; + * int64 mac = 2; + * @param value The mac to set. + * @return This builder for chaining. */ - public Builder setLight(float value) { - - light_ = value; + public Builder setMac(long value) { + + mac_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** *
-       * lux
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
        * 
* - * optional float light = 2; + * int64 mac = 2; + * @return This builder for chaining. */ - public Builder clearLight() { - - light_ = 0F; + public Builder clearMac() { + bitField0_ = (bitField0_ & ~0x00000002); + mac_ = 0L; + onChanged(); + return this; + } + + private float distance_ ; + /** + *
+       * in mm
+       * 
+ * + * float distance = 3; + * @return The distance. + */ + @java.lang.Override + public float getDistance() { + return distance_; + } + /** + *
+       * in mm
+       * 
+ * + * float distance = 3; + * @param value The distance to set. + * @return This builder for chaining. + */ + public Builder setDistance(float value) { + + distance_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + /** + *
+       * in mm
+       * 
+ * + * float distance = 3; + * @return This builder for chaining. + */ + public Builder clearDistance() { + bitField0_ = (bitField0_ & ~0x00000004); + distance_ = 0F; + onChanged(); return this; } - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + private float distanceStd_ ; + /** + *
+       * in mm
+       * 
+ * + * float distance_std = 4; + * @return The distanceStd. + */ + @java.lang.Override + public float getDistanceStd() { + return distanceStd_; + } + /** + *
+       * in mm
+       * 
+ * + * float distance_std = 4; + * @param value The distanceStd to set. + * @return This builder for chaining. + */ + public Builder setDistanceStd(float value) { + + distanceStd_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * in mm
+       * 
+ * + * float distance_std = 4; + * @return This builder for chaining. + */ + public Builder clearDistanceStd() { + bitField0_ = (bitField0_ & ~0x00000008); + distanceStd_ = 0F; + onChanged(); return this; } + private int rssi_ ; + /** + *
+       * rssi integer in dBm.
+       * typically between -120 and -10
+       * 
+ * + * int32 rssi = 5; + * @return The rssi. + */ + @java.lang.Override + public int getRssi() { + return rssi_; + } + /** + *
+       * rssi integer in dBm.
+       * typically between -120 and -10
+       * 
+ * + * int32 rssi = 5; + * @param value The rssi to set. + * @return This builder for chaining. + */ + public Builder setRssi(int value) { + + rssi_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * rssi integer in dBm.
+       * typically between -120 and -10
+       * 
+ * + * int32 rssi = 5; + * @return This builder for chaining. + */ + public Builder clearRssi() { + bitField0_ = (bitField0_ & ~0x00000010); + rssi_ = 0; + onChanged(); + return this; + } - // @@protoc_insertion_point(builder_scope:Light_Sample) + // @@protoc_insertion_point(builder_scope:WiFiRTTReading) } - // @@protoc_insertion_point(class_scope:Light_Sample) - private static final Light_Sample DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:WiFiRTTReading) + private static final com.openpositioning.PositionMe.Traj.WiFiRTTReading DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new Light_Sample(); + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.WiFiRTTReading(); } - public static Light_Sample getDefaultInstance() { + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Light_Sample parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Light_Sample(input, extensionRegistry); + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WiFiRTTReading parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } - @Override - public com.google.protobuf.Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } - public Light_Sample getDefaultInstanceForType() { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiRTTReading getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface GNSS_SampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:GNSS_Sample) - com.google.protobuf.MessageOrBuilder { - - /** - * optional 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(); + public interface WiFiAPDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:WiFiAPData) + com.google.protobuf.MessageOrBuilder { /** *
-     * m/s
+     * Integer encoding of the hex mac address (BSSID)
+     * e.g. 207394925843984
      * 
* - * optional float speed = 6; + * int64 mac = 1; + * @return The mac. */ - float getSpeed(); + long getMac(); /** *
-     * e.g 'gps' or 'network'
+     * E.g. 'Eduroam' or 'Starbucks_free_wifi'
      * 
* - * optional string provider = 7; + * string ssid = 2; + * @return The ssid. */ - String getProvider(); + java.lang.String getSsid(); /** *
-     * e.g 'gps' or 'network'
+     * E.g. 'Eduroam' or 'Starbucks_free_wifi'
      * 
* - * optional string provider = 7; + * string ssid = 2; + * @return The bytes for ssid. */ 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_; - } + getSsidBytes(); - public static final int ALTITUDE_FIELD_NUMBER = 4; - private float altitude_; /** *
-     *metres
+     * Typically 2.4GHz or 5GHz
      * 
* - * optional float altitude = 4; + * int64 frequency = 3; + * @return The frequency. */ - public float getAltitude() { - return altitude_; - } + long getFrequency(); - public static final int ACCURACY_FIELD_NUMBER = 5; - private float accuracy_; /** *
-     * metres
+     * Flag to indicate if the AP supports RTT measurements
      * 
* - * optional float accuracy = 5; + * bool rtt_enabled = 4; + * @return The rttEnabled. */ - public float getAccuracy() { - return accuracy_; + boolean getRttEnabled(); + } + /** + * Protobuf type {@code WiFiAPData} + */ + public static final class WiFiAPData extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:WiFiAPData) + WiFiAPDataOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + WiFiAPData.class.getName()); + } + // Use WiFiAPData.newBuilder() to construct. + private WiFiAPData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private WiFiAPData() { + ssid_ = ""; } - public static final int SPEED_FIELD_NUMBER = 6; - private float speed_; + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiAPData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiAPData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.WiFiAPData.class, com.openpositioning.PositionMe.Traj.WiFiAPData.Builder.class); + } + + public static final int MAC_FIELD_NUMBER = 1; + private long mac_ = 0L; /** *
-     * m/s
+     * Integer encoding of the hex mac address (BSSID)
+     * e.g. 207394925843984
      * 
* - * optional float speed = 6; + * int64 mac = 1; + * @return The mac. */ - public float getSpeed() { - return speed_; + @java.lang.Override + public long getMac() { + return mac_; } - public static final int PROVIDER_FIELD_NUMBER = 7; - private volatile Object provider_; + public static final int SSID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object ssid_ = ""; /** *
-     * e.g 'gps' or 'network'
+     * E.g. 'Eduroam' or 'Starbucks_free_wifi'
      * 
* - * optional string provider = 7; + * string ssid = 2; + * @return The ssid. */ - public String getProvider() { - Object ref = provider_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getSsid() { + java.lang.Object ref = ssid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - provider_ = s; + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ssid_ = s; return s; } } /** *
-     * e.g 'gps' or 'network'
+     * E.g. 'Eduroam' or 'Starbucks_free_wifi'
      * 
* - * optional string provider = 7; + * string ssid = 2; + * @return The bytes for ssid. */ + @java.lang.Override 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; + getSsidBytes() { + java.lang.Object ref = ssid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ssid_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } + public static final int FREQUENCY_FIELD_NUMBER = 3; + private long frequency_ = 0L; + /** + *
+     * Typically 2.4GHz or 5GHz
+     * 
+ * + * int64 frequency = 3; + * @return The frequency. + */ + @java.lang.Override + public long getFrequency() { + return frequency_; + } + + public static final int RTT_ENABLED_FIELD_NUMBER = 4; + private boolean rttEnabled_ = false; + /** + *
+     * Flag to indicate if the AP supports RTT measurements
+     * 
+ * + * bool rtt_enabled = 4; + * @return The rttEnabled. + */ + @java.lang.Override + public boolean getRttEnabled() { + return rttEnabled_; + } + private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -8721,899 +16765,902 @@ public final boolean isInitialized() { return true; } + @java.lang.Override 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_); + throws java.io.IOException { + if (mac_ != 0L) { + output.writeInt64(1, mac_); } - if (accuracy_ != 0F) { - output.writeFloat(5, accuracy_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ssid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, ssid_); } - if (speed_ != 0F) { - output.writeFloat(6, speed_); + if (frequency_ != 0L) { + output.writeInt64(3, frequency_); } - if (!getProviderBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, provider_); + if (rttEnabled_ != false) { + output.writeBool(4, rttEnabled_); } + getUnknownFields().writeTo(output); } + @java.lang.Override 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) { + if (mac_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, longitude_); + .computeInt64Size(1, mac_); } - if (altitude_ != 0F) { - size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, altitude_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ssid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, ssid_); } - if (accuracy_ != 0F) { + if (frequency_ != 0L) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(5, accuracy_); + .computeInt64Size(3, frequency_); } - if (speed_ != 0F) { + if (rttEnabled_ != false) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(6, speed_); - } - if (!getProviderBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, provider_); + .computeBoolSize(4, rttEnabled_); } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj instanceof GNSS_Sample)) { + if (!(obj instanceof com.openpositioning.PositionMe.Traj.WiFiAPData)) { 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 + com.openpositioning.PositionMe.Traj.WiFiAPData other = (com.openpositioning.PositionMe.Traj.WiFiAPData) obj; + + if (getMac() + != other.getMac()) return false; + if (!getSsid() + .equals(other.getSsid())) return false; + if (getFrequency() + != other.getFrequency()) return false; + if (getRttEnabled() + != other.getRttEnabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.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 = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAC_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(); + 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 = (37 * hash) + RTT_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getRttEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static GNSS_Sample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.WiFiAPData 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 { + public static com.openpositioning.PositionMe.Traj.WiFiAPData 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 { + public static com.openpositioning.PositionMe.Traj.WiFiAPData 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 { + public static com.openpositioning.PositionMe.Traj.WiFiAPData 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 static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(GNSS_Sample prototype) { + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.WiFiAPData prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code GNSS_Sample} + * Protobuf type {@code WiFiAPData} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:GNSS_Sample) - GNSS_SampleOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:WiFiAPData) + com.openpositioning.PositionMe.Traj.WiFiAPDataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_GNSS_Sample_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiAPData_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_GNSS_Sample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - GNSS_Sample.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiAPData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.WiFiAPData.class, com.openpositioning.PositionMe.Traj.WiFiAPData.Builder.class); } - // Construct using Traj.GNSS_Sample.newBuilder() + // Construct using com.openpositioning.PositionMe.Traj.WiFiAPData.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } + @java.lang.Override public Builder clear() { super.clear(); - relativeTimestamp_ = 0L; - - latitude_ = 0F; - - longitude_ = 0F; - - altitude_ = 0F; - - accuracy_ = 0F; - - speed_ = 0F; - - provider_ = ""; - + bitField0_ = 0; + mac_ = 0L; + ssid_ = ""; + frequency_ = 0L; + rttEnabled_ = false; return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Traj.internal_static_GNSS_Sample_descriptor; + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiAPData_descriptor; } - public GNSS_Sample getDefaultInstanceForType() { - return GNSS_Sample.getDefaultInstance(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiAPData getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.WiFiAPData.getDefaultInstance(); } - public GNSS_Sample build() { - GNSS_Sample result = buildPartial(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiAPData build() { + com.openpositioning.PositionMe.Traj.WiFiAPData result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public GNSS_Sample buildPartial() { - GNSS_Sample result = new GNSS_Sample(this); - result.relativeTimestamp_ = relativeTimestamp_; - result.latitude_ = latitude_; - result.longitude_ = longitude_; - result.altitude_ = altitude_; - result.accuracy_ = accuracy_; - result.speed_ = speed_; - result.provider_ = provider_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiAPData buildPartial() { + com.openpositioning.PositionMe.Traj.WiFiAPData result = new com.openpositioning.PositionMe.Traj.WiFiAPData(this); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.openpositioning.PositionMe.Traj.WiFiAPData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mac_ = mac_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ssid_ = ssid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.frequency_ = frequency_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.rttEnabled_ = rttEnabled_; + } } + + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof GNSS_Sample) { - return mergeFrom((GNSS_Sample)other); + if (other instanceof com.openpositioning.PositionMe.Traj.WiFiAPData) { + return mergeFrom((com.openpositioning.PositionMe.Traj.WiFiAPData)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(GNSS_Sample other) { - if (other == GNSS_Sample.getDefaultInstance()) return this; - if (other.getRelativeTimestamp() != 0L) { - setRelativeTimestamp(other.getRelativeTimestamp()); - } - if (other.getLatitude() != 0F) { - setLatitude(other.getLatitude()); - } - if (other.getLongitude() != 0F) { - setLongitude(other.getLongitude()); - } - if (other.getAltitude() != 0F) { - setAltitude(other.getAltitude()); + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.WiFiAPData other) { + if (other == com.openpositioning.PositionMe.Traj.WiFiAPData.getDefaultInstance()) return this; + if (other.getMac() != 0L) { + setMac(other.getMac()); } - if (other.getAccuracy() != 0F) { - setAccuracy(other.getAccuracy()); + if (!other.getSsid().isEmpty()) { + ssid_ = other.ssid_; + bitField0_ |= 0x00000002; + onChanged(); } - if (other.getSpeed() != 0F) { - setSpeed(other.getSpeed()); + if (other.getFrequency() != 0L) { + setFrequency(other.getFrequency()); } - if (!other.getProvider().isEmpty()) { - provider_ = other.provider_; - onChanged(); + if (other.getRttEnabled() != false) { + setRttEnabled(other.getRttEnabled()); } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } + @java.lang.Override public final boolean isInitialized() { return true; } + @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - GNSS_Sample parsedMessage = null; + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + mac_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + ssid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + frequency_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + rttEnabled_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (GNSS_Sample) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long relativeTimestamp_ ; - /** - * optional 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(); + onChanged(); + } // finally return this; } + private int bitField0_; - private float longitude_ ; - /** - *
-       * longitude between -180 and 180
-       * 
- * - * optional float longitude = 3; - */ - public float getLongitude() { - return longitude_; - } + private long mac_ ; /** *
-       * longitude between -180 and 180
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
        * 
* - * optional float longitude = 3; + * int64 mac = 1; + * @return The mac. */ - public Builder setLongitude(float value) { - - longitude_ = value; - onChanged(); - return this; + @java.lang.Override + public long getMac() { + return mac_; } /** *
-       * longitude between -180 and 180
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
        * 
* - * optional float longitude = 3; + * int64 mac = 1; + * @param value The mac to set. + * @return This builder for chaining. */ - public Builder clearLongitude() { - - longitude_ = 0F; - onChanged(); - return this; - } + public Builder setMac(long value) { - 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; + mac_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** *
-       *metres
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
        * 
* - * optional float altitude = 4; + * int64 mac = 1; + * @return This builder for chaining. */ - public Builder clearAltitude() { - - altitude_ = 0F; + public Builder clearMac() { + bitField0_ = (bitField0_ & ~0x00000001); + mac_ = 0L; onChanged(); return this; } - private float accuracy_ ; + private java.lang.Object ssid_ = ""; /** *
-       * metres
+       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
        * 
* - * optional float accuracy = 5; + * string ssid = 2; + * @return The ssid. */ - public float getAccuracy() { - return accuracy_; + public java.lang.String getSsid() { + java.lang.Object ref = ssid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ssid_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** *
-       * metres
+       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
        * 
* - * optional float accuracy = 5; + * string ssid = 2; + * @return The bytes for ssid. */ - public Builder setAccuracy(float value) { - - accuracy_ = value; - onChanged(); - return this; + public com.google.protobuf.ByteString + getSsidBytes() { + java.lang.Object ref = ssid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ssid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** *
-       * metres
+       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
        * 
* - * optional float accuracy = 5; + * string ssid = 2; + * @param value The ssid to set. + * @return This builder for chaining. */ - public Builder clearAccuracy() { - - accuracy_ = 0F; + public Builder setSsid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ssid_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } - - private float speed_ ; /** *
-       * m/s
+       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
        * 
* - * optional float speed = 6; + * string ssid = 2; + * @return This builder for chaining. */ - public float getSpeed() { - return speed_; + public Builder clearSsid() { + ssid_ = getDefaultInstance().getSsid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } /** *
-       * m/s
+       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
        * 
* - * optional float speed = 6; + * string ssid = 2; + * @param value The bytes for ssid to set. + * @return This builder for chaining. */ - public Builder setSpeed(float value) { - - speed_ = value; + public Builder setSsidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ssid_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } + + private long frequency_ ; /** *
-       * m/s
+       * Typically 2.4GHz or 5GHz
        * 
* - * optional float speed = 6; + * int64 frequency = 3; + * @return The frequency. */ - public Builder clearSpeed() { - - speed_ = 0F; - onChanged(); - return this; + @java.lang.Override + public long getFrequency() { + return frequency_; } - - private Object provider_ = ""; /** *
-       * e.g 'gps' or 'network'
+       * Typically 2.4GHz or 5GHz
        * 
* - * optional string provider = 7; + * int64 frequency = 3; + * @param value The frequency to set. + * @return This builder for chaining. */ - 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; - } + public Builder setFrequency(long value) { + + frequency_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; } /** *
-       * e.g 'gps' or 'network'
+       * Typically 2.4GHz or 5GHz
        * 
* - * optional string provider = 7; + * int64 frequency = 3; + * @return This builder for chaining. */ - 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; - } + public Builder clearFrequency() { + bitField0_ = (bitField0_ & ~0x00000004); + frequency_ = 0L; + onChanged(); + return this; } + + private boolean rttEnabled_ ; /** *
-       * e.g 'gps' or 'network'
+       * Flag to indicate if the AP supports RTT measurements
        * 
* - * optional string provider = 7; + * bool rtt_enabled = 4; + * @return The rttEnabled. */ - public Builder setProvider( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - provider_ = value; - onChanged(); - return this; + @java.lang.Override + public boolean getRttEnabled() { + return rttEnabled_; } /** *
-       * e.g 'gps' or 'network'
+       * Flag to indicate if the AP supports RTT measurements
        * 
* - * optional string provider = 7; + * bool rtt_enabled = 4; + * @param value The rttEnabled to set. + * @return This builder for chaining. */ - public Builder clearProvider() { - - provider_ = getDefaultInstance().getProvider(); + public Builder setRttEnabled(boolean value) { + + rttEnabled_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } /** *
-       * e.g 'gps' or 'network'
+       * Flag to indicate if the AP supports RTT measurements
        * 
* - * optional string provider = 7; + * bool rtt_enabled = 4; + * @return This builder for chaining. */ - public Builder setProviderBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - provider_ = value; + public Builder clearRttEnabled() { + bitField0_ = (bitField0_ & ~0x00000008); + rttEnabled_ = false; 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(builder_scope:WiFiAPData) } - // @@protoc_insertion_point(class_scope:GNSS_Sample) - private static final GNSS_Sample DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:WiFiAPData) + private static final com.openpositioning.PositionMe.Traj.WiFiAPData DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new GNSS_Sample(); + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.WiFiAPData(); } - public static GNSS_Sample getDefaultInstance() { + public static com.openpositioning.PositionMe.Traj.WiFiAPData getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public GNSS_Sample parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new GNSS_Sample(input, extensionRegistry); + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WiFiAPData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } - @Override - public com.google.protobuf.Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } - public GNSS_Sample getDefaultInstanceForType() { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiAPData getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface WiFi_SampleOrBuilder extends - // @@protoc_insertion_point(interface_extends:WiFi_Sample) - com.google.protobuf.MessageOrBuilder { + public interface BleDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:BleData) + com.google.protobuf.MessageOrBuilder { /** - * optional int64 relative_timestamp = 1; + * string mac_address = 1; + * @return The macAddress. */ - long getRelativeTimestamp(); + java.lang.String getMacAddress(); + /** + * string mac_address = 1; + * @return The bytes for macAddress. + */ + com.google.protobuf.ByteString + getMacAddressBytes(); /** - * repeated .Mac_Scan mac_scans = 2; + * string name = 2; + * @return The name. */ - java.util.List - getMacScansList(); + java.lang.String getName(); /** - * repeated .Mac_Scan mac_scans = 2; + * string name = 2; + * @return The bytes for name. */ - Mac_Scan getMacScans(int index); + com.google.protobuf.ByteString + getNameBytes(); + + /** + * int32 tx_power_level = 3; + * @return The txPowerLevel. + */ + int getTxPowerLevel(); + + /** + * int32 advertise_flags = 4; + * @return The advertiseFlags. + */ + int getAdvertiseFlags(); + /** - * repeated .Mac_Scan mac_scans = 2; + * repeated string service_uuids = 5; + * @return A list containing the serviceUuids. */ - int getMacScansCount(); + java.util.List + getServiceUuidsList(); /** - * repeated .Mac_Scan mac_scans = 2; + * repeated string service_uuids = 5; + * @return The count of serviceUuids. */ - java.util.List - getMacScansOrBuilderList(); + int getServiceUuidsCount(); /** - * repeated .Mac_Scan mac_scans = 2; + * repeated string service_uuids = 5; + * @param index The index of the element to return. + * @return The serviceUuids at the given index. */ - Mac_ScanOrBuilder getMacScansOrBuilder( - int index); + java.lang.String getServiceUuids(int index); + /** + * repeated string service_uuids = 5; + * @param index The index of the value to return. + * @return The bytes of the serviceUuids at the given index. + */ + com.google.protobuf.ByteString + getServiceUuidsBytes(int index); + + /** + * bytes manufacturer_data = 6; + * @return The manufacturerData. + */ + com.google.protobuf.ByteString getManufacturerData(); } /** - * Protobuf type {@code WiFi_Sample} + * Protobuf type {@code BleData} */ - 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) { + public static final class BleData extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:BleData) + BleDataOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + BleData.class.getName()); + } + // Use BleData.newBuilder() to construct. + private BleData(com.google.protobuf.GeneratedMessage.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: { + private BleData() { + macAddress_ = ""; + name_ = ""; + serviceUuids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + manufacturerData_ = com.google.protobuf.ByteString.EMPTY; + } - relativeTimestamp_ = input.readInt64(); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - macScans_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - macScans_.add( - input.readMessage(Mac_Scan.parser(), extensionRegistry)); - 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 { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - macScans_ = java.util.Collections.unmodifiableList(macScans_); - } - makeExtensionsImmutable(); + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_BleData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_BleData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.BleData.class, com.openpositioning.PositionMe.Traj.BleData.Builder.class); + } + + public static final int MAC_ADDRESS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object macAddress_ = ""; + /** + * string mac_address = 1; + * @return The macAddress. + */ + @java.lang.Override + public java.lang.String getMacAddress() { + java.lang.Object ref = macAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + macAddress_ = s; + return s; } } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_WiFi_Sample_descriptor; + /** + * string mac_address = 1; + * @return The bytes for macAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMacAddressBytes() { + java.lang.Object ref = macAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + macAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_WiFi_Sample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - WiFi_Sample.class, Builder.class); + public static final int TX_POWER_LEVEL_FIELD_NUMBER = 3; + private int txPowerLevel_ = 0; + /** + * int32 tx_power_level = 3; + * @return The txPowerLevel. + */ + @java.lang.Override + public int getTxPowerLevel() { + return txPowerLevel_; } - private int bitField0_; - public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; - private long relativeTimestamp_; + public static final int ADVERTISE_FLAGS_FIELD_NUMBER = 4; + private int advertiseFlags_ = 0; /** - * optional int64 relative_timestamp = 1; + * int32 advertise_flags = 4; + * @return The advertiseFlags. */ - public long getRelativeTimestamp() { - return relativeTimestamp_; + @java.lang.Override + public int getAdvertiseFlags() { + return advertiseFlags_; } - public static final int MAC_SCANS_FIELD_NUMBER = 2; - private java.util.List macScans_; + public static final int SERVICE_UUIDS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList serviceUuids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); /** - * repeated .Mac_Scan mac_scans = 2; + * repeated string service_uuids = 5; + * @return A list containing the serviceUuids. */ - public java.util.List getMacScansList() { - return macScans_; + public com.google.protobuf.ProtocolStringList + getServiceUuidsList() { + return serviceUuids_; } /** - * repeated .Mac_Scan mac_scans = 2; + * repeated string service_uuids = 5; + * @return The count of serviceUuids. */ - public java.util.List - getMacScansOrBuilderList() { - return macScans_; + public int getServiceUuidsCount() { + return serviceUuids_.size(); } /** - * repeated .Mac_Scan mac_scans = 2; + * repeated string service_uuids = 5; + * @param index The index of the element to return. + * @return The serviceUuids at the given index. */ - public int getMacScansCount() { - return macScans_.size(); + public java.lang.String getServiceUuids(int index) { + return serviceUuids_.get(index); } /** - * repeated .Mac_Scan mac_scans = 2; + * repeated string service_uuids = 5; + * @param index The index of the value to return. + * @return The bytes of the serviceUuids at the given index. */ - public Mac_Scan getMacScans(int index) { - return macScans_.get(index); + public com.google.protobuf.ByteString + getServiceUuidsBytes(int index) { + return serviceUuids_.getByteString(index); } + + public static final int MANUFACTURER_DATA_FIELD_NUMBER = 6; + private com.google.protobuf.ByteString manufacturerData_ = com.google.protobuf.ByteString.EMPTY; /** - * repeated .Mac_Scan mac_scans = 2; + * bytes manufacturer_data = 6; + * @return The manufacturerData. */ - public Mac_ScanOrBuilder getMacScansOrBuilder( - int index) { - return macScans_.get(index); + @java.lang.Override + public com.google.protobuf.ByteString getManufacturerData() { + return manufacturerData_; } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -9623,786 +17670,921 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (relativeTimestamp_ != 0L) { - output.writeInt64(1, relativeTimestamp_); + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(macAddress_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, macAddress_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, name_); + } + if (txPowerLevel_ != 0) { + output.writeInt32(3, txPowerLevel_); + } + if (advertiseFlags_ != 0) { + output.writeInt32(4, advertiseFlags_); } - for (int i = 0; i < macScans_.size(); i++) { - output.writeMessage(2, macScans_.get(i)); + for (int i = 0; i < serviceUuids_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, serviceUuids_.getRaw(i)); } + if (!manufacturerData_.isEmpty()) { + output.writeBytes(6, manufacturerData_); + } + getUnknownFields().writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; - if (relativeTimestamp_ != 0L) { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(macAddress_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, macAddress_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_); + } + if (txPowerLevel_ != 0) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, relativeTimestamp_); + .computeInt32Size(3, txPowerLevel_); + } + if (advertiseFlags_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, advertiseFlags_); + } + { + int dataSize = 0; + for (int i = 0; i < serviceUuids_.size(); i++) { + dataSize += computeStringSizeNoTag(serviceUuids_.getRaw(i)); + } + size += dataSize; + size += 1 * getServiceUuidsList().size(); } - for (int i = 0; i < macScans_.size(); i++) { + if (!manufacturerData_.isEmpty()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, macScans_.get(i)); + .computeBytesSize(6, manufacturerData_); } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj instanceof WiFi_Sample)) { + if (!(obj instanceof com.openpositioning.PositionMe.Traj.BleData)) { 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; + com.openpositioning.PositionMe.Traj.BleData other = (com.openpositioning.PositionMe.Traj.BleData) obj; + + if (!getMacAddress() + .equals(other.getMacAddress())) return false; + if (!getName() + .equals(other.getName())) return false; + if (getTxPowerLevel() + != other.getTxPowerLevel()) return false; + if (getAdvertiseFlags() + != other.getAdvertiseFlags()) return false; + if (!getServiceUuidsList() + .equals(other.getServiceUuidsList())) return false; + if (!getManufacturerData() + .equals(other.getManufacturerData())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - @Override + @java.lang.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(); + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAC_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getMacAddress().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TX_POWER_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getTxPowerLevel(); + hash = (37 * hash) + ADVERTISE_FLAGS_FIELD_NUMBER; + hash = (53 * hash) + getAdvertiseFlags(); + if (getServiceUuidsCount() > 0) { + hash = (37 * hash) + SERVICE_UUIDS_FIELD_NUMBER; + hash = (53 * hash) + getServiceUuidsList().hashCode(); + } + hash = (37 * hash) + MANUFACTURER_DATA_FIELD_NUMBER; + hash = (53 * hash) + getManufacturerData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static WiFi_Sample parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.openpositioning.PositionMe.Traj.BleData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.BleData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.BleData 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 { + public static com.openpositioning.PositionMe.Traj.BleData 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 { + public static com.openpositioning.PositionMe.Traj.BleData 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 { + public static com.openpositioning.PositionMe.Traj.BleData 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 static com.openpositioning.PositionMe.Traj.BleData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.BleData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.BleData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.BleData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.BleData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.BleData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(WiFi_Sample prototype) { + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.BleData prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code WiFi_Sample} + * Protobuf type {@code BleData} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:WiFi_Sample) - WiFi_SampleOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:BleData) + com.openpositioning.PositionMe.Traj.BleDataOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_WiFi_Sample_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_BleData_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_WiFi_Sample_fieldAccessorTable - .ensureFieldAccessorsInitialized( - WiFi_Sample.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_BleData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.BleData.class, com.openpositioning.PositionMe.Traj.BleData.Builder.class); } - // Construct using Traj.WiFi_Sample.newBuilder() + // Construct using com.openpositioning.PositionMe.Traj.BleData.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMacScansFieldBuilder(); - } + } + @java.lang.Override public Builder clear() { super.clear(); - relativeTimestamp_ = 0L; - - if (macScansBuilder_ == null) { - macScans_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - macScansBuilder_.clear(); - } + bitField0_ = 0; + macAddress_ = ""; + name_ = ""; + txPowerLevel_ = 0; + advertiseFlags_ = 0; + serviceUuids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + manufacturerData_ = com.google.protobuf.ByteString.EMPTY; return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Traj.internal_static_WiFi_Sample_descriptor; + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_BleData_descriptor; } - public WiFi_Sample getDefaultInstanceForType() { - return WiFi_Sample.getDefaultInstance(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BleData getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.BleData.getDefaultInstance(); } - public WiFi_Sample build() { - WiFi_Sample result = buildPartial(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BleData build() { + com.openpositioning.PositionMe.Traj.BleData result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public WiFi_Sample buildPartial() { - WiFi_Sample result = new WiFi_Sample(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.relativeTimestamp_ = relativeTimestamp_; - if (macScansBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - macScans_ = java.util.Collections.unmodifiableList(macScans_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.macScans_ = macScans_; - } else { - result.macScans_ = macScansBuilder_.build(); - } - result.bitField0_ = to_bitField0_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BleData buildPartial() { + com.openpositioning.PositionMe.Traj.BleData result = new com.openpositioning.PositionMe.Traj.BleData(this); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.openpositioning.PositionMe.Traj.BleData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.macAddress_ = macAddress_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.txPowerLevel_ = txPowerLevel_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.advertiseFlags_ = advertiseFlags_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + serviceUuids_.makeImmutable(); + result.serviceUuids_ = serviceUuids_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.manufacturerData_ = manufacturerData_; + } } + + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof WiFi_Sample) { - return mergeFrom((WiFi_Sample)other); + if (other instanceof com.openpositioning.PositionMe.Traj.BleData) { + return mergeFrom((com.openpositioning.PositionMe.Traj.BleData)other); } else { super.mergeFrom(other); return this; } - } - - public Builder mergeFrom(WiFi_Sample other) { - if (other == WiFi_Sample.getDefaultInstance()) return this; - if (other.getRelativeTimestamp() != 0L) { - setRelativeTimestamp(other.getRelativeTimestamp()); + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.BleData other) { + if (other == com.openpositioning.PositionMe.Traj.BleData.getDefaultInstance()) return this; + if (!other.getMacAddress().isEmpty()) { + macAddress_ = other.macAddress_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getTxPowerLevel() != 0) { + setTxPowerLevel(other.getTxPowerLevel()); + } + if (other.getAdvertiseFlags() != 0) { + setAdvertiseFlags(other.getAdvertiseFlags()); } - if (macScansBuilder_ == null) { - if (!other.macScans_.isEmpty()) { - if (macScans_.isEmpty()) { - macScans_ = other.macScans_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureMacScansIsMutable(); - macScans_.addAll(other.macScans_); - } - onChanged(); - } - } else { - if (!other.macScans_.isEmpty()) { - if (macScansBuilder_.isEmpty()) { - macScansBuilder_.dispose(); - macScansBuilder_ = null; - macScans_ = other.macScans_; - bitField0_ = (bitField0_ & ~0x00000002); - macScansBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getMacScansFieldBuilder() : null; - } else { - macScansBuilder_.addAllMessages(other.macScans_); - } + if (!other.serviceUuids_.isEmpty()) { + if (serviceUuids_.isEmpty()) { + serviceUuids_ = other.serviceUuids_; + bitField0_ |= 0x00000010; + } else { + ensureServiceUuidsIsMutable(); + serviceUuids_.addAll(other.serviceUuids_); } + onChanged(); + } + if (other.getManufacturerData() != com.google.protobuf.ByteString.EMPTY) { + setManufacturerData(other.getManufacturerData()); } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } + @java.lang.Override public final boolean isInitialized() { return true; } + @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - WiFi_Sample parsedMessage = null; + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + macAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + txPowerLevel_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + advertiseFlags_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + ensureServiceUuidsIsMutable(); + serviceUuids_.add(s); + break; + } // case 42 + case 50: { + manufacturerData_ = input.readBytes(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (WiFi_Sample) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; - private long relativeTimestamp_ ; + private java.lang.Object macAddress_ = ""; /** - * optional int64 relative_timestamp = 1; + * string mac_address = 1; + * @return The macAddress. */ - public long getRelativeTimestamp() { - return relativeTimestamp_; + public java.lang.String getMacAddress() { + java.lang.Object ref = macAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + macAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** - * optional int64 relative_timestamp = 1; + * string mac_address = 1; + * @return The bytes for macAddress. */ - public Builder setRelativeTimestamp(long value) { - - relativeTimestamp_ = value; + public com.google.protobuf.ByteString + getMacAddressBytes() { + java.lang.Object ref = macAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + macAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string mac_address = 1; + * @param value The macAddress to set. + * @return This builder for chaining. + */ + public Builder setMacAddress( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + macAddress_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * optional int64 relative_timestamp = 1; + * string mac_address = 1; + * @return This builder for chaining. */ - public Builder clearRelativeTimestamp() { - - relativeTimestamp_ = 0L; + public Builder clearMacAddress() { + macAddress_ = getDefaultInstance().getMacAddress(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } - - private java.util.List macScans_ = - java.util.Collections.emptyList(); - private void ensureMacScansIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - macScans_ = new java.util.ArrayList(macScans_); - bitField0_ |= 0x00000002; - } + /** + * string mac_address = 1; + * @param value The bytes for macAddress to set. + * @return This builder for chaining. + */ + public Builder setMacAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + macAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; } - private com.google.protobuf.RepeatedFieldBuilderV3< - Mac_Scan, Mac_Scan.Builder, Mac_ScanOrBuilder> macScansBuilder_; - + private java.lang.Object name_ = ""; /** - * repeated .Mac_Scan mac_scans = 2; + * string name = 2; + * @return The name. */ - public java.util.List getMacScansList() { - if (macScansBuilder_ == null) { - return java.util.Collections.unmodifiableList(macScans_); + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; } else { - return macScansBuilder_.getMessageList(); + return (java.lang.String) ref; } } /** - * repeated .Mac_Scan mac_scans = 2; + * string name = 2; + * @return The bytes for name. */ - public int getMacScansCount() { - if (macScansBuilder_ == null) { - return macScans_.size(); + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; } else { - return macScansBuilder_.getCount(); + return (com.google.protobuf.ByteString) ref; } } /** - * repeated .Mac_Scan mac_scans = 2; + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. */ - public Mac_Scan getMacScans(int index) { - if (macScansBuilder_ == null) { - return macScans_.get(index); - } else { - return macScansBuilder_.getMessage(index); - } + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } /** - * repeated .Mac_Scan mac_scans = 2; + * string name = 2; + * @return This builder for chaining. */ - 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); - } + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); return this; } /** - * repeated .Mac_Scan mac_scans = 2; + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. */ - 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()); - } + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); return this; } + + private int txPowerLevel_ ; /** - * repeated .Mac_Scan mac_scans = 2; + * int32 tx_power_level = 3; + * @return The txPowerLevel. */ - 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; + @java.lang.Override + public int getTxPowerLevel() { + return txPowerLevel_; } /** - * repeated .Mac_Scan mac_scans = 2; + * int32 tx_power_level = 3; + * @param value The txPowerLevel to set. + * @return This builder for chaining. */ - 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); - } + public Builder setTxPowerLevel(int value) { + + txPowerLevel_ = value; + bitField0_ |= 0x00000004; + onChanged(); return this; } /** - * repeated .Mac_Scan mac_scans = 2; + * int32 tx_power_level = 3; + * @return This builder for chaining. */ - public Builder addMacScans( - Mac_Scan.Builder builderForValue) { - if (macScansBuilder_ == null) { - ensureMacScansIsMutable(); - macScans_.add(builderForValue.build()); - onChanged(); - } else { - macScansBuilder_.addMessage(builderForValue.build()); - } + public Builder clearTxPowerLevel() { + bitField0_ = (bitField0_ & ~0x00000004); + txPowerLevel_ = 0; + onChanged(); return this; } + + private int advertiseFlags_ ; /** - * repeated .Mac_Scan mac_scans = 2; + * int32 advertise_flags = 4; + * @return The advertiseFlags. */ - 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; + @java.lang.Override + public int getAdvertiseFlags() { + return advertiseFlags_; } /** - * repeated .Mac_Scan mac_scans = 2; + * int32 advertise_flags = 4; + * @param value The advertiseFlags to set. + * @return This builder for chaining. */ - public Builder addAllMacScans( - Iterable values) { - if (macScansBuilder_ == null) { - ensureMacScansIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, macScans_); - onChanged(); - } else { - macScansBuilder_.addAllMessages(values); - } + public Builder setAdvertiseFlags(int value) { + + advertiseFlags_ = value; + bitField0_ |= 0x00000008; + onChanged(); return this; } /** - * repeated .Mac_Scan mac_scans = 2; + * int32 advertise_flags = 4; + * @return This builder for chaining. */ - public Builder clearMacScans() { - if (macScansBuilder_ == null) { - macScans_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - macScansBuilder_.clear(); - } + public Builder clearAdvertiseFlags() { + bitField0_ = (bitField0_ & ~0x00000008); + advertiseFlags_ = 0; + onChanged(); return this; } + + private com.google.protobuf.LazyStringArrayList serviceUuids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureServiceUuidsIsMutable() { + if (!serviceUuids_.isModifiable()) { + serviceUuids_ = new com.google.protobuf.LazyStringArrayList(serviceUuids_); + } + bitField0_ |= 0x00000010; + } /** - * repeated .Mac_Scan mac_scans = 2; + * repeated string service_uuids = 5; + * @return A list containing the serviceUuids. */ - public Builder removeMacScans(int index) { - if (macScansBuilder_ == null) { - ensureMacScansIsMutable(); - macScans_.remove(index); - onChanged(); - } else { - macScansBuilder_.remove(index); - } - return this; + public com.google.protobuf.ProtocolStringList + getServiceUuidsList() { + serviceUuids_.makeImmutable(); + return serviceUuids_; } /** - * repeated .Mac_Scan mac_scans = 2; + * repeated string service_uuids = 5; + * @return The count of serviceUuids. */ - public Mac_Scan.Builder getMacScansBuilder( - int index) { - return getMacScansFieldBuilder().getBuilder(index); + public int getServiceUuidsCount() { + return serviceUuids_.size(); } /** - * repeated .Mac_Scan mac_scans = 2; + * repeated string service_uuids = 5; + * @param index The index of the element to return. + * @return The serviceUuids at the given index. */ - public Mac_ScanOrBuilder getMacScansOrBuilder( - int index) { - if (macScansBuilder_ == null) { - return macScans_.get(index); } else { - return macScansBuilder_.getMessageOrBuilder(index); - } + public java.lang.String getServiceUuids(int index) { + return serviceUuids_.get(index); } /** - * repeated .Mac_Scan mac_scans = 2; + * repeated string service_uuids = 5; + * @param index The index of the value to return. + * @return The bytes of the serviceUuids at the given index. */ - public java.util.List - getMacScansOrBuilderList() { - if (macScansBuilder_ != null) { - return macScansBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(macScans_); - } + public com.google.protobuf.ByteString + getServiceUuidsBytes(int index) { + return serviceUuids_.getByteString(index); } /** - * repeated .Mac_Scan mac_scans = 2; + * repeated string service_uuids = 5; + * @param index The index to set the value at. + * @param value The serviceUuids to set. + * @return This builder for chaining. */ - public Mac_Scan.Builder addMacScansBuilder() { - return getMacScansFieldBuilder().addBuilder( - Mac_Scan.getDefaultInstance()); + public Builder setServiceUuids( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureServiceUuidsIsMutable(); + serviceUuids_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; } /** - * repeated .Mac_Scan mac_scans = 2; + * repeated string service_uuids = 5; + * @param value The serviceUuids to add. + * @return This builder for chaining. */ - public Mac_Scan.Builder addMacScansBuilder( - int index) { - return getMacScansFieldBuilder().addBuilder( - index, Mac_Scan.getDefaultInstance()); + public Builder addServiceUuids( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureServiceUuidsIsMutable(); + serviceUuids_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; } /** - * repeated .Mac_Scan mac_scans = 2; + * repeated string service_uuids = 5; + * @param values The serviceUuids to add. + * @return This builder for chaining. */ - public java.util.List - getMacScansBuilderList() { - return getMacScansFieldBuilder().getBuilderList(); + public Builder addAllServiceUuids( + java.lang.Iterable values) { + ensureServiceUuidsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, serviceUuids_); + bitField0_ |= 0x00000010; + onChanged(); + return this; } - private com.google.protobuf.RepeatedFieldBuilderV3< - Mac_Scan, Mac_Scan.Builder, Mac_ScanOrBuilder> - getMacScansFieldBuilder() { - if (macScansBuilder_ == null) { - macScansBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - Mac_Scan, Mac_Scan.Builder, Mac_ScanOrBuilder>( - macScans_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - macScans_ = null; - } - return macScansBuilder_; + /** + * repeated string service_uuids = 5; + * @return This builder for chaining. + */ + public Builder clearServiceUuids() { + serviceUuids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010);; + onChanged(); + return this; } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + /** + * repeated string service_uuids = 5; + * @param value The bytes of the serviceUuids to add. + * @return This builder for chaining. + */ + public Builder addServiceUuidsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureServiceUuidsIsMutable(); + serviceUuids_.add(value); + bitField0_ |= 0x00000010; + onChanged(); return this; } - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + private com.google.protobuf.ByteString manufacturerData_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes manufacturer_data = 6; + * @return The manufacturerData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getManufacturerData() { + return manufacturerData_; + } + /** + * bytes manufacturer_data = 6; + * @param value The manufacturerData to set. + * @return This builder for chaining. + */ + public Builder setManufacturerData(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + manufacturerData_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * bytes manufacturer_data = 6; + * @return This builder for chaining. + */ + public Builder clearManufacturerData() { + bitField0_ = (bitField0_ & ~0x00000020); + manufacturerData_ = getDefaultInstance().getManufacturerData(); + onChanged(); return this; } - - // @@protoc_insertion_point(builder_scope:WiFi_Sample) + // @@protoc_insertion_point(builder_scope:BleData) } - // @@protoc_insertion_point(class_scope:WiFi_Sample) - private static final WiFi_Sample DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:BleData) + private static final com.openpositioning.PositionMe.Traj.BleData DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new WiFi_Sample(); + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.BleData(); } - public static WiFi_Sample getDefaultInstance() { + public static com.openpositioning.PositionMe.Traj.BleData getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public WiFi_Sample parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new WiFi_Sample(input, extensionRegistry); + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BleData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } - @Override - public com.google.protobuf.Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } - public WiFi_Sample getDefaultInstanceForType() { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BleData getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface Mac_ScanOrBuilder extends - // @@protoc_insertion_point(interface_extends:Mac_Scan) - com.google.protobuf.MessageOrBuilder { + public interface Vector3OrBuilder extends + // @@protoc_insertion_point(interface_extends:Vector3) + com.google.protobuf.MessageOrBuilder { /** - * optional int64 relative_timestamp = 1; + * float x = 1; + * @return The x. */ - long getRelativeTimestamp(); + float getX(); /** - *
-     * Integer encoding of the hex mac address
-     * e.g. 207394925843984
-     * 
- * - * optional int64 mac = 2; + * float y = 2; + * @return The y. */ - long getMac(); + float getY(); /** - *
-     * rssi integer in dBm.
-     * typically between -120 and -10
-     * 
- * - * optional int32 rssi = 3; + * float z = 3; + * @return The z. */ - int getRssi(); + float getZ(); } /** - * Protobuf type {@code Mac_Scan} + *
+   * --- Common Types ---
+   * 
+ * + * Protobuf type {@code Vector3} */ - 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) { + public static final class Vector3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Vector3) + Vector3OrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + Vector3.class.getName()); + } + // Use Vector3.newBuilder() to construct. + private Vector3(com.google.protobuf.GeneratedMessage.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(); - } + private Vector3() { } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_Mac_Scan_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Vector3_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Mac_Scan_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Mac_Scan.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Vector3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Vector3.class, com.openpositioning.PositionMe.Traj.Vector3.Builder.class); } - public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; - private long relativeTimestamp_; + public static final int X_FIELD_NUMBER = 1; + private float x_ = 0F; /** - * optional int64 relative_timestamp = 1; + * float x = 1; + * @return The x. */ - public long getRelativeTimestamp() { - return relativeTimestamp_; + @java.lang.Override + public float getX() { + return x_; } - public static final int MAC_FIELD_NUMBER = 2; - private long mac_; + public static final int Y_FIELD_NUMBER = 2; + private float y_ = 0F; /** - *
-     * Integer encoding of the hex mac address
-     * e.g. 207394925843984
-     * 
- * - * optional int64 mac = 2; + * float y = 2; + * @return The y. */ - public long getMac() { - return mac_; + @java.lang.Override + public float getY() { + return y_; } - public static final int RSSI_FIELD_NUMBER = 3; - private int rssi_; + public static final int Z_FIELD_NUMBER = 3; + private float z_ = 0F; /** - *
-     * rssi integer in dBm.
-     * typically between -120 and -10
-     * 
- * - * optional int32 rssi = 3; + * float z = 3; + * @return The z. */ - public int getRssi() { - return rssi_; + @java.lang.Override + public float getZ() { + return z_; } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -10412,649 +18594,602 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (relativeTimestamp_ != 0L) { - output.writeInt64(1, relativeTimestamp_); + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); } - if (mac_ != 0L) { - output.writeInt64(2, mac_); + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); } - if (rssi_ != 0) { - output.writeInt32(3, rssi_); + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + output.writeFloat(3, z_); } + getUnknownFields().writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; - if (relativeTimestamp_ != 0L) { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, relativeTimestamp_); + .computeFloatSize(1, x_); } - if (mac_ != 0L) { + if (java.lang.Float.floatToRawIntBits(y_) != 0) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(2, mac_); + .computeFloatSize(2, y_); } - if (rssi_ != 0) { + if (java.lang.Float.floatToRawIntBits(z_) != 0) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, rssi_); + .computeFloatSize(3, z_); } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj instanceof Mac_Scan)) { + if (!(obj instanceof com.openpositioning.PositionMe.Traj.Vector3)) { 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; + com.openpositioning.PositionMe.Traj.Vector3 other = (com.openpositioning.PositionMe.Traj.Vector3) obj; + + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (java.lang.Float.floatToIntBits(getZ()) + != java.lang.Float.floatToIntBits( + other.getZ())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - @Override + @java.lang.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(); + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (37 * hash) + Z_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getZ()); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static Mac_Scan parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Vector3 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 { + public static com.openpositioning.PositionMe.Traj.Vector3 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 { + public static com.openpositioning.PositionMe.Traj.Vector3 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 { + public static com.openpositioning.PositionMe.Traj.Vector3 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 static com.openpositioning.PositionMe.Traj.Vector3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.Vector3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.Vector3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(Mac_Scan prototype) { + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.Vector3 prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code Mac_Scan} + *
+     * --- Common Types ---
+     * 
+ * + * Protobuf type {@code Vector3} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:Mac_Scan) - Mac_ScanOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Vector3) + com.openpositioning.PositionMe.Traj.Vector3OrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_Mac_Scan_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Vector3_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Mac_Scan_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Mac_Scan.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Vector3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Vector3.class, com.openpositioning.PositionMe.Traj.Vector3.Builder.class); } - // Construct using Traj.Mac_Scan.newBuilder() + // Construct using com.openpositioning.PositionMe.Traj.Vector3.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } + @java.lang.Override public Builder clear() { super.clear(); - relativeTimestamp_ = 0L; - - mac_ = 0L; - - rssi_ = 0; - + bitField0_ = 0; + x_ = 0F; + y_ = 0F; + z_ = 0F; return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Traj.internal_static_Mac_Scan_descriptor; + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_Vector3_descriptor; } - public Mac_Scan getDefaultInstanceForType() { - return Mac_Scan.getDefaultInstance(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3 getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance(); } - public Mac_Scan build() { - Mac_Scan result = buildPartial(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3 build() { + com.openpositioning.PositionMe.Traj.Vector3 result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public Mac_Scan buildPartial() { - Mac_Scan result = new Mac_Scan(this); - result.relativeTimestamp_ = relativeTimestamp_; - result.mac_ = mac_; - result.rssi_ = rssi_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3 buildPartial() { + com.openpositioning.PositionMe.Traj.Vector3 result = new com.openpositioning.PositionMe.Traj.Vector3(this); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.openpositioning.PositionMe.Traj.Vector3 result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.y_ = y_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.z_ = z_; + } } + + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Mac_Scan) { - return mergeFrom((Mac_Scan)other); + if (other instanceof com.openpositioning.PositionMe.Traj.Vector3) { + return mergeFrom((com.openpositioning.PositionMe.Traj.Vector3)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(Mac_Scan other) { - if (other == Mac_Scan.getDefaultInstance()) return this; - if (other.getRelativeTimestamp() != 0L) { - setRelativeTimestamp(other.getRelativeTimestamp()); + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.Vector3 other) { + if (other == com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance()) return this; + if (other.getX() != 0F) { + setX(other.getX()); } - if (other.getMac() != 0L) { - setMac(other.getMac()); + if (other.getY() != 0F) { + setY(other.getY()); } - if (other.getRssi() != 0) { - setRssi(other.getRssi()); + if (other.getZ() != 0F) { + setZ(other.getZ()); } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } + @java.lang.Override public final boolean isInitialized() { return true; } + @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Mac_Scan parsedMessage = null; + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + x_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: { + y_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: { + z_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Mac_Scan) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; - private long relativeTimestamp_ ; + private float x_ ; /** - * optional int64 relative_timestamp = 1; + * float x = 1; + * @return The x. */ - public long getRelativeTimestamp() { - return relativeTimestamp_; + @java.lang.Override + public float getX() { + return x_; } /** - * optional int64 relative_timestamp = 1; + * float x = 1; + * @param value The x to set. + * @return This builder for chaining. */ - public Builder setRelativeTimestamp(long value) { - - relativeTimestamp_ = value; + public Builder setX(float value) { + + x_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * optional int64 relative_timestamp = 1; + * float x = 1; + * @return This builder for chaining. */ - public Builder clearRelativeTimestamp() { - - relativeTimestamp_ = 0L; + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000001); + x_ = 0F; onChanged(); return this; } - private long mac_ ; + private float y_ ; /** - *
-       * Integer encoding of the hex mac address
-       * e.g. 207394925843984
-       * 
- * - * optional int64 mac = 2; + * float y = 2; + * @return The y. */ - public long getMac() { - return mac_; + @java.lang.Override + public float getY() { + return y_; } /** - *
-       * Integer encoding of the hex mac address
-       * e.g. 207394925843984
-       * 
- * - * optional int64 mac = 2; + * float y = 2; + * @param value The y to set. + * @return This builder for chaining. */ - public Builder setMac(long value) { - - mac_ = value; + public Builder setY(float value) { + + y_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - *
-       * Integer encoding of the hex mac address
-       * e.g. 207394925843984
-       * 
- * - * optional int64 mac = 2; + * float y = 2; + * @return This builder for chaining. */ - public Builder clearMac() { - - mac_ = 0L; + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000002); + y_ = 0F; onChanged(); return this; } - private int rssi_ ; + private float z_ ; /** - *
-       * rssi integer in dBm.
-       * typically between -120 and -10
-       * 
- * - * optional int32 rssi = 3; + * float z = 3; + * @return The z. */ - public int getRssi() { - return rssi_; + @java.lang.Override + public float getZ() { + return z_; } /** - *
-       * rssi integer in dBm.
-       * typically between -120 and -10
-       * 
- * - * optional int32 rssi = 3; + * float z = 3; + * @param value The z to set. + * @return This builder for chaining. */ - public Builder setRssi(int value) { - - rssi_ = value; + public Builder setZ(float value) { + + z_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** - *
-       * rssi integer in dBm.
-       * typically between -120 and -10
-       * 
- * - * optional int32 rssi = 3; + * float z = 3; + * @return This builder for chaining. */ - public Builder clearRssi() { - - rssi_ = 0; + public Builder clearZ() { + bitField0_ = (bitField0_ & ~0x00000004); + z_ = 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:Mac_Scan) + // @@protoc_insertion_point(builder_scope:Vector3) } - // @@protoc_insertion_point(class_scope:Mac_Scan) - private static final Mac_Scan DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:Vector3) + private static final com.openpositioning.PositionMe.Traj.Vector3 DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new Mac_Scan(); + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.Vector3(); } - public static Mac_Scan getDefaultInstance() { + public static com.openpositioning.PositionMe.Traj.Vector3 getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Mac_Scan parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Mac_Scan(input, extensionRegistry); + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Vector3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } - @Override - public com.google.protobuf.Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } - public Mac_Scan getDefaultInstanceForType() { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3 getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface AP_DataOrBuilder extends - // @@protoc_insertion_point(interface_extends:AP_Data) - com.google.protobuf.MessageOrBuilder { + public interface QuaternionOrBuilder extends + // @@protoc_insertion_point(interface_extends:Quaternion) + com.google.protobuf.MessageOrBuilder { /** - *
-     * Integer encoding of the hex mac address
-     * e.g. 207394925843984
-     * 
- * - * optional int64 mac = 1; + * float x = 1; + * @return The x. */ - long getMac(); + float getX(); /** - *
-     * E.g. 'Eduroam' or 'Starbucks_free_wifi'
-     * 
- * - * optional string ssid = 2; + * float y = 2; + * @return The y. */ - String getSsid(); + float getY(); + /** - *
-     * E.g. 'Eduroam' or 'Starbucks_free_wifi'
-     * 
- * - * optional string ssid = 2; + * float z = 3; + * @return The z. */ - com.google.protobuf.ByteString - getSsidBytes(); + float getZ(); /** - *
-     * Typically 2.4GHz or 5GHz
-     * 
- * - * optional int64 frequency = 3; + * float w = 4; + * @return The w. */ - long getFrequency(); + float getW(); } /** - * Protobuf type {@code AP_Data} + * Protobuf type {@code Quaternion} */ - 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) { + public static final class Quaternion extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Quaternion) + QuaternionOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + Quaternion.class.getName()); + } + // Use Quaternion.newBuilder() to construct. + private Quaternion(com.google.protobuf.GeneratedMessage.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(); - } + private Quaternion() { } + public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_AP_Data_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Quaternion_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_AP_Data_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AP_Data.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Quaternion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Quaternion.class, com.openpositioning.PositionMe.Traj.Quaternion.Builder.class); } - public static final int MAC_FIELD_NUMBER = 1; - private long mac_; + public static final int X_FIELD_NUMBER = 1; + private float x_ = 0F; /** - *
-     * Integer encoding of the hex mac address
-     * e.g. 207394925843984
-     * 
- * - * optional int64 mac = 1; + * float x = 1; + * @return The x. */ - public long getMac() { - return mac_; + @java.lang.Override + public float getX() { + return x_; } - public static final int SSID_FIELD_NUMBER = 2; - private volatile Object ssid_; + public static final int Y_FIELD_NUMBER = 2; + private float y_ = 0F; /** - *
-     * E.g. 'Eduroam' or 'Starbucks_free_wifi'
-     * 
- * - * optional string ssid = 2; + * float y = 2; + * @return The y. */ - 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; - } + @java.lang.Override + public float getY() { + return y_; } + + public static final int Z_FIELD_NUMBER = 3; + private float z_ = 0F; /** - *
-     * E.g. 'Eduroam' or 'Starbucks_free_wifi'
-     * 
- * - * optional string ssid = 2; + * float z = 3; + * @return The z. */ - 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; - } + @java.lang.Override + public float getZ() { + return z_; } - public static final int FREQUENCY_FIELD_NUMBER = 3; - private long frequency_; + public static final int W_FIELD_NUMBER = 4; + private float w_ = 0F; /** - *
-     * Typically 2.4GHz or 5GHz
-     * 
- * - * optional int64 frequency = 3; + * float w = 4; + * @return The w. */ - public long getFrequency() { - return frequency_; + @java.lang.Override + public float getW() { + return w_; } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -11064,688 +19199,679 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (mac_ != 0L) { - output.writeInt64(1, mac_); + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); } - if (!getSsidBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ssid_); + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); } - if (frequency_ != 0L) { - output.writeInt64(3, frequency_); + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + output.writeFloat(3, z_); } + if (java.lang.Float.floatToRawIntBits(w_) != 0) { + output.writeFloat(4, w_); + } + getUnknownFields().writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; - if (mac_ != 0L) { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, mac_); + .computeFloatSize(1, x_); } - if (!getSsidBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ssid_); + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, y_); } - if (frequency_ != 0L) { + if (java.lang.Float.floatToRawIntBits(z_) != 0) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(3, frequency_); + .computeFloatSize(3, z_); } + if (java.lang.Float.floatToRawIntBits(w_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, w_); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj instanceof AP_Data)) { + if (!(obj instanceof com.openpositioning.PositionMe.Traj.Quaternion)) { 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; + com.openpositioning.PositionMe.Traj.Quaternion other = (com.openpositioning.PositionMe.Traj.Quaternion) obj; + + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (java.lang.Float.floatToIntBits(getZ()) + != java.lang.Float.floatToIntBits( + other.getZ())) return false; + if (java.lang.Float.floatToIntBits(getW()) + != java.lang.Float.floatToIntBits( + other.getW())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; } - @Override + @java.lang.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(); + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (37 * hash) + Z_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getZ()); + hash = (37 * hash) + W_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getW()); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static AP_Data parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Quaternion 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 { + public static com.openpositioning.PositionMe.Traj.Quaternion 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 { + public static com.openpositioning.PositionMe.Traj.Quaternion 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 { + public static com.openpositioning.PositionMe.Traj.Quaternion 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 static com.openpositioning.PositionMe.Traj.Quaternion parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.Quaternion parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.Quaternion parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(AP_Data prototype) { + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.Quaternion prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code AP_Data} + * Protobuf type {@code Quaternion} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:AP_Data) - AP_DataOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Quaternion) + com.openpositioning.PositionMe.Traj.QuaternionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_AP_Data_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Quaternion_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_AP_Data_fieldAccessorTable - .ensureFieldAccessorsInitialized( - AP_Data.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Quaternion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Quaternion.class, com.openpositioning.PositionMe.Traj.Quaternion.Builder.class); } - // Construct using Traj.AP_Data.newBuilder() + // Construct using com.openpositioning.PositionMe.Traj.Quaternion.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } + @java.lang.Override public Builder clear() { super.clear(); - mac_ = 0L; - - ssid_ = ""; - - frequency_ = 0L; - + bitField0_ = 0; + x_ = 0F; + y_ = 0F; + z_ = 0F; + w_ = 0F; return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Traj.internal_static_AP_Data_descriptor; + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_Quaternion_descriptor; } - public AP_Data getDefaultInstanceForType() { - return AP_Data.getDefaultInstance(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Quaternion getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.Quaternion.getDefaultInstance(); } - public AP_Data build() { - AP_Data result = buildPartial(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Quaternion build() { + com.openpositioning.PositionMe.Traj.Quaternion result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public AP_Data buildPartial() { - AP_Data result = new AP_Data(this); - result.mac_ = mac_; - result.ssid_ = ssid_; - result.frequency_ = frequency_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Quaternion buildPartial() { + com.openpositioning.PositionMe.Traj.Quaternion result = new com.openpositioning.PositionMe.Traj.Quaternion(this); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.openpositioning.PositionMe.Traj.Quaternion result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.y_ = y_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.z_ = z_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.w_ = w_; + } } + + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof AP_Data) { - return mergeFrom((AP_Data)other); + if (other instanceof com.openpositioning.PositionMe.Traj.Quaternion) { + return mergeFrom((com.openpositioning.PositionMe.Traj.Quaternion)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(AP_Data other) { - if (other == AP_Data.getDefaultInstance()) return this; - if (other.getMac() != 0L) { - setMac(other.getMac()); + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.Quaternion other) { + if (other == com.openpositioning.PositionMe.Traj.Quaternion.getDefaultInstance()) return this; + if (other.getX() != 0F) { + setX(other.getX()); } - if (!other.getSsid().isEmpty()) { - ssid_ = other.ssid_; - onChanged(); + if (other.getY() != 0F) { + setY(other.getY()); } - if (other.getFrequency() != 0L) { - setFrequency(other.getFrequency()); + if (other.getZ() != 0F) { + setZ(other.getZ()); } + if (other.getW() != 0F) { + setW(other.getW()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } + @java.lang.Override public final boolean isInitialized() { return true; } + @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - AP_Data parsedMessage = null; + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + x_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: { + y_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: { + z_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 37: { + w_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (AP_Data) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; - private long mac_ ; + private float x_ ; /** - *
-       * Integer encoding of the hex mac address
-       * e.g. 207394925843984
-       * 
- * - * optional int64 mac = 1; + * float x = 1; + * @return The x. */ - public long getMac() { - return mac_; + @java.lang.Override + public float getX() { + return x_; } /** - *
-       * Integer encoding of the hex mac address
-       * e.g. 207394925843984
-       * 
- * - * optional int64 mac = 1; + * float x = 1; + * @param value The x to set. + * @return This builder for chaining. */ - public Builder setMac(long value) { - - mac_ = value; + public Builder setX(float value) { + + x_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - *
-       * Integer encoding of the hex mac address
-       * e.g. 207394925843984
-       * 
- * - * optional int64 mac = 1; + * float x = 1; + * @return This builder for chaining. */ - public Builder clearMac() { - - mac_ = 0L; + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000001); + x_ = 0F; onChanged(); return this; } - private Object ssid_ = ""; + private float y_ ; /** - *
-       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
-       * 
- * - * optional string ssid = 2; + * float y = 2; + * @return The y. */ - 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; - } + @java.lang.Override + public float getY() { + return y_; } /** - *
-       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
-       * 
- * - * optional string ssid = 2; + * float y = 2; + * @param value The y to set. + * @return This builder for chaining. */ - 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 Builder setY(float value) { + + y_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } /** - *
-       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
-       * 
- * - * optional string ssid = 2; + * float y = 2; + * @return This builder for chaining. */ - public Builder setSsid( - String value) { - if (value == null) { - throw new NullPointerException(); - } - - ssid_ = value; + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000002); + y_ = 0F; onChanged(); return this; } + + private float z_ ; + /** + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } /** - *
-       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
-       * 
- * - * optional string ssid = 2; + * float z = 3; + * @param value The z to set. + * @return This builder for chaining. */ - public Builder clearSsid() { - - ssid_ = getDefaultInstance().getSsid(); + public Builder setZ(float value) { + + z_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** - *
-       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
-       * 
- * - * optional string ssid = 2; + * float z = 3; + * @return This builder for chaining. */ - public Builder setSsidBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - ssid_ = value; + public Builder clearZ() { + bitField0_ = (bitField0_ & ~0x00000004); + z_ = 0F; onChanged(); return this; } - private long frequency_ ; + private float w_ ; /** - *
-       * Typically 2.4GHz or 5GHz
-       * 
- * - * optional int64 frequency = 3; + * float w = 4; + * @return The w. */ - public long getFrequency() { - return frequency_; + @java.lang.Override + public float getW() { + return w_; } /** - *
-       * Typically 2.4GHz or 5GHz
-       * 
- * - * optional int64 frequency = 3; + * float w = 4; + * @param value The w to set. + * @return This builder for chaining. */ - public Builder setFrequency(long value) { - - frequency_ = value; + public Builder setW(float value) { + + w_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } /** - *
-       * Typically 2.4GHz or 5GHz
-       * 
- * - * optional int64 frequency = 3; + * float w = 4; + * @return This builder for chaining. */ - public Builder clearFrequency() { - - frequency_ = 0L; + public Builder clearW() { + bitField0_ = (bitField0_ & ~0x00000008); + w_ = 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:AP_Data) + // @@protoc_insertion_point(builder_scope:Quaternion) } - // @@protoc_insertion_point(class_scope:AP_Data) - private static final AP_Data DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:Quaternion) + private static final com.openpositioning.PositionMe.Traj.Quaternion DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new AP_Data(); + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.Quaternion(); } - public static AP_Data getDefaultInstance() { + public static com.openpositioning.PositionMe.Traj.Quaternion getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public AP_Data parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AP_Data(input, extensionRegistry); + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Quaternion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } - @Override - public com.google.protobuf.Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } - public AP_Data getDefaultInstanceForType() { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Quaternion getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } - public interface Sensor_InfoOrBuilder extends - // @@protoc_insertion_point(interface_extends:Sensor_Info) - com.google.protobuf.MessageOrBuilder { + public interface SensorInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:SensorInfo) + com.google.protobuf.MessageOrBuilder { /** - * optional string name = 1; + * string name = 1; + * @return The name. */ - String getName(); + java.lang.String getName(); /** - * optional string name = 1; + * string name = 1; + * @return The bytes for name. */ com.google.protobuf.ByteString - getNameBytes(); + getNameBytes(); /** - * optional string vendor = 2; + * string vendor = 2; + * @return The vendor. */ - String getVendor(); + java.lang.String getVendor(); /** - * optional string vendor = 2; + * string vendor = 2; + * @return The bytes for vendor. */ com.google.protobuf.ByteString - getVendorBytes(); + getVendorBytes(); /** - * optional float resolution = 3; + * float resolution = 3; + * @return The resolution. */ float getResolution(); /** - * optional float power = 4; + * float power = 4; + * @return The power. */ float getPower(); /** - * optional int32 version = 5; + * int32 version = 5; + * @return The version. */ int getVersion(); /** - * optional int32 type = 6; + * int32 type = 6; + * @return The type. */ int getType(); + + /** + * float max_range = 7; + * @return The maxRange. + */ + float getMaxRange(); + + /** + * float frequency = 8; + * @return The frequency. + */ + float getFrequency(); } /** - * Protobuf type {@code Sensor_Info} + * Protobuf type {@code SensorInfo} */ - 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) { + public static final class SensorInfo extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:SensorInfo) + SensorInfoOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + SensorInfo.class.getName()); + } + // Use SensorInfo.newBuilder() to construct. + private SensorInfo(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private Sensor_Info() { + private SensorInfo() { 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; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_SensorInfo_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Sensor_Info_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Sensor_Info.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_SensorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.SensorInfo.class, com.openpositioning.PositionMe.Traj.SensorInfo.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; - private volatile Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** - * optional string name = 1; + * string name = 1; + * @return The name. */ - public String getName() { - Object ref = name_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** - * optional string name = 1; + * string name = 1; + * @return The bytes for name. */ + @java.lang.Override 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); + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -11754,32 +19880,37 @@ public String getName() { } public static final int VENDOR_FIELD_NUMBER = 2; - private volatile Object vendor_; + @SuppressWarnings("serial") + private volatile java.lang.Object vendor_ = ""; /** - * optional string vendor = 2; + * string vendor = 2; + * @return The vendor. */ - public String getVendor() { - Object ref = vendor_; - if (ref instanceof String) { - return (String) ref; + @java.lang.Override + public java.lang.String getVendor() { + java.lang.Object ref = vendor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); vendor_ = s; return s; } } /** - * optional string vendor = 2; + * string vendor = 2; + * @return The bytes for vendor. */ + @java.lang.Override 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); + getVendorBytes() { + java.lang.Object ref = vendor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); vendor_ = b; return b; } else { @@ -11788,42 +19919,73 @@ public String getVendor() { } public static final int RESOLUTION_FIELD_NUMBER = 3; - private float resolution_; + private float resolution_ = 0F; /** - * optional float resolution = 3; + * float resolution = 3; + * @return The resolution. */ + @java.lang.Override public float getResolution() { return resolution_; } public static final int POWER_FIELD_NUMBER = 4; - private float power_; + private float power_ = 0F; /** - * optional float power = 4; + * float power = 4; + * @return The power. */ + @java.lang.Override public float getPower() { return power_; } public static final int VERSION_FIELD_NUMBER = 5; - private int version_; + private int version_ = 0; /** - * optional int32 version = 5; + * int32 version = 5; + * @return The version. */ + @java.lang.Override public int getVersion() { return version_; } public static final int TYPE_FIELD_NUMBER = 6; - private int type_; + private int type_ = 0; /** - * optional int32 type = 6; + * int32 type = 6; + * @return The type. */ + @java.lang.Override public int getType() { return type_; } + public static final int MAX_RANGE_FIELD_NUMBER = 7; + private float maxRange_ = 0F; + /** + * float max_range = 7; + * @return The maxRange. + */ + @java.lang.Override + public float getMaxRange() { + return maxRange_; + } + + public static final int FREQUENCY_FIELD_NUMBER = 8; + private float frequency_ = 0F; + /** + * float frequency = 8; + * @return The frequency. + */ + @java.lang.Override + public float getFrequency() { + return frequency_; + } + private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -11833,18 +19995,19 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); } - if (!getVendorBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, vendor_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vendor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, vendor_); } - if (resolution_ != 0F) { + if (java.lang.Float.floatToRawIntBits(resolution_) != 0) { output.writeFloat(3, resolution_); } - if (power_ != 0F) { + if (java.lang.Float.floatToRawIntBits(power_) != 0) { output.writeFloat(4, power_); } if (version_ != 0) { @@ -11853,296 +20016,335 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (type_ != 0) { output.writeInt32(6, type_); } + if (java.lang.Float.floatToRawIntBits(maxRange_) != 0) { + output.writeFloat(7, maxRange_); + } + if (java.lang.Float.floatToRawIntBits(frequency_) != 0) { + output.writeFloat(8, frequency_); + } + getUnknownFields().writeTo(output); } + @java.lang.Override 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); } - if (!getVendorBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, vendor_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vendor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, vendor_); } - if (resolution_ != 0F) { + if (java.lang.Float.floatToRawIntBits(resolution_) != 0) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(3, resolution_); + .computeFloatSize(3, resolution_); } - if (power_ != 0F) { + if (java.lang.Float.floatToRawIntBits(power_) != 0) { size += com.google.protobuf.CodedOutputStream - .computeFloatSize(4, power_); + .computeFloatSize(4, power_); } if (version_ != 0) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, version_); + .computeInt32Size(5, version_); } if (type_ != 0) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(6, type_); + .computeInt32Size(6, type_); + } + if (java.lang.Float.floatToRawIntBits(maxRange_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(7, maxRange_); + } + if (java.lang.Float.floatToRawIntBits(frequency_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(8, frequency_); } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } - private static final long serialVersionUID = 0L; - @Override - public boolean equals(final Object obj) { + @java.lang.Override + public boolean equals(final java.lang.Object obj) { if (obj == this) { - return true; + return true; } - if (!(obj instanceof Sensor_Info)) { + if (!(obj instanceof com.openpositioning.PositionMe.Traj.SensorInfo)) { 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 + com.openpositioning.PositionMe.Traj.SensorInfo other = (com.openpositioning.PositionMe.Traj.SensorInfo) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getVendor() + .equals(other.getVendor())) return false; + if (java.lang.Float.floatToIntBits(getResolution()) + != java.lang.Float.floatToIntBits( + other.getResolution())) return false; + if (java.lang.Float.floatToIntBits(getPower()) + != java.lang.Float.floatToIntBits( + other.getPower())) return false; + if (getVersion() + != other.getVersion()) return false; + if (getType() + != other.getType()) return false; + if (java.lang.Float.floatToIntBits(getMaxRange()) + != java.lang.Float.floatToIntBits( + other.getMaxRange())) return false; + if (java.lang.Float.floatToIntBits(getFrequency()) + != java.lang.Float.floatToIntBits( + other.getFrequency())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; - hash = (19 * hash) + getDescriptorForType().hashCode(); + hash = (19 * hash) + getDescriptor().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 = (53 * hash) + java.lang.Float.floatToIntBits( + getResolution()); hash = (37 * hash) + POWER_FIELD_NUMBER; - hash = (53 * hash) + Float.floatToIntBits( - getPower()); + hash = (53 * hash) + java.lang.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(); + hash = (37 * hash) + MAX_RANGE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getMaxRange()); + hash = (37 * hash) + FREQUENCY_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getFrequency()); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static Sensor_Info parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.SensorInfo 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 { + public static com.openpositioning.PositionMe.Traj.SensorInfo 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 { + public static com.openpositioning.PositionMe.Traj.SensorInfo 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 { + public static com.openpositioning.PositionMe.Traj.SensorInfo 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 static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.SensorInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.SensorInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(Sensor_Info prototype) { + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.SensorInfo prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); + ? new Builder() : new Builder().mergeFrom(this); } - @Override + @java.lang.Override protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** - * Protobuf type {@code Sensor_Info} + * Protobuf type {@code SensorInfo} */ public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:Sensor_Info) - Sensor_InfoOrBuilder { + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:SensorInfo) + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return Traj.internal_static_Sensor_Info_descriptor; + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_SensorInfo_descriptor; } - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return Traj.internal_static_Sensor_Info_fieldAccessorTable - .ensureFieldAccessorsInitialized( - Sensor_Info.class, Builder.class); + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_SensorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.SensorInfo.class, com.openpositioning.PositionMe.Traj.SensorInfo.Builder.class); } - // Construct using Traj.Sensor_Info.newBuilder() + // Construct using com.openpositioning.PositionMe.Traj.SensorInfo.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } + @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; name_ = ""; - vendor_ = ""; - resolution_ = 0F; - power_ = 0F; - version_ = 0; - type_ = 0; - + maxRange_ = 0F; + frequency_ = 0F; return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return Traj.internal_static_Sensor_Info_descriptor; + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_SensorInfo_descriptor; } - public Sensor_Info getDefaultInstanceForType() { - return Sensor_Info.getDefaultInstance(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance(); } - public Sensor_Info build() { - Sensor_Info result = buildPartial(); + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo build() { + com.openpositioning.PositionMe.Traj.SensorInfo result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } - public Sensor_Info buildPartial() { - Sensor_Info result = new Sensor_Info(this); - result.name_ = name_; - result.vendor_ = vendor_; - result.resolution_ = resolution_; - result.power_ = power_; - result.version_ = version_; - result.type_ = type_; + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo buildPartial() { + com.openpositioning.PositionMe.Traj.SensorInfo result = new com.openpositioning.PositionMe.Traj.SensorInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - Object value) { - return (Builder) super.addRepeatedField(field, value); + private void buildPartial0(com.openpositioning.PositionMe.Traj.SensorInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vendor_ = vendor_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.resolution_ = resolution_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.power_ = power_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.maxRange_ = maxRange_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.frequency_ = frequency_; + } } + + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof Sensor_Info) { - return mergeFrom((Sensor_Info)other); + if (other instanceof com.openpositioning.PositionMe.Traj.SensorInfo) { + return mergeFrom((com.openpositioning.PositionMe.Traj.SensorInfo)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(Sensor_Info other) { - if (other == Sensor_Info.getDefaultInstance()) return this; + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.SensorInfo other) { + if (other == com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getVendor().isEmpty()) { vendor_ = other.vendor_; + bitField0_ |= 0x00000002; onChanged(); } if (other.getResolution() != 0F) { @@ -12157,58 +20359,123 @@ public Builder mergeFrom(Sensor_Info other) { if (other.getType() != 0) { setType(other.getType()); } + if (other.getMaxRange() != 0F) { + setMaxRange(other.getMaxRange()); + } + if (other.getFrequency() != 0F) { + setFrequency(other.getFrequency()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } + @java.lang.Override public final boolean isInitialized() { return true; } + @java.lang.Override public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - Sensor_Info parsedMessage = null; + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + vendor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 29: { + resolution_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 37: { + power_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + case 40: { + version_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + type_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 61: { + maxRange_ = input.readFloat(); + bitField0_ |= 0x00000040; + break; + } // case 61 + case 69: { + frequency_ = input.readFloat(); + bitField0_ |= 0x00000080; + break; + } // case 69 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (Sensor_Info) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; - private Object name_ = ""; + private java.lang.Object name_ = ""; /** - * optional string name = 1; + * string name = 1; + * @return The name. */ - public String getName() { - Object ref = name_; - if (!(ref instanceof String)) { + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string name = 1; + * string name = 1; + * @return The bytes for name. */ public com.google.protobuf.ByteString - getNameBytes() { - Object ref = name_; + getNameBytes() { + java.lang.Object ref = name_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); name_ = b; return b; } else { @@ -12216,68 +20483,71 @@ public String getName() { } } /** - * optional string name = 1; + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. */ public Builder setName( - String value) { - if (value == null) { - throw new NullPointerException(); - } - + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } /** - * optional string name = 1; + * string name = 1; + * @return This builder for chaining. */ public Builder clearName() { - name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** - * optional string name = 1; + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. */ public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } - private Object vendor_ = ""; + private java.lang.Object vendor_ = ""; /** - * optional string vendor = 2; + * string vendor = 2; + * @return The vendor. */ - public String getVendor() { - Object ref = vendor_; - if (!(ref instanceof String)) { + public java.lang.String getVendor() { + java.lang.Object ref = vendor_; + if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); vendor_ = s; return s; } else { - return (String) ref; + return (java.lang.String) ref; } } /** - * optional string vendor = 2; + * string vendor = 2; + * @return The bytes for vendor. */ public com.google.protobuf.ByteString - getVendorBytes() { - Object ref = vendor_; + getVendorBytes() { + java.lang.Object ref = vendor_; if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (String) ref); + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); vendor_ = b; return b; } else { @@ -12285,63 +20555,70 @@ public String getVendor() { } } /** - * optional string vendor = 2; + * string vendor = 2; + * @param value The vendor to set. + * @return This builder for chaining. */ public Builder setVendor( - String value) { - if (value == null) { - throw new NullPointerException(); - } - + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } vendor_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * optional string vendor = 2; + * string vendor = 2; + * @return This builder for chaining. */ public Builder clearVendor() { - vendor_ = getDefaultInstance().getVendor(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** - * optional string vendor = 2; + * string vendor = 2; + * @param value The bytes for vendor to set. + * @return This builder for chaining. */ public Builder setVendorBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); vendor_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } private float resolution_ ; /** - * optional float resolution = 3; + * float resolution = 3; + * @return The resolution. */ + @java.lang.Override public float getResolution() { return resolution_; } /** - * optional float resolution = 3; + * float resolution = 3; + * @param value The resolution to set. + * @return This builder for chaining. */ public Builder setResolution(float value) { - + resolution_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } /** - * optional float resolution = 3; + * float resolution = 3; + * @return This builder for chaining. */ public Builder clearResolution() { - + bitField0_ = (bitField0_ & ~0x00000004); resolution_ = 0F; onChanged(); return this; @@ -12349,25 +20626,31 @@ public Builder clearResolution() { private float power_ ; /** - * optional float power = 4; + * float power = 4; + * @return The power. */ + @java.lang.Override public float getPower() { return power_; } /** - * optional float power = 4; + * float power = 4; + * @param value The power to set. + * @return This builder for chaining. */ public Builder setPower(float value) { - + power_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } /** - * optional float power = 4; + * float power = 4; + * @return This builder for chaining. */ public Builder clearPower() { - + bitField0_ = (bitField0_ & ~0x00000008); power_ = 0F; onChanged(); return this; @@ -12375,25 +20658,31 @@ public Builder clearPower() { private int version_ ; /** - * optional int32 version = 5; + * int32 version = 5; + * @return The version. */ + @java.lang.Override public int getVersion() { return version_; } /** - * optional int32 version = 5; + * int32 version = 5; + * @param value The version to set. + * @return This builder for chaining. */ public Builder setVersion(int value) { - + version_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } /** - * optional int32 version = 5; + * int32 version = 5; + * @return This builder for chaining. */ public Builder clearVersion() { - + bitField0_ = (bitField0_ & ~0x00000010); version_ = 0; onChanged(); return this; @@ -12401,263 +20690,417 @@ public Builder clearVersion() { private int type_ ; /** - * optional int32 type = 6; + * int32 type = 6; + * @return The type. */ + @java.lang.Override public int getType() { return type_; } /** - * optional int32 type = 6; + * int32 type = 6; + * @param value The type to set. + * @return This builder for chaining. */ public Builder setType(int value) { - + type_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } /** - * optional int32 type = 6; + * int32 type = 6; + * @return This builder for chaining. */ public Builder clearType() { - + bitField0_ = (bitField0_ & ~0x00000020); type_ = 0; onChanged(); return this; } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return this; + + private float maxRange_ ; + /** + * float max_range = 7; + * @return The maxRange. + */ + @java.lang.Override + public float getMaxRange() { + return maxRange_; } + /** + * float max_range = 7; + * @param value The maxRange to set. + * @return This builder for chaining. + */ + public Builder setMaxRange(float value) { - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { + maxRange_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * float max_range = 7; + * @return This builder for chaining. + */ + public Builder clearMaxRange() { + bitField0_ = (bitField0_ & ~0x00000040); + maxRange_ = 0F; + onChanged(); return this; } + private float frequency_ ; + /** + * float frequency = 8; + * @return The frequency. + */ + @java.lang.Override + public float getFrequency() { + return frequency_; + } + /** + * float frequency = 8; + * @param value The frequency to set. + * @return This builder for chaining. + */ + public Builder setFrequency(float value) { + + frequency_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * float frequency = 8; + * @return This builder for chaining. + */ + public Builder clearFrequency() { + bitField0_ = (bitField0_ & ~0x00000080); + frequency_ = 0F; + onChanged(); + return this; + } - // @@protoc_insertion_point(builder_scope:Sensor_Info) + // @@protoc_insertion_point(builder_scope:SensorInfo) } - // @@protoc_insertion_point(class_scope:Sensor_Info) - private static final Sensor_Info DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:SensorInfo) + private static final com.openpositioning.PositionMe.Traj.SensorInfo DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new Sensor_Info(); + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.SensorInfo(); } - public static Sensor_Info getDefaultInstance() { + public static com.openpositioning.PositionMe.Traj.SensorInfo getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - public Sensor_Info parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Sensor_Info(input, extensionRegistry); + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SensorInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } - @Override - public com.google.protobuf.Parser getParserForType() { + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { return PARSER; } - public Sensor_Info getDefaultInstanceForType() { + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Trajectory_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_Trajectory_fieldAccessorTable; + internal_static_Trajectory_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_Trajectory_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Pdr_Sample_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_Pdr_Sample_fieldAccessorTable; + internal_static_RelativePosition_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_RelativePosition_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Motion_Sample_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_Motion_Sample_fieldAccessorTable; + internal_static_IMUReading_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_IMUReading_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Position_Sample_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_Position_Sample_fieldAccessorTable; + internal_static_MagnetometerReading_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_MagnetometerReading_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Pressure_Sample_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_Pressure_Sample_fieldAccessorTable; + internal_static_BarometerReading_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_BarometerReading_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Light_Sample_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_Light_Sample_fieldAccessorTable; + internal_static_LightReading_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_LightReading_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_GNSS_Sample_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_GNSS_Sample_fieldAccessorTable; + internal_static_ProximityReading_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_ProximityReading_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_WiFi_Sample_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_WiFi_Sample_fieldAccessorTable; + internal_static_GNSSPosition_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_GNSSPosition_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Mac_Scan_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_Mac_Scan_fieldAccessorTable; + internal_static_GNSSReading_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_GNSSReading_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_AP_Data_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_AP_Data_fieldAccessorTable; + internal_static_Fingerprint_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_Fingerprint_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor - internal_static_Sensor_Info_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_Sensor_Info_fieldAccessorTable; + internal_static_RFScan_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_RFScan_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WiFiRTTReading_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_WiFiRTTReading_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WiFiAPData_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_WiFiAPData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_BleData_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_BleData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Vector3_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_Vector3_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Quaternion_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_Quaternion_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SensorInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_SensorInfo_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { + getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; + descriptor; static { - String[] descriptorData = { - "\n#Cloud/app/src/main/proto/traj.proto\"\337\004" + - "\n\nTrajectory\022\027\n\017android_version\030\001 \001(\t\022 \n" + - "\010imu_data\030\002 \003(\0132\016.Motion_Sample\022\035\n\010pdr_d" + - "ata\030\003 \003(\0132\013.Pdr_Sample\022\'\n\rposition_data\030" + - "\004 \003(\0132\020.Position_Sample\022\'\n\rpressure_data" + - "\030\005 \003(\0132\020.Pressure_Sample\022!\n\nlight_data\030\006" + - " \003(\0132\r.Light_Sample\022\037\n\tgnss_data\030\007 \003(\0132\014" + - ".GNSS_Sample\022\037\n\twifi_data\030\010 \003(\0132\014.WiFi_S" + - "ample\022\032\n\010aps_data\030\t \003(\0132\010.AP_Data\022\027\n\017sta" + - "rt_timestamp\030\n \001(\003\022\027\n\017data_identifier\030\013 ", - "\001(\t\022(\n\022accelerometer_info\030\014 \001(\0132\014.Sensor" + - "_Info\022$\n\016gyroscope_info\030\r \001(\0132\014.Sensor_I" + - "nfo\022*\n\024rotation_vector_info\030\016 \001(\0132\014.Sens" + - "or_Info\022\'\n\021magnetometer_info\030\017 \001(\0132\014.Sen" + - "sor_Info\022$\n\016barometer_info\030\020 \001(\0132\014.Senso" + - "r_Info\022\'\n\021light_sensor_info\030\021 \001(\0132\014.Sens" + - "or_Info\">\n\nPdr_Sample\022\032\n\022relative_timest" + - "amp\030\001 \001(\003\022\t\n\001x\030\002 \001(\002\022\t\n\001y\030\003 \001(\002\"\205\002\n\rMoti" + - "on_Sample\022\032\n\022relative_timestamp\030\001 \001(\003\022\r\n" + - "\005acc_x\030\002 \001(\002\022\r\n\005acc_y\030\003 \001(\002\022\r\n\005acc_z\030\004 \001", - "(\002\022\r\n\005gyr_x\030\005 \001(\002\022\r\n\005gyr_y\030\006 \001(\002\022\r\n\005gyr_" + - "z\030\007 \001(\002\022\031\n\021rotation_vector_x\030\010 \001(\002\022\031\n\021ro" + - "tation_vector_y\030\t \001(\002\022\031\n\021rotation_vector" + - "_z\030\n \001(\002\022\031\n\021rotation_vector_w\030\013 \001(\002\022\022\n\ns" + - "tep_count\030\014 \001(\005\"Z\n\017Position_Sample\022\032\n\022re" + - "lative_timestamp\030\001 \001(\003\022\r\n\005mag_x\030\002 \001(\002\022\r\n" + - "\005mag_y\030\003 \001(\002\022\r\n\005mag_z\030\004 \001(\002\"?\n\017Pressure_" + - "Sample\022\032\n\022relative_timestamp\030\001 \001(\003\022\020\n\010pr" + - "essure\030\002 \001(\002\"9\n\014Light_Sample\022\032\n\022relative" + - "_timestamp\030\001 \001(\003\022\r\n\005light\030\002 \001(\002\"\223\001\n\013GNSS", - "_Sample\022\032\n\022relative_timestamp\030\001 \001(\003\022\020\n\010l" + - "atitude\030\002 \001(\002\022\021\n\tlongitude\030\003 \001(\002\022\020\n\010alti" + - "tude\030\004 \001(\002\022\020\n\010accuracy\030\005 \001(\002\022\r\n\005speed\030\006 " + - "\001(\002\022\020\n\010provider\030\007 \001(\t\"G\n\013WiFi_Sample\022\032\n\022" + - "relative_timestamp\030\001 \001(\003\022\034\n\tmac_scans\030\002 " + - "\003(\0132\t.Mac_Scan\"A\n\010Mac_Scan\022\032\n\022relative_t" + - "imestamp\030\001 \001(\003\022\013\n\003mac\030\002 \001(\003\022\014\n\004rssi\030\003 \001(" + - "\005\"7\n\007AP_Data\022\013\n\003mac\030\001 \001(\003\022\014\n\004ssid\030\002 \001(\t\022" + - "\021\n\tfrequency\030\003 \001(\003\"m\n\013Sensor_Info\022\014\n\004nam" + - "e\030\001 \001(\t\022\016\n\006vendor\030\002 \001(\t\022\022\n\nresolution\030\003 ", - "\001(\002\022\r\n\005power\030\004 \001(\002\022\017\n\007version\030\005 \001(\005\022\014\n\004t" + - "ype\030\006 \001(\005b\006proto3" + java.lang.String[] descriptorData = { + "\n\ntraj.proto\"\277\007\n\nTrajectory\022\027\n\017android_v" + + "ersion\030\001 \001(\t\022\032\n\022trajectory_version\030\002 \001(\002" + + "\022\025\n\rtrajectory_id\030\003 \001(\t\022\035\n\010imu_data\030\004 \003(" + + "\0132\013.IMUReading\022#\n\010pdr_data\030\005 \003(\0132\021.Relat" + + "ivePosition\022/\n\021magnetometer_data\030\006 \003(\0132\024" + + ".MagnetometerReading\022(\n\rpressure_data\030\007 " + + "\003(\0132\021.BarometerReading\022!\n\nlight_data\030\010 \003" + + "(\0132\r.LightReading\022)\n\016proximity_data\030\t \003(" + + "\0132\021.ProximityReading\022\037\n\tgnss_data\030\n \003(\0132" + + "\014.GNSSReading\022\'\n\021wifi_fingerprints\030\013 \003(\013" + + "2\014.Fingerprint\022\035\n\010aps_data\030\014 \003(\0132\013.WiFiA" + + "PData\022&\n\rwifi_rtt_data\030\r \003(\0132\017.WiFiRTTRe" + + "ading\022&\n\020ble_fingerprints\030\016 \003(\0132\014.Finger" + + "print\022\032\n\010ble_data\030\017 \003(\0132\010.BleData\022\027\n\017sta" + + "rt_timestamp\030\020 \001(\003\022\'\n\020initial_position\030\021" + + " \001(\0132\r.GNSSPosition\022*\n\023corrected_positio" + + "ns\030\022 \003(\0132\r.GNSSPosition\022\'\n\022accelerometer" + + "_info\030\023 \001(\0132\013.SensorInfo\022#\n\016gyroscope_in" + + "fo\030\024 \001(\0132\013.SensorInfo\022)\n\024rotation_vector" + + "_info\030\025 \001(\0132\013.SensorInfo\022&\n\021magnetometer" + + "_info\030\026 \001(\0132\013.SensorInfo\022#\n\016barometer_in" + + "fo\030\027 \001(\0132\013.SensorInfo\022&\n\021light_sensor_in" + + "fo\030\030 \001(\0132\013.SensorInfo\022#\n\016proximity_info\030" + + "\031 \001(\0132\013.SensorInfo\022\"\n\013test_points\030\032 \003(\0132" + + "\r.GNSSPosition\"D\n\020RelativePosition\022\032\n\022re" + + "lative_timestamp\030\001 \001(\003\022\t\n\001x\030\002 \001(\002\022\t\n\001y\030\003" + + " \001(\002\"\220\001\n\nIMUReading\022\032\n\022relative_timestam" + + "p\030\001 \001(\003\022\025\n\003acc\030\002 \001(\0132\010.Vector3\022\025\n\003gyr\030\003 " + + "\001(\0132\010.Vector3\022$\n\017rotation_vector\030\004 \001(\0132\013" + + ".Quaternion\022\022\n\nstep_count\030\005 \001(\005\"H\n\023Magne" + + "tometerReading\022\032\n\022relative_timestamp\030\001 \001" + + "(\003\022\025\n\003mag\030\002 \001(\0132\010.Vector3\"@\n\020BarometerRe" + + "ading\022\032\n\022relative_timestamp\030\001 \001(\003\022\020\n\010pre" + + "ssure\030\002 \001(\002\"9\n\014LightReading\022\032\n\022relative_" + + "timestamp\030\001 \001(\003\022\r\n\005light\030\002 \001(\002\"@\n\020Proxim" + + "ityReading\022\032\n\022relative_timestamp\030\001 \001(\003\022\020" + + "\n\010distance\030\002 \001(\002\"\177\n\014GNSSPosition\022\032\n\022rela" + + "tive_timestamp\030\001 \001(\003\022\020\n\010latitude\030\002 \001(\001\022\021" + + "\n\tlongitude\030\003 \001(\001\022\020\n\010altitude\030\004 \001(\001\022\022\n\005f" + + "loor\030\005 \001(\tH\000\210\001\001B\010\n\006_floor\"r\n\013GNSSReading" + + "\022\037\n\010position\030\001 \001(\0132\r.GNSSPosition\022\020\n\010acc" + + "uracy\030\002 \001(\002\022\r\n\005speed\030\003 \001(\002\022\017\n\007bearing\030\004 " + + "\001(\002\022\020\n\010provider\030\005 \001(\t\"D\n\013Fingerprint\022\032\n\022" + + "relative_timestamp\030\001 \001(\003\022\031\n\010rf_scans\030\002 \003" + + "(\0132\007.RFScan\"r\n\006RFScan\022\032\n\022relative_timest" + + "amp\030\001 \001(\003\022\013\n\003mac\030\002 \001(\003\022\014\n\004rssi\030\003 \001(\005\022$\n\010" + + "position\030\004 \001(\0132\r.GNSSPositionH\000\210\001\001B\013\n\t_p" + + "osition\"o\n\016WiFiRTTReading\022\032\n\022relative_ti" + + "mestamp\030\001 \001(\003\022\013\n\003mac\030\002 \001(\003\022\020\n\010distance\030\003" + + " \001(\002\022\024\n\014distance_std\030\004 \001(\002\022\014\n\004rssi\030\005 \001(\005" + + "\"O\n\nWiFiAPData\022\013\n\003mac\030\001 \001(\003\022\014\n\004ssid\030\002 \001(" + + "\t\022\021\n\tfrequency\030\003 \001(\003\022\023\n\013rtt_enabled\030\004 \001(" + + "\010\"\217\001\n\007BleData\022\023\n\013mac_address\030\001 \001(\t\022\014\n\004na" + + "me\030\002 \001(\t\022\026\n\016tx_power_level\030\003 \001(\005\022\027\n\017adve" + + "rtise_flags\030\004 \001(\005\022\025\n\rservice_uuids\030\005 \003(\t" + + "\022\031\n\021manufacturer_data\030\006 \001(\014\"*\n\007Vector3\022\t" + + "\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\"8\n\nQuate" + + "rnion\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\022\t" + + "\n\001w\030\004 \001(\002\"\222\001\n\nSensorInfo\022\014\n\004name\030\001 \001(\t\022\016" + + "\n\006vendor\030\002 \001(\t\022\022\n\nresolution\030\003 \001(\002\022\r\n\005po" + + "wer\030\004 \001(\002\022\017\n\007version\030\005 \001(\005\022\014\n\004type\030\006 \001(\005" + + "\022\021\n\tmax_range\030\007 \001(\002\022\021\n\tfrequency\030\010 \001(\002B(" + + "\n\036com.openpositioning.PositionMeB\004TrajP\000" + + "b\006proto3" }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); internal_static_Trajectory_descriptor = - getDescriptor().getMessageTypes().get(0); + getDescriptor().getMessageTypes().get(0); internal_static_Trajectory_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_Trajectory_descriptor, - new String[] { "AndroidVersion", "ImuData", "PdrData", "PositionData", "PressureData", "LightData", "GnssData", "WifiData", "ApsData", "StartTimestamp", "DataIdentifier", "AccelerometerInfo", "GyroscopeInfo", "RotationVectorInfo", "MagnetometerInfo", "BarometerInfo", "LightSensorInfo", }); - internal_static_Pdr_Sample_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_Pdr_Sample_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_Pdr_Sample_descriptor, - new String[] { "RelativeTimestamp", "X", "Y", }); - internal_static_Motion_Sample_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_Motion_Sample_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_Motion_Sample_descriptor, - new String[] { "RelativeTimestamp", "AccX", "AccY", "AccZ", "GyrX", "GyrY", "GyrZ", "RotationVectorX", "RotationVectorY", "RotationVectorZ", "RotationVectorW", "StepCount", }); - internal_static_Position_Sample_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_Position_Sample_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_Position_Sample_descriptor, - new String[] { "RelativeTimestamp", "MagX", "MagY", "MagZ", }); - internal_static_Pressure_Sample_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_Pressure_Sample_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_Pressure_Sample_descriptor, - new String[] { "RelativeTimestamp", "Pressure", }); - internal_static_Light_Sample_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_Light_Sample_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_Light_Sample_descriptor, - new String[] { "RelativeTimestamp", "Light", }); - internal_static_GNSS_Sample_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_GNSS_Sample_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_GNSS_Sample_descriptor, - new String[] { "RelativeTimestamp", "Latitude", "Longitude", "Altitude", "Accuracy", "Speed", "Provider", }); - internal_static_WiFi_Sample_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_WiFi_Sample_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_WiFi_Sample_descriptor, - new String[] { "RelativeTimestamp", "MacScans", }); - internal_static_Mac_Scan_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_Mac_Scan_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_Mac_Scan_descriptor, - new String[] { "RelativeTimestamp", "Mac", "Rssi", }); - internal_static_AP_Data_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_AP_Data_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_AP_Data_descriptor, - new String[] { "Mac", "Ssid", "Frequency", }); - internal_static_Sensor_Info_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_Sensor_Info_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_Sensor_Info_descriptor, - new String[] { "Name", "Vendor", "Resolution", "Power", "Version", "Type", }); + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Trajectory_descriptor, + new java.lang.String[] { "AndroidVersion", "TrajectoryVersion", "TrajectoryId", "ImuData", "PdrData", "MagnetometerData", "PressureData", "LightData", "ProximityData", "GnssData", "WifiFingerprints", "ApsData", "WifiRttData", "BleFingerprints", "BleData", "StartTimestamp", "InitialPosition", "CorrectedPositions", "AccelerometerInfo", "GyroscopeInfo", "RotationVectorInfo", "MagnetometerInfo", "BarometerInfo", "LightSensorInfo", "ProximityInfo", "TestPoints", }); + internal_static_RelativePosition_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_RelativePosition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_RelativePosition_descriptor, + new java.lang.String[] { "RelativeTimestamp", "X", "Y", }); + internal_static_IMUReading_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_IMUReading_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_IMUReading_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Acc", "Gyr", "RotationVector", "StepCount", }); + internal_static_MagnetometerReading_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_MagnetometerReading_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_MagnetometerReading_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Mag", }); + internal_static_BarometerReading_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_BarometerReading_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_BarometerReading_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Pressure", }); + internal_static_LightReading_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_LightReading_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_LightReading_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Light", }); + internal_static_ProximityReading_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_ProximityReading_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_ProximityReading_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Distance", }); + internal_static_GNSSPosition_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_GNSSPosition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_GNSSPosition_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Latitude", "Longitude", "Altitude", "Floor", }); + internal_static_GNSSReading_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_GNSSReading_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_GNSSReading_descriptor, + new java.lang.String[] { "Position", "Accuracy", "Speed", "Bearing", "Provider", }); + internal_static_Fingerprint_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_Fingerprint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Fingerprint_descriptor, + new java.lang.String[] { "RelativeTimestamp", "RfScans", }); + internal_static_RFScan_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_RFScan_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_RFScan_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Mac", "Rssi", "Position", }); + internal_static_WiFiRTTReading_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_WiFiRTTReading_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_WiFiRTTReading_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Mac", "Distance", "DistanceStd", "Rssi", }); + internal_static_WiFiAPData_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_WiFiAPData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_WiFiAPData_descriptor, + new java.lang.String[] { "Mac", "Ssid", "Frequency", "RttEnabled", }); + internal_static_BleData_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_BleData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_BleData_descriptor, + new java.lang.String[] { "MacAddress", "Name", "TxPowerLevel", "AdvertiseFlags", "ServiceUuids", "ManufacturerData", }); + internal_static_Vector3_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_Vector3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Vector3_descriptor, + new java.lang.String[] { "X", "Y", "Z", }); + internal_static_Quaternion_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_Quaternion_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Quaternion_descriptor, + new java.lang.String[] { "X", "Y", "Z", "W", }); + internal_static_SensorInfo_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_SensorInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_SensorInfo_descriptor, + new java.lang.String[] { "Name", "Vendor", "Resolution", "Power", "Version", "Type", "MaxRange", "Frequency", }); + descriptor.resolveAllFeaturesImmutable(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/app/src/main/java/com/openpositioning/PositionMe/data/model/TestPointInfo.java b/app/src/main/java/com/openpositioning/PositionMe/data/model/TestPointInfo.java new file mode 100644 index 00000000..7ed95d41 --- /dev/null +++ b/app/src/main/java/com/openpositioning/PositionMe/data/model/TestPointInfo.java @@ -0,0 +1,15 @@ +package com.openpositioning.PositionMe.data.model; + +public class TestPointInfo { + public int number; + public double latitude; + public double longitude; + public long timestamp; + + public TestPointInfo(int number, double latitude, double longitude, long timestamp) { + this.number = number; + this.latitude = latitude; + this.longitude = longitude; + this.timestamp = timestamp; + } +} diff --git a/app/src/main/java/com/openpositioning/PositionMe/data/remote/FloorPlanData.java b/app/src/main/java/com/openpositioning/PositionMe/data/remote/FloorPlanData.java new file mode 100644 index 00000000..55d5a898 --- /dev/null +++ b/app/src/main/java/com/openpositioning/PositionMe/data/remote/FloorPlanData.java @@ -0,0 +1,156 @@ +/** + * FloorPlanData is responsible for communicating with the OpenPositioning + * live floorplan API to retrieve nearby indoor venues. + * + * This class performs asynchronous HTTP POST requests using OkHttp, + * sending the user's current latitude, longitude, and observed Wi-Fi + * BSSID values to the server. The API response is parsed into + * lightweight VenueDto objects containing: + * - Venue name (identifier) + * - Building outline (GeoJSON) + * - Floor map geometry (GeoJSON map_shapes) + * + */ + +package com.openpositioning.PositionMe.data.remote; +import com.openpositioning.PositionMe.BuildConfig; +import com.openpositioning.PositionMe.utils.IndoorMapManager; + +import android.util.Log; + +import androidx.annotation.NonNull; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +/** + * Calls OpenPositioning floorplan API to fetch nearby indoor venues. + * Networking + JSON parsing only. No map/UI code here. + */ +public class FloorPlanData{ + + // Static constants necessary for communications + private static final String API_KEY_PATH = BuildConfig.OPENPOSITIONING_API_KEY; + private static final String MASTER_KEY = BuildConfig.OPENPOSITIONING_MASTER_KEY; + private static final String BASE_URL = "https://openpositioning.org/api/live/floorplan/request/"; + + + + + private static final MediaType JSON = MediaType.get("application/json; charset=utf-8"); + + private final OkHttpClient client; + + public FloorPlanData(OkHttpClient client) { + this.client = client; + } + + /** DTO matching the API response fields */ + public static class VenueDto { + public final String name; + public final String outline; // raw string from API + public final String mapShapes; // raw string from API + + public VenueDto(String name, String outline, String mapShapes) { + this.name = name; + this.outline = outline; + this.mapShapes = mapShapes; + } + } + + public interface VenueCallback { + void onSuccess(List venues); + void onError(Exception e); + } + + public void requestNearbyVenues( + double lat, + double lon, + @NonNull List macs, + @NonNull VenueCallback callback + ) { + String url = BASE_URL + API_KEY_PATH + "?key=" + MASTER_KEY; + + JSONObject body = new JSONObject(); + try { + body.put("lat", lat); + body.put("lon", lon); + + JSONArray macArr = new JSONArray(); + for (String m : macs) macArr.put(m); + body.put("macs", macArr); + + } catch (JSONException e) { + callback.onError(e); + return; + } + + Request req = new Request.Builder() + .url(url) + .post(RequestBody.create(body.toString(), JSON)) + .build(); + + client.newCall(req).enqueue(new Callback() { + + @Override + public void onFailure(@NonNull Call call, @NonNull IOException e) { + Log.e("FloorplanAPI", "Request failed", e); + callback.onError(e); + } + + @Override + public void onResponse(@NonNull Call call, @NonNull Response response) throws IOException { + + Log.d("FloorplanAPI", "HTTP response code=" + response.code()); + + if (!response.isSuccessful()) { + Log.e("FloorplanAPI", "Unsuccessful response"); + callback.onError(new IOException("HTTP " + response.code())); + return; + } + + String respBody = response.body() != null ? response.body().string() : "[]"; + Log.d("FloorplanAPI", "Raw response=" + respBody); + + try { + JSONArray arr = new JSONArray(respBody); + List venues = new ArrayList<>(); + + for (int i = 0; i < arr.length(); i++) { + JSONObject v = arr.getJSONObject(i); + String name = v.optString("name", ""); + String outline = v.optString("outline", ""); + String mapShapes = v.optString("map_shapes", ""); + venues.add(new VenueDto(name, outline, mapShapes)); + } + + Log.d("FloorplanAPI", "Parsed venues=" + venues.size()); + for (VenueDto v: venues) { + Log.d("IndoorDebug", "MapShapes raw=" + v.mapShapes); + } + + callback.onSuccess(venues); + + } catch (JSONException e) { + Log.e("FloorplanAPI", "Bad JSON: " + respBody); + callback.onError(e); + } + } + }); + + } +} + diff --git a/app/src/main/java/com/openpositioning/PositionMe/data/remote/ServerCommunications.java b/app/src/main/java/com/openpositioning/PositionMe/data/remote/ServerCommunications.java index 7f7e74b2..e92503c9 100644 --- a/app/src/main/java/com/openpositioning/PositionMe/data/remote/ServerCommunications.java +++ b/app/src/main/java/com/openpositioning/PositionMe/data/remote/ServerCommunications.java @@ -22,7 +22,6 @@ import android.os.Looper; import android.widget.Toast; -import androidx.annotation.NonNull; import androidx.preference.PreferenceManager; import com.google.protobuf.util.JsonFormat; @@ -44,7 +43,6 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; -import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import okhttp3.Call; @@ -74,7 +72,6 @@ public class ServerCommunications implements Observable { public static Map downloadRecords = new HashMap<>(); // Application context for handling permissions and devices private final Context context; - // Network status checking private ConnectivityManager connMgr; private boolean isWifiConn; @@ -100,8 +97,6 @@ public class ServerCommunications implements Observable { private static final String PROTOCOL_CONTENT_TYPE = "multipart/form-data"; private static final String PROTOCOL_ACCEPT_TYPE = "application/json"; - - /** * Public default constructor of {@link ServerCommunications}. The constructor saves context, * initialises a {@link ConnectivityManager}, {@link Observer} and gets the user preferences. @@ -218,7 +213,8 @@ private void copyFile(File src, File dst) throws IOException { // System.err.println("POST error response: " + responseBody.string()); String errorBody = responseBody.string(); - infoResponse = "Upload failed: " + errorBody; +// infoResponse = "Upload failed: " + errorBody; + infoResponse = ""; new Handler(Looper.getMainLooper()).post(() -> Toast.makeText(context, infoResponse, Toast.LENGTH_SHORT).show()); // show error message to users @@ -313,7 +309,8 @@ public void onFailure(Call call, IOException e) { success = false; System.err.println("UPLOAD: Failure to get response"); notifyObservers(1); - infoResponse = "Upload failed: " + e.getMessage(); // Store error message +// infoResponse = "Upload failed: " + e.getMessage(); // Store error message + infoResponse = ""; new Handler(Looper.getMainLooper()).post(() -> Toast.makeText(context, infoResponse, Toast.LENGTH_SHORT).show()); // show error message to users } @@ -330,7 +327,8 @@ public void onResponse(Call call, Response response) throws IOException { assert responseBody != null; String errorBody = responseBody.string(); System.err.println("UPLOAD unsuccessful: " + errorBody); - infoResponse = "Upload failed: " + errorBody; +// infoResponse = "Upload failed: " + errorBody; + infoResponse = ""; new Handler(Looper.getMainLooper()).post(() -> Toast.makeText(context, infoResponse, Toast.LENGTH_SHORT).show()); throw new IOException("UPLOAD failed with code " + response); @@ -623,11 +621,11 @@ private void checkNetworkStatus() { private void logDataSize(Traj.Trajectory trajectory) { Log.i("ServerCommunications", "IMU Data size: " + trajectory.getImuDataCount()); - Log.i("ServerCommunications", "Position Data size: " + trajectory.getPositionDataCount()); + Log.i("ServerCommunications", "Position Data size: " + trajectory.getMagnetometerDataCount()); Log.i("ServerCommunications", "Pressure Data size: " + trajectory.getPressureDataCount()); Log.i("ServerCommunications", "Light Data size: " + trajectory.getLightDataCount()); Log.i("ServerCommunications", "GNSS Data size: " + trajectory.getGnssDataCount()); - Log.i("ServerCommunications", "WiFi Data size: " + trajectory.getWifiDataCount()); + Log.i("ServerCommunications", "WiFi Data size: " + trajectory.getWifiFingerprintsCount()); Log.i("ServerCommunications", "APS Data size: " + trajectory.getApsDataCount()); Log.i("ServerCommunications", "PDR Data size: " + trajectory.getPdrDataCount()); } diff --git a/app/src/main/java/com/openpositioning/PositionMe/data/utils/TestPointParser.java b/app/src/main/java/com/openpositioning/PositionMe/data/utils/TestPointParser.java new file mode 100644 index 00000000..f7f53e99 --- /dev/null +++ b/app/src/main/java/com/openpositioning/PositionMe/data/utils/TestPointParser.java @@ -0,0 +1,37 @@ +package com.openpositioning.PositionMe.data.utils; + +import com.openpositioning.PositionMe.Traj; +import com.openpositioning.PositionMe.data.model.TestPointInfo; + +import java.io.File; +import java.io.FileInputStream; +import java.util.ArrayList; +import java.util.List; + +public class TestPointParser { + + public static List parseFromFile(File file) { + List list = new ArrayList<>(); + + try (FileInputStream fis = new FileInputStream(file)) { + + Traj.Trajectory trajectory = Traj.Trajectory.parseFrom(fis); + + int counter = 1; + for (Traj.GNSSPosition tp : trajectory.getTestPointsList()) { + + list.add(new TestPointInfo( + counter++, + tp.getLatitude(), + tp.getLongitude(), + tp.getRelativeTimestamp() // <-- correct field + )); + } + + } catch (Exception e) { + e.printStackTrace(); + } + + return list; + } +} diff --git a/app/src/main/java/com/openpositioning/PositionMe/presentation/activity/MainActivity.java b/app/src/main/java/com/openpositioning/PositionMe/presentation/activity/MainActivity.java index 995f010d..48bdd1d8 100644 --- a/app/src/main/java/com/openpositioning/PositionMe/presentation/activity/MainActivity.java +++ b/app/src/main/java/com/openpositioning/PositionMe/presentation/activity/MainActivity.java @@ -124,13 +124,28 @@ protected void onCreate(Bundle savedInstanceState) { boolean locationGranted = result.getOrDefault(Manifest.permission.ACCESS_FINE_LOCATION, false); boolean activityGranted = result.getOrDefault(Manifest.permission.ACTIVITY_RECOGNITION, false); - if (locationGranted && activityGranted) { - // Both permissions granted + // Check BLE permissions + boolean bleGranted; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + bleGranted = result.getOrDefault(Manifest.permission.BLUETOOTH_SCAN, false) && + result.getOrDefault(Manifest.permission.BLUETOOTH_CONNECT, false); + } else { + bleGranted = result.getOrDefault(Manifest.permission.BLUETOOTH, false) && + result.getOrDefault(Manifest.permission.BLUETOOTH_ADMIN, false); + } + + if (locationGranted && activityGranted && bleGranted) { + // All permissions granted allPermissionsObtained(); } else { - // Permission denied + // Some permission denied + String deniedPerms = ""; + if (!locationGranted) deniedPerms += "Location "; + if (!activityGranted) deniedPerms += "Activity "; + if (!bleGranted) deniedPerms += "Bluetooth "; + Toast.makeText(this, - "Location or Physical Activity permission denied. Some features may not work.", + deniedPerms + "permission(s) denied. Some features may not work.", Toast.LENGTH_LONG).show(); } } @@ -175,7 +190,7 @@ public void onResume() { // Delay permission check slightly to ensure the Activity is in the foreground new Handler().postDelayed(() -> { if (isActivityVisible()) { - // Check if both permissions are granted + // Check if all permissions are granted boolean locationGranted = ContextCompat.checkSelfPermission( this, Manifest.permission.ACCESS_FINE_LOCATION ) == PackageManager.PERMISSION_GRANTED; @@ -184,16 +199,50 @@ public void onResume() { this, Manifest.permission.ACTIVITY_RECOGNITION ) == PackageManager.PERMISSION_GRANTED; - if (!locationGranted || !activityGranted) { - // Request both permissions using ActivityResultLauncher - multiplePermissionsLauncher.launch(new String[]{ - Manifest.permission.ACCESS_FINE_LOCATION - }); - multiplePermissionsLauncher.launch(new String[]{ - Manifest.permission.ACTIVITY_RECOGNITION - }); + // Check BLE permissions based on Android version + boolean bleGranted; + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + // Android 12+ (API 31+) + bleGranted = ContextCompat.checkSelfPermission( + this, Manifest.permission.BLUETOOTH_SCAN + ) == PackageManager.PERMISSION_GRANTED && + ContextCompat.checkSelfPermission( + this, Manifest.permission.BLUETOOTH_CONNECT + ) == PackageManager.PERMISSION_GRANTED; + } else { + // Android 11 and below + bleGranted = ContextCompat.checkSelfPermission( + this, Manifest.permission.BLUETOOTH + ) == PackageManager.PERMISSION_GRANTED && + ContextCompat.checkSelfPermission( + this, Manifest.permission.BLUETOOTH_ADMIN + ) == PackageManager.PERMISSION_GRANTED; + } + + if (!locationGranted || !activityGranted || !bleGranted) { + // Build list of permissions to request + java.util.ArrayList permissionsToRequest = new java.util.ArrayList<>(); + + if (!locationGranted) { + permissionsToRequest.add(Manifest.permission.ACCESS_FINE_LOCATION); + } + if (!activityGranted) { + permissionsToRequest.add(Manifest.permission.ACTIVITY_RECOGNITION); + } + if (!bleGranted) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + permissionsToRequest.add(Manifest.permission.BLUETOOTH_SCAN); + permissionsToRequest.add(Manifest.permission.BLUETOOTH_CONNECT); + } else { + permissionsToRequest.add(Manifest.permission.BLUETOOTH); + permissionsToRequest.add(Manifest.permission.BLUETOOTH_ADMIN); + } + } + + // Request all missing permissions at once + multiplePermissionsLauncher.launch(permissionsToRequest.toArray(new String[0])); } else { - // Both permissions are already granted + // All permissions are already granted allPermissionsObtained(); } } diff --git a/app/src/main/java/com/openpositioning/PositionMe/presentation/activity/RecordingActivity.java b/app/src/main/java/com/openpositioning/PositionMe/presentation/activity/RecordingActivity.java index c0d82ae2..b84b2a97 100644 --- a/app/src/main/java/com/openpositioning/PositionMe/presentation/activity/RecordingActivity.java +++ b/app/src/main/java/com/openpositioning/PositionMe/presentation/activity/RecordingActivity.java @@ -11,6 +11,7 @@ import com.openpositioning.PositionMe.presentation.fragment.StartLocationFragment; import com.openpositioning.PositionMe.presentation.fragment.RecordingFragment; import com.openpositioning.PositionMe.presentation.fragment.CorrectionFragment; +import com.openpositioning.PositionMe.presentation.fragment.TrajectoryMapFragment; /** @@ -38,7 +39,25 @@ * @author ShuGu */ -public class RecordingActivity extends AppCompatActivity { +public class RecordingActivity extends AppCompatActivity + implements TrajectoryMapFragment.VenueSelectionListener { + private String selectedVenueIdOrName = null; + private String selectedFloorId = null; + + + @Override + public void onVenueSelected(String venueIdOrName){ + selectedVenueIdOrName = venueIdOrName; + } + + @Override + public void onVenueCleared() { + selectedVenueIdOrName = null; + } + + public String getSelectedVenueIdOrName() { + return selectedVenueIdOrName; + } @Override protected void onCreate(@Nullable Bundle savedInstanceState) { @@ -89,4 +108,12 @@ public void finishFlow() { getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); finish(); } + + public void onFloorChanged(String floorId) { + selectedFloorId = floorId; + } + + public String getSelectedFloorId() { + return selectedFloorId; + } } diff --git a/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/CorrectionFragment.java b/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/CorrectionFragment.java index 8f94cb27..24bdc2a2 100644 --- a/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/CorrectionFragment.java +++ b/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/CorrectionFragment.java @@ -26,6 +26,11 @@ import com.google.android.gms.maps.SupportMapFragment; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.MarkerOptions; +import com.google.android.gms.maps.model.PolylineOptions; +import android.graphics.Color; +import java.util.ArrayList; +import java.util.List; +import android.widget.Switch; /** * A simple {@link Fragment} subclass. Corrections Fragment is displayed after a recording session @@ -49,6 +54,14 @@ public class CorrectionFragment extends Fragment { private static LatLng start; private PathView pathView; + // ✅ ADD THESE NEW VARIABLES FOR FUSED TRAJECTORY CORRECTION + private float fusedOffsetLat = 0f; // Translation offset in latitude + private float fusedOffsetLng = 0f; // Translation offset in longitude + private float fusedRotationDegrees = 0f; // Rotation in degrees + private LatLng lastTouchPosition = null; // For drag gesture + private Switch togglePDR; + private boolean showPDR = false; + public CorrectionFragment() { // Required empty public constructor } @@ -90,9 +103,15 @@ public void onMapReady(GoogleMap map) { double zoom = Math.log(156543.03392f * Math.cos(startPosition[0] * Math.PI / 180) * scalingRatio) / Math.log(2); mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(start, (float) zoom)); + + // Draw the fused trajectory on the correction map + updateFusedTrajectoryOnMap(); + + // ✅ ADD TOUCH LISTENERS FOR INTERACTIVE CORRECTION + setupMapTouchListeners(); + } }); - return rootView; } @@ -104,6 +123,20 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat this.stepLengthInput = view.findViewById(R.id.inputStepLength); this.pathView = view.findViewById(R.id.pathView1); + togglePDR = view.findViewById(R.id.toggle_pdr); + togglePDR.setChecked(false); // default OFF + pathView.setVisibility(View.GONE); + + togglePDR.setOnCheckedChangeListener((buttonView, isChecked) -> { + showPDR = isChecked; + + if (showPDR) { + pathView.setVisibility(View.VISIBLE); + } else { + pathView.setVisibility(View.GONE); + } + }); + averageStepLength = sensorFusion.passAverageStepLength(); averageStepLengthText.setText(getString(R.string.averageStepLgn) + ": " + String.format("%.2f", averageStepLength)); @@ -111,13 +144,26 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat // Listen for ENTER key this.stepLengthInput.setOnKeyListener((v, keyCode, event) -> { if (keyCode == KeyEvent.KEYCODE_ENTER) { - newStepLength = Float.parseFloat(changedText.toString()); + if (changedText != null && !changedText.toString().isEmpty()) { + newStepLength = Float.parseFloat(changedText.toString()); + } else { + return false; + } + float scalingFactor = newStepLength / averageStepLength; // Rescale path - sensorFusion.redrawPath(newStepLength / averageStepLength); + sensorFusion.redrawPath(scalingFactor); + + // Rescale FUSED trajectory + sensorFusion.rescaleFusedTrajectory(scalingFactor); + + averageStepLengthText.setText(getString(R.string.averageStepLgn) + ": " + String.format("%.2f", newStepLength)); pathView.invalidate(); + // Update the fused trajectory on the map + updateFusedTrajectoryOnMap(); + secondPass++; if (secondPass == 2) { averageStepLength = newStepLength; @@ -143,18 +189,144 @@ public void afterTextChanged(Editable s) { this.button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - // ************* CHANGED CODE HERE ************* - // Before: - // NavDirections action = CorrectionFragmentDirections.actionCorrectionFragmentToHomeFragment(); - // Navigation.findNavController(view).navigate(action); - // ((AppCompatActivity)getActivity()).getSupportActionBar().show(); - - // Now, simply tell the Activity we are done: ((RecordingActivity) requireActivity()).finishFlow(); } }); } + private void updateFusedTrajectoryOnMap() { + if (mMap != null) { + // Clear the map (removes all polylines and markers) + mMap.clear(); + + // Re-add the start marker + mMap.addMarker(new MarkerOptions().position(start).title("Start Position")); + + // Redraw the fused trajectory with updated points + List fusedPoints = sensorFusion.getFusedTrajectoryPoints(); + if (fusedPoints != null && fusedPoints.size() > 1) { + // Apply transformations (rotation + translation) + List transformedPoints = applyFusedTransformations(fusedPoints); + + mMap.addPolyline(new PolylineOptions() + .addAll(transformedPoints) + .color(Color.RED) + .width(6f)); + } + } + } + + /** + * Set up touch listeners for interactive fused trajectory correction. + * - Single finger drag: translate the fused trajectory + * - Two finger rotation gesture: rotate the fused trajectory + */ + private void setupMapTouchListeners() { + if (mMap == null) return; + + mMap.setOnCameraMoveListener(new GoogleMap.OnCameraMoveListener() { + @Override + public void onCameraMove() { + LatLng currentCenter = mMap.getCameraPosition().target; + + if (lastTouchPosition != null) { + fusedOffsetLat += (currentCenter.latitude - lastTouchPosition.latitude); + fusedOffsetLng += (currentCenter.longitude - lastTouchPosition.longitude); + } + + // Always update rotation from map bearing + fusedRotationDegrees = mMap.getCameraPosition().bearing; + + lastTouchPosition = currentCenter; + updateFusedTrajectoryOnMap(); + } + }); + + mMap.setOnCameraIdleListener(new GoogleMap.OnCameraIdleListener() { + @Override + public void onCameraIdle() { + lastTouchPosition = null; + } + }); + + mMap.setOnMapLongClickListener(new GoogleMap.OnMapLongClickListener() { + @Override + public void onMapLongClick(LatLng latLng) { + // Reset corrections + fusedOffsetLat = 0f; + fusedOffsetLng = 0f; + fusedRotationDegrees = 0f; + updateFusedTrajectoryOnMap(); + } + }); + } + + /** + * Apply rotation and translation transformations to the fused trajectory. + * + * @param originalPoints Original fused trajectory points + * @return Transformed points with rotation and translation applied + */ + private List applyFusedTransformations(List originalPoints) { + if (originalPoints == null || originalPoints.isEmpty()) { + return originalPoints; + } + + List transformedPoints = new ArrayList<>(); + + // ✅ Step 1: Normalize to first point + LatLng firstPoint = originalPoints.get(0); + + // ✅ Step 2: Use center for rotation (better UX) + double avgLat = 0; + double avgLng = 0; + + for (LatLng p : originalPoints) { + avgLat += p.latitude; + avgLng += p.longitude; + } + + avgLat /= originalPoints.size(); + avgLng /= originalPoints.size(); + + LatLng rotationCenter = new LatLng(avgLat, avgLng); + + // ✅ Step 3: Convert rotation to radians + double rotationRad = Math.toRadians(fusedRotationDegrees); + double cosTheta = Math.cos(rotationRad); + double sinTheta = Math.sin(rotationRad); + + for (LatLng point : originalPoints) { + + // 🔹 Normalize relative to first point (so both start same) + double lat = point.latitude - firstPoint.latitude; + double lng = point.longitude - firstPoint.longitude; + + // 🔹 Also shift rotation center to normalized space + double centerLat = rotationCenter.latitude - firstPoint.latitude; + double centerLng = rotationCenter.longitude - firstPoint.longitude; + + // 🔹 Translate to rotation center + double relLat = lat - centerLat; + double relLng = lng - centerLng; + + // 🔹 Apply rotation + double rotatedLat = relLat * cosTheta - relLng * sinTheta; + double rotatedLng = relLat * sinTheta + relLng * cosTheta; + + // 🔹 Translate back from center + rotatedLat += centerLat; + rotatedLng += centerLng; + + // 🔹 Move everything to GNSS start + offset + double finalLat = start.latitude + rotatedLat + fusedOffsetLat; + double finalLng = start.longitude + rotatedLng + fusedOffsetLng; + + transformedPoints.add(new LatLng(finalLat, finalLng)); + } + + return transformedPoints; + } public void setScalingRatio(float scalingRatio) { this.scalingRatio = scalingRatio; } diff --git a/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/HomeFragment.java b/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/HomeFragment.java index 8371b04e..c8be036b 100644 --- a/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/HomeFragment.java +++ b/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/HomeFragment.java @@ -116,6 +116,15 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat Navigation.findNavController(v).navigate(action); }); + Button indoorButton = view.findViewById(R.id.indoorButton); + indoorButton.setOnClickListener(v -> { + Intent intent = new Intent(requireContext(), RecordingActivity.class); + startActivity(intent); + ((AppCompatActivity) getActivity()).getSupportActionBar().hide(); + }); + + + // TextView to display GNSS disabled message gnssStatusTextView = view.findViewById(R.id.gnssStatusTextView); diff --git a/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/RecordingFragment.java b/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/RecordingFragment.java index 6362a971..f62b3e15 100644 --- a/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/RecordingFragment.java +++ b/app/src/main/java/com/openpositioning/PositionMe/presentation/fragment/RecordingFragment.java @@ -7,6 +7,7 @@ import android.os.Bundle; import android.os.CountDownTimer; import android.os.Handler; +import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -16,8 +17,10 @@ import android.view.animation.LinearInterpolator; import android.widget.Button; import android.widget.ImageView; +import android.widget.LinearLayout; import android.widget.ProgressBar; import android.widget.TextView; +import android.widget.Toast; import com.google.android.material.button.MaterialButton; import androidx.annotation.NonNull; @@ -31,6 +34,8 @@ import com.openpositioning.PositionMe.sensors.SensorTypes; import com.openpositioning.PositionMe.utils.UtilFunctions; import com.google.android.gms.maps.model.LatLng; +import java.util.ArrayList; +import java.util.List; /** @@ -57,13 +62,44 @@ */ public class RecordingFragment extends Fragment { + private List observedMacs = new ArrayList<>(); + private TextView selectedVenueText; + public void updateObservedMacs(@NonNull List macs) { + observedMacs = new ArrayList<>(macs); + } + + private List getObservedMacsOrEmpty() { + return observedMacs == null ? new ArrayList<>() : new ArrayList<>(observedMacs); + } + /** Throttle WiFi debug toast to once every 5 seconds. */ + private long lastWifiToastMs = 0; // UI elements - private MaterialButton completeButton, cancelButton; + private MaterialButton completeButton, cancelButton, markTestPointButton; private ImageView recIcon; private ProgressBar timeRemaining; private TextView elevation, distanceTravelled, gnssError; + // Trajectory Info Card (merged collapsible card) + private TextView trajectoryNameText; + private TextView initialPositionText; + private TextView initialOrientationText; + private TextView wifiCountText; + private TextView bleCountText; + private TextView imuCountText; + private LinearLayout trajectoryInfoContent; + private TextView collapseIcon; + private boolean isCardExpanded = false; + + // Counters + private int wifiFingerprints = 0; + private int bleDeviceLists = 0; + + // Counters for live data + private int totalWifiScans = 0; + private int totalBleScans = 0; + private int totalImuReadings = 0; + // App settings private SharedPreferences settings; @@ -76,6 +112,8 @@ public class RecordingFragment extends Fragment { private float distance = 0f; private float previousPosX = 0f; private float previousPosY = 0f; + private int testPointCounter = 0; + // References to the child map fragment private TrajectoryMapFragment trajectoryMapFragment; @@ -116,6 +154,10 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); + selectedVenueText = view.findViewById(R.id.selectedVenueText); + selectedVenueText.setText("Venue: none"); + + // Child Fragment: the container in fragment_recording.xml // where TrajectoryMapFragment is placed trajectoryMapFragment = (TrajectoryMapFragment) @@ -135,8 +177,19 @@ public void onViewCreated(@NonNull View view, distanceTravelled = view.findViewById(R.id.currentDistanceTraveled); gnssError = view.findViewById(R.id.gnssError); + // Bind Trajectory Info Card + trajectoryNameText = view.findViewById(R.id.trajectoryNameText); + initialPositionText = view.findViewById(R.id.initialPositionText); + initialOrientationText = view.findViewById(R.id.initialOrientationText); + wifiCountText = view.findViewById(R.id.wifiCountText); + bleCountText = view.findViewById(R.id.bleCountText); + imuCountText = view.findViewById(R.id.imuCountText); + trajectoryInfoContent = view.findViewById(R.id.trajectoryInfoContent); + collapseIcon = view.findViewById(R.id.collapseIcon); + completeButton = view.findViewById(R.id.stopButton); cancelButton = view.findViewById(R.id.cancelButton); + markTestPointButton= view.findViewById(R.id.markPointButton); recIcon = view.findViewById(R.id.redDot); timeRemaining = view.findViewById(R.id.timeRemainingBar); @@ -154,6 +207,42 @@ public void onViewCreated(@NonNull View view, ((RecordingActivity) requireActivity()).showCorrectionScreen(); }); + markTestPointButton.setOnClickListener(v -> { + long timestampMillis = System.currentTimeMillis(); + + SensorFusion.getInstance().addTestPoint(timestampMillis); + + // Use fused position if available — places marker on the purple fused trajectory. + // Falls back to raw GNSS if the particle filter hasn't initialised yet. + double lat, lon; + double[] fused = SensorFusion.getInstance().getFusedLatLon(); + + if (fused != null) { + lat = fused[0]; + lon = fused[1]; + } else { + // Particle filter not yet ready — fall back to raw GNSS + float[] gnss = SensorFusion.getInstance().getGNSSLatitude(false); + if (gnss == null || (gnss[0] == 0.0f && gnss[1] == 0.0f)) { + Toast.makeText(requireContext(), + "Position not available yet", + Toast.LENGTH_SHORT).show(); + return; + } + lat = gnss[0]; + lon = gnss[1]; + } + + SensorFusion.getInstance().addTestPoint(timestampMillis, lat, lon); + testPointCounter++; + + if (trajectoryMapFragment != null) { + trajectoryMapFragment.addTestPointMarker( + new LatLng(lat, lon), + testPointCounter + ); + } + }); // Cancel button with confirmation dialog cancelButton.setOnClickListener(v -> { @@ -171,13 +260,11 @@ public void onViewCreated(@NonNull View view, dialogInterface.dismiss(); }) .create(); // Create the dialog but do not show it yet - // Show the dialog and change the button color dialog.setOnShowListener(dialogInterface -> { Button negativeButton = dialog.getButton(AlertDialog.BUTTON_NEGATIVE); negativeButton.setTextColor(Color.RED); // Set "Yes" button color to red }); - dialog.show(); // Finally, show the dialog }); @@ -209,11 +296,63 @@ public void onFinish() { // No set time limit, just keep refreshing refreshDataHandler.post(refreshDataTask); } + + // Set up collapse/expand functionality + View trajectoryInfoHeader = view.findViewById(R.id.trajectoryInfoHeader); + if (trajectoryInfoHeader != null) { + trajectoryInfoHeader.setOnClickListener(v -> toggleCardExpansion()); + } + + // Set initial trajectory name + if (trajectoryNameText != null) { + trajectoryNameText.setText("📝 Recording..."); + + // Update trajectory name after recording starts (with delay) + new Handler().postDelayed(() -> { + if (sensorFusion != null && sensorFusion.getTrajectory() != null) { + String trajName = sensorFusion.getTrajectory().getTrajectoryId(); + if (trajName != null && !trajName.isEmpty() && getActivity() != null) { + getActivity().runOnUiThread(() -> + trajectoryNameText.setText("📝 " + trajName)); + } + } + }, 1000); // 1 second delay to ensure trajectory is initialized + } + + // Update initial position and orientation after recording starts + new Handler().postDelayed(() -> { + if (sensorFusion != null) { + // Update initial position + float[] latLng = sensorFusion.getGNSSLatitude(false); + if (latLng != null && latLng.length >= 2) { + double lat = latLng[0]; + double lon = latLng[1]; + double alt = sensorFusion.getElevation(); + updateInitialPosition(lat, lon, alt); + } + + // Update initial orientation + float[] initialRotation = sensorFusion.getInitialRotation(); + if (initialRotation != null) { + updateInitialOrientation(initialRotation); + } + } + }, 1500); // 1.5 second delay to ensure GPS data is available + } /** * Update the UI with sensor data and pass map updates to TrajectoryMapFragment. */ + /** + * Update the UI with sensor data and pass map updates to TrajectoryMapFragment. + * Called every ~200 ms by refreshDataTask. + * + * Passes three types of position to the map: + * - PDR position → updateUserLocation() → red/purple polyline + green dot + * - GNSS position → updateGNSS() → blue polyline + blue dot + * - WiFi position → updateWifiPosition() → amber dot + */ private void updateUIandPosition() { float[] pdrValues = sensorFusion.getSensorValueMap().get(SensorTypes.PDR); if (pdrValues == null) return; @@ -227,31 +366,56 @@ 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 + // Wait for the filter to acquire its first real position fix before drawing. + double[] fused = sensorFusion.getFusedLatLon(); + if (fused == null) { + previousPosX = pdrValues[0]; + previousPosY = pdrValues[1]; + return; + } + + { + LatLng oldLocation = trajectoryMapFragment.getCurrentLocation(); LatLng newLocation = UtilFunctions.calculateNewPos( - oldLocation == null ? new LatLng(latLngArray[0], latLngArray[1]) : oldLocation, + oldLocation != null ? oldLocation : new LatLng(fused[0], fused[1]), new float[]{ pdrValues[0] - previousPosX, pdrValues[1] - previousPosY } ); // Pass the location + orientation to the map - if (trajectoryMapFragment != null) { - trajectoryMapFragment.updateUserLocation(newLocation, + TrajectoryMapFragment mapFrag = (TrajectoryMapFragment) + getChildFragmentManager().findFragmentById(R.id.trajectoryMapFragmentContainer); + + if (mapFrag != null) { + + List macs = sensorFusion.getLatestBssids(); + Log.d("RecordingFragment", "passing macs size=" + macs.size()); + mapFrag.updateObservedMacs(macs); + + mapFrag.updateUserLocation(newLocation, (float) Math.toDegrees(sensorFusion.passOrientation())); + + // Drive the arrow marker and fused trajectory polyline + mapFrag.updateFusedPosition(new LatLng(fused[0], fused[1])); + double[] wifi = sensorFusion.getLastWifiLatLon(); + if (wifi != null) { + mapFrag.updateWifiPosition(new LatLng(wifi[0], wifi[1])); + } + + mapFrag.updatePdrPosition(newLocation); } } - // 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. + double[] gnssRaw = sensorFusion.getLastGnssLatLon(); + if (gnssRaw != null && trajectoryMapFragment != null) { + LatLng gnssLocation = new LatLng(gnssRaw[0], gnssRaw[1]); + + // Always call updateGNSS — the fragment decides internally what to show + // based on isGnssOn (marker/path) and showGnssDots (dots) + trajectoryMapFragment.updateGNSS(gnssLocation); + + // Show GNSS error distance only when GNSS switch is on if (trajectoryMapFragment.isGnssEnabled()) { - LatLng gnssLocation = new LatLng(gnss[0], gnss[1]); +// LatLng gnssLocation = new LatLng(gnss[0], gnss[1]); LatLng currentLoc = trajectoryMapFragment.getCurrentLocation(); if (currentLoc != null) { double errorDist = UtilFunctions.distanceBetweenPoints(currentLoc, gnssLocation); @@ -264,10 +428,37 @@ private void updateUIandPosition() { trajectoryMapFragment.clearGNSS(); } } + RecordingActivity act = (RecordingActivity) requireActivity(); + String v = act.getSelectedVenueIdOrName(); + selectedVenueText.setText("Venue: " + (v == null ? "none" : v)); + // Update previous previousPosX = pdrValues[0]; previousPosY = pdrValues[1]; + + // Update live data counts - track actual recorded data + if (sensorFusion != null && sensorFusion.getTrajectory() != null) { + try { + // WiFi fingerprints (actual recorded) + int wifiFpCount = sensorFusion.getTrajectory().getWifiFingerprintsCount(); + android.util.Log.d("RecordingUI", "WiFi Fingerprints: " + wifiFpCount); + updateWifiCount(wifiFpCount); + + // BLE data (actual recorded) + int bleCount = sensorFusion.getTrajectory().getBleDataCount(); + android.util.Log.d("RecordingUI", "BLE Devices: " + bleCount); + updateBleCount(bleCount); + + // IMU readings + int imuCount = sensorFusion.getTrajectory().getImuDataList().size(); + android.util.Log.d("RecordingUI", "IMU Readings: " + imuCount); + updateImuCount(imuCount); + } catch (Exception e) { + android.util.Log.e("RecordingUI", "Error updating counts: " + e.getMessage()); + } + } + } /** @@ -295,4 +486,84 @@ public void onResume() { refreshDataHandler.postDelayed(refreshDataTask, 500); } } + + /** + * Toggle card expansion/collapse + */ + private void toggleCardExpansion() { + isCardExpanded = !isCardExpanded; + + if (isCardExpanded) { + trajectoryInfoContent.setVisibility(View.VISIBLE); + collapseIcon.setText("▼"); + } else { + trajectoryInfoContent.setVisibility(View.GONE); + collapseIcon.setText("▶"); + } + } + + /** + * Update initial position display + * Called when recording starts with initial GPS position + */ + public void updateInitialPosition(double lat, double lon, double alt) { + if (initialPositionText != null && getActivity() != null) { + getActivity().runOnUiThread(() -> { + // Format: Lat: 55.920, Lon: -3.168, Alt: 112m + String posText = String.format(java.util.Locale.US, + "Lat: %.6f, Lon: %.6f, Alt: %.1fm", lat, lon, alt); + initialPositionText.setText(posText); + }); + } + } + + /** + * Update initial orientation display + * Called when recording starts with initial sensor orientation + */ + public void updateInitialOrientation(float[] quaternion) { + if (initialOrientationText != null && getActivity() != null && quaternion != null && quaternion.length >= 4) { + getActivity().runOnUiThread(() -> { + // Convert quaternion to Euler angles (simplified) + // For display purposes, just show quaternion values + String oriText = String.format(java.util.Locale.US, + "Q: [%.2f, %.2f, %.2f, %.2f]", + quaternion[0], quaternion[1], quaternion[2], quaternion[3]); + initialOrientationText.setText(oriText); + }); + } + } + + /** + * Update WiFi count display + */ + public void updateWifiCount(int count) { + if (wifiCountText != null && getActivity() != null) { + totalWifiScans = count; + getActivity().runOnUiThread(() -> + wifiCountText.setText(String.valueOf(totalWifiScans))); + } + } + + /** + * Update BLE count display + */ + public void updateBleCount(int count) { + if (bleCountText != null && getActivity() != null) { + totalBleScans = count; + getActivity().runOnUiThread(() -> + bleCountText.setText(String.valueOf(totalBleScans))); + } + } + + /** + * Update IMU count display + */ + public void updateImuCount(int count) { + if (imuCountText != null && getActivity() != null) { + totalImuReadings = count; + getActivity().runOnUiThread(() -> + imuCountText.setText(String.valueOf(totalImuReadings))); + } + } } 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..12aee7af 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 @@ -6,6 +6,7 @@ import android.view.ViewGroup; import android.widget.Button; + import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; @@ -159,38 +160,89 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat this.button.setOnClickListener(new View.OnClickListener() { /** * {@inheritDoc} - * When button clicked the PDR recording can start and the start position is stored for - * the {@link CorrectionFragment} to display. The {@link RecordingFragment} is loaded. + * When button clicked, first ask for trajectory name, then start PDR recording */ @Override public void onClick(View view) { - 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.setStartGNSSLatitude(startPosition); - - // Now switch to the recording screen - ((RecordingActivity) requireActivity()).showRecordingScreen(); - - // If the Activity is ReplayActivity - } else if (requireActivity() instanceof ReplayActivity) { - // *Do not* cast to RecordingActivity here - // Just call the Replay method - ((ReplayActivity) requireActivity()).onStartLocationChosen(chosenLat, chosenLon); - - // Otherwise (unexpected host) - } else { - // Optional: log or handle error - // Log.e("StartLocationFragment", "Unknown host Activity: " + requireActivity()); - } + // Show dialog to get trajectory name + showTrajectoryNameDialog(); } }); } + /** + * Show dialog to get trajectory name from user + */ + private void showTrajectoryNameDialog() { + // Create EditText for input + final android.widget.EditText input = new android.widget.EditText(requireContext()); + input.setHint("e.g., Building_A_Floor_1"); + input.setInputType(android.text.InputType.TYPE_CLASS_TEXT); + + // Set some padding for better UX + int padding = (int) (16 * getResources().getDisplayMetrics().density); + input.setPadding(padding, padding, padding, padding); + + // Create dialog + new androidx.appcompat.app.AlertDialog.Builder(requireContext()) + .setTitle("Enter Trajectory Name") + .setMessage("Please provide a name for this trajectory recording:") + .setView(input) + .setPositiveButton("Start Recording", new android.content.DialogInterface.OnClickListener() { + @Override + public void onClick(android.content.DialogInterface dialog, int which) { + String trajectoryName = input.getText().toString().trim(); + + // If empty, use default name with timestamp + if (trajectoryName.isEmpty()) { + trajectoryName = "Trajectory_" + System.currentTimeMillis(); + } + + // Start recording with the name + startRecordingWithName(trajectoryName); + } + }) + .setNegativeButton("Cancel", new android.content.DialogInterface.OnClickListener() { + @Override + public void onClick(android.content.DialogInterface dialog, int which) { + dialog.cancel(); + } + }) + .show(); + } + + /** + * Start recording with trajectory name + */ + private void startRecordingWithName(String trajectoryName) { + float chosenLat = startPosition[0]; + float chosenLon = startPosition[1]; + + // If the Activity is RecordingActivity + if (requireActivity() instanceof RecordingActivity) { + // Set trajectory name in SensorFusion + sensorFusion.setTrajectoryName(trajectoryName); + + // Set initial position + sensorFusion.setInitialPositionData(chosenLat, chosenLon); + + // Start sensor recording + set the start location + sensorFusion.startRecording(); + sensorFusion.setStartGNSSLatitude(startPosition); + + // Now switch to the recording screen + ((RecordingActivity) requireActivity()).showRecordingScreen(); + + } else if (requireActivity() instanceof ReplayActivity) { + // For replay, just proceed without trajectory name + ((ReplayActivity) requireActivity()).onStartLocationChosen(chosenLat, chosenLon); + + } else { + // Optional: log or handle error + android.util.Log.e("StartLocationFragment", "Unknown host Activity: " + requireActivity()); + } + } + /** * Switches the indoor map to the specified floor. * 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..d437ec02 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 @@ -10,6 +10,9 @@ import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.Spinner; +import android.widget.TextView; +import android.widget.LinearLayout; + import com.google.android.material.switchmaterial.SwitchMaterial; import androidx.annotation.NonNull; @@ -28,7 +31,30 @@ import java.util.ArrayList; import java.util.List; +import java.util.Objects; +import java.util.Queue; +import java.util.LinkedList; +import com.openpositioning.PositionMe.data.remote.FloorPlanData; +import com.openpositioning.PositionMe.utils.VenueMapper; + +import okhttp3.OkHttpClient; + + +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.Paint; +import android.graphics.Rect; +import android.graphics.Typeface; +import android.graphics.drawable.Drawable; + +import com.google.android.gms.maps.model.BitmapDescriptorFactory; +import com.google.android.gms.maps.model.MarkerOptions; +import com.google.android.gms.maps.model.Circle; +import com.google.android.gms.maps.model.CircleOptions; + +import android.content.SharedPreferences; +import androidx.preference.PreferenceManager; /** * A fragment responsible for displaying a trajectory map using Google Maps. @@ -51,24 +77,83 @@ * @author Mate Stodulka */ +//request nearby indoor maps +// draw venue polygons +//handle venue click + public class TrajectoryMapFragment extends Fragment { private GoogleMap gMap; // Google Maps instance private LatLng currentLocation; // Stores the user's current location private Marker orientationMarker; // Marker representing user's heading private Marker gnssMarker; // GNSS position marker - private Polyline polyline; // Polyline representing user's movement path + private Polyline pdrPolyline; // Polyline representing user's PDR movement path + private Polyline gnssPolyline; // Polyline for GNSS path + private Polyline fusedPolyline; // best estimated position - Red initially, can be changed to black + private Polyline lpfPolyline; // LPF-smoothed fused trajectory — teal, visible only when smoothing toggle is O private boolean isRed = true; // Tracks whether the polyline color is red private boolean isGnssOn = false; // Tracks if GNSS tracking is enabled - - private Polyline gnssPolyline; // Polyline for GNSS path + private boolean showGnssPath = false; // Controls visibility of GNSS path (blue) private LatLng lastGnssLocation = null; // Stores the last GNSS location - private LatLng pendingCameraPosition = null; // Stores pending camera movement private boolean hasPendingCameraMove = false; // Tracks if camera needs to move - private IndoorMapManager indoorMapManager; // Manages indoor mapping private SensorFusion sensorFusion; + private TextView floorLabel; + private static final String TAG = "TrajectoryMapFragment"; + private static final float MIN_DOT_SPACING_METRES = 2.0f; // Minimum distance in metres a position must move before a new dot is placed + // Dot fill colours + private static final int COLOR_GNSS = Color.parseColor("#215AF6"); // blue + private static final int COLOR_WIFI = Color.parseColor("#FF9800"); // amber + private static final int COLOR_PDR = Color.parseColor("#BBF060"); // green + private static final double LOW_PASS_ALPHA = 0.2; // Range- [0.1] ;Lower = smoother but more lag; higher = less smoothing but more responsive + private boolean isSmoothingEnabled = false; // toggle for lpf filter on best estimate + private LatLng smoothedPosition = null; // Running smoothed position for the low-pass filter. + private int defaultObservations = 5; + private Circle activeAccessHighlight = null; + + String newfloor; + String oldfloor; +// Per-source visibility flags (all disabled by default) + private boolean showGnssDots = false; + private boolean showWifiDots = false; + private boolean showPdrDots = false; + private boolean showPdrPath = true; // Control visibility of raw PDR trajectory + + private final List smoothedPoints = new ArrayList<>(); // Full list of smoothed positions (mirrors fusedPolyline but filtered) + private final List lpfPoints = new ArrayList<>(); // Full list of LPF-smoothed fused positions + + // Per-source rolling queues of on-map markers + private final LinkedList gnssObservationMarkers = new LinkedList<>(); + private final LinkedList wifiObservationMarkers = new LinkedList<>(); + private final LinkedList pdrObservationMarkers = new LinkedList<>(); + /** + * Position where the most recent dot was placed for each source. + * Used by {@link #hasMoved} to enforce the minimum spacing threshold. + */ + private LatLng lastGnssDotPos = null; + private LatLng lastWifiDotPos = null; + private LatLng lastPdrDotPos = null; + + /** Semi-transparent uncertainty circle around the fused position marker. + * Radius = getPositionUncertainty(). Colour reflects confidence level. */ + private Circle uncertaintyCircle; + /** Particle cloud markers — faint grey dots showing filter spread. */ + private final List particleMarkers = new ArrayList<>(); + + /** Throttle particle cloud redraws to every 2 seconds. */ + private long lastParticleRedrawMs = 0; + + /** Whether particle cloud overlay is enabled — toggled by UI switch. */ + private boolean showParticleCloud = false; + + private LinearLayout controlCardContent; + private TextView controlCardCollapseIcon; + private boolean isControlCardExpanded = false; + + /** Most recent device heading in degrees, from passOrientation(). */ + private float lastOrientation = 0f; + private float lastElevation = Float.NaN; //To compute height change between old and current position // UI @@ -76,11 +161,48 @@ public class TrajectoryMapFragment extends Fragment { private SwitchMaterial gnssSwitch; private SwitchMaterial autoFloorSwitch; - + private SwitchMaterial smoothingSwitch; + private SwitchMaterial gnssDotSwitch; + private SwitchMaterial wifiDotSwitch; + private SwitchMaterial pdrDotSwitch; + private SwitchMaterial gnssPathSwitch; + private SwitchMaterial showPdrPathSwitch; private com.google.android.material.floatingactionbutton.FloatingActionButton floorUpButton, floorDownButton; private Button switchColorButton; private Polygon buildingPolygon; + private FloorPlanData floorplanRemote; + private long lastVenueQueryMs = 0; + private LatLng lastVenueQueryLoc = null; + private final Object macLock = new Object(); + private List observedMacs = new ArrayList<>(); + private SwitchMaterial particleCloudSwitch; + + // ── Fused trajectory display ────────────────────────────────────────────── + + /** Handler that drives the 1-second periodic polyline redraw. */ + private final android.os.Handler trajectoryUpdateHandler = + new android.os.Handler(android.os.Looper.getMainLooper()); + /** True while the fragment is visible and updates should fire. */ + private boolean isTrajectoryUpdateRunning = false; + + /** + * Snapshot of smoothedPoints last drawn onto the polyline. + * Compared against the live list so we only redraw when there is + * actually something new to show. + */ + private int lastDrawnPointCount = 0; + + /** 1-second runnable — redraws the fused polyline then reschedules itself. */ + private final Runnable trajectoryUpdateRunnable = new Runnable() { + @Override + public void run() { + redrawFusedTrajectory(); + if (isTrajectoryUpdateRunning) { + trajectoryUpdateHandler.postDelayed(this, 1000); + } + } + }; public TrajectoryMapFragment() { // Required empty public constructor @@ -101,15 +223,45 @@ public void onViewCreated(@NonNull View view, super.onViewCreated(view, savedInstanceState); // Grab references to UI controls + controlCardContent = view.findViewById(R.id.controlCardContent); switchMapSpinner = view.findViewById(R.id.mapSwitchSpinner); gnssSwitch = view.findViewById(R.id.gnssSwitch); + gnssPathSwitch = view.findViewById(R.id.gnssPathSwitch); autoFloorSwitch = view.findViewById(R.id.autoFloor); + smoothingSwitch = view.findViewById(R.id.smoothingSwitch); + showPdrPathSwitch = view.findViewById(R.id.fusedPdrSwitch); + particleCloudSwitch = view.findViewById(R.id.particleCloudSwitch); + gnssDotSwitch = view.findViewById(R.id.gnssDotSwitch); + wifiDotSwitch = view.findViewById(R.id.wifiDotSwitch); + pdrDotSwitch = view.findViewById(R.id.pdrDotSwitch); floorUpButton = view.findViewById(R.id.floorUpButton); + floorUpButton.setOnClickListener(v -> indoorMapManager.increaseFloor()); floorDownButton = view.findViewById(R.id.floorDownButton); + floorDownButton.setOnClickListener(v -> indoorMapManager.decreaseFloor()); switchColorButton = view.findViewById(R.id.lineColorButton); - - // Setup floor up/down UI hidden initially until we know there's an indoor map - setFloorControlsVisibility(View.GONE); + floorLabel = view.findViewById(R.id.floorLabel); + floorLabel.setText("Floor: -"); + + Drawable d1 = gnssPathSwitch.getCompoundDrawablesRelative()[0]; + d1.setTint(Color.BLUE); + Drawable d2 = smoothingSwitch.getCompoundDrawablesRelative()[0]; + d2.setTint(Color.CYAN); + Drawable d3 = showPdrPathSwitch.getCompoundDrawablesRelative()[0]; + d3.setTint(Color.RED); + Drawable d4 = particleCloudSwitch.getCompoundDrawablesRelative()[0]; + d4.setTint(Color.rgb(255,165,0)); // orange + + +// Hide floor controls until a venue is selected + floorUpButton.setVisibility(View.GONE); + floorDownButton.setVisibility(View.GONE); + autoFloorSwitch.setVisibility(View.GONE); + floorLabel.setVisibility(View.GONE); + + // Hide particle cloud switch when EKF mode is active + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(requireContext()); + boolean useEkf = prefs.getBoolean("use_ekf", false); + particleCloudSwitch.setVisibility(useEkf ? View.GONE : View.VISIBLE); // Initialize the map asynchronously SupportMapFragment mapFragment = (SupportMapFragment) @@ -122,6 +274,8 @@ public void onMapReady(@NonNull GoogleMap googleMap) { gMap = googleMap; // Initialize map settings with the now non-null gMap initMapSettings(gMap); + floorplanRemote = new FloorPlanData(new OkHttpClient()); + // If we had a pending camera move, apply it now if (hasPendingCameraMove && pendingCameraPosition != null) { @@ -130,11 +284,41 @@ public void onMapReady(@NonNull GoogleMap googleMap) { pendingCameraPosition = null; } - drawBuildingPolygon(); + // drawBuildingPolygon(); + indoorMapManager = new IndoorMapManager(gMap); + sensorFusion = SensorFusion.getInstance(); + sensorFusion.setIndoorMapManager(indoorMapManager); + // 1) Handle user clicking a venue outline polygon + gMap.setOnPolygonClickListener(polygon -> { + IndoorMapManager.IndoorVenue v = indoorMapManager.getVenueForPolygon(polygon); + + if (v != null) { + Log.d("IndoorDebug", "Clicked venue=" + v.name); + + Log.d("IndoorDebug", "mapShapes length=" + + (v.rawMapShapes == null ? "null" : v.rawMapShapes.length())); + + Log.d("IndoorDebug", "mapShapes preview=" + + (v.rawMapShapes == null ? "null" : + v.rawMapShapes.substring(0, + Math.min(400, v.rawMapShapes.length())))); + + indoorMapManager.selectVenue(v); - Log.d("TrajectoryMapFragment", "onMapReady: Map is ready!"); + if(getActivity() instanceof VenueSelectionListener) { + ((VenueSelectionListener) getActivity()).onVenueSelected( + v.venueId != null ? v.venueId : v.name + ); + } + setFloorControlsVisibility(View.VISIBLE); + String fk = indoorMapManager.getCurrentFloorKey(); + if (floorLabel != null) floorLabel.setText("Floor: " + (fk == null ? "-" : fk)); + + } + }); + Log.d("TrajectoryMapFragment", "onMapReady: Map is ready!"); } }); } @@ -142,6 +326,15 @@ public void onMapReady(@NonNull GoogleMap googleMap) { // Map type spinner setup initMapTypeSpinner(); + controlCardCollapseIcon = view.findViewById(R.id.controlCardCollapseIcon); + view.findViewById(R.id.controlCardHeader).setOnClickListener(v -> { + isControlCardExpanded = !isControlCardExpanded; + controlCardContent.setVisibility( + isControlCardExpanded ? View.VISIBLE : View.GONE); + controlCardCollapseIcon.setText( + isControlCardExpanded ? "▼" : "▶"); + }); + // GNSS Switch gnssSwitch.setOnCheckedChangeListener((buttonView, isChecked) -> { isGnssOn = isChecked; @@ -151,16 +344,24 @@ public void onMapReady(@NonNull GoogleMap googleMap) { } }); + gnssPathSwitch.setOnCheckedChangeListener((btn, isChecked) -> { + showGnssPath = isChecked; + if (gnssPolyline != null) { + gnssPolyline.setVisible(showGnssPath); + } + Log.d(TAG, "GNSS path visible: " + isChecked); + }); + // Color switch switchColorButton.setOnClickListener(v -> { - if (polyline != null) { + if (pdrPolyline != null) { if (isRed) { switchColorButton.setBackgroundColor(Color.BLACK); - polyline.setColor(Color.BLACK); + fusedPolyline.setColor(Color.BLACK); isRed = false; } else { switchColorButton.setBackgroundColor(Color.RED); - polyline.setColor(Color.RED); + fusedPolyline.setColor(Color.RED); isRed = true; } } @@ -168,29 +369,107 @@ public void onMapReady(@NonNull GoogleMap googleMap) { // Floor up/down logic autoFloorSwitch.setOnCheckedChangeListener((compoundButton, isChecked) -> { + }); + + // Smoothing toggle + smoothingSwitch.setOnCheckedChangeListener((buttonView, isChecked) -> { + isSmoothingEnabled = isChecked; + updatePolylineVisibility(); + Log.d(TAG, "Smoothing toggled: " + isChecked); + }); + + showPdrPathSwitch.setOnCheckedChangeListener((btn, isChecked) -> { + showPdrPath = isChecked; + // Immediately show or hide the red PDR polyline + if (pdrPolyline != null) { + pdrPolyline.setVisible(showPdrPath); + } + Log.d(TAG, "PDR path visible: " + isChecked); + }); + + particleCloudSwitch.setOnCheckedChangeListener((btn, isChecked) -> { + showParticleCloud = isChecked; + // Hide all existing particles immediately when toggled off + if (!isChecked) { + clearParticleCloud(); + } + Log.d(TAG, "Particle cloud: " + (isChecked ? "ON" : "OFF")); + }); + + // Dot visibility toggles — also immediately show/hide existing dots + gnssDotSwitch.setOnCheckedChangeListener((btn, isChecked) -> { + showGnssDots = isChecked; + setQueueVisibility(gnssObservationMarkers, isChecked); + }); + + wifiDotSwitch.setOnCheckedChangeListener((btn, isChecked) -> { + showWifiDots = isChecked; + setQueueVisibility(wifiObservationMarkers, isChecked); + }); - //TODO - fix the sensor fusion method to get the elevation (cannot get it from the current method) -// float elevationVal = sensorFusion.getElevation(); -// indoorMapManager.setCurrentFloor((int)(elevationVal/indoorMapManager.getFloorHeight()) -// ,true); + pdrDotSwitch.setOnCheckedChangeListener((btn, isChecked) -> { + showPdrDots = isChecked; + setQueueVisibility(pdrObservationMarkers, isChecked); }); floorUpButton.setOnClickListener(v -> { // If user manually changes floor, turn off auto floor - autoFloorSwitch.setChecked(false); +// autoFloorSwitch.setChecked(false); if (indoorMapManager != null) { indoorMapManager.increaseFloor(); + String fk = indoorMapManager.getCurrentFloorKey(); + if (floorLabel != null) floorLabel.setText("Floor: " + (fk == null ? "-" : fk)); } }); floorDownButton.setOnClickListener(v -> { - autoFloorSwitch.setChecked(false); +// autoFloorSwitch.setChecked(false); if (indoorMapManager != null) { indoorMapManager.decreaseFloor(); + String fk = indoorMapManager.getCurrentFloorKey(); + if (floorLabel != null) floorLabel.setText("Floor: " + (fk == null ? "-" : fk)); + } }); } + @Override + public void onResume() { + super.onResume(); + // Read slider value + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(requireContext()); + defaultObservations = prefs.getInt("last_observations", 20); + trimObservationQueues(); + + Log.d("TrajectoryMapFragment", "Max observations set to: " + defaultObservations); + + // Start the 1-second fused trajectory update loop + isTrajectoryUpdateRunning = true; + trajectoryUpdateHandler.postDelayed(trajectoryUpdateRunnable, 1000); + } + + //If more number of markers present, and we suddenly reduce the number of GNSS, PDR, Wifi dots on screen, remove excess + private void trimObservationQueues() { + trimQueue(gnssObservationMarkers); + trimQueue(wifiObservationMarkers); + trimQueue(pdrObservationMarkers); + } + + private void trimQueue(LinkedList queue) { + while (queue.size() > defaultObservations) { + Marker m = queue.poll(); + if (m != null) m.remove(); + } + } + + @Override + public void onPause() { + super.onPause(); + // Stop the loop when fragment is not visible to avoid wasted redraws + isTrajectoryUpdateRunning = false; + trajectoryUpdateHandler.removeCallbacks(trajectoryUpdateRunnable); + } + /** * Initialize the map settings with the provided GoogleMap instance. *

@@ -202,6 +481,62 @@ public void onMapReady(@NonNull GoogleMap googleMap) { * @param map */ + // ------------------------------------------------------------------------- + // Test point markers + // ------------------------------------------------------------------------- + + /** + * Creates a numbered red circle marker bitmap for a test point. + * + * @param number the test point index to display inside the circle. + * @return a {@link Bitmap} with a numbered red circle. + */ + + private Bitmap createNumberedMarkerBitmap(int number) { + int size = 60; // marker size in pixels + + Bitmap bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888); + Canvas canvas = new Canvas(bitmap); + + Paint circlePaint = new Paint(); + circlePaint.setColor(Color.RED); + circlePaint.setAntiAlias(true); + + Paint textPaint = new Paint(); + textPaint.setColor(Color.WHITE); + textPaint.setTextSize(40f); + textPaint.setTypeface(Typeface.DEFAULT_BOLD); + textPaint.setAntiAlias(true); + textPaint.setTextAlign(Paint.Align.CENTER); + + // Draw circle + canvas.drawCircle(size / 2f, size / 2f, size / 2f, circlePaint); + + // Draw number in center + Rect bounds = new Rect(); + String text = String.valueOf(number); + textPaint.getTextBounds(text, 0, text.length(), bounds); + + float x = size / 2f; + float y = size / 2f - bounds.centerY(); + + canvas.drawText(text, x, y, textPaint); + + return bitmap; + } + + public void addTestPointMarker(LatLng latLng, int number) { + Bitmap numberedMarker = createNumberedMarkerBitmap(number); + + MarkerOptions markerOptions = new MarkerOptions() + .position(latLng) + .icon(BitmapDescriptorFactory.fromBitmap(numberedMarker)) + .anchor(0.5f, 0.5f) // center anchor + .title("Test Point " + number); + + gMap.addMarker(markerOptions); + } + private void initMapSettings(GoogleMap map) { // Basic map settings map.getUiSettings().setCompassEnabled(true); @@ -213,21 +548,108 @@ private void initMapSettings(GoogleMap map) { // Initialize indoor manager indoorMapManager = new IndoorMapManager(map); - // Initialize an empty polyline - polyline = map.addPolyline(new PolylineOptions() - .color(Color.RED) + // Raw PDR trajectory — green, matches PDR observation dots + pdrPolyline = map.addPolyline(new PolylineOptions() + .color(COLOR_PDR) .width(5f) - .add() // start empty + .add() ); - // GNSS path in blue + // GNSS path — blue, matches GNSS observation dots gnssPolyline = map.addPolyline(new PolylineOptions() - .color(Color.BLUE) + .color(COLOR_GNSS) .width(5f) + .add() + .visible(false) .add() // start empty ); + + // Fused trajectory — red, matches the arrow marker + fusedPolyline = map.addPolyline(new PolylineOptions() + .color(Color.RED) + .width(6f) + .visible(true)); + + // LPF-smoothed fused trajectory — only visible when smoothing toggle is ON + lpfPolyline = map.addPolyline(new PolylineOptions() + .color(Color.parseColor("#21f6eb")) // cyan + .width(7f) + .visible(false)); + + // Uncertainty circle — invisible until first fused position arrives + uncertaintyCircle = map.addCircle(new CircleOptions() + .center(new LatLng(0, 0)) + .radius(0) + .fillColor(Color.argb(50, 0, 255, 0)) // semi-transparent green initially + .strokeColor(Color.argb(100, 0, 255, 0)) + .strokeWidth(2f) + .visible(false)); + } + + private void highlightAccessPoint(LatLng center) { + if (center == null || gMap == null) return; + + if (activeAccessHighlight != null) { + activeAccessHighlight.remove(); + activeAccessHighlight = null; + } + + activeAccessHighlight = gMap.addCircle(new CircleOptions() + .center(center) + .radius(2.0) // meters + .strokeWidth(4f) + .strokeColor(Color.GREEN) + .fillColor(0x2200FF00)); } + private void maybeRequestNearbyVenues(@NonNull LatLng loc) { + Log.d("MapDebug", "maybeRequestNearbyVenues called, timeSinceLast=" + (System.currentTimeMillis() - lastVenueQueryMs) + " loc=" + loc); + if (indoorMapManager != null && indoorMapManager.getIsIndoorMapSet()) return; + long now = System.currentTimeMillis(); + if (now - lastVenueQueryMs < 15000) return; // 15s throttle + + if (lastVenueQueryLoc != null && distanceMeters(loc, lastVenueQueryLoc) < 25) return; // 25m threshold + + lastVenueQueryMs = now; + lastVenueQueryLoc = loc; + + List macs = getObservedMacsOrEmpty(); + Log.d("TrajectoryMapFragment", "maybeRequestNearbyVenues instance=" + System.identityHashCode(this) + + " observedMacs=" + macs.size()); + + if (macs.isEmpty()) { + Log.d("TrajectoryMapFragment", "Skipping floorplan request: no MACs yet"); + return; + } + Log.d("TrajectoryMapFragment", "Floorplan request @ " + + loc.latitude + "," + loc.longitude + " macs=" + macs.size()); + if (floorplanRemote == null) { + Log.w("TrajectoryMapFragment", "floorplanRemote not initialized"); + return; + } + + floorplanRemote.requestNearbyVenues( + loc.latitude, loc.longitude, macs, + new FloorPlanData.VenueCallback() { + @Override public void onSuccess(List dtos) { + requireActivity().runOnUiThread(() -> { + Log.d("TrajectoryMapFragment", "Floorplan response venues=" + dtos.size()); + + List venues = VenueMapper.toIndoorVenues(dtos); + Log.d("TrajectoryMapFragment", "Mapped venues=" + venues.size()); + + if (indoorMapManager != null) { + indoorMapManager.showVenueOutlines(venues); + } + }); + } + + @Override public void onError(Exception e) { + Log.d("TrajectoryMapFragment", "floorplan request failed", e); + } + } + ); + } /** * Initialize the map type spinner with the available map types. @@ -288,47 +710,145 @@ public void onNothingSelected(AdapterView parent) {} * @param orientation The user’s heading (e.g. from sensor fusion). */ public void updateUserLocation(@NonNull LatLng newLocation, float orientation) { + Log.d("MapDebug", "updateUserLocation called, gMap=" + gMap + " sensorFusion=" + sensorFusion); if (gMap == null) return; + if (sensorFusion == null) sensorFusion = SensorFusion.getInstance(); + + + // Store orientation for use by the fused marker + lastOrientation = orientation; // Keep track of current location LatLng oldLocation = this.currentLocation; - this.currentLocation = newLocation; - - // If no marker, create it - if (orientationMarker == null) { - orientationMarker = gMap.addMarker(new MarkerOptions() - .position(newLocation) - .flat(true) - .title("Current Position") - .icon(BitmapDescriptorFactory.fromBitmap( - UtilFunctions.getBitmapFromVector(requireContext(), - R.drawable.ic_baseline_navigation_24))) - ); - gMap.moveCamera(CameraUpdateFactory.newLatLngZoom(newLocation, 19f)); - } else { - // Update marker position + orientation - orientationMarker.setPosition(newLocation); - orientationMarker.setRotation(orientation); - // Move camera a bit - gMap.moveCamera(CameraUpdateFactory.newLatLng(newLocation)); + LatLng correctedLocation = newLocation; + IndoorMapManager.FloorChangeResult floorResult = null; + float heightChange = 0f; + + if (sensorFusion != null) { + float currentElevation = sensorFusion.getElevation(); + Log.d("MapMatch", "currel: " + currentElevation); + + + + + if (oldLocation != null && indoorMapManager != null) { + correctedLocation = indoorMapManager.indoorLocationCorrection( + oldLocation, + newLocation, + heightChange + ); + oldfloor = newfloor; + if (autoFloorSwitch.isChecked()) { + floorResult = indoorMapManager.acceptFloorChange( + correctedLocation, + oldLocation, + currentElevation + ); + if (floorResult.snappedLocation != null) { + correctedLocation = floorResult.snappedLocation; + newfloor = floorResult.floorKey; + } + if (floorResult.changedFloor && floorResult.highlightcenter != null) { + highlightAccessPoint(floorResult.highlightcenter); + } + } + } + if (!Objects.equals(oldfloor, newfloor)) { + if (floorLabel != null) { + floorLabel.post(() -> floorLabel.setText("Floor: " + newfloor)); + } + } } + this.currentLocation = correctedLocation; + newLocation = correctedLocation; + Log.d("IndoorTest", "oldLocation = " + oldLocation); + Log.d("IndoorTest", "newLocation = " + newLocation); + Log.d("IndoorTest", "heightChange = " + heightChange); + // Extend polyline if movement occurred - if (oldLocation != null && !oldLocation.equals(newLocation) && polyline != null) { - List points = new ArrayList<>(polyline.getPoints()); + if (oldLocation != null && !oldLocation.equals(newLocation) && pdrPolyline != null) { + List points = new ArrayList<>(pdrPolyline.getPoints()); points.add(newLocation); - polyline.setPoints(points); + pdrPolyline.setPoints(points); } + // Update indoor map overlay if (indoorMapManager != null) { indoorMapManager.setCurrentLocation(newLocation); setFloorControlsVisibility(indoorMapManager.getIsIndoorMapSet() ? View.VISIBLE : View.GONE); } + + // call api + if (floorplanRemote != null) { + maybeRequestNearbyVenues(newLocation); + } + } + + /** + * Adds a green PDR observation dot at the raw PDR-derived position. + * Uses getLastPdrLatLon() from SensorFusion — called from RecordingFragment. + * Only places a dot if the PDR dot toggle is ON and the position has moved + * at least MIN_DOT_SPACING_METRES from the last PDR dot. + * + * @param pdrLocation raw PDR position converted to WGS84 lat/lon. + */ + public void updatePdrPosition(@NonNull LatLng pdrLocation) { + if (gMap == null) return; + if (showPdrDots && hasMoved(pdrLocation, lastPdrDotPos)) { + addObservationMarker(pdrLocation, COLOR_PDR, pdrObservationMarkers); + lastPdrDotPos = pdrLocation; + } } + /** + * Updates the arrow marker using the particle filter's fused position. + * + * Also grows the red fused trajectory polyline and the cyan LPF polyline, + * and updates the uncertainty circle. + * + * @param fusedLocation best position estimate from the particle filter. + */ + public void updateFusedPosition(@NonNull LatLng fusedLocation) { + if (gMap == null) return; + + // Raw fused path — always grows (no filter applied here) + smoothedPoints.add(fusedLocation); + redrawFusedTrajectory(); + + // LPF-smoothed path — grows but only visible when smoothing toggle is ON + LatLng lpfFiltered = applyLowPassFilter(fusedLocation); + lpfPoints.add(lpfFiltered); + if (lpfPolyline != null) { + lpfPolyline.setPoints(new ArrayList<>(lpfPoints)); + } + + // Uncertainty circle — shrinks/grows with filter confidence + updateUncertaintyCircle(fusedLocation); + + // Particle cloud overlay — throttled to every 2 seconds + redrawParticleCloud(); + + // Arrow marker always follows fused position + if (orientationMarker == null) { + orientationMarker = gMap.addMarker(new MarkerOptions() + .position(fusedLocation) + .flat(true) + .title("Current Position") + .icon(BitmapDescriptorFactory.fromBitmap( + UtilFunctions.getBitmapFromVector(requireContext(), + R.drawable.ic_baseline_navigation_24)))); + gMap.moveCamera(CameraUpdateFactory.newLatLngZoom(fusedLocation, 19f)); + } else { + orientationMarker.setPosition(fusedLocation); + orientationMarker.setRotation(lastOrientation); + gMap.moveCamera(CameraUpdateFactory.newLatLng(fusedLocation)); + } + } + /** * Set the initial camera position for the map. *

@@ -350,7 +870,6 @@ public void setInitialCameraPosition(@NonNull LatLng startLocation) { } } - /** * Get the current user location on the map. * @return The current user location as a LatLng object. @@ -360,38 +879,371 @@ public LatLng getCurrentLocation() { } /** - * Called when we want to set or update the GNSS marker position + * Updates the GNSS marker and polyline, and places a blue GNSS observation dot. + * + * The GNSS marker and blue path line are only shown when the GNSS switch is ON. + * The blue observation dots are controlled independently by the GNSS dot switch + * (showGnssDots) — they appear regardless of the GNSS path switch state. + * + * @param gnssLocation latest raw GNSS fix. */ public void updateGNSS(@NonNull LatLng gnssLocation) { if (gMap == null) return; - if (!isGnssOn) return; - - if (gnssMarker == null) { - // Create the GNSS marker for the first time - gnssMarker = gMap.addMarker(new MarkerOptions() - .position(gnssLocation) - .title("GNSS Position") - .icon(BitmapDescriptorFactory - .defaultMarker(BitmapDescriptorFactory.HUE_AZURE))); - lastGnssLocation = gnssLocation; - } else { - // Move existing GNSS marker - gnssMarker.setPosition(gnssLocation); - - // Add a segment to the blue GNSS line, if this is a new location - if (lastGnssLocation != null && !lastGnssLocation.equals(gnssLocation)) { - List gnssPoints = new ArrayList<>(gnssPolyline.getPoints()); - gnssPoints.add(gnssLocation); - gnssPolyline.setPoints(gnssPoints); + + // Blue dot — always shown when gnssDotSwitch is ON, regardless of gnssSwitch + if (showGnssDots && hasMoved(gnssLocation, lastGnssDotPos)) { + addObservationMarker(gnssLocation, COLOR_GNSS, gnssObservationMarkers); + lastGnssDotPos = gnssLocation; + } + + // GNSS marker and path line — only when GNSS switch is ON + if (isGnssOn) { + if (gnssMarker == null) { + gnssMarker = gMap.addMarker(new MarkerOptions() + .position(gnssLocation) + .title("GNSS Position") + .icon(BitmapDescriptorFactory + .defaultMarker(BitmapDescriptorFactory.HUE_AZURE))); + } else { + gnssMarker.setPosition(gnssLocation); + if (showGnssPath && lastGnssLocation != null + && !lastGnssLocation.equals(gnssLocation)) { + List gnssPoints = new ArrayList<>(gnssPolyline.getPoints()); + gnssPoints.add(gnssLocation); + gnssPolyline.setPoints(gnssPoints); + } } - lastGnssLocation = gnssLocation; } + else return; + // Always update lastGnssLocation so path builds correctly when gnssSwitch is turned ON mid-session + lastGnssLocation = gnssLocation; + + // Blue dot — independent of gnssSwitch, only controlled by gnssDotSwitch + if (showGnssDots && hasMoved(gnssLocation, lastGnssDotPos)) { + addObservationMarker(gnssLocation, COLOR_GNSS, gnssObservationMarkers); + lastGnssDotPos = gnssLocation; + } + } + + /** + * Updates the map with the latest WiFi position fix and adds an amber WiFi + * observation dot. Called from RecordingFragment whenever a new WiFi position + * is available from SensorFusion. + * + * @param wifiLocation the WiFi-derived position. + */ + public void updateWifiPosition(@NonNull LatLng wifiLocation) { + if (gMap == null) return; + + if (showWifiDots && hasMoved(wifiLocation, lastWifiDotPos)) { + addObservationMarker(wifiLocation, COLOR_WIFI, wifiObservationMarkers); + lastWifiDotPos = wifiLocation; + } + Log.d(TAG, "WiFi position updated: " + wifiLocation); + } + + // ------------------------------------------------------------------------- + // Distance threshold — fixes dot stacking when stationary + // ------------------------------------------------------------------------- + + /** + * Returns {@code true} if {@code newPos} is at least + * {@value MIN_DOT_SPACING_METRES} metres from {@code lastPos}. + * Returns {@code true} unconditionally when {@code lastPos} is {@code null} + * (the very first dot for this source). + * + * @param newPos candidate position for the new dot. + * @param lastPos position of the most recent dot ({@code null} if none yet). + * @return {@code true} if a new dot should be placed. + */ + private boolean hasMoved(@NonNull LatLng newPos, @Nullable LatLng lastPos) { + if (lastPos == null) return true; + float[] result = new float[1]; + android.location.Location.distanceBetween( + lastPos.latitude, lastPos.longitude, + newPos.latitude, newPos.longitude, + result); + return result[0] >= MIN_DOT_SPACING_METRES; + } + + // ------------------------------------------------------------------------- + // Smoothing — low-pass filter + // ------------------------------------------------------------------------- + + /** + * Applies a low-pass filter to the incoming position. The filter blends the + * previous smoothed position with the new raw position using {@link #LOW_PASS_ALPHA}. + * + * @param newPoint the raw position to filter. + * @return the filtered position. + */ + private LatLng applyLowPassFilter(@NonNull LatLng newPoint) { + if (smoothedPosition == null) { + // First point — initialise filter state + smoothedPosition = newPoint; + return newPoint; + } + double lat = smoothedPosition.latitude + + LOW_PASS_ALPHA * (newPoint.latitude - smoothedPosition.latitude); + double lng = smoothedPosition.longitude + + LOW_PASS_ALPHA * (newPoint.longitude - smoothedPosition.longitude); + smoothedPosition = new LatLng(lat, lng); + return smoothedPosition; } + /** + * Controls visibility of the LPF-smoothed fused polyline. + */ + private void updatePolylineVisibility() { + if (fusedPolyline != null) { + fusedPolyline.setVisible(!isSmoothingEnabled); + } + if (lpfPolyline != null) { + lpfPolyline.setVisible(isSmoothingEnabled); + } + } /** - * Remove GNSS marker if user toggles it off + * Updates the uncertainty circle around the fused position marker. + * + * Radius is taken from SensorFusion.getPositionUncertainty() which returns + * the standard deviation of the particle cloud in metres: + * < 5m → green (filter confident) + * 5–15m → yellow (moderate uncertainty) + * > 15m → red (filter uncertain / diverged) + * + * The circle is hidden when the filter returns -1 (not yet initialised). + * + * @param centre the current fused position — centre of the circle. */ + private void updateUncertaintyCircle(@NonNull LatLng centre) { + if (uncertaintyCircle == null) return; + + double uncertainty = SensorFusion.getInstance().getPositionUncertainty(); + + // Filter not yet initialised — hide the circle + if (uncertainty < 0) { + uncertaintyCircle.setVisible(false); + return; + } + + // Choose colour based on confidence level + int fillColor; + int strokeColor; + if (uncertainty < 5.0) { + // Green — confident + fillColor = Color.argb(50, 0, 200, 0); + strokeColor = Color.argb(150, 0, 200, 0); + } else if (uncertainty <= 15.0) { + // Yellow — moderate + fillColor = Color.argb(50, 255, 200, 0); + strokeColor = Color.argb(150, 255, 200, 0); + } else { + // Red — uncertain + fillColor = Color.argb(50, 220, 0, 0); + strokeColor = Color.argb(150, 220, 0, 0); + } + + uncertaintyCircle.setCenter(centre); + uncertaintyCircle.setRadius(uncertainty); + uncertaintyCircle.setFillColor(fillColor); + uncertaintyCircle.setStrokeColor(strokeColor); + uncertaintyCircle.setVisible(true); + + Log.d(TAG, "Uncertainty circle: radius=" + String.format("%.1f", uncertainty) + "m"); + } + + /** + * Redraws the particle cloud overlay from the current particle positions. + * + * Each particle from getParticles() is in local ENU metres and is converted + * to LatLng via SensorFusion.enuToLatLon() before being rendered as a small + * faint grey circle on the map. + * + * Throttled to redraw at most every 2 seconds to avoid performance issues + * from recreating 300 map objects on every position update. + * + * Only runs when showParticleCloud is true. + */ + private void redrawParticleCloud() { + if (!showParticleCloud || gMap == null) return; + if (SensorFusion.getInstance().isUsingEKF()) { clearParticleCloud(); return; } + + long now = System.currentTimeMillis(); + if (now - lastParticleRedrawMs < 2000) return; // 2s throttle + lastParticleRedrawMs = now; + + float[][] particles = SensorFusion.getInstance().getParticles(); + if (particles == null || particles.length == 0) return; + + // Remove old particle circles + clearParticleCloud(); + + // Draw new ones + for (float[] particle : particles) { + double[] latLon = SensorFusion.getInstance().enuToLatLon(particle[0], particle[1]); + if (latLon == null) continue; + + Circle dot = gMap.addCircle(new CircleOptions() + .center(new LatLng(latLon[0], latLon[1])) + .radius(0.8) // 0.8m radius dot + .fillColor(Color.argb(60, 120, 120, 120)) // faint grey + .strokeWidth(0f) // no border + .zIndex(0f)); // behind everything + particleMarkers.add(dot); + } + + Log.d(TAG, "Particle cloud redrawn: " + particles.length + " particles"); + } + + /** + * Removes all particle circle overlays from the map and clears the list. + */ + private void clearParticleCloud() { + for (Circle c : particleMarkers) { + if (c != null) c.remove(); + } + particleMarkers.clear(); + } + + /** + * Redraws the fused (smoothed) trajectory polyline if new points have + * arrived since the last draw. + * + *

Called on two triggers: + *

    + *
  1. Every 1 second by {@link #trajectoryUpdateRunnable}.
  2. + *
  3. Immediately from {@link #updateUserLocation} when movement is + * detected (i.e. the position has actually changed).
  4. + *
+ * Only updates the polyline when the point count has grown, avoiding + * unnecessary Google Maps redraws.

+ */ + private void redrawFusedTrajectory() { + if (fusedPolyline == null || smoothedPoints.isEmpty()) return; + if (smoothedPoints.size() == lastDrawnPointCount) return; // nothing new + + fusedPolyline.setPoints(new ArrayList<>(smoothedPoints)); + lastDrawnPointCount = smoothedPoints.size(); + Log.d(TAG, "Fused trajectory redrawn — " + lastDrawnPointCount + " points"); + } + + // ------------------------------------------------------------------------- + // Colour-coded observation markers + // ------------------------------------------------------------------------- + + /** + * Adds a numbered observation dot at the given position for the specified source. + * + * After adding, ALL markers in the queue are renumbered so that: + * - The newest dot always shows "1" + * - The oldest dot shows the highest number + * + * When the queue is full, the oldest marker is removed before the new one is added. + * + * @param position the observation position. + * @param color the fill colour for this source. + * @param markerQueue the rolling window queue for this source. + */ + private void addObservationMarker(@NonNull LatLng position, + int color, + @NonNull Queue markerQueue) { + if (gMap == null) return; + + // Remove oldest marker when the window is full + if (markerQueue.size() >= defaultObservations) { + Marker oldest = markerQueue.poll(); + if (oldest != null) oldest.remove(); + } + + // Add the new dot — starts as number 1 (most recent), others will be renumbered below + Marker newDot = gMap.addMarker(new MarkerOptions() + .position(position) + .icon(BitmapDescriptorFactory.fromBitmap( + createNumberedDotBitmap(color, 1))) + .anchor(0.5f, 0.5f) + .zIndex(2f)); + + if (newDot != null) { + // Store the dot colour as the tag so we can recreate its bitmap when renumbering + newDot.setTag(color); + markerQueue.add(newDot); + } + + // Renumber all markers: newest = 1, oldest = queue.size() + // The queue is ordered oldest-first (LinkedList), so we iterate in reverse + List markerList = new ArrayList<>(markerQueue); + int total = markerList.size(); + for (int i = 0; i < total; i++) { + Marker m = markerList.get(i); + if (m == null) continue; + int recencyNumber = total - i; // oldest gets highest number + Object tag = m.getTag(); + int markerColor = (tag instanceof Integer) ? (int) tag : color; + m.setIcon(BitmapDescriptorFactory.fromBitmap( + createNumberedDotBitmap(markerColor, recencyNumber))); + } + } + + // ------------------------------------------------------------------------- + // Dot queue visibility + // ------------------------------------------------------------------------- + + /** + * Shows or hides all markers in a queue immediately. Called when the user + * flips one of the three dot-source switches. + */ + private void setQueueVisibility(@NonNull LinkedList queue, boolean visible) { + for (Marker m : queue) if (m != null) m.setVisible(visible); + } + + /** + * Creates a numbered circle bitmap for an observation dot marker. + * The number shows recency — 1 is the most recent observation. + * Numbers are updated across the whole queue after each new dot is added. + * + * @param color fill colour of the dot. + * @param number the recency label to display (1 = most recent). + * @return a 40×40 px Bitmap with a filled circle and white number. + */ + private Bitmap createNumberedDotBitmap(int color, int number) { + int size = 40; + Bitmap bitmap = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888); + Canvas canvas = new Canvas(bitmap); + + // Filled circle + Paint fillPaint = new Paint(); + fillPaint.setColor(color); + fillPaint.setAntiAlias(true); + fillPaint.setStyle(Paint.Style.FILL); + canvas.drawCircle(size / 2f, size / 2f, size / 2f - 2, fillPaint); + + // White border + Paint borderPaint = new Paint(); + borderPaint.setColor(Color.WHITE); + borderPaint.setAntiAlias(true); + borderPaint.setStyle(Paint.Style.STROKE); + borderPaint.setStrokeWidth(2.5f); + canvas.drawCircle(size / 2f, size / 2f, size / 2f - 2, borderPaint); + + // Number text + Paint textPaint = new Paint(); + textPaint.setColor(Color.WHITE); + textPaint.setAntiAlias(true); + textPaint.setTextSize(16f); + textPaint.setTypeface(Typeface.DEFAULT_BOLD); + textPaint.setTextAlign(Paint.Align.CENTER); + + Rect bounds = new Rect(); + String text = String.valueOf(number); + textPaint.getTextBounds(text, 0, text.length(), bounds); + float textY = size / 2f - bounds.centerY(); + canvas.drawText(text, size / 2f, textY, textPaint); + + return bitmap; + } + + // Remove GNSS marker if user toggles it off public void clearGNSS() { if (gnssMarker != null) { gnssMarker.remove(); @@ -399,9 +1251,7 @@ public void clearGNSS() { } } - /** - * Whether user is currently showing GNSS or not - */ + // Whether user is currently showing GNSS or not public boolean isGnssEnabled() { return isGnssOn; } @@ -410,12 +1260,13 @@ private void setFloorControlsVisibility(int visibility) { floorUpButton.setVisibility(visibility); floorDownButton.setVisibility(visibility); autoFloorSwitch.setVisibility(visibility); + floorLabel.setVisibility(visibility); } public void clearMapAndReset() { - if (polyline != null) { - polyline.remove(); - polyline = null; + if (pdrPolyline != null) { + pdrPolyline.remove(); + pdrPolyline = null; } if (gnssPolyline != null) { gnssPolyline.remove(); @@ -429,19 +1280,54 @@ public void clearMapAndReset() { gnssMarker.remove(); gnssMarker = null; } + if (uncertaintyCircle != null) { + uncertaintyCircle.remove(); + uncertaintyCircle = null; + } + lastGnssLocation = null; currentLocation = null; + smoothedPoints.clear(); + lpfPoints.clear(); + smoothedPosition = null; // reset LPF filter state + + clearParticleCloud(); + lastParticleRedrawMs = 0; + + // Reset fused trajectory state + lastDrawnPointCount = 0; + trajectoryUpdateHandler.removeCallbacks(trajectoryUpdateRunnable); + if (isTrajectoryUpdateRunning) { + trajectoryUpdateHandler.postDelayed(trajectoryUpdateRunnable, 1000); + } + // Re-create empty polylines with your chosen colors if (gMap != null) { - polyline = gMap.addPolyline(new PolylineOptions() + pdrPolyline = gMap.addPolyline(new PolylineOptions() .color(Color.RED) .width(5f) .add()); gnssPolyline = gMap.addPolyline(new PolylineOptions() .color(Color.BLUE) .width(5f) + .visible(showGnssPath) .add()); + fusedPolyline = gMap.addPolyline(new PolylineOptions() + .color(Color.parseColor("#8B00FF")) + .width(6f) + .visible(!isSmoothingEnabled)); + lpfPolyline = gMap.addPolyline(new PolylineOptions() + .color(Color.parseColor("#00BCD4")) + .width(7f) + .visible(isSmoothingEnabled)); + uncertaintyCircle = gMap.addCircle(new CircleOptions() + .center(new LatLng(0, 0)) + .radius(0) + .fillColor(Color.argb(50, 0, 255, 0)) + .strokeColor(Color.argb(100, 0, 255, 0)) + .strokeWidth(2f) + .visible(false)); } } @@ -454,13 +1340,11 @@ public void clearMapAndReset() { * The method removes the old polygon if it exists and adds the new polygon * to the map with the specified options. * The method logs the number of vertices in the polygon for debugging. - *

* - * Note: The method uses hard-coded vertices for the building polygon. + * Note: The method uses hard-coded vertices for the building polygon. * - *

* - * See: {@link com.google.android.gms.maps.model.PolygonOptions} The options for the new polygon. + * See: {@link com.google.android.gms.maps.model.PolygonOptions} The options for the new polygon. */ private void drawBuildingPolygon() { if (gMap == null) { @@ -498,7 +1382,6 @@ private void drawBuildingPolygon() { .add(nucleus1, nucleus2, nucleus3, nucleus4, nucleus5) .strokeColor(Color.RED) // Red border .strokeWidth(10f) // Border width - //.fillColor(Color.argb(50, 255, 0, 0)) // Semi-transparent red fill .zIndex(1); // Set a higher zIndex to ensure it appears above other overlays // Options for the new polygon @@ -536,6 +1419,30 @@ private void drawBuildingPolygon() { gMap.addPolygon(buildingPolygonOptions4); Log.d("TrajectoryMapFragment", "Building polygon added, vertex count: " + buildingPolygon.getPoints().size()); } + public interface VenueSelectionListener { + void onVenueSelected(String venueIdOrName); + void onVenueCleared(); + } + + private static float distanceMeters(LatLng a, LatLng b) { + float[] out = new float[1]; + android.location.Location.distanceBetween( + a.latitude, a.longitude, b.latitude, b.longitude, out + ); + return out[0]; + } + private List getObservedMacsOrEmpty() { + return observedMacs == null ? new ArrayList<>() : new ArrayList<>(observedMacs); + } + public void updateObservedMacs(@NonNull List macs) { + Log.d("TrajectoryMapFragment", "Observed macs updated size=" + macs.size()+ " instance=" + System.identityHashCode(this)); + synchronized (macLock) { + observedMacs = new ArrayList<>(macs); + } + } + public IndoorMapManager getIndoorMapManager() { + return indoorMapManager; + } } diff --git a/app/src/main/java/com/openpositioning/PositionMe/presentation/viewitems/TestPointListAdapter.java b/app/src/main/java/com/openpositioning/PositionMe/presentation/viewitems/TestPointListAdapter.java new file mode 100644 index 00000000..ec66881c --- /dev/null +++ b/app/src/main/java/com/openpositioning/PositionMe/presentation/viewitems/TestPointListAdapter.java @@ -0,0 +1,72 @@ +package com.openpositioning.PositionMe.presentation.viewitems; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +import com.openpositioning.PositionMe.R; +import com.openpositioning.PositionMe.data.model.TestPointInfo; + +import java.text.SimpleDateFormat; +import java.util.List; +import java.util.Locale; +import java.util.TimeZone; +import java.util.Date; + +public class TestPointListAdapter extends RecyclerView.Adapter { + + private final Context context; + private final List testPoints; + + private long startTime = -1; + + public TestPointListAdapter(Context context, List testPoints) { + this.context = context; + this.testPoints = testPoints; + } + + @NonNull + @Override + public TestPointViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + View view = LayoutInflater.from(context).inflate(R.layout.item_testpoint_row, parent, false); + return new TestPointViewHolder(view); + } + + @Override + public void onBindViewHolder(@NonNull TestPointViewHolder holder, int position) { + TestPointInfo tp = testPoints.get(position); + holder.tvNumber.setText(String.valueOf(tp.number)); + holder.tvLatLon.setText(String.format(Locale.US, "(%.6f, %.6f)", tp.latitude, tp.longitude)); + + if (startTime == -1) { + startTime = tp.timestamp; + } + + long elapsed = tp.timestamp - startTime; + + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss", Locale.US); + sdf.setTimeZone(TimeZone.getTimeZone("UTC")); + + holder.tvTimestamp.setText(sdf.format(new Date(elapsed))); + } + + @Override + public int getItemCount() { + return testPoints.size(); + } + + public static class TestPointViewHolder extends RecyclerView.ViewHolder { + TextView tvNumber, tvLatLon, tvTimestamp; + + public TestPointViewHolder(@NonNull View itemView) { + super(itemView); + tvNumber = itemView.findViewById(R.id.tvTestPointNumber); + tvLatLon = itemView.findViewById(R.id.tvLatLon); + tvTimestamp = itemView.findViewById(R.id.tvTimestamp); + } + } +} diff --git a/app/src/main/java/com/openpositioning/PositionMe/presentation/viewitems/UploadListAdapter.java b/app/src/main/java/com/openpositioning/PositionMe/presentation/viewitems/UploadListAdapter.java index b564e231..3ca553dd 100644 --- a/app/src/main/java/com/openpositioning/PositionMe/presentation/viewitems/UploadListAdapter.java +++ b/app/src/main/java/com/openpositioning/PositionMe/presentation/viewitems/UploadListAdapter.java @@ -2,6 +2,7 @@ import android.content.Context; import android.view.LayoutInflater; +import android.view.View; import android.view.ViewGroup; import android.widget.Toast; @@ -12,9 +13,24 @@ import com.openpositioning.PositionMe.presentation.fragment.UploadFragment; import java.io.File; +import java.io.FileInputStream; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; +import java.util.ArrayList; + +import androidx.recyclerview.widget.LinearLayoutManager; + +import com.openpositioning.PositionMe.data.model.TestPointInfo; +import com.openpositioning.PositionMe.data.utils.TestPointParser; + +import androidx.core.content.ContextCompat; + +import com.openpositioning.PositionMe.data.remote.ServerCommunications; + +import android.os.Handler; +import android.os.Looper; + /** * Adapter used for displaying local Trajectory file data @@ -30,6 +46,13 @@ public class UploadListAdapter extends RecyclerView.Adapter { private final List uploadItems; private final DownloadClickListener listener; + List testPoints; + + private final List expandedState; + + private final ServerCommunications serverCommunications; + + /** * Default public constructor with context for inflating views and list to be displayed. * @@ -43,6 +66,12 @@ public UploadListAdapter(Context context, List uploadItems, DownloadClickL this.context = context; this.uploadItems = uploadItems; this.listener = listener; + this.serverCommunications = new ServerCommunications(context); + + expandedState = new ArrayList<>(); + for (int i = 0; i < uploadItems.size(); i++) { + expandedState.add(false); // collapsed by default + } } /** @@ -65,16 +94,112 @@ public UploadViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewTy */ @Override public void onBindViewHolder(@NonNull UploadViewHolder holder, int position) { + File trajectoryFile = uploadItems.get(position); + holder.trajId.setText(String.valueOf(position)); + + // Extract date from filename Pattern datePattern = Pattern.compile("_(.*?)\\.txt"); Matcher dateMatcher = datePattern.matcher(uploadItems.get(position).getName()); String dateString = dateMatcher.find() ? dateMatcher.group(1) : "N/A"; System.err.println("UPLOAD - Date string: " + dateString); holder.trajDate.setText(dateString); + // Read and display Trajectory Name (NEW) + String trajectoryName = readTrajectoryName(uploadItems.get(position)); + if (trajectoryName != null && !trajectoryName.isEmpty()) { + holder.trajectoryNameText.setText(trajectoryName); + holder.trajectoryNameText.setVisibility(View.VISIBLE); + } else { + holder.trajectoryNameText.setText("No name"); + holder.trajectoryNameText.setVisibility(View.VISIBLE); + } + + // --------------------------- + // 🔽 Setup test point dropdown + // --------------------------- + // Parse test points from protobuf file + +// List testPoints = +// TestPointParser.parseFromFile(trajectoryFile); + + try { + testPoints = TestPointParser.parseFromFile(trajectoryFile); + } catch (Exception e) { + testPoints = java.util.Collections.emptyList(); + android.util.Log.e("UploadListAdapter", + "Failed to parse test points from " + trajectoryFile.getName(), e); + } + + + // Setup nested RecyclerView + TestPointListAdapter testPointListAdapter = + new TestPointListAdapter(context, testPoints); + + holder.testPointRecyclerView.setLayoutManager( + new LinearLayoutManager(context)); + + holder.testPointRecyclerView.setAdapter(testPointListAdapter); + + // Initially collapsed + holder.testPointRecyclerView.setVisibility(android.view.View.GONE); + + boolean isExpanded = expandedState.get(position); + + // Apply state when binding (IMPORTANT for RecyclerView recycling) + holder.testPointRecyclerView.setVisibility(isExpanded ? View.VISIBLE : View.GONE); + holder.toggleTestPointsButton.setIcon( + ContextCompat.getDrawable(context, + isExpanded ? R.drawable.up_arrow : R.drawable.down_arrow) + ); + + // Toggle expand/collapse + holder.toggleTestPointsButton.setOnClickListener(v -> { + boolean newState = !expandedState.get(position); + expandedState.set(position, newState); + + holder.testPointRecyclerView.setVisibility(newState ? View.VISIBLE : View.GONE); + holder.toggleTestPointsButton.setIcon( + ContextCompat.getDrawable(context, + newState ? R.drawable.up_arrow : R.drawable.down_arrow) + ); + }); + + // Set click listener for the delete button holder.deletebutton.setOnClickListener(v -> deleteFileAtPosition(position)); + // --------------------------- + // ⬆ Upload button + // --------------------------- + holder.uploadButton.setOnClickListener(v -> { + File fileToUpload = uploadItems.get(position); + + if (!fileToUpload.exists()) { + Toast.makeText(context, "File not found", Toast.LENGTH_SHORT).show(); + return; + } + + holder.uploadButton.setEnabled(false); + + String name = readTrajectoryName(fileToUpload); + String displayName = (name != null && !name.isEmpty()) + + ? name + : fileToUpload.getName(); + + Toast.makeText(context, + "Uploading trajectory: " + displayName, + Toast.LENGTH_LONG).show(); + + serverCommunications.uploadLocalTrajectory(fileToUpload); + + new Handler(Looper.getMainLooper()).postDelayed(() -> { + holder.uploadButton.setEnabled(true); + }, 3000); // re-enable after 3 seconds + }); + + } /** @@ -86,23 +211,45 @@ public int getItemCount() { return uploadItems.size(); } - private void deleteFileAtPosition(int position) - { - if (position >= 0 && position < uploadItems.size()) - { + /** + * Delete trajectory file at specified position + */ + private void deleteFileAtPosition(int position) { + if (position >= 0 && position < uploadItems.size()) { File fileToDelete = uploadItems.get(position); - if (fileToDelete.exists() && fileToDelete.delete()) - { + if (fileToDelete.exists() && fileToDelete.delete()) { uploadItems.remove(position); notifyItemRemoved(position); notifyItemRangeChanged(position, uploadItems.size()); // Update subsequent items Toast.makeText(context, "File deleted successfully", Toast.LENGTH_SHORT).show(); - } - else - { + } else { Toast.makeText(context, "Failed to delete file", Toast.LENGTH_SHORT).show(); } } } -} + + /** + * Read trajectory name (trajectory_id) from the protobuf file + * + * @param file The trajectory .txt file containing protobuf data + * @return The trajectory_id string, or null if not found/error + */ + private String readTrajectoryName(File file) { + try { + FileInputStream fis = new FileInputStream(file); + com.openpositioning.PositionMe.Traj.Trajectory trajectory = + com.openpositioning.PositionMe.Traj.Trajectory.parseFrom(fis); + fis.close(); + + // Get trajectory_id from proto + String trajectoryId = trajectory.getTrajectoryId(); + return (trajectoryId != null && !trajectoryId.isEmpty()) ? trajectoryId : null; + + } catch (Exception e) { + android.util.Log.e("UploadListAdapter", "Error reading trajectory name from " + + file.getName() + ": " + e.getMessage()); + return null; + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/openpositioning/PositionMe/presentation/viewitems/UploadViewHolder.java b/app/src/main/java/com/openpositioning/PositionMe/presentation/viewitems/UploadViewHolder.java index e6068969..be28a60c 100644 --- a/app/src/main/java/com/openpositioning/PositionMe/presentation/viewitems/UploadViewHolder.java +++ b/app/src/main/java/com/openpositioning/PositionMe/presentation/viewitems/UploadViewHolder.java @@ -25,10 +25,14 @@ public class UploadViewHolder extends RecyclerView.ViewHolder implements View.On TextView trajId; TextView trajDate; + TextView trajectoryNameText; // NEW: Trajectory name display MaterialButton uploadButton; // Correct reference to MaterialButton // Weak reference to the click listener to enable garbage collection on recyclerview items private WeakReference listenerReference; public Button deletebutton; + public RecyclerView testPointRecyclerView; + public MaterialButton toggleTestPointsButton; + /** * {@inheritDoc} @@ -43,14 +47,16 @@ public UploadViewHolder(@NonNull View itemView, DownloadClickListener listener) super(itemView); this.listenerReference = new WeakReference<>(listener); - this.trajId = itemView.findViewById(R.id.trajectoryIdItem); - this.trajDate = itemView.findViewById(R.id.trajectoryDateItem); - this.uploadButton = itemView.findViewById(R.id.uploadTrajectoryButton); - - this.uploadButton.setOnClickListener(this); - this.deletebutton = itemView.findViewById(R.id.deletebutton); + trajId = itemView.findViewById(R.id.trajectoryIdItem); + trajDate = itemView.findViewById(R.id.trajectoryDateItem); + trajectoryNameText = itemView.findViewById(R.id.trajectory_name_text); // ✅ ADD THIS + uploadButton = itemView.findViewById(R.id.uploadTrajectoryButton); + toggleTestPointsButton = itemView.findViewById(R.id.toggleTestPointsButton); + testPointRecyclerView = itemView.findViewById(R.id.rvTestPoints); + deletebutton = itemView.findViewById(R.id.deletebutton); } + /** * {@inheritDoc} * Calls the onPositionClick function on the listenerReference object. @@ -59,4 +65,4 @@ public UploadViewHolder(@NonNull View itemView, DownloadClickListener listener) public void onClick(View view) { listenerReference.get().onPositionClicked(getAdapterPosition()); } -} +} \ No newline at end of file diff --git a/app/src/main/java/com/openpositioning/PositionMe/sensors/BleDataProcessor.java b/app/src/main/java/com/openpositioning/PositionMe/sensors/BleDataProcessor.java new file mode 100644 index 00000000..10535028 --- /dev/null +++ b/app/src/main/java/com/openpositioning/PositionMe/sensors/BleDataProcessor.java @@ -0,0 +1,370 @@ +package com.openpositioning.PositionMe.sensors; + +import android.Manifest; +import android.annotation.SuppressLint; +import android.bluetooth.BluetoothAdapter; +import android.bluetooth.BluetoothDevice; +import android.bluetooth.BluetoothManager; +import android.bluetooth.le.BluetoothLeScanner; +import android.bluetooth.le.ScanCallback; +import android.bluetooth.le.ScanResult; +import android.content.Context; +import android.content.pm.PackageManager; +import android.os.Build; +import android.util.Log; +import android.widget.Toast; + +import androidx.core.app.ActivityCompat; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Timer; +import java.util.TimerTask; + +/** + * BLE Data Processor for scanning and collecting Bluetooth Low Energy device information. + * Designed to work in background without UI, similar to WifiDataProcessor. + * Implements Observable pattern to notify SensorFusion of new BLE scan results. + * + * @author Generated for Proto v2.0 BLE data collection + */ +public class BleDataProcessor implements Observable { + + private static final String TAG = "BleDataProcessor"; + + // Scan interval (5 seconds, same as WiFi) + private static final long SCAN_INTERVAL = 5000; + + // BLE scan duration (4 seconds to complete before next scan) + private static final long SCAN_DURATION = 4000; + + // Application context + private final Context context; + + // Bluetooth components + private final BluetoothAdapter bluetoothAdapter; + private BluetoothLeScanner bleScanner; + + // Collected BLE devices (using Map to avoid duplicates in same scan) + private Map bleDevicesMap; + + // Observers list + private ArrayList observers; + + // Timer for periodic scanning + private Timer scanBleTimer; + + // Flag to track if currently scanning + private boolean isScanning = false; + + /** + * Constructor - Initialize BLE processor + */ + public BleDataProcessor(Context context) { + this.context = context; + this.observers = new ArrayList<>(); + this.bleDevicesMap = new HashMap<>(); + + Log.i(TAG, "Initializing BleDataProcessor..."); + + // Check if BLE is supported + if (!context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH_LE)) { + Log.w(TAG, "BLE not supported on this device"); + Toast.makeText(context, "BLE not supported on this device", Toast.LENGTH_SHORT).show(); + this.bluetoothAdapter = null; + return; + } + Log.i(TAG, "BLE is supported on this device"); + + // Get Bluetooth adapter + BluetoothManager bluetoothManager = (BluetoothManager) context.getSystemService(Context.BLUETOOTH_SERVICE); + if (bluetoothManager == null) { + Log.e(TAG, "BluetoothManager is null"); + Toast.makeText(context, "Bluetooth manager not available", Toast.LENGTH_SHORT).show(); + this.bluetoothAdapter = null; + return; + } + + this.bluetoothAdapter = bluetoothManager.getAdapter(); + + // Check if Bluetooth adapter exists + if (bluetoothAdapter == null) { + Log.e(TAG, "BluetoothAdapter is null - device may not support Bluetooth"); + Toast.makeText(context, "Bluetooth not available", Toast.LENGTH_SHORT).show(); + return; + } + Log.i(TAG, "BluetoothAdapter obtained successfully"); + + // Check if Bluetooth is enabled + if (!bluetoothAdapter.isEnabled()) { + Log.w(TAG, "Bluetooth is not enabled - BLE scanning will not work"); + Toast.makeText(context, "Please enable Bluetooth for BLE scanning", Toast.LENGTH_LONG).show(); + return; + } + Log.i(TAG, "Bluetooth is enabled"); + + // Try to get BLE scanner immediately (with permission check) + if (checkBlePermissions()) { + try { + this.bleScanner = bluetoothAdapter.getBluetoothLeScanner(); + if (bleScanner == null) { + Log.e(TAG, "BluetoothLeScanner is null even though Bluetooth is enabled"); + Toast.makeText(context, "BLE scanner initialization failed - try toggling Bluetooth", Toast.LENGTH_LONG).show(); + } else { + Log.i(TAG, "BLE scanner initialized successfully"); + } + } catch (Exception e) { + Log.e(TAG, "Exception while getting BLE scanner: " + e.getMessage()); + this.bleScanner = null; + } + } else { + Log.w(TAG, "BLE permissions not granted yet - scanner will be initialized when permissions are granted"); + } + } + + /** + * BLE Scan Callback - receives scan results + */ + private final ScanCallback bleScanCallback = new ScanCallback() { + @SuppressLint("MissingPermission") + @Override + public void onScanResult(int callbackType, ScanResult result) { + super.onScanResult(callbackType, result); + + if (!checkBlePermissions()) { + return; + } + + try { + BluetoothDevice device = result.getDevice(); + String address = device.getAddress(); + + // Create BleDevice object + BleDevice bleDevice = new BleDevice(); + bleDevice.macAddress = address; + bleDevice.name = device.getName() != null ? device.getName() : "Unknown"; + bleDevice.rssi = result.getRssi(); + + // Get TX power level (if available) + if (result.getTxPower() != 127) { // 127 means not available + bleDevice.txPowerLevel = result.getTxPower(); + } + + // Get Service UUIDs + if (result.getScanRecord() != null) { + bleDevice.serviceUuids = new ArrayList<>(); + if (result.getScanRecord().getServiceUuids() != null) { + for (android.os.ParcelUuid uuid : result.getScanRecord().getServiceUuids()) { + bleDevice.serviceUuids.add(uuid.toString()); + } + } + + // Get manufacturer data + if (result.getScanRecord().getManufacturerSpecificData() != null + && result.getScanRecord().getManufacturerSpecificData().size() > 0) { + int manufacturerId = result.getScanRecord().getManufacturerSpecificData().keyAt(0); + bleDevice.manufacturerData = result.getScanRecord().getManufacturerSpecificData().get(manufacturerId); + } + + // Get advertise flags + bleDevice.advertiseFlags = result.getScanRecord().getAdvertiseFlags(); + } + + // Add to map (will replace if same device scanned again in this scan) + bleDevicesMap.put(address, bleDevice); + + } catch (Exception e) { + Log.e(TAG, "Error processing BLE scan result: " + e.getMessage()); + } + } + + @Override + public void onScanFailed(int errorCode) { + super.onScanFailed(errorCode); + Log.e(TAG, "BLE Scan failed with error code: " + errorCode); + isScanning = false; + } + }; + + /** + * Start BLE scanning + */ + @SuppressLint("MissingPermission") + private void startBleScan() { + if (!checkBlePermissions()) { + Log.w(TAG, "BLE permissions not granted - cannot scan"); + return; + } + + // Try to get scanner if not already obtained + if (bleScanner == null && bluetoothAdapter != null) { + Log.i(TAG, "Attempting to get BLE scanner..."); + try { + bleScanner = bluetoothAdapter.getBluetoothLeScanner(); + if (bleScanner == null) { + Log.e(TAG, "BLE scanner is still null - Bluetooth might need to be toggled"); + return; + } + Log.i(TAG, "BLE scanner obtained successfully"); + } catch (Exception e) { + Log.e(TAG, "Exception getting BLE scanner: " + e.getMessage()); + return; + } + } + + if (bleScanner == null) { + Log.w(TAG, "BLE scanner not available"); + return; + } + + if (isScanning) { + Log.d(TAG, "Already scanning, skip this round"); + return; + } + + // Clear previous scan results + bleDevicesMap.clear(); + + // Start scanning + try { + bleScanner.startScan(bleScanCallback); + isScanning = true; + Log.d(TAG, "BLE scan started"); + + // Stop scan after SCAN_DURATION + new Timer().schedule(new TimerTask() { + @Override + public void run() { + stopBleScan(); + } + }, SCAN_DURATION); + + } catch (SecurityException e) { + Log.e(TAG, "Security exception when starting BLE scan: " + e.getMessage()); + } catch (Exception e) { + Log.e(TAG, "Exception when starting BLE scan: " + e.getMessage()); + } + } + + /** + * Stop BLE scanning and notify observers + */ + @SuppressLint("MissingPermission") + private void stopBleScan() { + if (!isScanning) { + return; + } + + if (!checkBlePermissions()) { + return; + } + + try { + if (bleScanner != null) { + bleScanner.stopScan(bleScanCallback); + isScanning = false; + + Log.i(TAG, "BLE scan completed, found " + bleDevicesMap.size() + " devices"); + + // Notify observers with results + notifyObservers(0); + } + } catch (SecurityException e) { + Log.e(TAG, "Security exception when stopping BLE scan: " + e.getMessage()); + } catch (Exception e) { + Log.e(TAG, "Exception when stopping BLE scan: " + e.getMessage()); + } + } + + /** + * Start periodic BLE scanning + */ + public void startListening() { + if (!checkBlePermissions()) { + Log.w(TAG, "Cannot start BLE listening - permissions not granted"); + return; + } + + Log.i(TAG, "BLE periodic scanning started"); + + this.scanBleTimer = new Timer(); + this.scanBleTimer.scheduleAtFixedRate(new TimerTask() { + @Override + public void run() { + startBleScan(); + } + }, 0, SCAN_INTERVAL); + } + + /** + * Stop periodic BLE scanning + */ + public void stopListening() { + if (scanBleTimer != null) { + scanBleTimer.cancel(); + scanBleTimer = null; + } + + if (isScanning) { + stopBleScan(); + } + + Log.i(TAG, "BLE scanning stopped"); + } + + /** + * Check BLE permissions + */ + private boolean checkBlePermissions() { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + // Android 12+ + return ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_SCAN) + == PackageManager.PERMISSION_GRANTED && + ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_CONNECT) + == PackageManager.PERMISSION_GRANTED; + } else { + // Below Android 12 + return ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH) + == PackageManager.PERMISSION_GRANTED && + ActivityCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_ADMIN) + == PackageManager.PERMISSION_GRANTED && + ActivityCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) + == PackageManager.PERMISSION_GRANTED; + } + } + + /** + * Get collected BLE devices as array + */ + public BleDevice[] getBleDevices() { + return bleDevicesMap.values().toArray(new BleDevice[0]); + } + + @Override + public void registerObserver(Observer o) { + observers.add(o); + } + + @Override + public void notifyObservers(int idx) { + BleDevice[] devices = getBleDevices(); + for (Observer o : observers) { + o.update(devices); + } + } + + /** + * BLE Device data class + */ + public static class BleDevice { + public String macAddress; + public String name; + public int rssi; + public int txPowerLevel = 0; + public int advertiseFlags = 0; + public List serviceUuids; + public byte[] manufacturerData; + } +} \ No newline at end of file diff --git a/app/src/main/java/com/openpositioning/PositionMe/sensors/ExtendedKalmanFilter.java b/app/src/main/java/com/openpositioning/PositionMe/sensors/ExtendedKalmanFilter.java new file mode 100644 index 00000000..03d331a4 --- /dev/null +++ b/app/src/main/java/com/openpositioning/PositionMe/sensors/ExtendedKalmanFilter.java @@ -0,0 +1,239 @@ +package com.openpositioning.PositionMe.sensors; + +import android.util.Log; + +/** + * Extended Kalman Filter for indoor positioning. + * + * State vector: [east, north] in local East-North metres. + * Process model: constant velocity, state advances by PDR displacement. + * Observation model: direct position measurement. + * + * @author Haoning Huang + */ + +public class ExtendedKalmanFilter { + + private static final String TAG = "EKFPositioning"; + + /** PDR process noise standard deviation (metres). */ + private static final float MOTION_NOISE_STD = 0.15f; + /** GNSS observation noise standard deviation (metres). */ + private static final float GNSS_NOISE_STD = 5.0f; + /** WiFi observation noise standard deviation (metres). */ + private static final float WIFI_NOISE_STD = 15.0f; + + // State estimate + private float stateX, stateY; + + // State covariance P (2x2 symmetric, stored as four scalars) + private float p00, p01, p10, p11; + + private boolean initialized = false; + + /** + * Initializes the filter at the given East-North position. + * + * @param initX Initial East position (metres) + * @param initY Initial North position (metres) + * @param uncertainty Initial 1-sigma uncertainty (metres) + */ + public void initParticles(float initX, float initY, float uncertainty) { + stateX = initX; + stateY = initY; + float u2 = uncertainty * uncertainty; + p00 = u2; p01 = 0f; + p10 = 0f; p11 = u2; + initialized = true; + Log.i(TAG, "EKF initialised at (" + initX + ", " + initY + + ") ± " + uncertainty + " m"); + } + + /** + * Prediction step: advances state by PDR displacement and grows covariance. + * + * @param dx East displacement since last step (metres) + * @param dy North displacement since last step (metres) + */ + public void predict(float dx, float dy) { + if (!initialized) return; + float movementMagnitude = (float) Math.sqrt(dx * dx + dy * dy); + float noiseStd = (movementMagnitude < 0.05f) + ? MOTION_NOISE_STD * 0.1f : MOTION_NOISE_STD; + stateX += dx; + stateY += dy; + float q = noiseStd * noiseStd; + p00 += q; + p11 += q; + } + + /** + * Update step with a position observation. + * H = I, so innovation = meas - state, S = P + R. + * + * @param measX Observed East position (metres) + * @param measY Observed North position (metres) + * @param noiseStd Observation noise standard deviation (metres) + */ + private void update(float measX, float measY, float noiseStd) { + if (!initialized) return; + float r = noiseStd * noiseStd; + // Innovation covariance S = P + R*I + float s00 = p00 + r, s01 = p01; + float s10 = p10, s11 = p11 + r; + // S inverse + float det = s00 * s11 - s01 * s10; + if (Math.abs(det) < 1e-10f) return; + float id = 1f / det; + float si00 = s11 * id, si01 = -s01 * id; + float si10 = -s10 * id, si11 = s00 * id; + // Kalman gain K = P * S^{-1} + float k00 = p00 * si00 + p01 * si10; + float k01 = p00 * si01 + p01 * si11; + float k10 = p10 * si00 + p11 * si10; + float k11 = p10 * si01 + p11 * si11; + // State update + float innX = measX - stateX; + float innY = measY - stateY; + stateX += k00 * innX + k01 * innY; + stateY += k10 * innX + k11 * innY; + // Covariance update P = (I - K) * P + float ik00 = 1f - k00, ik01 = -k01; + float ik10 = -k10, ik11 = 1f - k11; + float np00 = ik00 * p00 + ik01 * p10; + float np01 = ik00 * p01 + ik01 * p11; + float np10 = ik10 * p00 + ik11 * p10; + float np11 = ik10 * p01 + ik11 * p11; + p00 = np00; p01 = np01; + p10 = np10; p11 = np11; + } + + /** Update with a GNSS position observation. */ + public void updateWithGnss(float measX, float measY) { + update(measX, measY, GNSS_NOISE_STD); + Log.d(TAG, "GNSS update. State: (" + stateX + ", " + stateY + ")"); + } + + /** + * Update with a GNSS observation using accuracy-adaptive noise. + * + * @param measX Observed East position (metres) + * @param measY Observed North position (metres) + * @param accuracy Reported horizontal accuracy from Android Location (metres) + */ + public void updateWithGnss(float measX, float measY, float accuracy) { + float noiseStd = Math.min(Math.max(accuracy, 3.0f), 30.0f); + update(measX, measY, noiseStd); + Log.d(TAG, "GNSS update (accuracy=" + accuracy + "m, noiseStd=" + noiseStd + + "m). State: (" + stateX + ", " + stateY + ")"); + } + + /** Update with a WiFi positioning observation. */ + public void updateWithWifi(float measX, float measY) { + update(measX, measY, WIFI_NOISE_STD); + Log.d(TAG, "WiFi update. State: (" + stateX + ", " + stateY + ")"); + } + + /** + * Update with a WiFi positioning observation with a caller-supplied noise std. + * + * @param measX Observed East position (metres) + * @param measY Observed North position (metres) + * @param noiseStd Observation noise standard deviation (metres) + */ + public void updateWithWifi(float measX, float measY, float noiseStd) { + update(measX, measY, noiseStd); + Log.d(TAG, "WiFi update (noiseStd=" + noiseStd + "m). State: (" + stateX + ", " + stateY + ")"); + } + + /** + * Update with a WiFi positioning observation using AP-count-adaptive noise. + * + * @param measX Observed East position (metres) + * @param measY Observed North position (metres) + * @param apCount Number of WiFi APs used to compute the position fix + */ + public void updateWithWifi(float measX, float measY, int apCount) { + float noiseStd = Math.max(8.0f, 20.0f - apCount * 1.5f); + update(measX, measY, noiseStd); + Log.d(TAG, "WiFi update (apCount=" + apCount + ", noiseStd=" + noiseStd + + "m). State: (" + stateX + ", " + stateY + ")"); + } + + /** + * Returns the current best position estimate. + * + * @return float[]{east, north} in East-North metres. + */ + public float[] getBestEstimate() { + if (!initialized) return new float[]{0f, 0f}; + return new float[]{stateX, stateY}; + } + + /** + * Returns position uncertainty as the RMS of the covariance diagonal. + * + * @return 1-sigma uncertainty in metres (-1 if not initialized) + */ + public double getSigmaMetres() { + if (!initialized) return -1.0; + return Math.sqrt(p00 + p11); + } + + /** + * Resets state around a new position with increased uncertainty. + * Used after a floor change. + */ + public void resetAroundPosition(float centreX, float centreY, float uncertainty) { + stateX = centreX; + stateY = centreY; + float u2 = uncertainty * uncertainty; + p00 = u2; p01 = 0f; + p10 = 0f; p11 = u2; + Log.i(TAG, "EKF reset around (" + centreX + ", " + centreY + ")"); + } + + /** + * Inflates the diagonal of P to allow WiFi observations to pull the state. + * + * @param amount Variance increment (metres²) added to p00 and p11 + */ + public void inflateCovariance(float amount) { + p00 += amount; + p11 += amount; + } + + public boolean isInitialized() { return initialized; } + + /** + * Computes the squared Mahalanobis distance between a candidate observation + * and the current predicted state, using the innovation covariance S = P + R·I. + * + *

For a 2-D position observation the result follows a chi-squared distribution + * with 2 degrees of freedom. Typical rejection thresholds:

+ *
    + *
  • 95 % confidence boundary: 5.99
  • + *
  • 99 % confidence boundary: 9.21
  • + *
+ * + * @param measX Observed East position (metres) + * @param measY Observed North position (metres) + * @param noiseStd Observation noise standard deviation (metres) + * @return squared Mahalanobis distance, or {@code Float.MAX_VALUE} if not initialized + */ + public float mahalanobisDistanceSq(float measX, float measY, float noiseStd) { + if (!initialized) return Float.MAX_VALUE; + float r = noiseStd * noiseStd; + float s00 = p00 + r; + float s01 = p01; + float s10 = p10; + float s11 = p11 + r; + float det = s00 * s11 - s01 * s10; + if (Math.abs(det) < 1e-10f) return Float.MAX_VALUE; + float innX = measX - stateX; + float innY = measY - stateY; + // d² = [innX innY] · S⁻¹ · [innX innY]ᵀ + float id = 1f / det; + return (innX * innX * s11 - 2f * innX * innY * s01 + innY * innY * s00) * id; + } +} diff --git a/app/src/main/java/com/openpositioning/PositionMe/sensors/ParticleFilter.java b/app/src/main/java/com/openpositioning/PositionMe/sensors/ParticleFilter.java new file mode 100644 index 00000000..cc089e60 --- /dev/null +++ b/app/src/main/java/com/openpositioning/PositionMe/sensors/ParticleFilter.java @@ -0,0 +1,405 @@ +package com.openpositioning.PositionMe.sensors; + +import android.util.Log; +import java.util.Random; + +/** + * The filter maintains a set of NUM_PARTICLES weighted hypotheses (particles) that each + * represent a possible user position in the local East-North coordinate frame (metres East and + * North from a reference point set. + * + * Three-step cycle: + * 1. predict() — move every particle using the PDR displacement + Gaussian noise + * 2. updateWithGnss() — reweight particles by distance to the GNSS observation + * updateWithWifi() — reweight particles by distance to the WiFi observation + * 3. resample() — called inside each update step + * + * @author Haoning Huang + */ +public class ParticleFilter { + + private static final String TAG = "ParticleFilter"; + + /** Number of particles.*/ + private static final int NUM_PARTICLES = 300; + + /** + * Standard deviation of Gaussian noise added to each particle during the predict step (metres). + * Represents uncertainty in PDR step length / heading. + */ + private static final float MOTION_NOISE_STD = 0.15f; + + /** + * Standard deviation of the GNSS observation model (metres). + * Reflects typical outdoor GNSS horizontal accuracy. + */ + private static final float GNSS_NOISE_STD = 5.0f; + + /** + * Standard deviation of the WiFi observation model (metres). + * WiFi fingerprinting is less accurate than GNSS, so a larger value is used. + */ + private static final float WIFI_NOISE_STD = 15.0f; + + /** East coordinate of each particle in East-North metres */ + private float[] particlesX; + + /** North coordinate of each particle in East-North metres */ + private float[] particlesY; + + /** Normalised importance weight of each particle (sum = 1) */ + private float[] weights; + + private final Random random = new Random(); + + private boolean initialized = false; + + /** Default constructor — allocates arrays but does not initialise positions. */ + public ParticleFilter() { + particlesX = new float[NUM_PARTICLES]; + particlesY = new float[NUM_PARTICLES]; + weights = new float[NUM_PARTICLES]; + } + + /** + * Spreads all particles as a Gaussian cloud centred on the given East-North position. + * + * @param initX Initial East position in East-North metres + * @param initY Initial North position in East-North metres + * @param uncertainty Spread radius + */ + public void initParticles(float initX, float initY, float uncertainty) { + for (int i = 0; i < NUM_PARTICLES; i++) { + particlesX[i] = initX + (float) (random.nextGaussian() * uncertainty); + particlesY[i] = initY + (float) (random.nextGaussian() * uncertainty); + weights[i] = 1.0f / NUM_PARTICLES; + } + initialized = true; + Log.i(TAG, "Initialised " + NUM_PARTICLES + " particles at (" + + initX + ", " + initY + ") ± " + uncertainty + " m"); + } + + /** + * Prediction step: translates every particle by the PDR displacement and + * adds Gaussian noise to model uncertainty in step length and heading. + * + * When the device is stationary, using a reduced noise to lower the drifting of particle cloud. + * + * @param dx PDR displacement in East direction (metres) since last call + * @param dy PDR displacement in North direction (metres) since last call + */ + public void predict(float dx, float dy) { + if (!initialized) return; + float movementMagnitude = (float) Math.sqrt(dx * dx + dy * dy); + float noise = (movementMagnitude < 0.05f) ? MOTION_NOISE_STD * 0.1f : MOTION_NOISE_STD; + for (int i = 0; i < NUM_PARTICLES; i++) { + particlesX[i] += dx + (float) (random.nextGaussian() * noise); + particlesY[i] += dy + (float) (random.nextGaussian() * noise); + } + } + + + /** + * Update step using a GNSS position observation. + * Reweights particles by a Gaussian likelihood centred on the measurement. + * Resamples to remove low-weight particles. + * + * @param measX Observed East position in East-North metres (converted from WGS84) + * @param measY Observed North position in East-North metres (converted from WGS84) + */ + public void updateWithGnss(float measX, float measY) { + if (!initialized) return; + updateWeights(measX, measY, GNSS_NOISE_STD); + resample(); + Log.d(TAG, "GNSS update applied. Best estimate: " + java.util.Arrays.toString(getBestEstimate())); + } + + /** + * Update step using a GNSS position observation with accuracy-adaptive noise. + * Maps the reported GNSS accuracy (metres) to an observation noise std dev: + * accuracy < 5 m → noise std = accuracy (high trust) + * accuracy 5–20 m → noise std = accuracy + * accuracy > 20 m → noise std = accuracy (capped at 30 m) + * + * @param measX Observed East position in East-North metres + * @param measY Observed North position in East-North metres + * @param accuracy Reported horizontal accuracy from Android Location (metres) + */ + public void updateWithGnss(float measX, float measY, float accuracy) { + if (!initialized) return; + float noiseStd = Math.min(Math.max(accuracy, 3.0f), 30.0f); + updateWeights(measX, measY, noiseStd); + resample(); + Log.d(TAG, "GNSS update (accuracy=" + accuracy + "m, noiseStd=" + noiseStd + + "m). Best estimate: " + java.util.Arrays.toString(getBestEstimate())); + } + + /** + * Update step using a WiFi positioning observation. + * + * @param measX Observed East position in East-North metres + * @param measY Observed North position in East-North metres + */ + public void updateWithWifi(float measX, float measY) { + if (!initialized) return; + updateWeights(measX, measY, WIFI_NOISE_STD); + resample(); + Log.d(TAG, "WiFi update applied. Best estimate: " + java.util.Arrays.toString(getBestEstimate())); + } + + /** + * Update step using a WiFi positioning observation with a caller-supplied noise std. + * + * @param measX Observed East position in East-North metres + * @param measY Observed North position in East-North metres + * @param noiseStd Observation noise standard deviation (metres) + */ + public void updateWithWifi(float measX, float measY, float noiseStd) { + if (!initialized) return; + updateWeights(measX, measY, noiseStd); + resample(); + Log.d(TAG, "WiFi update (noiseStd=" + noiseStd + "m). Best estimate: " + + java.util.Arrays.toString(getBestEstimate())); + } + + /** + * Update step using a WiFi positioning observation with AP-count-adaptive noise. + * + * @param measX Observed East position in East-North metres + * @param measY Observed North position in East-North metres + * @param apCount Number of WiFi APs used to compute the position fix + */ + public void updateWithWifi(float measX, float measY, int apCount) { + if (!initialized) return; + float noiseStd = Math.max(8.0f, 20.0f - apCount * 1.5f); + updateWeights(measX, measY, noiseStd); + resample(); + Log.d(TAG, "WiFi update (apCount=" + apCount + ", noiseStd=" + noiseStd + + "m). Best estimate: " + java.util.Arrays.toString(getBestEstimate())); + } + + /** + * Returns the current best position estimate as the weighted mean of all particles. + * + * @return float array {east, north} in East-North metres. + */ + public float[] getBestEstimate() { + if (!initialized) return new float[]{0f, 0f}; + float x = 0f, y = 0f; + for (int i = 0; i < NUM_PARTICLES; i++) { + x += weights[i] * particlesX[i]; + y += weights[i] * particlesY[i]; + } + return new float[]{x, y}; + } + + /** + * Returns the spread of the particle cloud as a single scalar (metres). + * Computed as the RMS of the weighted standard deviations in East and North. + * A larger value means more uncertain. + * + * @return spread radius in metres (if not initialized,return -1). + */ + public double getSigmaMetres() { + if (!initialized) return -1.0; + float[] mean = getBestEstimate(); + double varX = 0.0, varY = 0.0; + for (int i = 0; i < NUM_PARTICLES; i++) { + double dx = particlesX[i] - mean[0]; + double dy = particlesY[i] - mean[1]; + varX += weights[i] * dx * dx; + varY += weights[i] * dy * dy; + } + return Math.sqrt(varX + varY); + } + + /** + * Returns a copy of all particle positions in local East-North coordinates (metres). + * Each row is one particle: {east, north}. + * Used for map matching wall-constraint filter. + * + * @return float[NUM_PARTICLES][2] array, or empty array if not initialized. + */ + public float[][] getParticles() { + if (!initialized) return new float[0][2]; + float[][] result = new float[NUM_PARTICLES][2]; + for (int i = 0; i < NUM_PARTICLES; i++) { + result[i][0] = particlesX[i]; + result[i][1] = particlesY[i]; + } + return result; + } + + /** + * Returns a deep copy of all particle positions in local East-North coordinates. + * Each row is one particle: {east, north}. + */ + public float[][] getParticlesCopy() { + if (!initialized) return new float[0][2]; + + float[][] copy = new float[NUM_PARTICLES][2]; + for (int i = 0; i < NUM_PARTICLES; i++) { + copy[i][0] = particlesX[i]; + copy[i][1] = particlesY[i]; + } + return copy; + } + + /** + * Returns a copy of the particle weights. + */ + public float[] getWeights() { + if (!initialized) return new float[0]; + + float[] copy = new float[NUM_PARTICLES]; + System.arraycopy(weights, 0, copy, 0, NUM_PARTICLES); + return copy; + } + + public float[] getParticlesXRef() { + return particlesX; + } + + public float[] getParticlesYRef() { + return particlesY; + } + + public float[] getWeightsRef() { + return weights; + } + + /** + * Resets the particle cloud around a new position with increased uncertainty. + * Called when a floor change is detected, to prevent particles from remaining on the wrong floor. + * Horizontal position is still preserved as the best estimate, but spread is widened. + * + * @param centreX East position to re-centre particles around (metres) + * @param centreY North position to re-centre particles around (metres) + * @param uncertainty Spread radius for the new particle cloud (metres) + */ + public void resetAroundPosition(float centreX, float centreY, float uncertainty) { + for (int i = 0; i < NUM_PARTICLES; i++) { + particlesX[i] = centreX + (float) (random.nextGaussian() * uncertainty); + particlesY[i] = centreY + (float) (random.nextGaussian() * uncertainty); + weights[i] = 1.0f / NUM_PARTICLES; + } + Log.i(TAG, "Particles reset around (" + centreX + ", " + centreY + + ") ± " + uncertainty + " m after floor change"); + } + + + public boolean isInitialized() { + return initialized; + } + + /** + * Fraction of particles injected near the observation when weight collapse is detected. + * These particles allow the filter to recover when PDR error exceeds the observation noise range. + */ + private static final float INJECTION_FRACTION = 0.2f; + + /** + * Multiplies each particle's weight by the Gaussian likelihood of the given observation. + * Normalizes the weight array, sum = 1. + * + * Likelihood: w_i *= exp( -distance^2 / (2 * std^2) ) + * + * If all weights collapse to zero, a fraction of particles is injected near the observation + * to allow recovery when PDR error is large. Remaining particles retain uniform weights. + * + * @param measX Observed East position (East-North metres) + * @param measY Observed North position (East-North metres) + * @param noiseStd Standard deviation of the observation model (metres) + */ + private void updateWeights(float measX, float measY, float noiseStd) { + float totalWeight = 0f; + float twoSigmaSq = 2.0f * noiseStd * noiseStd; + + for (int i = 0; i < NUM_PARTICLES; i++) { + float dx = particlesX[i] - measX; + float dy = particlesY[i] - measY; + float distSq = dx * dx + dy * dy; + weights[i] *= (float) Math.exp(-distSq / twoSigmaSq); + totalWeight += weights[i]; + } + + // Normalise + if (totalWeight > 1e-10f) { + for (int i = 0; i < NUM_PARTICLES; i++) { + weights[i] /= totalWeight; + } + } else { + // Weight collapse: inject a fraction of particles near the observation, + // then reset all weights to uniform. + Log.w(TAG, "Weight collapse — injecting particles near observation (" + + measX + ", " + measY + ")"); + int injected = (int) (NUM_PARTICLES * INJECTION_FRACTION); + for (int i = 0; i < injected; i++) { + particlesX[i] = measX + (float) (random.nextGaussian() * noiseStd); + particlesY[i] = measY + (float) (random.nextGaussian() * noiseStd); + } + float uniform = 1.0f / NUM_PARTICLES; + for (int i = 0; i < NUM_PARTICLES; i++) { + weights[i] = uniform; + } + } + } + + public void normalizeWeights() { + if (!initialized) return; + + float totalWeight = 0f; + for (int i = 0; i < NUM_PARTICLES; i++) { + totalWeight += weights[i]; + } + + if (totalWeight > 1e-10f) { + for (int i = 0; i < NUM_PARTICLES; i++) { + weights[i] /= totalWeight; + } + } else { + Log.w(TAG, "Weight collapse detected — resetting to uniform weights"); + float uniform = 1.0f / NUM_PARTICLES; + for (int i = 0; i < NUM_PARTICLES; i++) { + weights[i] = uniform; + } + } + } + + /** + * Resampling: draws new particles from the current weighted distribution, then resets weights to uniform. + */ + private void resample() { + float[] newX = new float[NUM_PARTICLES]; + float[] newY = new float[NUM_PARTICLES]; + + // Build cumulative weight array + float[] cdf = new float[NUM_PARTICLES]; + cdf[0] = weights[0]; + for (int i = 1; i < NUM_PARTICLES; i++) { + cdf[i] = cdf[i - 1] + weights[i]; + } + + // evenly spaced starting point + float step = 1.0f / NUM_PARTICLES; + float u = random.nextFloat() * step; // random offset in [0, step) + int j = 0; + + for (int i = 0; i < NUM_PARTICLES; i++) { + while (j < NUM_PARTICLES - 1 && u > cdf[j]) { + j++; + } + newX[i] = particlesX[j]; + newY[i] = particlesY[j]; + u += step; + } + + // Replace old particles and reset to uniform weights + particlesX = newX; + particlesY = newY; + float uniform = 1.0f / NUM_PARTICLES; + for (int i = 0; i < NUM_PARTICLES; i++) { + weights[i] = uniform; + } + } +} diff --git a/app/src/main/java/com/openpositioning/PositionMe/sensors/SensorFusion.java b/app/src/main/java/com/openpositioning/PositionMe/sensors/SensorFusion.java index 6eca847c..f3db1ad0 100644 --- a/app/src/main/java/com/openpositioning/PositionMe/sensors/SensorFusion.java +++ b/app/src/main/java/com/openpositioning/PositionMe/sensors/SensorFusion.java @@ -16,8 +16,12 @@ import androidx.annotation.NonNull; import androidx.preference.PreferenceManager; +import android.net.wifi.ScanResult; +import android.net.wifi.rtt.RangingResult; + import com.google.android.gms.maps.model.LatLng; import com.openpositioning.PositionMe.presentation.activity.MainActivity; +import com.openpositioning.PositionMe.utils.IndoorMapManager; import com.openpositioning.PositionMe.utils.PathView; import com.openpositioning.PositionMe.utils.PdrProcessing; import com.openpositioning.PositionMe.data.remote.ServerCommunications; @@ -36,6 +40,9 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import com.openpositioning.PositionMe.sensors.model.TestPoint; + +import com.openpositioning.PositionMe.utils.CoordinateConverter; /** * The SensorFusion class is the main data gathering and processing class of the application. @@ -63,12 +70,13 @@ public class SensorFusion implements SensorEventListener, Observer { private HashMap lastEventTimestamps = new HashMap<>(); private HashMap eventCounts = new HashMap<>(); - long maxReportLatencyNs = 0; // Disable batching to deliver events immediately + //Save the last WiFi fingerprint for deduplication. + private Traj.Fingerprint lastWifiFingerprint = null; + private List lastBleDeviceList = null; - // Define a threshold for large time gaps (in milliseconds) - private static final long LARGE_GAP_THRESHOLD_MS = 500; // Adjust this if needed + long maxReportLatencyNs = 0; // Disable batching to deliver events immediately - //region Static variables + //Static variables // Singleton Class private static final SensorFusion sensorFusion = new SensorFusion(); // Static constant for calculations with milliseconds @@ -79,9 +87,8 @@ public class SensorFusion implements SensorEventListener, Observer { private static final float ALPHA = 0.8f; // String for creating WiFi fingerprint JSO N object private static final String WIFI_FINGERPRINT= "wf"; - //endregion - //region Instance variables + //Instance variables // Keep device awake while recording private PowerManager.WakeLock wakeLock; private Context appContext; @@ -100,8 +107,12 @@ public class SensorFusion implements SensorEventListener, Observer { private MovementSensor rotationSensor; private MovementSensor gravitySensor; private MovementSensor linearAccelerationSensor; + // Other data recording private WifiDataProcessor wifiProcessor; + private volatile List latestBssids = new ArrayList<>(); + + private BleDataProcessor bleProcessor; private GNSSDataProcessor gnssProcessor; // Data listener private final LocationListener locationListener; @@ -143,9 +154,23 @@ public class SensorFusion implements SensorEventListener, Observer { // Location values private float latitude; private float longitude; + private float altitude = 0.0f; + + //add trajectoryName + private String trajectoryName = ""; + + // Initial position data + private float initialLatitude = 0.0f; + private float initialLongitude = 0.0f; + private float initialAltitude = 0.0f; + + // Initial orientation data (rotation vector - quaternion) + private float[] initialRotation = new float[4]; + private float[] startLocation; // Wifi values private List wifiList; + private List bleDeviceList; // Over time accelerometer magnitude values since last step @@ -159,6 +184,55 @@ public class SensorFusion implements SensorEventListener, Observer { // WiFi positioning object private WiFiPositioning wiFiPositioning; + // Particle filter for sensor fusion positioning + private ParticleFilter particleFilter; + + // Coordinate converter for WGS84 ↔ East-North transformation + private CoordinateConverter coordinateConverter; + + // Previous PDR cumulative position, used to compute per-step displacement + private float prevPdrX = 0f; + private float prevPdrY = 0f; + private float[] prevEkfEnu = null; + + // Rolling average of recent PDR step displacements — used to gauge movement trend. + // Smoothed over the last ~5 steps via exponential moving average (alpha = 0.3). + private float pdrTrendDx = 0f; + private float pdrTrendDy = 0f; + private static final float PDR_TREND_ALPHA = 0.3f; + + // Gyroscope-integrated heading with rotation-vector correction (radians) + private float fusedHeading = 0f; + private boolean headingInitialised = false; + private long lastGyroTimestampMs = 0; + + // Floor change detection for particle reset + private int lastKnownFloor = 0; + + private ExtendedKalmanFilter ekfPositioning; + // true = use EKF output, false = use Particle Filter output + private boolean useEKF = false; + + + + // Last raw position from each individual source, for colour-coded display + private double[] lastGnssLatLon = null; // {lat, lon} + private double[] lastWifiLatLon = null; // {lat, lon} + private double[] lastPdrLatLon = null; // {lat, lon} + + // Previous valid GNSS position in ENU (metres), used to derive heading from consecutive fixes + private float[] lastGnssEnu = null; + // Last WiFi position in ENU (metres), cached for stationary soft-update + private float[] lastWifiEnu = null; + // EMA-smoothed WiFi position in ENU, fed to EKF instead of the raw fix + private float[] smoothedWifiEnu = null; + private static final float WIFI_EMA_ALPHA = 0.4f; + private final List testPoints = new ArrayList<>(); + boolean enuBaked = false; + private IndoorMapManager indoorMapManager; + + private float[] prevBestEnu = null; + //region Initialisation /** * Private constructor for implementing singleton design pattern for SensorFusion. @@ -193,6 +267,34 @@ private SensorFusion() { this.startLocation = new float[2]; } + /** + * Get current BLE device list + * @return List of BLE devices from last scan + */ + public List getBleDeviceList() { + return this.bleDeviceList; + } + + /** + * Get current trajectory being recorded + * @return Trajectory protobuf builder + */ + public Traj.Trajectory.Builder getTrajectory() { + return this.trajectory; + } + + public void setIndoorMapManager(IndoorMapManager indoorMapManager) { + Log.i("SensorFusion", "set indoormapmanager"); + this.indoorMapManager = indoorMapManager; + if(coordinateConverter == null){ + Log.i("SensorFusion", "coordinateConverter null"); + } + if (!enuBaked && this.indoorMapManager != null && coordinateConverter != null) { + Log.i("SensorFusion", "Baking ENU coordinates from setIndoorMapManager"); + this.indoorMapManager.bakeEnuCoordinates(coordinateConverter); + enuBaked = true; + } + } /** * Static function to access singleton instance of SensorFusion. @@ -203,19 +305,80 @@ public static SensorFusion getInstance() { return sensorFusion; } + public float[] getInitialRotation() { + return this.initialRotation; + } + + + + /** + * Adds a test point (ground truth or manually marked point) to a local list. + * This is typically used for debugging or evaluation purposes. + * + * @param timestampMillis Timestamp of the test point in milliseconds + * @param lat Latitude of the point + * @param lon Longitude of the point + */ + public void addTestPoint(long timestampMillis, double lat, double lon) { + testPoints.add(new TestPoint(timestampMillis, lat, lon)); + } + + /** + * Returns all stored test points. + * Used for debugging, evaluation, or visualisation of ground truth vs estimated trajectory. + * + * @return List of test points + */ + public List getTestPoints() { + return testPoints; + } + + + /** + * Adds a test point to the trajectory at the current estimated position. + * This is stored in the trajectory protobuf for later analysis. + * + * NOTE: + * - Only works when recording is active. + * - Uses current latitude/longitude/elevation from sensors. + * + * @param timestamp Absolute timestamp when the test point was triggered + */ + public void addTestPoint(long timestamp) { + Log.d("TestPoint", "Test point marked at: " + timestamp); + if (!saveRecording || trajectory == null) { + Log.w("SensorFusion", "Test point ignored: not recording"); + return; + } + + long relativeTs = System.currentTimeMillis() - absoluteStartTime; + + Traj.GNSSPosition testPoint = Traj.GNSSPosition.newBuilder() + .setRelativeTimestamp(relativeTs) + .setLatitude(latitude) + .setLongitude(longitude) + .setAltitude(elevation) // or GNSS altitude if you prefer + .build(); + + trajectory.addTestPoints(testPoint); + + Log.d("SensorFusion", "Test point added @ " + latitude + ", " + longitude); + } + /** - * Initialisation function for the SensorFusion instance. + * Initialises all sensors, processors, filters, and system components. * - * 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. + * This MUST be called before using SensorFusion. * - * @param context application context for permissions and device access. + * Responsibilities: + * - Initialise all hardware sensors (accelerometer, gyro, etc.) + * - Initialise WiFi, BLE, GNSS processors + * - Set up particle filter + EKF + * - Configure settings and filters + * - Start WiFi scanning + * - Acquire wake lock to keep device active during recording * - * @see MovementSensor handling all SensorManager based data collection devices. - * @see ServerCommunications handling communication with the server. - * @see GNSSDataProcessor for location data processing. - * @see WifiDataProcessor for network data processing. + * @param context Application context */ public void setContext(Context context) { this.appContext = context.getApplicationContext(); // store app context for later use @@ -233,7 +396,17 @@ public void setContext(Context context) { this.linearAccelerationSensor = new MovementSensor(context, Sensor.TYPE_LINEAR_ACCELERATION); // Listener based devices this.wifiProcessor = new WifiDataProcessor(context); + wifiProcessor.registerObserver(this); + // Register RTT result listener to receive ranging data from WiFi RTT + wifiProcessor.setRttResultListener((results, associatedScans) -> { + if (saveRecording) { + recordRttResults(results, associatedScans); + } + }); + + this.bleProcessor = new BleDataProcessor(context); + bleProcessor.registerObserver(this); this.gnssProcessor = new GNSSDataProcessor(context, locationListener); // Create object handling HTTPS communication this.serverCommunications = new ServerCommunications(context); @@ -242,11 +415,12 @@ public void setContext(Context context) { this.bootTime = SystemClock.uptimeMillis(); // Initialise saveRecording to false this.saveRecording = false; - - // Other initialisations... this.accelMagnitude = new ArrayList<>(); this.pdrProcessing = new PdrProcessing(context); + this.particleFilter = new ParticleFilter(); this.settings = PreferenceManager.getDefaultSharedPreferences(context); + this.ekfPositioning = new ExtendedKalmanFilter(); + this.useEKF = settings.getBoolean("use_ekf", false); this.pathView = new PathView(context, null); this.wiFiPositioning = new WiFiPositioning(context); @@ -259,11 +433,11 @@ public void setContext(Context context) { // Keep app awake during the recording (using stored appContext) PowerManager powerManager = (PowerManager) this.appContext.getSystemService(Context.POWER_SERVICE); wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MyApp::MyWakelockTag"); - } + wifiProcessor.startListening(); - //endregion + } - //region Sensor processing + // Sensor processing /** * {@inheritDoc} * @@ -283,12 +457,6 @@ public void onSensorChanged(SensorEvent sensorEvent) { if (lastTimestamp != null) { long timeGap = currentTime - lastTimestamp; - -// // Log a warning if the time gap is larger than the threshold -// if (timeGap > LARGE_GAP_THRESHOLD_MS) { -// Log.e("SensorFusion", "Large time gap detected for sensor " + sensorType + -// " | Time gap: " + timeGap + " ms"); -// } } // Update timestamp and frequency counter for this sensor @@ -318,6 +486,17 @@ public void onSensorChanged(SensorEvent sensorEvent) { angularVelocity[1] = sensorEvent.values[1]; angularVelocity[2] = sensorEvent.values[2]; + // Integrate yaw rate to advance fusedHeading. + // angularVelocity[2] is the device z-axis rotation rate (rad/s). + if (headingInitialised && lastGyroTimestampMs > 0) { + long dtMs = currentTime - lastGyroTimestampMs; + if (dtMs > 0 && dtMs < 500) { + fusedHeading = normalizeAngle(fusedHeading - angularVelocity[2] * (dtMs / 1000f)); + } + } + lastGyroTimestampMs = currentTime; + break; + case Sensor.TYPE_LINEAR_ACCELERATION: filteredAcc[0] = sensorEvent.values[0]; filteredAcc[1] = sensorEvent.values[1]; @@ -331,11 +510,6 @@ public void onSensorChanged(SensorEvent sensorEvent) { ); this.accelMagnitude.add(accelMagFiltered); -// // Debug logging -// Log.v("SensorFusion", -// "Added new linear accel magnitude: " + accelMagFiltered -// + "; accelMagnitude size = " + accelMagnitude.size()); - elevator = pdrProcessing.estimateElevator(gravity, filteredAcc); break; @@ -344,9 +518,6 @@ public void onSensorChanged(SensorEvent sensorEvent) { gravity[1] = sensorEvent.values[1]; gravity[2] = sensorEvent.values[2]; - // Possibly log gravity values if needed - //Log.v("SensorFusion", "Gravity: " + Arrays.toString(gravity)); - elevator = pdrProcessing.estimateElevator(gravity, filteredAcc); break; @@ -369,20 +540,36 @@ public void onSensorChanged(SensorEvent sensorEvent) { float[] rotationVectorDCM = new float[9]; SensorManager.getRotationMatrixFromVector(rotationVectorDCM, this.rotation); SensorManager.getOrientation(rotationVectorDCM, this.orientation); + + // Complementary filter: slow rotation-vector correction on gyro-integrated heading. + // Corrects long-term gyro drift while preserving short-term stability. + if (!headingInitialised) { + fusedHeading = this.orientation[0]; + headingInitialised = true; + } else { + float diff = normalizeAngle(this.orientation[0] - fusedHeading); + fusedHeading = normalizeAngle(fusedHeading + 0.02f * diff); + } break; 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; + + // Skip PDR update if the acceleration pattern indicates no real movement + if (isStationary(accelMagnitude)) { + Log.d("SensorFusion", "isStationary=true, skipping PDR step (samples=" + + accelMagnitude.size() + ")"); + accelMagnitude.clear(); + break; + } + // Log if accelMagnitude is empty if (accelMagnitude.isEmpty()) { Log.e("SensorFusion", @@ -396,24 +583,104 @@ public void onSensorChanged(SensorEvent sensorEvent) { float[] newCords = this.pdrProcessing.updatePdr( stepTime, this.accelMagnitude, - this.orientation[0] + fusedHeading ); + // Feed PDR displacement to particle filter + if (particleFilter.isInitialized()) { + float dx = newCords[0] - prevPdrX; + float dy = newCords[1] - prevPdrY; + + // Update PDR movement trend (exponential moving average) + pdrTrendDx = PDR_TREND_ALPHA * dx + (1f - PDR_TREND_ALPHA) * pdrTrendDx; + pdrTrendDy = PDR_TREND_ALPHA * dy + (1f - PDR_TREND_ALPHA) * pdrTrendDy; + + // Save particle positions BEFORE prediction + float[][] prevParticles = particleFilter.getParticlesCopy(); + + // Predict particle motion + particleFilter.predict(dx, dy); + + float[] ekfPrev = ekfPositioning.getBestEstimate(); + ekfPositioning.predict(dx, dy); + // Previous EKF position in ENU, for wall-slide constraint + // Wall constraint for EKF after each prediction step + if (coordinateConverter != null && indoorMapManager != null + && settings.getBoolean("use_wall_constraints", true)) { + float[] ekfEst = ekfPositioning.getBestEstimate(); + + if (prevEkfEnu != null) { + // First re-route prevEkfEnu if the EKF has jumped to the + // other side of a wall (e.g. after a GNSS/WiFi correction) + prevEkfEnu = indoorMapManager.reroutePrevEnu(prevEkfEnu, ekfEst); + + // Now apply normal wall-slide for the current step + float[] adjusted = indoorMapManager.slideAlongWallEnu(prevEkfEnu, ekfEst); + if (adjusted != ekfEst) { + ekfPositioning.resetAroundPosition(adjusted[0], adjusted[1], 2.0f); + prevEkfEnu = adjusted; + Log.d("SensorFusion", "EKF wall-slid to: (" + + adjusted[0] + ", " + adjusted[1] + ")"); + } else { + prevEkfEnu = ekfEst.clone(); + } + } else { + prevEkfEnu = ekfEst.clone(); + } + } + + float[] bestBefore = particleFilter.getBestEstimate(); + Log.d("PFDebug", "Best BEFORE constraints: " + + bestBefore[0] + ", " + bestBefore[1]); + + // Apply wall constraints after prediction + if (coordinateConverter != null && indoorMapManager != null + && settings.getBoolean("use_wall_constraints", true)) { + + if (!useEKF) { + // Particle filter mode: batch weight penalty per particle + float[] currEast = particleFilter.getParticlesXRef(); + float[] currNorth = particleFilter.getParticlesYRef(); + float[] liveWeights = particleFilter.getWeightsRef(); + + float[] prevEast = new float[prevParticles.length]; + float[] prevNorth = new float[prevParticles.length]; + + for (int i = 0; i < prevParticles.length; i++) { + prevEast[i] = prevParticles[i][0]; + prevNorth[i] = prevParticles[i][1]; + } + + particleFilter.normalizeWeights(); + + Log.d("SensorFusion", "PF wall constraints applied"); + float[] bestAfter = particleFilter.getBestEstimate(); + Log.d("PFDebug", "Best BEFORE: " + bestBefore[0] + ", " + bestBefore[1]); + Log.d("PFDebug", "Best AFTER: " + bestAfter[0] + ", " + bestAfter[1]); + } + } + + prevPdrX = newCords[0]; + prevPdrY = newCords[1]; + + if (coordinateConverter != null) { + lastPdrLatLon = coordinateConverter.toLatLon(prevPdrX, prevPdrY); + } + } + // Clear the accelMagnitude after using it this.accelMagnitude.clear(); - 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])); } break; } - } } @@ -441,19 +708,93 @@ 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(); + altitude = (float) location.getAltitude(); float accuracy = (float) location.getAccuracy(); float speed = (float) location.getSpeed(); String provider = location.getProvider(); + // Initialize coordinate converter and particle filter on first GNSS position during recording + if (coordinateConverter == null) { + coordinateConverter = new CoordinateConverter( + location.getLatitude(), location.getLongitude()); + Log.i("SensorFusion", "CoordinateConverter initialised at lat=" + + latitude + " lon=" + longitude); + } + if (saveRecording) { + if (!particleFilter.isInitialized()) { + particleFilter.initParticles(0f, 0f, Math.max(accuracy, 5f)); + ekfPositioning.initParticles(0f, 0f, Math.max(accuracy, 5f)); + prevPdrX = 0f; + prevPdrY = 0f; + Log.i("SensorFusion", "ParticleFilter initialised at lat=" + + latitude + " lon=" + longitude); + if (indoorMapManager != null) { + indoorMapManager.bakeEnuCoordinates(coordinateConverter); + enuBaked = true; + } + } else { + // Subsequent positions: convert to East-North space and update particle weights. + float[] enu = coordinateConverter.toEnu( + location.getLatitude(), location.getLongitude()); + + // Jump detection: reject position if it is too far from the current estimate + float[] currentEst = particleFilter.getBestEstimate(); + float jumpDist = (float) Math.hypot( + enu[0] - currentEst[0], enu[1] - currentEst[1]); + if (jumpDist > 80f) { + Log.w("SensorFusion", "GNSS jump " + jumpDist + "m — update rejected"); + } else { + // Sigma-adaptive noise: tighten observation noise when particles diverge + float adaptedAccuracy = accuracy; + double sigma = particleFilter.getSigmaMetres(); + if (sigma > 15.0) { + adaptedAccuracy = Math.max(accuracy * 0.5f, 3.0f); + } + + // Derive heading from two consecutive valid GNSS fixes. + // Displacement must exceed 1.5x the reported accuracy to ensure the + // computed direction reflects real movement rather than GPS noise. + if (lastGnssEnu != null) { + float dEast = enu[0] - lastGnssEnu[0]; + float dNorth = enu[1] - lastGnssEnu[1]; + float gnssDist = (float) Math.hypot(dEast, dNorth); + float minDist = Math.max(accuracy * 1.5f, 5f); + if (gnssDist > minDist) { + fusedHeading = normalizeAngle( + (float) Math.atan2(dEast, dNorth)); + Log.d("SensorFusion", "GNSS heading: " + + (float) Math.toDegrees(fusedHeading) + "°"); + } + } + lastGnssEnu = enu; + + // High-accuracy fix: re-centre particle cloud to prevent filter divergence + if (accuracy < 5f) { + particleFilter.resetAroundPosition(enu[0], enu[1], accuracy); + ekfPositioning.resetAroundPosition(enu[0], enu[1], accuracy); + Log.i("SensorFusion", "High-accuracy GNSS (" + accuracy + + "m) — particle cloud recentred"); + } else { + particleFilter.updateWithGnss(enu[0], enu[1], adaptedAccuracy); + ekfPositioning.updateWithGnss(enu[0], enu[1], adaptedAccuracy); + } + lastGnssLatLon = new double[]{location.getLatitude(), location.getLongitude()}; + } + + } + } if(saveRecording) { - trajectory.addGnssData(Traj.GNSS_Sample.newBuilder() + trajectory.addGnssData(Traj.GNSSReading.newBuilder() + .setPosition(Traj.GNSSPosition.newBuilder() + .setLatitude(latitude) + .setLongitude(longitude) + .setAltitude(altitude) + .setRelativeTimestamp(System.currentTimeMillis()-absoluteStartTime) + .build()) .setAccuracy(accuracy) - .setAltitude(altitude) - .setLatitude(latitude) - .setLongitude(longitude) .setSpeed(speed) + .setBearing(0) .setProvider(provider) - .setRelativeTimestamp(System.currentTimeMillis()-absoluteStartTime)); + .build()); } } } @@ -462,33 +803,310 @@ public void onLocationChanged(@NonNull Location location) { * {@inheritDoc} * * Receives updates from {@link WifiDataProcessor}. - * + * Receives updates from {@link BleDataProcessor} * @see WifiDataProcessor object for wifi scanning. + * @see BleDataProcessor object for BLE scanning. */ + @Override - public void update(Object[] wifiList) { + public void update(Object[] dataArray) { + if (dataArray == null || dataArray.length == 0) { + return; + } + + // Check the type of the first element to determine if it's WiFi or BLE + if (dataArray[0] instanceof Wifi) { + // Handle WiFi data + updateWifiData(dataArray); + } else if (dataArray[0] instanceof BleDataProcessor.BleDevice) { + // Handle BLE data + updateBleData(dataArray); + } + } + + // Original WiFi update logic + private void updateWifiData(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() + // build new wifi fingerprint + Traj.Fingerprint.Builder wifiData = Traj.Fingerprint.newBuilder() .setRelativeTimestamp(SystemClock.uptimeMillis()-bootTime); for (Wifi data : this.wifiList) { - wifiData.addMacScans(Traj.Mac_Scan.newBuilder() + wifiData.addRfScans(Traj.RFScan.newBuilder() .setRelativeTimestamp(SystemClock.uptimeMillis() - bootTime) - .setMac(data.getBssid()).setRssi(data.getLevel())); + .setMac(data.getBssid()) + .setRssi(data.getLevel()) + .build()); + } + + Traj.Fingerprint newFingerprint = wifiData.build(); + + if (!isSameFingerprintAs(newFingerprint, lastWifiFingerprint)) { + this.trajectory.addWifiFingerprints(newFingerprint); + lastWifiFingerprint = newFingerprint; + android.util.Log.i("SensorFusion", "New WiFi fingerprint added (" + + newFingerprint.getRfScansCount() + " APs)"); + } else { + android.util.Log.d("SensorFusion", "Duplicate WiFi fingerprint skipped"); + } + } + createWifiPositionRequestCallback(); + Log.d("SensorFusion", "wifiList length = " + + (wifiList == null ? 0 : wifiList.length)); + } + + /** + * Records WiFi RTT ranging results and AP metadata into the trajectory protobuf. + * Called by the RttResultListener when new ranging results arrive. + * + * WiFiAPData stores per-AP metadata including the rtt_enabled flag. + * WiFiRTTReading stores the actual measured distance for each RTT-capable AP. + * + * @param results List of RTT ranging results from WifiRttManager + * @param associatedScans List of ScanResults corresponding to the ranging request + */ + private void recordRttResults(List results, + List associatedScans) { + long relativeTimestamp = SystemClock.uptimeMillis() - bootTime; + + for (RangingResult result : results) { + // Convert MAC address to long integer (same format as BSSID elsewhere) + String macString = result.getMacAddress().toString(); + long macLong = bssidStringToLong(macString); + + // Record AP metadata with rtt_enabled = true (these are RTT-capable APs) + Traj.WiFiAPData apData = Traj.WiFiAPData.newBuilder() + .setMac(macLong) + .setRttEnabled(true) + .build(); + this.trajectory.addApsData(apData); + + // Only record distance measurement if ranging succeeded + if (result.getStatus() == RangingResult.STATUS_SUCCESS) { + Traj.WiFiRTTReading rttReading = Traj.WiFiRTTReading.newBuilder() + .setRelativeTimestamp(relativeTimestamp) + .setMac(macLong) + .setDistance(result.getDistanceMm()) // distance in mm + .setDistanceStd(result.getDistanceStdDevMm()) // std deviation in mm + .setRssi(result.getRssi()) + .build(); + this.trajectory.addWifiRttData(rttReading); + Log.i("SensorFusion", "RTT result: mac=" + macString + + " dist=" + result.getDistanceMm() + "mm"); + } else { + Log.d("SensorFusion", "RTT ranging failed for AP: " + macString + + " status=" + result.getStatus()); + } + } + } + + /** + * Converts a MAC address string (e.g. "aa:bb:cc:dd:ee:ff") to a long integer. + * Replicates the same conversion logic used for WiFi BSSID in WifiDataProcessor. + * + * @param mac MAC address string with colon separators + * @return Long integer representation of the MAC address + */ + private long bssidStringToLong(String mac) { + try { + return Long.parseLong(mac.replace(":", ""), 16); + } catch (NumberFormatException e) { + Log.w("SensorFusion", "Failed to convert MAC: " + mac); + return 0L; + } + } + + // BLE update logic + /** + * Update BLE data with deduplication + */ + private void updateBleData(Object[] bleArray) { + BleDataProcessor.BleDevice[] bleDevices = new BleDataProcessor.BleDevice[bleArray.length]; + for (int i = 0; i < bleArray.length; i++) { + bleDevices[i] = (BleDataProcessor.BleDevice) bleArray[i]; + } + + // Save BLE devices to local variable + List newBleDeviceList = java.util.Arrays.asList(bleDevices); + this.bleDeviceList = newBleDeviceList; + + if(this.saveRecording) { + // Check for duplicate BLE device list + if (!isSameBleDeviceList(newBleDeviceList, lastBleDeviceList)) { + // Add each BLE device to trajectory + for (BleDataProcessor.BleDevice device : bleDevices) { + Traj.BleData.Builder bleData = Traj.BleData.newBuilder() + .setMacAddress(device.macAddress) + .setName(device.name) + .setTxPowerLevel(device.txPowerLevel) + .setAdvertiseFlags(device.advertiseFlags); + + // Add service UUIDs if available + if (device.serviceUuids != null && !device.serviceUuids.isEmpty()) { + bleData.addAllServiceUuids(device.serviceUuids); + } + + // Add manufacturer data if available + if (device.manufacturerData != null) { + bleData.setManufacturerData(com.google.protobuf.ByteString.copyFrom(device.manufacturerData)); + } + + this.trajectory.addBleData(bleData.build()); + } + + lastBleDeviceList = newBleDeviceList; + android.util.Log.i("SensorFusion", "New BLE device list added (" + bleDevices.length + " devices)"); + } else { + android.util.Log.d("SensorFusion", "Duplicate BLE device list skipped"); + } + } + } + + /** + * Check if two WiFi fingerprints are similar enough to be considered duplicates + * Uses overlap ratio instead of exact match to handle unstable WiFi signals + */ + /** + * Check if two WiFi fingerprints are similar (for deduplication) + * Uses both MAC address overlap and RSSI change to determine similarity + * + * @param newFingerprint New WiFi fingerprint + * @param oldFingerprint Previous WiFi fingerprint + * @return true if fingerprints are similar, false otherwise + */ + private boolean isSameFingerprintAs(Traj.Fingerprint newFingerprint, Traj.Fingerprint oldFingerprint) { + if (oldFingerprint == null) return false; + if (newFingerprint.getRfScansCount() < 3 || oldFingerprint.getRfScansCount() < 3) return false; + + // Build maps of MAC -> RSSI for both fingerprints + java.util.Map oldMacRssi = new java.util.HashMap<>(); + for (Traj.RFScan scan : oldFingerprint.getRfScansList()) { + oldMacRssi.put(scan.getMac(), scan.getRssi()); + } + + java.util.Map newMacRssi = new java.util.HashMap<>(); + for (Traj.RFScan scan : newFingerprint.getRfScansList()) { + newMacRssi.put(scan.getMac(), scan.getRssi()); + } + + // Count common MACs and check RSSI changes + int commonCount = 0; + int significantRssiChanges = 0; + final int RSSI_THRESHOLD = 5; // dBm threshold for "significant" change + + for (Traj.RFScan newScan : newFingerprint.getRfScansList()) { + Long mac = newScan.getMac(); + if (oldMacRssi.containsKey(mac)) { + commonCount++; + + // Check if RSSI changed significantly + int oldRssi = oldMacRssi.get(mac); + int newRssi = newScan.getRssi(); + int rssiDiff = Math.abs(newRssi - oldRssi); + + if (rssiDiff >= RSSI_THRESHOLD) { + significantRssiChanges++; + } } - // Adding WiFi data to Trajectory - this.trajectory.addWifiData(wifiData); } - createWifiPositioningRequest(); + + int minCount = Math.min(newFingerprint.getRfScansCount(), oldFingerprint.getRfScansCount()); + float overlapRatio = (float) commonCount / minCount; + float rssiChangeRatio = commonCount > 0 ? (float) significantRssiChanges / commonCount : 0; + + android.util.Log.d("SensorFusion", String.format( + "WiFi comparison: overlap %.0f%% (%d/%d MACs), RSSI changes %.0f%% (%d/%d APs)", + overlapRatio * 100, commonCount, minCount, + rssiChangeRatio * 100, significantRssiChanges, commonCount + )); + + // Consider duplicate if: + // 1. High overlap (≥70%) AND + // 2. Few RSSI changes (<30% of common APs changed significantly) + return overlapRatio >= 0.7f && rssiChangeRatio < 0.3f; + } + + /** + * Check if two BLE device lists are similar (for deduplication) + * Uses MAC address overlap ratio to determine similarity + * + * @param newList New BLE device list + * @param oldList Previous BLE device list + * @return true if lists are similar (overlap >= 80%), false otherwise + */ + /** + * Check if two BLE device lists are similar (for deduplication) + * Uses dynamic threshold based on device count: + * - Many devices (≥20): 50% overlap or 15+ common devices + * - Medium devices (≥10): 60% overlap or 8+ common devices + * - Few devices (<10): 70% overlap or 5+ common devices + * + * @param newList New BLE device list + * @param oldList Previous BLE device list + * @return true if lists are similar, false otherwise + */ + private boolean isSameBleDeviceList(List newList, + List oldList) { + if (oldList == null || oldList.isEmpty()) { + return false; + } + + if (newList.isEmpty()) { + return false; + } + + // Create set of MAC addresses from old list + java.util.Set oldMacs = new java.util.HashSet<>(); + for (BleDataProcessor.BleDevice device : oldList) { + oldMacs.add(device.macAddress); + } + + // Count common MAC addresses + int commonCount = 0; + for (BleDataProcessor.BleDevice device : newList) { + if (oldMacs.contains(device.macAddress)) { + commonCount++; + } + } + + // Calculate overlap ratio + int minCount = Math.min(newList.size(), oldList.size()); + float overlapRatio = (float) commonCount / minCount; + + // Determine if duplicate based on dynamic threshold + boolean isDuplicate; + String thresholdInfo; + + if (minCount >= 20) { + // Many devices: use 50% threshold + isDuplicate = overlapRatio >= 0.5f || commonCount >= 15; + thresholdInfo = "threshold=50% or 15+ devices"; + } else if (minCount >= 10) { + // Medium devices: use 60% threshold + isDuplicate = overlapRatio >= 0.6f || commonCount >= 8; + thresholdInfo = "threshold=60% or 8+ devices"; + } else { + // Few devices: use 70% threshold + isDuplicate = overlapRatio >= 0.7f || commonCount >= 5; + thresholdInfo = "threshold=70% or 5+ devices"; + } + + android.util.Log.d("SensorFusion", String.format( + "BLE comparison: overlap %.0f%% (%d/%d common MACs), common: %d, %s → %s", + overlapRatio * 100, commonCount, minCount, commonCount, + thresholdInfo, isDuplicate ? "DUPLICATE" : "NEW" + )); + + return isDuplicate; } /** * Function to create a request to obtain a wifi location for the obtained wifi fingerprint * */ - private void createWifiPositioningRequest(){ + private void PositioningRequest(){ // Try catch block to catch any errors and prevent app crashing try { // Creating a JSON object to store the WiFi access points @@ -518,15 +1136,181 @@ private void createWifiPositionRequestCallback(){ for (Wifi data : this.wifiList){ wifiAccessPoints.put(String.valueOf(data.getBssid()), data.getLevel()); } + // Capture AP count, average RSSI and timestamp before the async callback closure. + // These must be final locals because the lambda captures them from the enclosing scope. + final int apCount = this.wifiList.size(); + final long currentTime = System.currentTimeMillis(); + float rssiSum = 0f; + for (Wifi data : this.wifiList) rssiSum += data.getLevel(); + final float avgRssi = (apCount > 0) ? rssiSum / apCount : -75f; // Creating POST Request JSONObject wifiFingerPrint = new JSONObject(); wifiFingerPrint.put(WIFI_FINGERPRINT, wifiAccessPoints); this.wiFiPositioning.request(wifiFingerPrint, new WiFiPositioning.VolleyCallback() { @Override public void onSuccess(LatLng wifiLocation, int floor) { - // Handle the success response + lastWifiLatLon = new double[]{wifiLocation.latitude, wifiLocation.longitude}; + if (!saveRecording) return; + + if (!particleFilter.isInitialized()) { + // GNSS not yet available — initialise from first WiFi fix + if (coordinateConverter == null) { + coordinateConverter = new CoordinateConverter( + wifiLocation.latitude, wifiLocation.longitude); + if (indoorMapManager != null) { + indoorMapManager.bakeEnuCoordinates(coordinateConverter); + enuBaked = true; + } + } + particleFilter.initParticles(0f, 0f, 20f); + ekfPositioning.initParticles(0f, 0f, 20f); + prevPdrX = 0f; + prevPdrY = 0f; + Log.i("SensorFusion", "ParticleFilter initialised from WiFi at lat=" + + wifiLocation.latitude + " lon=" + wifiLocation.longitude); + } else { + // Normal update + float[] enu = coordinateConverter.toEnu( + wifiLocation.latitude, wifiLocation.longitude); + + // Cache WiFi ENU for stationary soft-update + lastWifiEnu = enu; + + // EMA smoothing: blend raw fix toward the running average. + // Particle filter always receives the raw fix; EKF uses the + // smoothed value so high-frequency fingerprint noise is damped. + if (smoothedWifiEnu == null) { + smoothedWifiEnu = new float[]{enu[0], enu[1]}; + } else { + smoothedWifiEnu[0] = WIFI_EMA_ALPHA * enu[0] + + (1f - WIFI_EMA_ALPHA) * smoothedWifiEnu[0]; + smoothedWifiEnu[1] = WIFI_EMA_ALPHA * enu[1] + + (1f - WIFI_EMA_ALPHA) * smoothedWifiEnu[1]; + } + float[] ekfEnu = smoothedWifiEnu; + + // Hard-reject implausibly large jumps (> 80 m). + float[] currentEst = particleFilter.getBestEstimate(); + float jumpDist = (float) Math.hypot( + enu[0] - currentEst[0], enu[1] - currentEst[1]); + if (jumpDist > 80f) { + Log.w("SensorFusion", "WiFi hard-reject: jump=" + jumpDist + "m"); + } else { + long stationaryMs = currentTime - lastStepTime; + boolean isStationary = stationaryMs > 1000; + + // Base observation noise from AP count. + // More visible APs → tighter position estimate → lower noise. + float noiseStd = Math.max(8.0f, 20.0f - apCount * 1.5f); + + // Scale noise based on average signal strength of the scan. + // Strong signal (> -60 dBm) → reliable ranging; weak (< -80 dBm) → coarser estimate. + if (avgRssi > -60f) { + noiseStd *= 0.7f; + } else if (avgRssi < -80f) { + noiseStd *= 1.5f; + } + + // When moving, a large displacement between the WiFi fix and the current + // estimate is likely a fingerprinting error rather than true movement. + // Penalise proportionally: at 8 m → ×1, at 16 m → ×2, capped at ×4. + if (!isStationary && jumpDist > 8f) { + float jumpPenalty = Math.min(jumpDist / 8f, 4f); + noiseStd *= jumpPenalty; + Log.d("SensorFusion", "WiFi jump penalty ×" + jumpPenalty + + " dist=" + jumpDist + "m rssi=" + avgRssi); + } + + // When stationary, WiFi provides a position anchor. + // Keep covariance inflation modest so the Kalman gain stays + // below ~0.5 and a single erroneous fix cannot pull the state + // more than a few metres in one step. + if (stationaryMs > 3000) { + noiseStd = 4.0f; + ekfPositioning.inflateCovariance(10.0f); + } else if (isStationary) { + noiseStd = 6.0f; + ekfPositioning.inflateCovariance(5.0f); + } else { + // While moving, reduce noise further only if the particle cloud + // is already widely dispersed. + double sigma = particleFilter.getSigmaMetres(); + if (sigma > 15.0) { + noiseStd = Math.max(noiseStd * 0.5f, 5.0f); + } + } + + noiseStd = Math.max(noiseStd, 2.0f); + + // ── EKF-specific: PDR motion-consistency check ────────────── + // When moving, compare WiFi correction direction against the + // recent PDR movement trend. If they are near-opposite (cosine < 0), + // the WiFi observation is pulling against the walk direction — + // likely a fingerprint error. Inflate noise to dampen the pull. + // Also apply a gradual step: blend toward the WiFi position rather + // than jumping to it, so the trajectory stays smooth. + float ekfNoiseStd = noiseStd; + float[] ekfState = ekfPositioning.getBestEstimate(); + + float corrDx = ekfEnu[0] - ekfState[0]; + float corrDy = ekfEnu[1] - ekfState[1]; + float corrMag = (float) Math.sqrt(corrDx * corrDx + corrDy * corrDy); + + // Direction consistency check (moving only): + // if WiFi correction opposes recent PDR movement, inflate noise. + if (!isStationary) { + float trendMag = (float) Math.sqrt( + pdrTrendDx * pdrTrendDx + pdrTrendDy * pdrTrendDy); + if (trendMag > 0.05f && corrMag > 1.0f) { + float cosAngle = (pdrTrendDx * corrDx + pdrTrendDy * corrDy) + / (trendMag * corrMag); + if (cosAngle < 0f) { + float backwardPenalty = 1f + 2f * (-cosAngle); + ekfNoiseStd *= backwardPenalty; + Log.d("SensorFusion", "EKF WiFi direction penalty ×" + + backwardPenalty + " cosAngle=" + cosAngle); + } + } + } + + // Innovation gating: reject the WiFi fix for EKF if the observation + // is statistically inconsistent with the predicted state. + final float GATE_THRESHOLD_SQ = 9.21f; + float mahaSq = ekfPositioning.mahalanobisDistanceSq( + ekfEnu[0], ekfEnu[1], ekfNoiseStd); + if (mahaSq > GATE_THRESHOLD_SQ) { + Log.d("SensorFusion", "EKF WiFi gated out mahaSq=" + mahaSq + + " threshold=" + GATE_THRESHOLD_SQ); + particleFilter.updateWithWifi(enu[0], enu[1], noiseStd); + return; + } + + // Gradual position update: cap the single-step displacement so one + // erroneous WiFi fix cannot teleport the state. + // Allow a larger step when stationary (WiFi is the only anchor) + // but still cap it to limit damage from a bad fix. + final float MAX_STEP_METRES = isStationary ? 2.0f : 1.5f; + if (corrMag > MAX_STEP_METRES) { + float blend = MAX_STEP_METRES / corrMag; + float gradualEast = ekfState[0] + blend * corrDx; + float gradualNorth = ekfState[1] + blend * corrDy; + ekfPositioning.updateWithWifi(gradualEast, gradualNorth, ekfNoiseStd); + Log.d("SensorFusion", "EKF WiFi capped step=" + MAX_STEP_METRES + + "m corrMag=" + corrMag + " noise=" + ekfNoiseStd); + particleFilter.updateWithWifi(enu[0], enu[1], noiseStd); + return; + } + + Log.d("SensorFusion", "WiFi update noiseStd=" + noiseStd + + " apCount=" + apCount + " avgRssi=" + avgRssi + + " jump=" + jumpDist + "m stationary=" + isStationary); + particleFilter.updateWithWifi(enu[0], enu[1], noiseStd); + ekfPositioning.updateWithWifi(ekfEnu[0], ekfEnu[1], ekfNoiseStd); + } + } } + @Override public void onError(String message) { // Handle the error response @@ -537,7 +1321,6 @@ public void onError(String message) { // Error log to keep record of errors (for secure programming and maintainability) Log.e("jsonErrors","Error creating json object"+e.toString()); } - } /** @@ -547,6 +1330,61 @@ public void onError(String message) { */ public LatLng getLatLngWifiPositioning(){return this.wiFiPositioning.getWifiLocation();} + /** + * Returns the particle filter's best estimated position in WGS84 coordinates. + * Used by the map display fragment to show the fused position marker. + * + * @return double[]{latitude, longitude}, or null(if filter is not initialized) + */ + /** Trajectory points accumulated during a session, used to redraw path on CorrectionFragment. */ + private final List fusedTrajectoryPoints = new ArrayList<>(); + + /** Returns accumulated fused trajectory points for display in CorrectionFragment. */ + public List getFusedTrajectoryPoints() { + return fusedTrajectoryPoints; + } + + + /** Last raw GNSS position. Returns null before first GPS signal. */ + public double[] getLastGnssLatLon() { + return lastGnssLatLon; + } + + /** Last raw WiFi position. Returns null before first WiFi scan result. */ + public double[] getLastWifiLatLon() { + return lastWifiLatLon; + } + + /** + * Returns the spread of the particle cloud in metres. + * Use this to draw an uncertainty circle around the fused position marker. + * + * @return RMS particle spread in metres. + */ + public double getPositionUncertainty() { + if (useEKF) { + return ekfPositioning == null ? -1.0 : ekfPositioning.getSigmaMetres(); + } + return particleFilter == null ? -1.0 : particleFilter.getSigmaMetres(); + } + + /** + * Returns a copy of all particle positions in local East-North metres. + * + * Used for map matching wall-constraint filter. + * + * @return float[300][2] particle array, or float[0][2] if uninitialised. + */ + public float[][] getParticles() { + if (particleFilter == null) return new float[0][2]; + return particleFilter.getParticles(); + } + + /** Returns true if the EKF is selected as the active positioning algorithm. */ + public boolean isUsingEKF() { + return useEKF; + } + /** * Method to get current floor the user is at, obtained using WiFiPositioning * @see WiFiPositioning for WiFi positioning @@ -595,6 +1433,60 @@ private float[] getRotationMatrixFromOrientation(float[] o) { return resultMatrix; } + public CoordinateConverter getCoordinateConverter() { + return coordinateConverter; + } + + public float[] getBestParticleEstimate() { + if (particleFilter == null || !particleFilter.isInitialized()) { + return new float[]{0f, 0f}; + } + return particleFilter.getBestEstimate(); + } + + public double[] getFusedLatLon() { + boolean ekfReady = useEKF && ekfPositioning != null && ekfPositioning.isInitialized(); + boolean pfReady = !useEKF && particleFilter != null && particleFilter.isInitialized(); + + if (!(ekfReady || pfReady) || coordinateConverter == null) { + return null; + } + + float[] rawEnu = useEKF + ? ekfPositioning.getBestEstimate() + : particleFilter.getBestEstimate(); + + if (rawEnu == null || rawEnu.length < 2) { + return null; + } + + float[] displayEnu = new float[]{rawEnu[0], rawEnu[1]}; + + if (indoorMapManager != null && prevBestEnu != null + && settings.getBoolean("use_wall_constraints", true)) { + displayEnu = indoorMapManager.constrainMovementToWalls(prevBestEnu, rawEnu); + } + + prevBestEnu = new float[]{displayEnu[0], displayEnu[1]}; + + return coordinateConverter.toLatLon(displayEnu[0], displayEnu[1]); + } + + /** + * Called when map matching confirms a floor change. + * Resets the particle cloud around the current best estimate with increased uncertainty, + * and updates the last known floor to stay in sync with barometer-based detection. + * + * @param newFloor integer floor number confirmed by map matching + */ + public void onFloorChanged(int newFloor) { + float[] best = particleFilter.getBestEstimate(); + particleFilter.resetAroundPosition(best[0], best[1], 8f); + ekfPositioning.resetAroundPosition(best[0], best[1], 8f); + lastKnownFloor = newFloor; + Log.i("SensorFusion", "Floor change confirmed by map matching → floor " + newFloor); + } + /** * Performs and matrix multiplication of two 3x3 matrices and returns the product. * @@ -780,9 +1672,7 @@ public int getHoldMode(){ } } - //endregion - - //region Start/Stop + // Start/Stop /** * Registers all device listeners and enables updates with the specified sampling rate. @@ -806,6 +1696,7 @@ public void resumeListening() { stepDetectionSensor.sensorManager.registerListener(this, stepDetectionSensor.sensor, SensorManager.SENSOR_DELAY_NORMAL); rotationSensor.sensorManager.registerListener(this, rotationSensor.sensor, (int) 1e6); wifiProcessor.startListening(); + bleProcessor.startListening(); gnssProcessor.startLocationUpdates(); } @@ -834,15 +1725,60 @@ public void stopListening() { //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? + this.wifiProcessor.stopListening(); } catch (Exception e) { System.err.println("Wifi resumed before existing"); } + + // Stop BLE scanning + try { + this.bleProcessor.stopListening(); + } catch (Exception e) { + System.err.println("BLE stopped before existing"); + } + // Stop receiving location updates this.gnssProcessor.stopUpdating(); } } + /** + * Set trajectory name before recording starts + */ + public void setTrajectoryName(String name) { + this.trajectoryName = name; + android.util.Log.i("SensorFusion", "Trajectory name set: " + name); + } + + /** + * Get trajectory name + */ + public String getTrajectoryName() { + return this.trajectoryName; + } + + /** + * Set initial position data before recording starts + */ + public void setInitialPositionData(float lat, float lon) { + this.initialLatitude = lat; + this.initialLongitude = lon; + this.initialAltitude = this.altitude; + + // Save initial orientation (rotation vector) + this.initialRotation[0] = this.rotation[0]; + this.initialRotation[1] = this.rotation[1]; + this.initialRotation[2] = this.rotation[2]; + this.initialRotation[3] = this.rotation[3]; + + android.util.Log.i("SensorFusion", String.format( + "Initial position set: lat=%.6f, lon=%.6f, alt=%.2fm", + initialLatitude, initialLongitude, initialAltitude)); + android.util.Log.i("SensorFusion", String.format( + "Initial orientation set: quat[%.3f, %.3f, %.3f, %.3f]", + initialRotation[0], initialRotation[1], initialRotation[2], initialRotation[3])); + } + /** * Enables saving sensor values to the trajectory object. * @@ -859,6 +1795,8 @@ public void startRecording() { } wakeLock.acquire(31 * 60 * 1000L /*31 minutes*/); + this.lastWifiFingerprint = null; + this.lastBleDeviceList = null; this.saveRecording = true; this.stepCounter = 0; this.absoluteStartTime = System.currentTimeMillis(); @@ -867,17 +1805,65 @@ public void startRecording() { this.trajectory = Traj.Trajectory.newBuilder() .setAndroidVersion(Build.VERSION.RELEASE) .setStartTimestamp(absoluteStartTime) + .setTrajectoryId(trajectoryName) + .setInitialPosition(Traj.GNSSPosition.newBuilder() + .setLatitude(initialLatitude) + .setLongitude(initialLongitude) + .setAltitude(initialAltitude) + .setRelativeTimestamp(0) + .build()) .setAccelerometerInfo(createInfoBuilder(accelerometerSensor)) .setGyroscopeInfo(createInfoBuilder(gyroscopeSensor)) + .setRotationVectorInfo(createInfoBuilder(rotationSensor)) .setMagnetometerInfo(createInfoBuilder(magnetometerSensor)) .setBarometerInfo(createInfoBuilder(barometerSensor)) - .setLightSensorInfo(createInfoBuilder(lightSensor)); - - + .setLightSensorInfo(createInfoBuilder(lightSensor)) + .setProximityInfo(createInfoBuilder(proximitySensor)); + + // Add the initial orientation as the first IMU reading + this.trajectory.addImuData(Traj.IMUReading.newBuilder() + .setRelativeTimestamp(0) + .setAcc(Traj.Vector3.newBuilder() + .setX(0).setY(0).setZ(0) + .build()) + .setGyr(Traj.Vector3.newBuilder() + .setX(0).setY(0).setZ(0) + .build()) + .setRotationVector(Traj.Quaternion.newBuilder() + .setX(initialRotation[0]) + + .setY(initialRotation[1]) + .setZ(initialRotation[2]) + .setW(initialRotation[3]) + .build()) + .setStepCount(0) + .build()); this.storeTrajectoryTimer = new Timer(); this.storeTrajectoryTimer.schedule(new storeDataInTrajectory(), 0, TIME_CONST); this.pdrProcessing.resetPDR(); + // Reset particle filter state for new recording session + particleFilter = new ParticleFilter(); + ekfPositioning = new ExtendedKalmanFilter(); + useEKF = settings.getBoolean("use_ekf", false); + coordinateConverter = null; // force fresh origin at actual recording position + enuBaked = false; + lastGnssLatLon = null; + lastWifiLatLon = null; + lastPdrLatLon = null; + lastKnownFloor = 0; + prevPdrX = 0f; + prevPdrY = 0f; + prevEkfEnu = null; + pdrTrendDx = 0f; + pdrTrendDy = 0f; + fusedHeading = 0f; + headingInitialised = false; + lastGyroTimestampMs = 0; + lastGnssEnu = null; + lastWifiEnu = null; + smoothedWifiEnu = null; + fusedTrajectoryPoints.clear(); // Clear old fused trajectory points if(settings.getBoolean("overwrite_constants", false)) { this.filter_coefficient = Float.parseFloat(settings.getString("accel_filter", "0.96")); } else { @@ -894,6 +1880,7 @@ public void startRecording() { * @see Traj object for storing data. * @see SettingsFragment navigation that might cancel recording. */ + public void stopRecording() { // Only cancel if we are running if(this.saveRecording) { @@ -905,9 +1892,7 @@ public void stopRecording() { } } - //endregion - - //region Trajectory object + // Trajectory object /** * Send the trajectory object to servers. @@ -922,7 +1907,7 @@ public void sendTrajectoryToCloud() { } /** - * Creates a {@link Traj.Sensor_Info} objects from the specified sensor's data. + * 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 @@ -930,8 +1915,8 @@ public void sendTrajectoryToCloud() { * @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()) @@ -949,40 +1934,45 @@ private Traj.Sensor_Info.Builder createInfoBuilder(MovementSensor sensor) { private class storeDataInTrajectory extends TimerTask { public void run() { // Store IMU and magnetometer data in Trajectory class - trajectory.addImuData(Traj.Motion_Sample.newBuilder() + trajectory.addImuData(Traj.IMUReading.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)) - ; + .setAcc(Traj.Vector3.newBuilder() + .setX(acceleration[0]) + .setY(acceleration[1]) + .setZ(acceleration[2]) + .build()) + .setGyr(Traj.Vector3.newBuilder() + .setX(angularVelocity[0]) + .setY(angularVelocity[1]) + .setZ(angularVelocity[2]) + .build()) + .setRotationVector(Traj.Quaternion.newBuilder() + .setX(rotation[0]) + .setY(rotation[1]) + .setZ(rotation[2]) + .setW(rotation[3]) + .build()) + .setStepCount(stepCounter) + .build()); + + trajectory.addMagnetometerData(Traj.MagnetometerReading.newBuilder() + .setMag(Traj.Vector3.newBuilder() + .setX(magneticField[0]) + .setY(magneticField[1]) + .setZ(magneticField[2]) + .build()) + .setRelativeTimestamp(SystemClock.uptimeMillis()-bootTime) + .build()); // Divide timer with a counter for storing data every 1 second if (counter == 99) { 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,7 +1983,7 @@ 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())); @@ -1005,10 +1995,121 @@ public void run() { else { counter++; } + } + } + public List getLatestBssids() { + if (wifiProcessor == null) { + Log.w("SensorFusion", "getLatestBssids(): wifiProcessor is null"); + return new ArrayList<>(); } + List macs = wifiProcessor.getLastObservedBssids(); + Log.d("SensorFusion", "getLatestBssids(): macs=" + macs.size()); + return macs; } - //endregion + /** + * Converts a local ENU position to WGS84 lat/lon. + * Returns null if coordinate converter is not yet initialised. + * + * @param east metres east from the reference point + * @param north metres north from the reference point + * @return double[]{latitude, longitude} or null + */ + public double[] enuToLatLon(float east, float north) { + if (coordinateConverter == null) return null; + return coordinateConverter.toLatLon(east, north); + } + + /** + * Returns true if the linear acceleration samples indicate the device is stationary. + * Uses the peak-to-peak range of the sample window. + * + * @param samples linear acceleration magnitudes (m/s²) collected between two step events + * @return true if peak-to-peak range is below the stationary threshold (0.5 m/s²) + */ + private boolean isStationary(List samples) { + if (samples.isEmpty()) return false; + // Require at least 5 samples; fewer samples means a very short step interval, + // which is more likely genuine movement than noise. + if (samples.size() < 5) return false; + double max = Double.MIN_VALUE, min = Double.MAX_VALUE; + for (double v : samples) { + if (v > max) max = v; + if (v < min) min = v; + } + // Lowered threshold from 0.5 to 0.3 m/s²: walking in a bag/pocket produces + // a steady magnitude that varies less than 0.5 but still more than 0.3. + return (max - min) < 0.3; + } + + /** + * Wraps an angle in radians to the range [-π, π]. + * + * @param angle angle in radians + * @return equivalent angle in [-π, π] + */ + private float normalizeAngle(float angle) { + while (angle > Math.PI) angle -= 2 * (float) Math.PI; + while (angle < -Math.PI) angle += 2 * (float) Math.PI; + return angle; + } + + /** + * Rescales the fused trajectory points based on a new step length scaling factor. + * Called from CorrectionFragment when the user adjusts the average step length. + * + * @param scalingFactor ratio of new step length to original step length + */ + public void rescaleFusedTrajectory(float scalingFactor) { + if (fusedTrajectoryPoints.isEmpty()) { + Log.w("SensorFusion", "rescaleFusedTrajectory: no points to rescale"); + return; + } + + if (coordinateConverter == null) { + Log.w("SensorFusion", "rescaleFusedTrajectory: coordinateConverter is null"); + return; + } + + // Get the first point as reference (this is the origin) + LatLng startPoint = fusedTrajectoryPoints.get(0); + + // Convert start point to ENU + float[] startEnu = coordinateConverter.toEnu(startPoint.latitude, startPoint.longitude); + + // Rescale each subsequent point relative to the start + for (int i = 1; i < fusedTrajectoryPoints.size(); i++) { + LatLng currentPoint = fusedTrajectoryPoints.get(i); + + // Convert current point to ENU + float[] currentEnu = coordinateConverter.toEnu( + currentPoint.latitude, currentPoint.longitude); + + // Calculate offset from start + float eastOffset = currentEnu[0] - startEnu[0]; + float northOffset = currentEnu[1] - startEnu[1]; + // Apply scaling factor + float newEast = startEnu[0] + (eastOffset * scalingFactor); + float newNorth = startEnu[1] + (northOffset * scalingFactor); + + // Convert back to lat/lon + double[] newLatLon = coordinateConverter.toLatLon(newEast, newNorth); + + // Update the point in the list + fusedTrajectoryPoints.set(i, new LatLng(newLatLon[0], newLatLon[1])); + } + + Log.i("SensorFusion", "Fused trajectory rescaled with factor: " + scalingFactor); + } + + /** + * Clears accumulated fused trajectory points. + * Called when starting a new recording session. + */ + public void clearFusedTrajectoryPoints() { + fusedTrajectoryPoints.clear(); + Log.i("SensorFusion", "Fused trajectory points cleared"); + } } diff --git a/app/src/main/java/com/openpositioning/PositionMe/sensors/WifiDataProcessor.java b/app/src/main/java/com/openpositioning/PositionMe/sensors/WifiDataProcessor.java index fa8a17dd..265521e8 100644 --- a/app/src/main/java/com/openpositioning/PositionMe/sensors/WifiDataProcessor.java +++ b/app/src/main/java/com/openpositioning/PositionMe/sensors/WifiDataProcessor.java @@ -1,5 +1,6 @@ package com.openpositioning.PositionMe.sensors; +import android.util.Log; import android.Manifest; import android.content.BroadcastReceiver; import android.content.Context; @@ -10,6 +11,14 @@ import android.net.NetworkInfo; import android.net.wifi.ScanResult; import android.net.wifi.WifiManager; +import android.net.wifi.rtt.RangingRequest; +import android.net.wifi.rtt.RangingResult; +import android.net.wifi.rtt.RangingResultCallback; +import android.net.wifi.rtt.WifiRttManager; +import android.annotation.SuppressLint; +import androidx.annotation.RequiresApi; +import android.os.Build; +import java.util.concurrent.Executor; import android.provider.Settings; import android.widget.Toast; @@ -41,13 +50,25 @@ public class WifiDataProcessor implements Observable { //Time over which a new scan will be initiated - private static final long scanInterval = 5000; + private static final long scanInterval = 1000; // Application context for handling permissions and WifiManager instances private final Context context; // Locations manager to enable access to Wifi data via the android system private final WifiManager wifiManager; + // WiFi RTT manager for distance measurement (API 28+) + private final WifiRttManager wifiRttManager; + + // Listener to deliver RTT results back to SensorFusion + private RttResultListener rttResultListener; + + // Interface for RTT result callbacks + public interface RttResultListener { + void onRttResults(List results, List associatedScans); + } + + //List of nearby networks private Wifi[] wifiData; @@ -57,6 +78,10 @@ public class WifiDataProcessor implements Observable { // Timer object private Timer scanWifiDataTimer; + // Raw BSSIDs from the most recent scan (colon-separated MAC strings) + private final List lastObservedBssids = new ArrayList<>(); + + /** * Public default constructor of the WifiDataProcessor class. * The constructor saves the context, checks for permissions to use the location services, @@ -73,29 +98,80 @@ public class WifiDataProcessor implements Observable { * @author Mate Stodulka */ public WifiDataProcessor(Context context) { - this.context = context; - // Check for permissions - boolean permissionsGranted = checkWifiPermissions(); - this.wifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); + + Log.d("WifiDataProcessor", + "constructed instance=" + System.identityHashCode(this)); + + this.context = context.getApplicationContext(); + this.wifiManager = (WifiManager) this.context.getSystemService(Context.WIFI_SERVICE); + this.wifiRttManager = (WifiRttManager) this.context.getSystemService(Context.WIFI_RTT_RANGING_SERVICE); this.scanWifiDataTimer = new Timer(); this.observers = new ArrayList<>(); + this.wifiData = new Wifi[0]; + } + + /** + * Set the listener that will receive WiFi RTT ranging results. + * Called by SensorFusion to receive RTT data for trajectory recording. + * + * @param listener Callback to receive RTT results + */ + @RequiresApi(api = Build.VERSION_CODES.P) + public void setRttResultListener(RttResultListener listener) { + this.rttResultListener = listener; + } - // Decreapted method after API 29 - // Turn on wifi if it is currently disabled - // TODO - turn it to a notification toward user -// // if(permissionsGranted && wifiManager.getWifiState()== WifiManager.WIFI_STATE_DISABLED) { -// // wifiManager.setWifiEnabled(true); -// // } + @SuppressLint("MissingPermission") + public void startListening() { - // Start wifi scan and return results via broadcast - if(permissionsGranted) { - this.scanWifiDataTimer.schedule(new scheduledWifiScan(), 0, scanInterval); + if (!checkWifiPermissions()) { + Log.w("WifiDataProcessor", "Permissions not granted, not starting WiFi scan"); + return; } - //Inform the user if wifi throttling is enabled on their device - checkWifiThrottling(); + // Immediately process cached results + List initialResults = wifiManager.getScanResults(); + processScanResults(initialResults); + + scanWifiDataTimer.scheduleAtFixedRate( + new scheduledWifiScan(), + 0, + scanInterval + ); } + private void processScanResults(List wifiScanList) { + + if (wifiScanList == null) return; + + lastObservedBssids.clear(); + + for (ScanResult r : wifiScanList) { + if (r.BSSID != null && !r.BSSID.isEmpty()) { + lastObservedBssids.add(r.BSSID.toLowerCase()); + } + } + + wifiData = new Wifi[wifiScanList.size()]; + + for (int i = 0; i < wifiScanList.size(); i++) { + wifiData[i] = new Wifi(); + String mac = wifiScanList.get(i).BSSID; + long intMacAddress = convertBssidToLong(mac); + wifiData[i].setBssid(intMacAddress); + wifiData[i].setLevel(wifiScanList.get(i).level); + } + + Log.d("WifiDataProcessor", + "Processed scan results, BSSIDs=" + lastObservedBssids.size()); + + // Attempt RTT ranging for APs that support it + performRttRanging(wifiScanList); + + notifyObservers(0); + } + + /** * Broadcast receiver to receive updates from the wifi manager. * Receives updates when a wifi scan is complete. Observers are notified when the broadcast is @@ -114,6 +190,7 @@ public WifiDataProcessor(Context context) { */ @Override public void onReceive(Context context, Intent intent) { + Log.d("WifiDataProcessor", "Scan complete, BSSIDs=" + lastObservedBssids.size()); if (ActivityCompat.checkSelfPermission(context, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) { // Unregister this listener @@ -125,6 +202,14 @@ public void onReceive(Context context, Intent intent) { List wifiScanList = wifiManager.getScanResults(); //Stop receiver as scan is complete context.unregisterReceiver(this); + // Collect raw BSSIDs for floorplan API + lastObservedBssids.clear(); + for (ScanResult r : wifiScanList) { + if (r.BSSID != null && !r.BSSID.isEmpty()) { + lastObservedBssids.add(r.BSSID.toLowerCase()); + } + } + //Loop though each item in wifi list wifiData = new Wifi[wifiScanList.size()]; @@ -138,6 +223,7 @@ public void onReceive(Context context, Intent intent) { wifiData[i].setLevel(wifiScanList.get(i).level); } + //Notify observers of change in wifiData variable notifyObservers(0); } @@ -224,10 +310,8 @@ private void startWifiScan() { * Initiate scans for nearby networks every 5 seconds. * The method declares a new timer instance to schedule a scan for nearby wifis every 5 seconds. */ - public void startListening() { - this.scanWifiDataTimer = new Timer(); - this.scanWifiDataTimer.scheduleAtFixedRate(new scheduledWifiScan(), 0, scanInterval); - } + + /** * Cancel wifi scans. @@ -258,6 +342,64 @@ public void checkWifiThrottling(){ } } + + /** + * Checks which APs in the scan list support WiFi RTT (802.11mc), + * then initiates a ranging request for those APs. + * Results are delivered asynchronously via RttResultListener. + * Requires Android API 28+ and CHANGE_WIFI_STATE permission. + * + * @param scanResults The current list of scanned WiFi access points + */ + @RequiresApi(api = Build.VERSION_CODES.P) + @SuppressLint("MissingPermission") + private void performRttRanging(List scanResults) { + // RTT requires Android P (API 28) or higher + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) { + return; + } + // Check device supports RTT + if (wifiRttManager == null || !wifiRttManager.isAvailable()) { + Log.d("WifiDataProcessor", "WiFi RTT not available on this device"); + return; + } + // Filter to APs that advertise 802.11mc support + List rttCapableAps = new ArrayList<>(); + for (ScanResult result : scanResults) { + if (result.is80211mcResponder()) { + rttCapableAps.add(result); + } + } + if (rttCapableAps.isEmpty()) { + Log.d("WifiDataProcessor", "No RTT-capable APs found in scan"); + return; + } + Log.d("WifiDataProcessor", "Starting RTT ranging for " + rttCapableAps.size() + " APs"); + // Build ranging request for all RTT-capable APs + RangingRequest request = new RangingRequest.Builder() + .addAccessPoints(rttCapableAps) + .build(); + // Store reference for use inside callback + final List scansForCallback = rttCapableAps; + // Execute ranging on main thread executor + Executor executor = context.getMainExecutor(); + wifiRttManager.startRanging(request, executor, new RangingResultCallback() { + @Override + public void onRangingFailure(int code) { + Log.w("WifiDataProcessor", "RTT ranging failed, code=" + code); + } + @Override + public void onRangingResults(List results) { + Log.d("WifiDataProcessor", "RTT ranging results received: " + results.size()); + // Deliver results to SensorFusion via listener + if (rttResultListener != null) { + rttResultListener.onRttResults(results, scansForCallback); + } + } + }); + } + + /** * Implement default method from Observable Interface to add new observers to the class. * @@ -287,13 +429,23 @@ public void notifyObservers(int idx) { * calling wifi scans every 5 seconds. */ private class scheduledWifiScan extends TimerTask { - + @SuppressLint("MissingPermission") @Override public void run() { - startWifiScan(); + + if (!checkWifiPermissions()) return; + + // Always read cached results first + List cached = wifiManager.getScanResults(); + processScanResults(cached); + + // Best-effort request a new scan (maybe throttled) + boolean ok = wifiManager.startScan(); + Log.d("WifiDataProcessor", "startScan() returned=" + ok); } } + /** * Obtains required information about wifi in which the device is currently connected. * @@ -329,4 +481,15 @@ public Wifi getCurrentWifiData(){ } return currentWifi; } + + + + public List getLastObservedBssids() { + Log.d("WifiDataProcessor", "getLastObservedBssids() size=" + lastObservedBssids.size() + + " instance=" + System.identityHashCode(this)); + return new ArrayList<>(lastObservedBssids); + } + + + } diff --git a/app/src/main/java/com/openpositioning/PositionMe/sensors/model/TestPoint.java b/app/src/main/java/com/openpositioning/PositionMe/sensors/model/TestPoint.java new file mode 100644 index 00000000..34b4e55a --- /dev/null +++ b/app/src/main/java/com/openpositioning/PositionMe/sensors/model/TestPoint.java @@ -0,0 +1,14 @@ +package com.openpositioning.PositionMe.sensors.model; + +public class TestPoint { + public final long timestampMillis; + public final double latitude; + public final double longitude; + + public TestPoint(long timestampMillis, double latitude, double longitude) { + this.timestampMillis = timestampMillis; + this.latitude = latitude; + this.longitude = longitude; + } + +} diff --git a/app/src/main/java/com/openpositioning/PositionMe/utils/BuildingPolygon.java b/app/src/main/java/com/openpositioning/PositionMe/utils/BuildingPolygon.java index 2d0a3265..fcbb327c 100644 --- a/app/src/main/java/com/openpositioning/PositionMe/utils/BuildingPolygon.java +++ b/app/src/main/java/com/openpositioning/PositionMe/utils/BuildingPolygon.java @@ -62,7 +62,7 @@ public static boolean inLibrary(LatLng point){ * @return True if point in polygon * False otherwise */ - private static boolean pointInPolygon(LatLng point, List polygon) { + public static boolean pointInPolygon(LatLng point, List polygon) { int numCrossings = 0; List path=polygon; // For each edge diff --git a/app/src/main/java/com/openpositioning/PositionMe/utils/CoordinateConverter.java b/app/src/main/java/com/openpositioning/PositionMe/utils/CoordinateConverter.java new file mode 100644 index 00000000..afc7dd90 --- /dev/null +++ b/app/src/main/java/com/openpositioning/PositionMe/utils/CoordinateConverter.java @@ -0,0 +1,65 @@ +package com.openpositioning.PositionMe.utils; + +/** + * Converts between WGS84 geographic coordinates (latitude/longitude) and local + * East-North Cartesian coordinates in metres. + * + * A reference point (East-North origin) should be set via the constructor before any + * conversion can be performed. This origin is the first reliable GNSS at the start of a recording session. + * + * @author Haoning Huang + */ +public class CoordinateConverter { + + // Number of metres corresponding to one degree of latitude (constant at all latitudes) + private static final double METRES_PER_DEGREE = 111320.0; + + // Reference point stored in degrees and radians + private final double refLat; // reference latitude in degrees + private final double refLon; // reference longitude in degrees + private final double cosRefLat; // cos(refLat) precomputed to avoid repeated calls + + /** + * Constructs a converter with the given WGS84 reference point as the East-North origin. + * + * @param refLat Reference latitude in decimal degrees + * @param refLon Reference longitude in decimal degrees + */ + public CoordinateConverter(double refLat, double refLon) { + this.refLat = refLat; + this.refLon = refLon; + this.cosRefLat = Math.cos(Math.toRadians(refLat)); + } + + /** + * Converts a WGS84 position to local East-North coordinates in metres. + * + * @param lat Latitude of the point to convert, in decimal degrees + * @param lon Longitude of the point to convert, in decimal degrees + * @return float array {east, north} in metres relative to the reference point + */ + public float[] toEnu(double lat, double lon) { + float north = (float) ((lat - refLat) * METRES_PER_DEGREE); + float east = (float) ((lon - refLon) * METRES_PER_DEGREE * cosRefLat); + return new float[]{east, north}; + } + + /** + * Converts a local East-North position back to WGS84 latitude and longitude. + * + * @param east East displacement in metres from the reference point + * @param north North displacement in metres from the reference point + * @return double array {latitude, longitude} in decimal degrees + */ + public double[] toLatLon(float east, float north) { + double lat = refLat + north / METRES_PER_DEGREE; + double lon = refLon + east / (METRES_PER_DEGREE * cosRefLat); + return new double[]{lat, lon}; + } + + /** @return Reference latitude in decimal degrees */ + public double getRefLat() { return refLat; } + + /** @return Reference longitude in decimal degrees */ + public double getRefLon() { return refLon; } +} diff --git a/app/src/main/java/com/openpositioning/PositionMe/utils/IndoorMapManager.java b/app/src/main/java/com/openpositioning/PositionMe/utils/IndoorMapManager.java index 9d7167df..3d9d9767 100644 --- a/app/src/main/java/com/openpositioning/PositionMe/utils/IndoorMapManager.java +++ b/app/src/main/java/com/openpositioning/PositionMe/utils/IndoorMapManager.java @@ -5,6 +5,8 @@ import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.model.BitmapDescriptorFactory; +import com.google.android.gms.maps.model.Circle; +import com.google.android.gms.maps.model.CircleOptions; import com.google.android.gms.maps.model.GroundOverlay; import com.google.android.gms.maps.model.GroundOverlayOptions; import com.google.android.gms.maps.model.LatLng; @@ -12,9 +14,28 @@ import com.google.android.gms.maps.model.PolylineOptions; import com.openpositioning.PositionMe.R; +import java.util.ArrayList; import java.util.Arrays; +import java.util.Iterator; import java.util.List; +import com.google.android.gms.maps.model.BitmapDescriptor; +import com.google.android.gms.maps.model.LatLngBounds; +import com.google.android.gms.maps.model.Polygon; +import com.google.android.gms.maps.model.PolygonOptions; +import com.openpositioning.PositionMe.sensors.SensorFusion; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; +import java.util.Map; +import java.util.HashMap; +//import java.util.logging.Handler; +import android.os.Handler; +import android.os.Looper; +import java.util.logging.LogRecord; + +import static java.lang.Math.*; /** * Class used to manage indoor floor map overlays * Currently used by RecordingFragment @@ -22,172 +43,1571 @@ * in the building * @author Arun Gopalakrishnan */ +/** + * Class used to manage indoor floor map overlays + * Currently used by RecordingFragment + * @see BuildingPolygon Describes the bounds of buildings and the methods to check if point is + * in the building + * + * UPDATED: + * - Replaced bitmap GroundOverlay indoor floors with vector GeoJSON floor rendering + * - Floors are now drawn using polygons from map_shapes + */ public class IndoorMapManager { + // To store the map instance - private GoogleMap gMap; - //Stores the overlay of the indoor maps - private GroundOverlay groundOverlay; + private final GoogleMap gMap; + // Stores the current Location of user private LatLng currentLocation; + // Stores if indoor map overlay is currently set - private boolean isIndoorMapSet=false; - //Stores the current floor in building - private int currentFloor; - // Floor height of current building - private float floorHeight; - //Images of the Nucleus Building and Library indoor floor maps - private final List NUCLEUS_MAPS =Arrays.asList( - R.drawable.nucleuslg, R.drawable.nucleusg, R.drawable.nucleus1, - R.drawable.nucleus2,R.drawable.nucleus3); - private final List LIBRARY_MAPS =Arrays.asList( - R.drawable.libraryg, R.drawable.library1, R.drawable.library2, - R.drawable.library3); - // South-west and north east Bounds of Nucleus building and library to set the Overlay - LatLngBounds NUCLEUS=new LatLngBounds( - BuildingPolygon.NUCLEUS_SW, - BuildingPolygon.NUCLEUS_NE - ); - LatLngBounds LIBRARY=new LatLngBounds( - BuildingPolygon.LIBRARY_SW, - BuildingPolygon.LIBRARY_NE - ); - //Average Floor Heights of the Buildings - public static final float NUCLEUS_FLOOR_HEIGHT=4.2F; - public static final float LIBRARY_FLOOR_HEIGHT=3.6F; + private boolean isIndoorMapSet = false; + + // Stores the current venue selected + private IndoorVenue currentVenue; + + // Stores the currently displayed floor key (e.g., "B1", "G", "1") + private String currentFloorKey; + + // Map polygon (outline) → venue mapping + private final Map polygonToVenue = new HashMap<>(); + + // List of currently drawn indoor floor polygons + private final List activeFloorPolygons = new ArrayList<>(); + + + // Distance (m) to consider user near stairs/floor features + final double floorDistThresh = 5.0; + + // Distance (m) to consider user near a lift (tighter than stairs) + final double liftDistThresh = 3.0; + + // Last confirmed floor key used as baseline for floor change detection + private String confirmedFloorKey = null; + + // Elevation (m) at which the current floor was confirmed (barometer reference) + private float confirmedFloorElevation = Float.NaN; + + // Handler to delay committing floor changes during UI floor browsing + private final Handler floorCommitHandler = new Handler(Looper.getMainLooper()); + + // Delay (ms) before confirming a browsed floor as the active floor + private static final long FLOOR_COMMIT_DELAY_MS = 1500; + + // Timestamp of last accepted floor change (used to debounce rapid switches) + private long lastFloorChangeTimeMs = 0; + + // Minimum time (ms) between floor changes to prevent oscillation + private static final long MIN_FLOOR_CHANGE_INTERVAL_MS = 5000; + + // Required vertical change (m) to consider a real floor transition (barometer threshold) + private static final double HEIGHT_THRESHOLD_METERS = 4.5; + + // Max distance (m) to consider user near stairs for a valid floor change + private static final double STAIRS_THRESHOLD_METERS = 12.0; + + // Max distance (m) to consider user near a lift for a valid floor change + private static final double LIFT_THRESHOLD_METERS = 10.0; + + // Max horizontal movement (m) allowed for lift detection (lifts have minimal horizontal shift) + private static final double LIFT_HORIZONTAL_THRESHOLD_METERS = 1.0; + + // Tolerance for floating-point precision when checking line segment intersections + private static final float INTERSECTION_EPSILON = 1e-6f; + + // Tolerance for determining if a polygon ring is already closed (first ≈ last point) + private static final float RING_CLOSURE_EPSILON = 1e-4f; + + // Distance (m) to back off from a wall after detecting a collision (prevents sticking) + private static final float WALL_SNAP_BACK_METERS = 0.05f; + + // FLOOR TRANSITION TRACKING + + //location of where we starting changing floors + private LatLng floorTransitionStartLocation = null; + + private LatLng lastStableFloorLocation = null; + //are we potentially changing floors + private boolean floorTransitionInProgress = false; + + private static final float FLOOR_STABLE_BAND_METERS = 0.5f; + //threshold to start tracking as potential new floor transition + private static final float FLOOR_TRANSITION_START_THRESHOLD_METERS = 1.0f; + + /** + * Confirms the currently displayed floor as the user's reference floor. + * + * Stores both: + * - the current floor key, and + * - the current sensor-derived elevation at the moment of confirmation. + * + * This confirmed floor/elevation pair is later used as the baseline for + * detecting real floor changes. + */ + private final Runnable commitBrowsedFloorRunnable = new Runnable() { + @Override + public void run() { + commitCurrentDisplayedFloor(); + } + }; + + + /** + * Venue model used for storing API floorplan data + */ + public static class IndoorVenue{ + public String venueId; + public String name; + public LatLngBounds bounds; + public List outline; + + // Raw GeoJSON floor data from API + public String rawMapShapes; + public Map floorFeatures = new HashMap<>(); + + // Stores all geometric features for a single floor, used for rendering and map-matching + public static class FloorFeatures { + // Wall polygons in LatLng (used for drawing and geographic checks) + public List> wallPolygons = new ArrayList<>(); + + // Wall polygons converted to ENU (meters) for efficient collision detection + public List> wallPolygonsEnu = new ArrayList<>(); + + // Centroid positions of stair features (used for floor transition logic) + public List stairsCenters = new ArrayList<>(); + + // Centroid positions of lift/elevator features (used for floor transition logic) + public List liftCenters = new ArrayList<>(); + } + } + /** * Constructor to set the map instance * @param map The map on which the indoor floor map overlays are set */ public IndoorMapManager(GoogleMap map){ - this.gMap=map; + this.gMap = map; } + /** - * Function to update the current location of user and display the indoor map - * if user in building with indoor map available + * Function to update the current location of user * @param currentLocation new location of user */ public void setCurrentLocation(LatLng currentLocation){ - this.currentLocation=currentLocation; - setBuildingOverlay(); + this.currentLocation = currentLocation; } + /** - * Function to obtain the current building's floor height - * @return the floor height of the current building the user is in + * Draw available indoor venues as clickable green polygons. */ - public float getFloorHeight() { - return floorHeight; + public void showVenueOutlines(List venues) { + + polygonToVenue.clear(); + + for (IndoorVenue venue : venues) { + Log.d("IndoorMapManager", "Adding venue outline: " + venue.name + + " points=" + venue.outline.size()); + Polygon poly = gMap.addPolygon( + new PolygonOptions() + .addAll(venue.outline) + .strokeColor(Color.GREEN) + .strokeWidth(4f) + .fillColor(0x2200FF00) + .clickable(true) + ); + + polygonToVenue.put(poly, venue); + } } + /** - * Getter to obtain if currently an indoor floor map is being displayed - * @return true if an indoor map is visible to the user, false otherwise + * Returns the IndoorVenue corresponding to a clicked polygon. */ - public boolean getIsIndoorMapSet(){ - return isIndoorMapSet; + public IndoorVenue getVenueForPolygon(Polygon polygon) { + return polygonToVenue.get(polygon); + } + + + /** + * Called when user selects a venue. + * Parses GeoJSON floor data and renders first available floor. + */ + public void selectVenue(IndoorVenue venue){ + + if (venue == null || venue.rawMapShapes == null) return; + + clearIndoorFloor(); + + this.currentVenue = venue; + + try { + JSONObject floorsObj = new JSONObject(venue.rawMapShapes); + + Iterator keys = floorsObj.keys(); + if (!keys.hasNext()) { + Log.w("IndoorMapManager", "No floors found for venue: " + venue.name); + return; + } + + // Default to first floor + currentFloorKey = keys.next(); + drawFloor(floorsObj.getJSONObject(currentFloorKey), currentFloorKey); + + isIndoorMapSet = true; + + Log.d("IndoorMapManager", "Selected floor: " + currentFloorKey); + + } catch (JSONException e) { + Log.e("IndoorMapManager", "Failed parsing floor GeoJSON", e); + } + } + + + /** + * Prevents movement from passing through walls on the current floor. + * + * This checks whether the line segment from the previous ENU position to the + * proposed ENU position intersects any wall polygon edge. If no wall is crossed, + * the destination is returned unchanged. + * + * If a wall is crossed, the movement is shortened so that the returned point + * lies just before the first wall intersection. This is used as a hard wall + * constraint for fused position estimates. + * + * @param fromEnu Previous position in ENU metres: {east, north} + * @param toEnu Proposed new position in ENU metres: {east, north} + * @return Safe ENU position that does not cross a wall + */ + public float[] constrainMovementToWalls(float[] fromEnu, float[] toEnu) { + if (fromEnu == null || toEnu == null) { + return toEnu; + } + + if (currentVenue == null || currentFloorKey == null) { + return toEnu; + } + + IndoorVenue.FloorFeatures floorFeatures = currentVenue.floorFeatures.get(currentFloorKey); + if (floorFeatures == null || + floorFeatures.wallPolygonsEnu == null || + floorFeatures.wallPolygonsEnu.isEmpty()) { + return toEnu; + } + + WallCrossing crossing = findFirstWallCrossing(fromEnu, toEnu, floorFeatures.wallPolygonsEnu); + + if (crossing == null) { + return new float[]{toEnu[0], toEnu[1]}; + } + + return moveToJustBeforeWall(fromEnu, toEnu, crossing.t, WALL_SNAP_BACK_METERS); + } + + // Represents where a movement path first intersects a wall edge in ENU space + private static class WallCrossing { + // Exact ENU point where the path intersects the wall + final float[] crossingPoint; + + // Index of the wall polygon that was intersected + final int polygonIndex; + + // Index of the specific edge within the polygon that was hit + final int edgeIndex; + + // Parametric position along the path (0=start, 1=end) where intersection occurs + final float t; + + WallCrossing(float[] crossingPoint, int polygonIndex, int edgeIndex, float t) { + this.crossingPoint = crossingPoint; + this.polygonIndex = polygonIndex; + this.edgeIndex = edgeIndex; + this.t = t; + } + } + + + /** + * Finds the earliest wall edge intersected by a movement segment. + * + * Iterates through all wall polygons on the current floor and checks every edge + * for intersection with the segment from {@code from} to {@code to}. If multiple + * walls are crossed, the closest one along the path is returned. + * + * The returned WallCrossing includes: + * - the intersection point, + * - which polygon and edge were hit, + * - the interpolation parameter t along the path. + * + * @param from Start ENU point {east, north} + * @param to End ENU point {east, north} + * @param walls List of wall polygons in ENU coordinates + * @return First wall crossing along the path, or null if no crossing occurs + */ + private WallCrossing findFirstWallCrossing(float[] from, + float[] to, + List> walls) { + double bestT = Double.MAX_VALUE; + WallCrossing best = null; + + for (int pi = 0; pi < walls.size(); pi++) { + List polygon = walls.get(pi); + if (polygon == null || polygon.size() < 2) continue; + + int edgeCount = getRingEdgeCount(polygon); + + for (int ei = 0; ei < edgeCount; ei++) { + float[] a = polygon.get(ei); + float[] b = polygon.get((ei + 1) % polygon.size()); + + double t = intersectionT(from, to, a, b); + if (t >= 0.0 && t <= 1.0 && t < bestT) { + bestT = t; + + float[] crossingPoint = new float[]{ + (float) (from[0] + t * (to[0] - from[0])), + (float) (from[1] + t * (to[1] - from[1])) + }; + + best = new WallCrossing(crossingPoint, pi, ei, (float) t); + } + } + } + + return best; + } + + /** + * Returns the number of usable edges in a polygon ring. + * + * Some polygon rings are explicitly closed, meaning the first and last point are + * the same. In that case, the final repeated point should not create an extra edge. + * This helper detects that case and returns the correct number of edges. + * + * @param ring Polygon ring as a list of ENU points + * @return Number of distinct edges in the ring + */ + private int getRingEdgeCount(List ring) { + if (ring == null || ring.size() < 2) return 0; + + float[] first = ring.get(0); + float[] last = ring.get(ring.size() - 1); + + boolean alreadyClosed = + Math.abs(first[0] - last[0]) < RING_CLOSURE_EPSILON && + Math.abs(first[1] - last[1]) < RING_CLOSURE_EPSILON; + + return alreadyClosed ? ring.size() - 1 : ring.size(); + } + + /** + * Computes the intersection parameter t for two line segments. + * + * The first segment is p1 -> p2, and the second is p3 -> p4. + * If the segments intersect, this returns the parameter t such that: + * + * intersection = p1 + t * (p2 - p1) + * + * where 0 <= t <= 1 means the intersection lies on the first segment. + * + * If the lines are parallel or the segments do not intersect, returns -1. + * + * @param p1 Start of first segment + * @param p2 End of first segment + * @param p3 Start of second segment + * @param p4 End of second segment + * @return Interpolation parameter t on first segment, or -1 if no intersection + */ + private double intersectionT(float[] p1, float[] p2, float[] p3, float[] p4) { + double rX = p2[0] - p1[0]; + double rY = p2[1] - p1[1]; + double sX = p4[0] - p3[0]; + double sY = p4[1] - p3[1]; + + double denom = rX * sY - rY * sX; + if (Math.abs(denom) < INTERSECTION_EPSILON) { + return -1.0; + } + + double qmpX = p3[0] - p1[0]; + double qmpY = p3[1] - p1[1]; + + double t = (qmpX * sY - qmpY * sX) / denom; + double u = (qmpX * rY - qmpY * rX) / denom; + + return (t >= 0.0 && t <= 1.0 && u >= 0.0 && u <= 1.0) ? t : -1.0; + } + + /** + * Moves a point to just before a detected wall collision. + * + * Given a path from {@code from} to {@code to} and the interpolation value + * {@code hitT} where the wall was hit, this backs the point away slightly + * from the wall by {@code snapBackMeters}. This avoids leaving the estimate + * exactly on the wall boundary. + * + * @param from Start ENU point + * @param to End ENU point + * @param hitT Path interpolation value where wall is hit + * @param snapBackMeters Distance to back off from the wall + * @return Adjusted ENU position just before the wall + */ + private float[] moveToJustBeforeWall(float[] from, float[] to, float hitT, float snapBackMeters) { + float dx = to[0] - from[0]; + float dy = to[1] - from[1]; + float len = (float) Math.sqrt(dx * dx + dy * dy); + + if (len < 1e-6f) { + return new float[]{from[0], from[1]}; + } + + float backT = snapBackMeters / len; + float safeT = Math.max(0f, hitT - backT); + + return new float[]{ + from[0] + safeT * dx, + from[1] + safeT * dy + }; + } + + /** + * Checks whether a movement segment intersects any wall edge in ENU space. + * + * This is a broad collision test used before more detailed correction logic. + * It loops over every wall polygon and every edge within each polygon. + * + * @param from Start ENU point + * @param to End ENU point + * @param walls List of wall polygons in ENU coordinates + * @return true if the segment crosses at least one wall, false otherwise + */ + private boolean crossesAnyWallEnu(float[] from, float[] to, List> walls) { + for (List polygon : walls) { + for (int i = 0; i < polygon.size(); i++) { + float[] a = polygon.get(i); + float[] b = polygon.get((i + 1) % polygon.size()); + if (segmentsIntersectEnu(from, to, a, b)) return true; + } + } + return false; + } + + /** + * Finds the furthest valid point along a path before hitting a wall. + * + * Uses binary search between {@code from} and {@code to} to find the last point + * that does not cross any wall. This is useful when a movement intersects a wall + * and we want to clamp the position as close as possible to the obstacle without + * crossing it. + * + * @param from Start ENU point + * @param to End ENU point + * @param allWalls List of all wall polygons in ENU coordinates + * @return Last valid ENU point before wall intersection + */ + private float[] snapToWallEnu(float[] from, float[] to, + List> allWalls) { + float[] best = from.clone(); + double low = 0.0, high = 1.0; + + for (int iter = 0; iter < 24; iter++) { + double mid = (low + high) / 2.0; + float[] candidate = { + (float)(from[0] + mid * (to[0] - from[0])), + (float)(from[1] + mid * (to[1] - from[1])) + }; + + // Check candidate against ALL walls, not just the nearest + if (crossesAnyWallEnu(from, candidate, allWalls)) { + high = mid; + } else { + low = mid; + best = candidate; + } + } + return best; + } + + + /** + * Tests whether two 2D line segments intersect in ENU coordinates. + * + * Handles both proper crossings and edge cases such as collinear points + * or touching at endpoints. This is the core geometric primitive used by + * the wall constraint logic. + * + * @param p1 Start of first segment + * @param p2 End of first segment + * @param p3 Start of second segment + * @param p4 End of second segment + * @return true if the segments intersect, false otherwise + */ + private boolean segmentsIntersectEnu(float[] p1, float[] p2, float[] p3, float[] p4) { + double eps = 1e-6; + + double o1 = orientation(p1, p2, p3); + double o2 = orientation(p1, p2, p4); + double o3 = orientation(p3, p4, p1); + double o4 = orientation(p3, p4, p2); + + // Proper intersection + if ((o1 > eps && o2 < -eps || o1 < -eps && o2 > eps) && + (o3 > eps && o4 < -eps || o3 < -eps && o4 > eps)) { + return true; + } + + // Collinear / endpoint cases + if (Math.abs(o1) <= eps && onSegmentEnu(p1, p3, p2, eps)) return true; + if (Math.abs(o2) <= eps && onSegmentEnu(p1, p4, p2, eps)) return true; + if (Math.abs(o3) <= eps && onSegmentEnu(p3, p1, p4, eps)) return true; + if (Math.abs(o4) <= eps && onSegmentEnu(p3, p2, p4, eps)) return true; + + return false; + } + + /** + * Returns the signed orientation / cross product of three ENU points. + * + * Positive value -> c is to one side of line ab + * Negative value -> c is to the other side + * Near zero -> points are approximately collinear + * + * Used by segment intersection tests. + * + * @param a First point + * @param b Second point + * @param c Third point + * @return Signed 2D cross product value + */ + private double orientation(float[] a, float[] b, float[] c) { + return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]); + } + + /** + * Checks whether a point lies on a line segment in ENU space. + * + * Assumes the point is already known to be approximately collinear with the + * segment, and then checks whether it falls within the segment bounds. + * + * @param a Segment start + * @param p Candidate point + * @param b Segment end + * @param eps Tolerance for floating-point comparisons + * @return true if p lies on segment ab, false otherwise + */ + private boolean onSegmentEnu(float[] a, float[] p, float[] b, double eps) { + return p[0] >= Math.min(a[0], b[0]) - eps && + p[0] <= Math.max(a[0], b[0]) + eps && + p[1] >= Math.min(a[1], b[1]) - eps && + p[1] <= Math.max(a[1], b[1]) + eps; + } + + /** + * Precomputes ENU versions of wall polygons for the current floor. + * + * Converts all wall polygon LatLng coordinates into local East-North-Up metre + * coordinates using the supplied CoordinateConverter. This allows wall collision + * checks to be done in a consistent local metric coordinate system. + * + * Should be called whenever: + * - a new floor is shown, or + * - the coordinate converter becomes available / changes. + * + * @param converter Converter for LatLng <-> ENU transformations + */ + public void bakeEnuCoordinates(CoordinateConverter converter) { + if (currentVenue == null || currentFloorKey == null) return; + IndoorVenue.FloorFeatures floor = currentVenue.floorFeatures.get(currentFloorKey); + if (floor == null) return; + + floor.wallPolygonsEnu.clear(); + for (List polygon : floor.wallPolygons) { + List enuPoly = new ArrayList<>(); + for (LatLng p : polygon) { + enuPoly.add(converter.toEnu(p.latitude, p.longitude)); + } + floor.wallPolygonsEnu.add(enuPoly); + } + Log.d("WallDebug", "Baked " + floor.wallPolygonsEnu.size() + " wall polygons to ENU"); + } + + + private LatLng toLatLng(float eastM, float northM, CoordinateConverter c) { + double[] ll = c.toLatLon(eastM, northM); + return new LatLng(ll[0], ll[1]); + } + + private float[] toEnu(LatLng latLng, CoordinateConverter c) { + float[] enu = c.toEnu(latLng.latitude, latLng.longitude); + return new float[]{(float) enu[0], (float) enu[1]}; + } + + //checks orientation using three points: 0= points on same line, 1 & 2 = points on either side + private static int orientation(LatLng a, LatLng b, LatLng c) { + + double val = + (b.longitude - a.longitude) * (c.latitude - a.latitude) - + (b.latitude - a.latitude) * (c.longitude - a.longitude); + + double eps = 1e-12; + + return (val > 0) ? 1 : 2; + } + + + /** + * When the EKF has teleported to the other side of a wall (e.g. after a + * strong GNSS/WiFi correction), this re-routes prevEkfEnu through the + * nearest navigable gap so that future wall-slide checks work correctly. + * + * Returns an updated "previous position" that is on the same side of all + * walls as toEnu, routed through doorways/gaps. + * + * @param fromEnu current prevEkfEnu + * @param toEnu current EKF best estimate (possibly on other side of wall) + * @return re-routed fromEnu that is navigably connected to toEnu + */ + public float[] reroutePrevEnu(float[] fromEnu, float[] toEnu) { + if (currentVenue == null || currentFloorKey == null) return fromEnu; + IndoorVenue.FloorFeatures floor = currentVenue.floorFeatures.get(currentFloorKey); + if (floor == null || floor.wallPolygonsEnu.isEmpty()) return fromEnu; + + // If no wall crossing, no rerouting needed + if (!crossesAnyWallEnu(fromEnu, toEnu, floor.wallPolygonsEnu)) return fromEnu; + + // Simple gap search: scan along the wall that was crossed looking for + // the largest gap (doorway). We sample points along the crossing wall + // and find the one that has the shortest clear path to toEnu. + float[] bestWaypoint = null; + double bestScore = Double.MAX_VALUE; + + for (List polygon : floor.wallPolygonsEnu) { + for (int i = 0; i < polygon.size(); i++) { + float[] a = polygon.get(i); + float[] b = polygon.get((i + 1) % polygon.size()); + + if (!segmentsIntersectEnu(fromEnu, toEnu, a, b)) continue; + + // Sample along this wall segment and adjacent segments + // looking for a point that has a clear line to toEnu + int samples = 20; + for (int s = 0; s <= samples; s++) { + float t = (float) s / samples; + float candidateX = a[0] + t * (b[0] - a[0]); + float candidateY = a[1] + t * (b[1] - a[1]); + float[] candidate = {candidateX, candidateY}; + + // Check if this candidate has a clear line to toEnu + if (!crossesAnyWallEnu(candidate, toEnu, floor.wallPolygonsEnu)) { + double dist = Math.sqrt( + Math.pow(candidateX - fromEnu[0], 2) + + Math.pow(candidateY - fromEnu[1], 2)); + if (dist < bestScore) { + bestScore = dist; + bestWaypoint = candidate; + } + } + } + + // Also check points slightly offset from the wall endpoints + // as these are where doorways typically are + float[][] endpoints = {a, b}; + float[][] offsets = {{0.5f, 0f}, {-0.5f, 0f}, {0f, 0.5f}, {0f, -0.5f}}; + for (float[] ep : endpoints) { + for (float[] off : offsets) { + float[] candidate = {ep[0] + off[0], ep[1] + off[1]}; + if (!crossesAnyWallEnu(candidate, toEnu, floor.wallPolygonsEnu)) { + double dist = Math.sqrt( + Math.pow(candidate[0] - fromEnu[0], 2) + + Math.pow(candidate[1] - fromEnu[1], 2)); + if (dist < bestScore) { + bestScore = dist; + bestWaypoint = candidate; + } + } + } + } + } + } + + // If we found a waypoint through a gap, route prevEkfEnu through it + if (bestWaypoint != null) { + Log.d("IndoorMapManager", "Rerouted prevEnu through gap at (" + + bestWaypoint[0] + ", " + bestWaypoint[1] + ")"); + return bestWaypoint; + } + + // No gap found — just move prevEkfEnu to toEnu directly + // so we don't stay permanently stuck + Log.d("IndoorMapManager", "No gap found, snapping prevEnu to toEnu"); + return toEnu.clone(); + } + + private Circle activeAccessHighlight = null; + + /** + * Draws a temporary visual highlight around a stairs/lift access point. + * + * Used to show the user which access point was selected during a floor change. + * Removes any previously drawn highlight before adding the new one. + * + * @param center Access point centre to highlight + */ + public void highlightAccessPoint(LatLng center) { + if (center == null || gMap == null) return; + + // remove previous highlight + if (activeAccessHighlight != null) { + activeAccessHighlight.remove(); + } + + activeAccessHighlight = gMap.addCircle(new CircleOptions() + .center(center) + .radius(2.0) // meters (tweak) + .strokeWidth(3f) + .strokeColor(Color.GREEN) + .fillColor(0x2200FF00) // translucent green + ); + } + + + + /** + * If the movement from fromEnu to toEnu crosses a wall, slides the destination + * along the wall surface rather than stopping at it. This prevents the position + * from getting stuck while still respecting the wall boundary. + * + * If no wall is crossed, returns toEnu unchanged. + * + * @param fromEnu float[]{east, north} — previous position in metres + * @param toEnu float[]{east, north} — new position after predict() + * @return wall-slid float[]{east, north}, or toEnu if no wall was crossed + */ + public float[] slideAlongWallEnu(float[] fromEnu, float[] toEnu) { + if (currentVenue == null || currentFloorKey == null) return toEnu; + IndoorVenue.FloorFeatures floor = currentVenue.floorFeatures.get(currentFloorKey); + if (floor == null || floor.wallPolygonsEnu.isEmpty()) return toEnu; + + if (!crossesAnyWallEnu(fromEnu, toEnu, floor.wallPolygonsEnu)) return toEnu; + + // Find the wall segment that was hit + float[] wallA = null, wallB = null; + outer: + for (List polygon : floor.wallPolygonsEnu) { + for (int i = 0; i < polygon.size(); i++) { + float[] a = polygon.get(i); + float[] b = polygon.get((i + 1) % polygon.size()); + if (segmentsIntersectEnu(fromEnu, toEnu, a, b)) { + wallA = a; + wallB = b; + break outer; + } + } + } + + if (wallA == null) return toEnu; // shouldn't happen + + // Snap to just before the wall first + float[] hitPoint = snapToWallEnu(fromEnu, toEnu, floor.wallPolygonsEnu); + + // Compute the movement vector and the wall direction vector + float moveX = toEnu[0] - fromEnu[0]; + float moveY = toEnu[1] - fromEnu[1]; + + float wallDX = wallB[0] - wallA[0]; + float wallDY = wallB[1] - wallA[1]; + float wallLen = (float) Math.sqrt(wallDX * wallDX + wallDY * wallDY); + if (wallLen < 1e-6f) return hitPoint; + + // Normalise wall direction + float wallNX = wallDX / wallLen; + float wallNY = wallDY / wallLen; + + // Project movement onto wall direction (slide component) + float dot = moveX * wallNX + moveY * wallNY; + float slideX = dot * wallNX; + float slideY = dot * wallNY; + + // Apply slide from hit point + float[] slid = new float[]{hitPoint[0] + slideX, hitPoint[1] + slideY}; + + // If the slid position also crosses a wall, just return the hit point + if (crossesAnyWallEnu(hitPoint, slid, floor.wallPolygonsEnu)) { + return hitPoint; + } + + return slid; + } + + + /** + * Applies wall-based correction to a predicted indoor location. + * + * Converts the old and predicted geographic coordinates into ENU space, checks + * whether the motion crosses a wall, and if so clamps the destination to just + * before the first wall hit. The corrected ENU point is then converted back to + * LatLng. + * + * This is the LatLng-facing version of the wall constraint logic. + * + * @param oldLocation Previous corrected location + * @param predictedLocation Newly predicted location + * @param heightChange Current vertical change estimate (currently not directly used here) + * @return Corrected location that does not pass through walls + */ + public LatLng indoorLocationCorrection(LatLng oldLocation, + LatLng predictedLocation, + float heightChange) { + + if (currentVenue == null || currentFloorKey == null || + oldLocation == null || predictedLocation == null) { + return predictedLocation; + } + + IndoorVenue.FloorFeatures floorFeatures = + currentVenue.floorFeatures.get(currentFloorKey); + + if (floorFeatures == null || + floorFeatures.wallPolygonsEnu == null || + floorFeatures.wallPolygonsEnu.isEmpty()) { + return predictedLocation; + } + + CoordinateConverter c = + SensorFusion.getInstance().getCoordinateConverter(); + + if (c == null) return predictedLocation; + + float[] from = toEnu(oldLocation, c); + float[] to = toEnu(predictedLocation, c); + + Log.d("MapMatch", + "Checking movement from (" + from[0] + "," + from[1] + ") to (" + + to[0] + "," + to[1] + ")"); + + WallCrossing crossing = + findFirstWallCrossing(from, to, floorFeatures.wallPolygonsEnu); + + if (crossing == null) { + return predictedLocation; + } + + float[] corrected = moveToJustBeforeWall(from, to, crossing.t, 0.25f); + + Log.d("MapMatch", + "Wall hit at (" + crossing.crossingPoint[0] + "," + crossing.crossingPoint[1] + ")" + + " → corrected to (" + corrected[0] + "," + corrected[1] + ")"); + + return toLatLng(corrected[0], corrected[1], c); + } + + + /** + * Decides whether a proposed floor change should be accepted. + * + * A floor change is accepted only if: + * - there is a confirmed current floor reference, + * - enough time has passed since the last floor change, + * - the barometric height change exceeds a threshold, + * - the user is plausibly near stairs or a lift, + * - the horizontal movement pattern matches either stairs or lift usage. + * + * If accepted, the method: + * - determines the adjacent destination floor, + * - snaps the destination to the nearest stairs/lift centre on that floor, + * - commits the new floor state, + * - redraws the correct floor overlay. + * + * @param correctedLocation Current corrected location on map + * @param oldLocation Previous location + * @param currentHeight Current barometric height estimate + * @return FloorChangeResult describing whether the floor changed and where to snap the user + */ + public FloorChangeResult acceptFloorChange(LatLng correctedLocation, + LatLng oldLocation, + float currentHeight) { + + if (currentVenue == null || + currentFloorKey == null || + correctedLocation == null || + oldLocation == null) { + return new FloorChangeResult(currentFloorKey, correctedLocation, false, null); + } + + if (confirmedFloorKey == null || Float.isNaN(confirmedFloorElevation)) { + Log.d("MapMatch", "No confirmed floor reference yet"); + return new FloorChangeResult(currentFloorKey, correctedLocation, false, null); + } + + long now = System.currentTimeMillis(); + if (now - lastFloorChangeTimeMs < MIN_FLOOR_CHANGE_INTERVAL_MS) { + Log.d("MapMatch", "Floor change blocked by debounce"); + return new FloorChangeResult(currentFloorKey, correctedLocation, false, null); + } + updateFloorTransitionState(correctedLocation, currentHeight); + + double horizontalDisplacement = + getFloorTransitionHorizontalDisplacement(correctedLocation); + + float heightChangeMeters = currentHeight - confirmedFloorElevation; + if (Math.abs(heightChangeMeters) < HEIGHT_THRESHOLD_METERS) { + Log.d("MapMatch", "Height change too small: " + heightChangeMeters); +// resetFloorTransitionState(); + return new FloorChangeResult(currentFloorKey, correctedLocation, false, null); + } + + IndoorVenue.FloorFeatures currentFloorFeatures = currentVenue.floorFeatures.get(confirmedFloorKey); + if (currentFloorFeatures == null) { + Log.d("MapMatch", "No floor features for confirmed floor: " + confirmedFloorKey); +// resetFloorTransitionState(); + return new FloorChangeResult(currentFloorKey, correctedLocation, false, null); + } + + int direction = heightChangeMeters > 0 ? 1 : -1; + String nextFloorKey = getAdjacentFloorKey(confirmedFloorKey, direction); + + Log.d("MapMatch", "confirmed floor: " + confirmedFloorKey); + Log.d("MapMatch", "current displayed floor: " + currentFloorKey); + Log.d("MapMatch", "candidate next floor: " + nextFloorKey); + Log.d("MapMatch", "heightChange=" + heightChangeMeters); + + if (nextFloorKey == null || !currentVenue.floorFeatures.containsKey(nextFloorKey)) { + Log.d("MapMatch", "Next floor invalid"); + return new FloorChangeResult(currentFloorKey, correctedLocation, false, null); + } + + IndoorVenue.FloorFeatures nextFloorFeatures = currentVenue.floorFeatures.get(nextFloorKey); + if (nextFloorFeatures == null) { + Log.d("MapMatch", "No floor features for destination floor: " + nextFloorKey); + return new FloorChangeResult(currentFloorKey, correctedLocation, false, null); + } + + boolean nearStairs = isNearAnyPoint( + correctedLocation, + currentFloorFeatures.stairsCenters, + STAIRS_THRESHOLD_METERS + ); + + boolean nearLift = isNearAnyPoint( + correctedLocation, + currentFloorFeatures.liftCenters, + LIFT_THRESHOLD_METERS + ); + + + boolean usedLift = nearLift && horizontalDisplacement < LIFT_HORIZONTAL_THRESHOLD_METERS; + boolean usedStairs = false; + + usedStairs = nearStairs && horizontalDisplacement >= LIFT_HORIZONTAL_THRESHOLD_METERS; + Log.d("MapMatch", "nearStairs=" + nearStairs + ", nearLift=" + nearLift); + Log.d("MapMatch", "horizontalDisplacement=" + horizontalDisplacement); + Log.d("MapMatch", "usedLift=" + usedLift + ", usedStairs=" + usedStairs); + + if (!usedLift && !usedStairs) { + Log.d("MapMatch", "Rejected floor change: not near stairs/lift in a plausible way"); + return new FloorChangeResult(currentFloorKey, correctedLocation, false, null); + } + LatLng highlightCenter = null; + + + + if (nextFloorKey.equals(confirmedFloorKey)) { + return new FloorChangeResult(currentFloorKey, correctedLocation, false, null); + } + + LatLng snappedDestination = correctedLocation; + + + if (usedLift) { + LatLng nearestLiftOnNextFloor = getNearestPoint(correctedLocation, nextFloorFeatures.liftCenters); + if (nearestLiftOnNextFloor != null) { + snappedDestination = nearestLiftOnNextFloor; + highlightCenter = nearestLiftOnNextFloor; + } + } else if (usedStairs) { + LatLng nearestStairsOnNextFloor = getNearestPoint(correctedLocation, nextFloorFeatures.stairsCenters); + highlightCenter = nearestStairsOnNextFloor; + + if (nearestStairsOnNextFloor != null) { + snappedDestination = nearestStairsOnNextFloor; + } + } + + commitAutoFloorChange(nextFloorKey, currentHeight); + lastFloorChangeTimeMs = now; + resetFloorTransitionState(); + + Log.d("MapMatch", "Accepted floor change to " + nextFloorKey + + " with snapped destination " + snappedDestination); + Log.d("MapMatch", "nextFloor stair count = " + + (nextFloorFeatures.stairsCenters == null ? 0 : nextFloorFeatures.stairsCenters.size())); + Log.d("MapMatch", "nextFloor lift count = " + + (nextFloorFeatures.liftCenters == null ? 0 : nextFloorFeatures.liftCenters.size())); + showFloor(nextFloorKey); + return new FloorChangeResult(nextFloorKey, snappedDestination, true, highlightCenter); + } + + + + + + /** + * Updates transition tracking state. + * Call this every update BEFORE computing horizontal displacement. + */ + private void updateFloorTransitionState(LatLng currentLocation, float currentHeight) { + if (currentLocation == null) return; + if (confirmedFloorKey == null || Float.isNaN(confirmedFloorElevation)) return; + + float heightDelta = currentHeight - confirmedFloorElevation; + float absDelta = Math.abs(heightDelta); + + // Case 1: Still clearly on the confirmed floor → keep refreshing anchor + if (absDelta < FLOOR_STABLE_BAND_METERS) { + lastStableFloorLocation = currentLocation; + + // If we had started a transition but came back, cancel it + floorTransitionInProgress = false; + floorTransitionStartLocation = null; + return; + } + + // Case 2: Height has meaningfully deviated → start transition (once) + if (!floorTransitionInProgress && + absDelta >= FLOOR_TRANSITION_START_THRESHOLD_METERS) { + + floorTransitionInProgress = true; + + // Prefer last stable location (more accurate than noisy trigger point) + floorTransitionStartLocation = (lastStableFloorLocation != null) + ? lastStableFloorLocation + : currentLocation; + + Log.d("MapMatch", "Started floor transition at " + floorTransitionStartLocation + + ", current location = " + currentLocation + + ", height delta = " + heightDelta); + } + } + + /** + * Returns horizontal displacement since transition began. + */ + private double getFloorTransitionHorizontalDisplacement(LatLng currentLocation) { + if (!floorTransitionInProgress || + floorTransitionStartLocation == null || + currentLocation == null) { + return 0.0; + } + + return distanceMeters(floorTransitionStartLocation, currentLocation); + } + + /** + * Call this after a successful floor change. + */ + private void resetFloorTransitionState() { + floorTransitionInProgress = false; + floorTransitionStartLocation = null; + lastStableFloorLocation = null; + } + private LatLng getNearestPoint(LatLng location, List centers) { + if (location == null || centers == null || centers.isEmpty()) { + return null; + } + + LatLng nearest = null; + double bestDist = Double.MAX_VALUE; + + for (LatLng center : centers) { + double d = distanceMeters(location, center); + if (d < bestDist) { + bestDist = d; + nearest = center; + } + } + + return nearest; + } + + public static class FloorChangeResult { + public final String floorKey; + public final LatLng snappedLocation; + public final boolean changedFloor; + + public LatLng highlightcenter; + + public FloorChangeResult(String floorKey, LatLng snappedLocation, boolean changedFloor, LatLng highlightcenter) { + this.floorKey = floorKey; + this.snappedLocation = snappedLocation; + this.changedFloor = changedFloor; + this.highlightcenter = highlightcenter; + } + } + + private void commitCurrentDisplayedFloor() { + if (currentFloorKey == null) return; + + confirmedFloorKey = currentFloorKey; + confirmedFloorElevation = SensorFusion.getInstance().getElevation(); + + Log.d("IndoorMapManager", "Confirmed floor: " + confirmedFloorKey + + " at elevation " + confirmedFloorElevation); + } + + /** + * Returns the floor key directly above or below a given floor. + * + * Floors are first sorted into building order (e.g. B2, B1, G, 1, 2, ...), + * then the next key is selected using the supplied direction. + * + * @param floorKey Current floor key + * @param direction +1 for up one floor, -1 for down one floor + * @return Adjacent floor key, or null if none exists + */ + private String getAdjacentFloorKey(String floorKey, int direction) { + if (currentVenue == null || currentVenue.rawMapShapes == null) return null; + + try { + JSONObject floorsObj = new JSONObject(currentVenue.rawMapShapes); + List floorKeys = getSortedFloorKeys(floorsObj); + + int idx = floorKeys.indexOf(floorKey); + if (idx < 0) return null; + + int next = idx + direction; + if (next < 0 || next >= floorKeys.size()) return null; + + return floorKeys.get(next); + + } catch (JSONException e) { + Log.e("IndoorMapManager", "getAdjacentFloorKey failed", e); + return null; + } + } + + /** + * Computes straight-line distance between two LatLng points in metres. + * + * Uses Android's Location.distanceBetween utility. + * + * @param a First point + * @param b Second point + * @return Distance in metres + */ + private double distanceMeters(LatLng a, LatLng b) { + float[] result = new float[1]; + android.location.Location.distanceBetween( + a.latitude, a.longitude, + b.latitude, b.longitude, + result + ); + return result[0]; } /** - * Setting the new floor of a user and displaying the indoor floor map accordingly - * (if floor exists in building) - * @param newFloor the floor the user is at - * @param autoFloor flag if function called by auto-floor feature + * Checks whether a location lies within a threshold distance of any point in a list. + * + * Used for access-point logic such as determining whether the user is close enough + * to stairs or a lift for a floor change to be plausible. + * + * @param location Location to test + * @param centers Candidate reference points + * @param thresholdMeters Distance threshold in metres + * @return true if location is near at least one point */ - public void setCurrentFloor(int newFloor, boolean autoFloor) { - if (BuildingPolygon.inNucleus(currentLocation)){ - //Special case for nucleus when auto-floor is being used - if (autoFloor) { - // If nucleus add bias floor as lower-ground floor referred to as floor 0 - newFloor += 1; + private boolean isNearAnyPoint(LatLng location, List centers, double thresholdMeters) { + + if (location == null || centers == null || centers.isEmpty()) { + return false; + } + + double result; + for (LatLng center : centers) { + result = distanceMeters(location, center); + if (result <= thresholdMeters) { + return true; + } + } + + return false; + } + + public LatLng computeCentroid(List> wallPolygons) { + if (wallPolygons == null || wallPolygons.isEmpty()) { + return null; + } + + double sumLat = 0.0; + double sumLon = 0.0; + int polyCount = 0; + + for (List polygon : wallPolygons) { + if (polygon == null || polygon.isEmpty()) continue; + + double polyLat = 0.0; + double polyLon = 0.0; + + for (LatLng point : polygon) { + polyLat += point.latitude; + polyLon += point.longitude; } - // If within bounds and different from floor map currently being shown - if (newFloor>=0 && newFloor=0 && newFloor floorKeys = getSortedFloorKeys(floorsObj); // already has all keys + + int idx = floorKeys.indexOf(currentFloorKey); + if (idx < 0) return; + + int next = idx + direction; + if (next >= 0 && next < floorKeys.size()) { + currentFloorKey = floorKeys.get(next); + clearIndoorFloor(); + drawFloor(floorsObj.getJSONObject(currentFloorKey), currentFloorKey); + isIndoorMapSet = true; + Log.d("IndoorMapManager", "Switched to floor: " + currentFloorKey); + bakeEnuCoordinates(SensorFusion.getInstance().getCoordinateConverter()); + + + // Delay the floor commit + floorCommitHandler.removeCallbacks(commitBrowsedFloorRunnable); + floorCommitHandler.postDelayed(commitBrowsedFloorRunnable, FLOOR_COMMIT_DELAY_MS); + } + + } catch (JSONException e) { + Log.e("IndoorMapManager", "Floor switch failed", e); } + } + /** + * Displays a specific floor immediately. + * + * Clears the existing floor overlay, redraws the requested floor, and rebakes + * ENU wall coordinates for map matching. + * + * Unlike delayed browsing logic, this is typically used when the floor should + * be shown directly, such as after an accepted automatic floor change. + * + * @param floorKey Floor key to display + */ + private void showFloor(String floorKey) { + if (currentVenue == null || currentVenue.rawMapShapes == null || floorKey == null) return; + + try { + JSONObject floorsObj = new JSONObject(currentVenue.rawMapShapes); + + currentFloorKey = floorKey; + clearIndoorFloor(); + Log.d("showFloor", "drawing floor "+ currentFloorKey); + drawFloor(floorsObj.getJSONObject(currentFloorKey), currentFloorKey); + isIndoorMapSet = true; + bakeEnuCoordinates(SensorFusion.getInstance().getCoordinateConverter()); + + Log.d("IndoorMapManager", "Showing floor: " + currentFloorKey); + + } catch (JSONException e) { + Log.e("IndoorMapManager", "Failed to show floor: " + floorKey, e); + } } /** - * Increments the Current Floor and changes to higher floor's map (if a higher floor exists) + * Immediately commits an automatically detected floor change. + * + * Updates both the displayed floor and the confirmed floor reference, stores the + * elevation at which the change was accepted, cancels any pending delayed floor + * commit, and redraws the new floor overlay. + * + * @param newFloorKey Newly accepted floor + * @param elevation Elevation associated with the accepted floor change */ - public void increaseFloor(){ - this.setCurrentFloor(currentFloor+1,false); + private void commitAutoFloorChange(String newFloorKey, float elevation) { + currentFloorKey = newFloorKey; + confirmedFloorKey = newFloorKey; + confirmedFloorElevation = elevation; + + floorCommitHandler.removeCallbacks(commitBrowsedFloorRunnable); + + try { + JSONObject floorsObj = new JSONObject(currentVenue.rawMapShapes); + clearIndoorFloor(); + drawFloor(floorsObj.getJSONObject(currentFloorKey), currentFloorKey); + isIndoorMapSet = true; + bakeEnuCoordinates(SensorFusion.getInstance().getCoordinateConverter()); + } catch (JSONException e) { + Log.e("IndoorMapManager", "Auto floor redraw failed", e); + } + + Log.d("IndoorMapManager", "AUTO confirmed floor: " + confirmedFloorKey + + " at elevation " + confirmedFloorElevation); } + + + /** + * Draw a single floor from GeoJSON FeatureCollection. + */ + private void drawFloor(JSONObject floorGeoJson, String floorKey) throws JSONException { + + IndoorVenue.FloorFeatures features = new IndoorVenue.FloorFeatures(); + + JSONArray featuresArray = floorGeoJson.getJSONArray("features"); + + for (int i = 0; i < featuresArray.length(); i++) { + + JSONObject feature = featuresArray.getJSONObject(i); + + JSONObject props = feature.optJSONObject("properties"); + String indoorType = props != null ? props.optString("indoor_type", "") : ""; + String t = indoorType == null ? "" : indoorType.toLowerCase(); + + JSONObject geometry = feature.getJSONObject("geometry"); + String geomType = geometry.optString("type", ""); + + if (!"MultiPolygon".equalsIgnoreCase(geomType)) continue; + + JSONArray multiPoly = geometry.getJSONArray("coordinates"); + + // Style defaults + int strokeColor = Color.argb(220, 20, 20, 20); + int fillColor = Color.argb(25, 60, 130, 255); + float strokeWidth = 2.0f; + + if (t.contains("wall")) { + fillColor = Color.argb(0, 250, 0, 0); + strokeWidth = 3.5f; + } else if (t.contains("lift")) { + strokeColor = Color.BLUE; + fillColor = Color.argb(0, 0, 0, 0); + strokeWidth = 8f; + } else if (t.contains("stairs")) { + strokeColor = Color.YELLOW; + fillColor = Color.argb(35, 60, 130, 255); + strokeWidth = 8f; + } else if (t.contains("room") || t.contains("area")) { + fillColor = Color.argb(30, 60, 130, 255); + strokeWidth = 1.2f; + } else { + fillColor = Color.argb(15, 60, 130, 255); + strokeWidth = 1.0f; + } + + for (int j = 0; j < multiPoly.length(); j++) { + + JSONArray polygon = multiPoly.getJSONArray(j); + if (polygon.length() == 0) continue; + + JSONArray outerRing = polygon.getJSONArray(0); + List outerPoints = toLatLngList(outerRing); + + if (outerPoints.size() < 3) continue; + if (isTiny(outerPoints)) continue; + + // Store by type for map matching + if (t.contains("wall")) { + features.wallPolygons.add(outerPoints); + } else if (t.contains("stair")) { + features.stairsCenters.add(centroidOf(outerPoints)); + } else if (t.contains("lift") || t.contains("elevator")) { + features.liftCenters.add(centroidOf(outerPoints)); + } + Log.d("IndoorTypes", "Feature " + i + " indoor_type='" + indoorType + + "' geomType=" + geomType + " points=" + outerPoints.size()); + + PolygonOptions opts = new PolygonOptions() + .addAll(outerPoints) + .strokeColor(strokeColor) + .strokeWidth(strokeWidth) + .fillColor(fillColor); + + for (int k = 1; k < polygon.length(); k++) { + JSONArray holeRing = polygon.getJSONArray(k); + List holePoints = toLatLngList(holeRing); + if (holePoints.size() >= 3) { + opts.addHole(holePoints); + } + } + + Polygon polyObj = gMap.addPolygon(opts); + activeFloorPolygons.add(polyObj); + + if (props != null) { + Log.d("IndoorTypes", "Found indoor_type=" + indoorType); + } + } + } + + // Store features on current venue + if (currentVenue != null) { + currentVenue.floorFeatures.put(floorKey, features); + Log.d("IndoorMapManager", "Floor " + floorKey + + " walls=" + features.wallPolygons.size() + + " stairs=" + features.stairsCenters.size() + + " lifts=" + features.liftCenters.size()); + } + } /** - * Decrements the Current Floor and changes to the lower floor's map (if a lower floor exists) + * Convert a GeoJSON ring ([[lon,lat], ...]) into List. + * GeoJSON uses [lon,lat] order. */ - public void decreaseFloor(){ - this.setCurrentFloor(currentFloor-1,false); + private List toLatLngList(JSONArray ring) throws JSONException { + List points = new ArrayList<>(ring.length()); + for (int m = 0; m < ring.length(); m++) { + JSONArray coord = ring.getJSONArray(m); + double lon = coord.getDouble(0); + double lat = coord.getDouble(1); + points.add(new LatLng(lat, lon)); + } + return points; + } + + private LatLng centroidOf(List pts) { + double lat = 0, lon = 0; + for (LatLng p : pts) { lat += p.latitude; lon += p.longitude; } + return new LatLng(lat / pts.size(), lon / pts.size()); } /** - * Sets the map overlay for the building if user's current - * location is in building and is not already set - * Removes the overlay if user no longer in building + * Heuristic to drop tiny polygons that clutter the view. + * Adjust thresholds if needed. */ - private void setBuildingOverlay() { - // Try catch block to prevent fatal crashes + private boolean isTiny(List pts) { + double minLat = Double.POSITIVE_INFINITY, minLon = Double.POSITIVE_INFINITY; + double maxLat = Double.NEGATIVE_INFINITY, maxLon = Double.NEGATIVE_INFINITY; + + for (LatLng p : pts) { + minLat = Math.min(minLat, p.latitude); + minLon = Math.min(minLon, p.longitude); + maxLat = Math.max(maxLat, p.latitude); + maxLon = Math.max(maxLon, p.longitude); + } + + double dLat = maxLat - minLat; + double dLon = maxLon - minLon; + + // ~1e-6 deg is ~0.11m lat-wise; tune as needed + return (dLat * dLon) < 2e-12; + } + + + + private List getSortedFloorKeys(JSONObject floorsObj) throws JSONException { + List keys = new ArrayList<>(); + Iterator it = floorsObj.keys(); + while (it.hasNext()) keys.add(it.next()); + + keys.sort((a, b) -> Integer.compare(floorOrderValue(a), floorOrderValue(b))); + return keys; + } + + private int floorOrderValue(String key) { + // Basement floors: B3 < B2 < B1 + if (key == null) return 9999; + key = key.trim().toUpperCase(); + + if (key.startsWith("B")) { + try { + int n = Integer.parseInt(key.substring(1)); + return -100 - n; // B3 -> -103, B1 -> -101 + } catch (Exception ignored) { + return -150; + } + } + + // Ground floor + if (key.equals("G") || key.equals("GF") || key.equals("GROUND")) return 0; + + // Numeric floors try { - // Setting overlay if in Nucleus and not already set - if (BuildingPolygon.inNucleus(currentLocation) && !isIndoorMapSet) { - groundOverlay = gMap.addGroundOverlay(new GroundOverlayOptions() - .image(BitmapDescriptorFactory.fromResource(R.drawable.nucleusg)) - .positionFromBounds(NUCLEUS)); - isIndoorMapSet = true; - // Nucleus has an LG floor so G floor is at index 1 - currentFloor=1; - floorHeight=NUCLEUS_FLOOR_HEIGHT; - } - // Setting overlay if in Library and not already set - else if (BuildingPolygon.inLibrary(currentLocation) && !isIndoorMapSet) { - groundOverlay = gMap.addGroundOverlay(new GroundOverlayOptions() - .image(BitmapDescriptorFactory.fromResource(R.drawable.libraryg)) - .positionFromBounds(LIBRARY)); - isIndoorMapSet = true; - currentFloor=0; - floorHeight=LIBRARY_FLOOR_HEIGHT; - } - // Removing overlay if user no longer in area with indoor maps available - else if (!BuildingPolygon.inLibrary(currentLocation) && - !BuildingPolygon.inNucleus(currentLocation)&& isIndoorMapSet){ - groundOverlay.remove(); - isIndoorMapSet = false; - currentFloor=0; - } - } catch (Exception ex) { - Log.e("Error with overlay, Exception:", ex.toString()); - } - } - - /** - * Function used to set the indication of available floor maps for building using green Polylines - * along the building's boundaries. - */ - public void setIndicationOfIndoorMap(){ - //Indicator for Nucleus Building - List points=BuildingPolygon.NUCLEUS_POLYGON; - // Closing Boundary - points.add(BuildingPolygon.NUCLEUS_POLYGON.get(0)); - gMap.addPolyline(new PolylineOptions().color(Color.GREEN) - .addAll(points)); - - // Indicator for the Library Building - points=BuildingPolygon.LIBRARY_POLYGON; - // Closing Boundary - points.add(BuildingPolygon.LIBRARY_POLYGON.get(0)); - gMap.addPolyline(new PolylineOptions().color(Color.GREEN) - .addAll(points)); - } -} + return Integer.parseInt(key); + } catch (Exception ignored) { + return 1000; + } + } + + /** + * Removes currently drawn indoor floor polygons. + */ + private void clearIndoorFloor() { + for (Polygon p : activeFloorPolygons) { + p.remove(); + } + activeFloorPolygons.clear(); + + } + + public void clearSelection() { + clearIndoorFloor(); + currentVenue = null; + currentFloorKey = null; + isIndoorMapSet = false; + } + + + + /** + * Getter to obtain if currently an indoor floor map is being displayed + */ + public boolean getIsIndoorMapSet() { + return isIndoorMapSet; + } + + public String getCurrentFloorKey() { + return currentFloorKey; + } + + public String getConfirmedFloorKey() { + return confirmedFloorKey; + } + + public float getConfirmedFloorElevation() { + return confirmedFloorElevation; + } + + public IndoorVenue getCurrentVenue() { return currentVenue; } + + public IndoorVenue.FloorFeatures getCurrentFloorFeatures() { + if (currentVenue == null || currentFloorKey == null) return null; + return currentVenue.floorFeatures.get(currentFloorKey); + } + + +} \ No newline at end of file diff --git a/app/src/main/java/com/openpositioning/PositionMe/utils/PathView.java b/app/src/main/java/com/openpositioning/PositionMe/utils/PathView.java index 5a5efa8d..c56cd47a 100644 --- a/app/src/main/java/com/openpositioning/PositionMe/utils/PathView.java +++ b/app/src/main/java/com/openpositioning/PositionMe/utils/PathView.java @@ -27,7 +27,7 @@ */ public class PathView extends View { // Set up drawing colour - private final int paintColor = Color.BLUE; + private final int paintColor = Color.parseColor("#BBF060"); // Defines paint and canvas private Paint drawPaint; // Path of straight lines diff --git a/app/src/main/java/com/openpositioning/PositionMe/utils/PermissionManager.java b/app/src/main/java/com/openpositioning/PositionMe/utils/PermissionManager.java index 40c937ab..22e41823 100644 --- a/app/src/main/java/com/openpositioning/PositionMe/utils/PermissionManager.java +++ b/app/src/main/java/com/openpositioning/PositionMe/utils/PermissionManager.java @@ -57,12 +57,32 @@ public PermissionManager(Activity activity, PermissionCallback callback) { requiredPermissions.add(Manifest.permission.ACCESS_COARSE_LOCATION); requiredPermissions.add(Manifest.permission.ACCESS_WIFI_STATE); requiredPermissions.add(Manifest.permission.CHANGE_WIFI_STATE); + + // Add BLE permissions based on Android version + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + // Android 12+ (API 31+) + requiredPermissions.add(Manifest.permission.BLUETOOTH_SCAN); + requiredPermissions.add(Manifest.permission.BLUETOOTH_CONNECT); + android.util.Log.i("PermissionManager", "Added Android 12+ BLE permissions"); + } else { + // Android 11 and below + requiredPermissions.add(Manifest.permission.BLUETOOTH); + requiredPermissions.add(Manifest.permission.BLUETOOTH_ADMIN); + android.util.Log.i("PermissionManager", "Added Android 11- BLE permissions"); + } + // For API < 29, also request broad storage permissions // For API >= 29, also request ACTIVITY_RECOGNITION // (We can do the check here or just always add them; the OS will skip as needed.) requiredPermissions.add(Manifest.permission.WRITE_EXTERNAL_STORAGE); requiredPermissions.add(Manifest.permission.READ_EXTERNAL_STORAGE); requiredPermissions.add(Manifest.permission.ACTIVITY_RECOGNITION); + + // Log all permissions + android.util.Log.i("PermissionManager", "Total permissions to request: " + requiredPermissions.size()); + for (String perm : requiredPermissions) { + android.util.Log.i("PermissionManager", " - " + perm); + } } /** diff --git a/app/src/main/java/com/openpositioning/PositionMe/utils/VenueMapper.java b/app/src/main/java/com/openpositioning/PositionMe/utils/VenueMapper.java new file mode 100644 index 00000000..5c42888b --- /dev/null +++ b/app/src/main/java/com/openpositioning/PositionMe/utils/VenueMapper.java @@ -0,0 +1,306 @@ +/** + * VenueMapper is responsible for converting raw API response objects + * (FloorPlanData.VenueDto) into IndoorMapManager.IndoorVenue objects + * that can be rendered and managed by the map layer. + * + * It parses the GeoJSON building outline into a list of LatLng points, + * computes bounding boxes for overlay placement, and stores raw + * floor map (mapShapes) data for later floor rendering. + * + * This class isolates data transformation logic from both the + * networking layer (FloorPlanData) and the UI layer + * (TrajectoryMapFragment / IndoorMapManager), maintaining a clear + * separation of concerns and improving maintainability. + */ + +package com.openpositioning.PositionMe.utils; + +//load venue into internal model + +import android.util.Log; + +import com.google.android.gms.maps.model.LatLng; +import com.google.android.gms.maps.model.LatLngBounds; +import com.openpositioning.PositionMe.data.remote.FloorPlanData; + +import org.json.JSONArray; +import org.json.JSONObject; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +public class VenueMapper { + + public static List toIndoorVenues(List dtos) { + List out = new ArrayList<>(); + Log.d("VenueMapper", "toIndoorVenues called, dtos=" + dtos.size()); + + for (FloorPlanData.VenueDto dto : dtos) { + Log.d("VenueMapper", "Processing dto name=" + dto.name + + " outline length=" + (dto.outline == null ? "null" : dto.outline.length()) + + " mapShapes length=" + (dto.mapShapes == null ? "null" : dto.mapShapes.length())); + try { + List outline = parseOutlineGeoJson(dto.outline); + Log.d("VenueMapper", "Parsed outline points=" + outline.size()); + if (outline.isEmpty()) continue; + // rest unchanged + + IndoorMapManager.IndoorVenue v = new IndoorMapManager.IndoorVenue(); + v.name = dto.name; + v.venueId = dto.name; // placeholder (API may provide an id field later) + v.outline = outline; + v.bounds = computeBounds(outline); + v.rawMapShapes = dto.mapShapes; + Log.d("VenueMapper", "mapShapes example: " + dto.mapShapes); + v.floorFeatures = parseFloorFeatures(dto.mapShapes); +// Log.d("VenueMapper", "Floor " + v.floorKey + +// " walls=" + v.floorFeatures.wallPolygons.size() + +// " stairs=" + v.floorFeatures.stairsCenters.size() + +// " lifts=" + v.floorFeatures.liftCenters.size()); + + out.add(v); + + } catch (Exception e) { + Log.e("VenueMapper", "Failed mapping venue " + dto.name, e); + } + } + + return out; + } + + /** + * extracts the building outline coordinates from a GeoJSON string and + * converts them into a list of LatLng points that Android/Google Maps can use + */ + private static List parseOutlineGeoJson(String outlineJsonString) throws Exception { + List pts = new ArrayList<>(); + if (outlineJsonString == null || outlineJsonString.isEmpty()) return pts; + + JSONObject object = new JSONObject(outlineJsonString); + JSONArray features = object.optJSONArray("features"); + if (features == null || features.length() == 0) return pts; + + JSONObject geom = features.getJSONObject(0).getJSONObject("geometry"); + String type = geom.optString("type", ""); + + JSONArray coordinates = geom.getJSONArray("coordinates"); + + // MultiPolygon: coordinates[ polygon ][ ring ][ point ][ lon/lat ] + // Polygon: coordinates[ ring ][ point ][ lon/lat ] + JSONArray boundary; + + if ("MultiPolygon".equalsIgnoreCase(type)) { + boundary = coordinates.getJSONArray(0).getJSONArray(0); + } else if ("Polygon".equalsIgnoreCase(type)) { + boundary = coordinates.getJSONArray(0); + } else { + return pts; + } + + for (int i = 0; i < boundary.length(); i++) { + JSONArray p = boundary.getJSONArray(i); + double lon = p.getDouble(0); + double lat = p.getDouble(1); + pts.add(new LatLng(lat, lon)); + } + + return pts; + } + + /** + * takes a string of shape, gets JSON object, + */ + private static Map + parseFloorFeatures(String shapes) throws Exception { + + Map floors = new HashMap<>(); + + if (shapes == null || shapes.isEmpty()) { + return floors; + } + + JSONObject floorsObj = new JSONObject(shapes); + Iterator floorKeys = floorsObj.keys(); + + while (floorKeys.hasNext()) { + String floorKey = floorKeys.next(); + + JSONObject floorGeoJson = floorsObj.getJSONObject(floorKey); + JSONArray features = floorGeoJson.optJSONArray("features"); + + IndoorMapManager.IndoorVenue.FloorFeatures floorFeatures = + new IndoorMapManager.IndoorVenue.FloorFeatures(); + + if (features == null) { + floors.put(floorKey, floorFeatures); + continue; + } + + for (int i = 0; i < features.length(); i++) { + JSONObject feature = features.getJSONObject(i); + + JSONObject properties = feature.optJSONObject("properties"); + JSONObject geometry = feature.optJSONObject("geometry"); + + if (properties == null || geometry == null) { + continue; + } + + String indoorType = properties.optString("indoor_type", ""); + + if ("wall".equalsIgnoreCase(indoorType)) { + List poly = parsePolygon(geometry); + if (!poly.isEmpty()) { + floorFeatures.wallPolygons.add(poly); + } + } else if ("stairs".equalsIgnoreCase(indoorType)) { + LatLng p = parsePointOrCenter(geometry); + if (p != null) { + floorFeatures.stairsCenters.add(p); + } + } else if ("lift".equalsIgnoreCase(indoorType)) { + LatLng p = parsePointOrCenter(geometry); + if (p != null) { + floorFeatures.liftCenters.add(p); + } + } + } + Log.d("VenueMapper", "Floor " + floorKey + + " walls=" + floorFeatures.wallPolygons.size() + + " stairs=" + floorFeatures.stairsCenters.size() + + " lifts=" + floorFeatures.liftCenters.size()); + + floors.put(floorKey, floorFeatures); + } + + return floors; + } + private static List parsePolygon(JSONObject geometry) throws Exception { + List pts = new ArrayList<>(); + + if (geometry == null) { + return pts; + } + + String type = geometry.optString("type", ""); + JSONArray coords = geometry.optJSONArray("coordinates"); + + if (coords == null || coords.length() == 0) { + return pts; + } + + JSONArray ring = null; + + if ("MultiPolygon".equalsIgnoreCase(type)) { + JSONArray polygon = coords.optJSONArray(0); + if (polygon == null || polygon.length() == 0) { + return pts; + } + + ring = polygon.optJSONArray(0); + if (ring == null || ring.length() == 0) { + return pts; + } + + } else if ("Polygon".equalsIgnoreCase(type)) { + ring = coords.optJSONArray(0); + if (ring == null || ring.length() == 0) { + return pts; + } + + } else { + return pts; + } + + for (int i = 0; i < ring.length(); i++) { + JSONArray p = ring.optJSONArray(i); + if (p == null || p.length() < 2) { + continue; + } + + double lon = p.getDouble(0); + double lat = p.getDouble(1); + pts.add(new LatLng(lat, lon)); + } + + return pts; + } + + + + private static List parseLineString(JSONObject geometry) throws Exception { + List pts = new ArrayList<>(); + + if (!"LineString".equalsIgnoreCase(geometry.optString("type", ""))) { + return pts; + } + + JSONArray coordinates = geometry.getJSONArray("coordinates"); + for (int i = 0; i < coordinates.length(); i++) { + JSONArray p = coordinates.getJSONArray(i); + double lon = p.getDouble(0); + double lat = p.getDouble(1); + pts.add(new LatLng(lat, lon)); + } + + return pts; + } + + private static LatLng parsePointOrCenter(JSONObject geometry) throws Exception { + String type = geometry.optString("type", ""); + + if ("Point".equalsIgnoreCase(type)) { + JSONArray coordinates = geometry.getJSONArray("coordinates"); + double lon = coordinates.getDouble(0); + double lat = coordinates.getDouble(1); + return new LatLng(lat, lon); + } + + if ("Polygon".equalsIgnoreCase(type) || "MultiPolygon".equalsIgnoreCase(type)) { + List poly = parsePolygon(geometry); + if (!poly.isEmpty()) { + return computeCenter(poly); + } + } + + return null; + } + + private static LatLng computeCenter(List pts) { + if (pts == null || pts.isEmpty()) return null; + + double sumLat = 0.0; + double sumLon = 0.0; + + for (LatLng p : pts) { + sumLat += p.latitude; + sumLon += p.longitude; + } + + return new LatLng(sumLat / pts.size(), sumLon / pts.size()); + } + + /** + * finds the smallest rectangle completely containing all points + */ + private static LatLngBounds computeBounds(List pts) { + double minLat = Double.POSITIVE_INFINITY, minLon = Double.POSITIVE_INFINITY; + double maxLat = Double.NEGATIVE_INFINITY, maxLon = Double.NEGATIVE_INFINITY; + + for (LatLng p : pts) { + minLat = Math.min(minLat, p.latitude); + minLon = Math.min(minLon, p.longitude); + maxLat = Math.max(maxLat, p.latitude); + maxLon = Math.max(maxLon, p.longitude); + } + + return new LatLngBounds( + new LatLng(minLat, minLon), + new LatLng(maxLat, maxLon) + ); + } +} + diff --git a/app/src/main/proto/traj.proto b/app/src/main/proto/traj.proto index 95d8b0ac..13b9270b 100644 --- a/app/src/main/proto/traj.proto +++ b/app/src/main/proto/traj.proto @@ -1,134 +1,168 @@ syntax = "proto3"; +option java_outer_classname = "Traj"; +option java_multiple_files = false; +option java_package = "com.openpositioning.PositionMe"; + message Trajectory { -string android_version = 1; -repeated Motion_Sample imu_data = 2; -repeated Pdr_Sample pdr_data = 3; -repeated Position_Sample position_data = 4; -repeated Pressure_Sample pressure_data = 5; -repeated Light_Sample light_data = 6; - -repeated GNSS_Sample gnss_data = 7; -repeated WiFi_Sample wifi_data = 8; -repeated AP_Data aps_data = 9; - -// 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) -int64 start_timestamp = 10; -string data_identifier = 11; -Sensor_Info accelerometer_info = 12; -Sensor_Info gyroscope_info = 13; -Sensor_Info rotation_vector_info = 14; -Sensor_Info magnetometer_info = 15; -Sensor_Info barometer_info = 16; -Sensor_Info light_sensor_info = 17; - -} - -message Pdr_Sample { -// milliseconds from the start_timestamp -int64 relative_timestamp = 1; - -// 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 -float x = 2; -float y = 3; -} - - -message Motion_Sample { + string android_version = 1; + // version 2.0 + float trajectory_version = 2; + // trajectory id/name for identification + string trajectory_id = 3; + repeated IMUReading imu_data = 4; + repeated RelativePosition pdr_data = 5; + repeated MagnetometerReading magnetometer_data = 6; + repeated BarometerReading pressure_data = 7; + repeated LightReading light_data = 8; + repeated ProximityReading proximity_data = 9; + + repeated GNSSReading gnss_data = 10; + repeated Fingerprint wifi_fingerprints = 11; + repeated WiFiAPData aps_data = 12; + repeated WiFiRTTReading wifi_rtt_data = 13; + repeated Fingerprint ble_fingerprints = 14; + repeated BleData ble_data = 15; + + // 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) + int64 start_timestamp = 16; + GNSSPosition initial_position = 17; + repeated GNSSPosition corrected_positions = 18; + + SensorInfo accelerometer_info = 19; + SensorInfo gyroscope_info = 20; + SensorInfo rotation_vector_info = 21; + SensorInfo magnetometer_info = 22; + SensorInfo barometer_info = 23; + SensorInfo light_SensorInfo = 24; + SensorInfo proximity_info = 25; + + repeated GNSSPosition test_points = 26; +} + +message RelativePosition { + // milliseconds from the start_timestamp + int64 relative_timestamp = 1; + + // 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 + float x = 2; + float y = 3; +} + +message IMUReading { // milliseconds int64 relative_timestamp = 1; - // m/s^2 - float acc_x = 2; - float acc_y = 3; - float acc_z = 4; + // Accelerometer [m/s^2] + Vector3 acc = 2; - // radians/s - float gyr_x = 5; - float gyr_y = 6; - float gyr_z = 7; + // Gyroscope [radians/s] + Vector3 gyr = 3; - // unitless, 4 components should sum to ~1 - float rotation_vector_x = 8; - float rotation_vector_y = 9; - float rotation_vector_z = 10; - float rotation_vector_w = 11; + // Orientation [unitless], 4 components should square sum to ~1 + Quaternion rotation_vector = 4; - // Integer - int32 step_count = 12; + // Number of steps so far + int32 step_count = 5; } -message Position_Sample { +message MagnetometerReading { int64 relative_timestamp = 1; - // uT - float mag_x = 2; - float mag_y = 3; - float mag_z = 4; + // Magnetometer [uT] + Vector3 mag = 2; } -message Pressure_Sample { +message BarometerReading { int64 relative_timestamp = 1; // mbar float pressure = 2; - } -message Light_Sample { + +message LightReading { int64 relative_timestamp = 1; // lux float light = 2; } -message GNSS_Sample { + +message ProximityReading { + int64 relative_timestamp = 1; + // cm + float distance = 2; +} + +message GNSSPosition { int64 relative_timestamp = 1; // degrees (minimum 6 significant figures) // latitude between -90 and 90 - float latitude = 2; - + double latitude = 2; // longitude between -180 and 180 - float longitude = 3; - - //metres - float altitude = 4; - + double longitude = 3; // metres - float accuracy = 5; + double altitude = 4; + // floor name + optional string floor = 5; +} +message GNSSReading { + GNSSPosition position = 1; + // metres + float accuracy = 2; // m/s - float speed = 6; + float speed = 3; + // degrees + float bearing = 4; // e.g 'gps' or 'network' - string provider = 7; + string provider = 5; } -message WiFi_Sample { +message Fingerprint { int64 relative_timestamp = 1; - repeated Mac_Scan mac_scans = 2; - + repeated RFScan rf_scans = 2; } -message Mac_Scan { +message RFScan { int64 relative_timestamp = 1; - // Integer encoding of the hex mac address + // Integer encoding of the hex mac address (BSSID) // e.g. 207394925843984 int64 mac = 2; // rssi integer in dBm. // typically between -120 and -10 int32 rssi = 3; + + // returned position + optional GNSSPosition position = 4; } -message AP_Data { - // Integer encoding of the hex mac address +message WiFiRTTReading { + int64 relative_timestamp = 1; + // Integer encoding of the hex mac address (BSSID) + // e.g. 207394925843984 + int64 mac = 2; + + // in mm + float distance = 3; + // in mm + float distance_std = 4; + // rssi integer in dBm. + // typically between -120 and -10 + int32 rssi = 5; +} + +message WiFiAPData { + // Integer encoding of the hex mac address (BSSID) // e.g. 207394925843984 int64 mac = 1; @@ -137,13 +171,41 @@ message AP_Data { // Typically 2.4GHz or 5GHz int64 frequency = 3; + + // Flag to indicate if the AP supports RTT measurements + bool rtt_enabled = 4; +} + +message BleData { + string mac_address = 1; + string name = 2; + int32 tx_power_level = 3; + int32 advertise_flags = 4; + repeated string service_uuids = 5; + bytes manufacturer_data = 6; +} + +// --- Common Types --- +message Vector3 { + float x = 1; + float y = 2; + float z = 3; +} + +message Quaternion { + float x = 1; + float y = 2; + float z = 3; + float w = 4; } -message Sensor_Info { +message SensorInfo { string name = 1; string vendor = 2; float resolution = 3; float power = 4; int32 version = 5; int32 type = 6; + float max_range = 7; + float frequency = 8; } \ No newline at end of file diff --git a/app/src/main/res/drawable/baseline_add_location_24.xml b/app/src/main/res/drawable/baseline_add_location_24.xml new file mode 100644 index 00000000..9e099e9d --- /dev/null +++ b/app/src/main/res/drawable/baseline_add_location_24.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/drawable/down_arrow.png b/app/src/main/res/drawable/down_arrow.png new file mode 100644 index 00000000..efbc9e50 Binary files /dev/null and b/app/src/main/res/drawable/down_arrow.png differ diff --git a/app/src/main/res/drawable/up_arrow.png b/app/src/main/res/drawable/up_arrow.png new file mode 100644 index 00000000..9220c248 Binary files /dev/null and b/app/src/main/res/drawable/up_arrow.png differ diff --git a/app/src/main/res/layout/fragment_correction.xml b/app/src/main/res/layout/fragment_correction.xml index ce536570..0f48b150 100644 --- a/app/src/main/res/layout/fragment_correction.xml +++ b/app/src/main/res/layout/fragment_correction.xml @@ -53,31 +53,40 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="10dp"> + + app:layout_constraintTop_toBottomOf="@id/toggle_pdr" + app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintStart_toStartOf="parent" /> + app:layout_constraintTop_toTopOf="@id/correctStepLabel" + app:layout_constraintBottom_toBottomOf="@id/correctStepLabel" + app:layout_constraintEnd_toEndOf="parent"> + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0.0" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_recording.xml b/app/src/main/res/layout/fragment_recording.xml index c04381a5..15372615 100644 --- a/app/src/main/res/layout/fragment_recording.xml +++ b/app/src/main/res/layout/fragment_recording.xml @@ -6,6 +6,14 @@ android:layout_height="match_parent"> + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,27 +317,46 @@ + + + + app:iconSize="24dp" + app:iconTint="@color/md_theme_onSecondary" /> - + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_trajectory_map.xml b/app/src/main/res/layout/fragment_trajectory_map.xml index a8ab9118..1f9848f8 100644 --- a/app/src/main/res/layout/fragment_trajectory_map.xml +++ b/app/src/main/res/layout/fragment_trajectory_map.xml @@ -1,6 +1,7 @@ @@ -29,41 +30,183 @@ android:layout_height="wrap_content" android:orientation="vertical" android:padding="8dp" - android:gravity="center"> + android:gravity="start"> - + + android:orientation="horizontal" + android:gravity="center_vertical" + android:padding="4dp"> - + + + + + - + + android:orientation="vertical" + android:visibility="gone"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -71,29 +214,58 @@ android:layout_width="match_parent" android:layout_height="match_parent"> + + + app:tint="@android:color/black" /> + + + + + + + app:tint="@android:color/black" /> + + diff --git a/app/src/main/res/layout/item_testpoint_row.xml b/app/src/main/res/layout/item_testpoint_row.xml new file mode 100644 index 00000000..9aa15c48 --- /dev/null +++ b/app/src/main/res/layout/item_testpoint_row.xml @@ -0,0 +1,28 @@ + + + + + + + + + diff --git a/app/src/main/res/layout/item_upload_card_view.xml b/app/src/main/res/layout/item_upload_card_view.xml index 465ea27f..9c7d2b06 100644 --- a/app/src/main/res/layout/item_upload_card_view.xml +++ b/app/src/main/res/layout/item_upload_card_view.xml @@ -8,79 +8,139 @@ + app:cardBackgroundColor="@color/md_theme_tertiaryContainer"> + + + + + + + + + + + + + app:layout_constraintVertical_bias="0.571" /> - + + + app:layout_constraintTop_toBottomOf="@id/trajectoryDateItem" + app:layout_constraintVertical_bias="0.0" /> - + app:layout_constraintVertical_bias="0.0" /> + + - + + + app:layout_constraintVertical_bias="1.0" /> + + + + + - + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a2fa6043..fcf2caab 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -136,5 +136,14 @@ Play End Exit + Mark Point + Smooth Path + Floor G + PDR Path + Smooth Path + GNSS Path + Particle Cloud + + Map Controls \ No newline at end of file diff --git a/app/src/main/res/xml/root_preferences.xml b/app/src/main/res/xml/root_preferences.xml index 65793d88..33c1f89d 100644 --- a/app/src/main/res/xml/root_preferences.xml +++ b/app/src/main/res/xml/root_preferences.xml @@ -67,6 +67,20 @@ + + + + + + \ No newline at end of file + diff --git a/build.gradle b/build.gradle index e208c000..5bc60f64 100644 --- a/build.gradle +++ b/build.gradle @@ -1,12 +1,18 @@ // Top-level build file buildscript { + ext { + + agp_version = '8.7.1' + agp_version = '8.7.1' + + } repositories { google() mavenCentral() } dependencies { // NOTE: Only classpath deps (plugins) go here - classpath 'com.android.tools.build:gradle:8.8.0' + classpath "com.android.tools.build:gradle:$agp_version" classpath 'com.google.gms:google-services:4.4.2' def nav_version = "2.5.3" classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version" diff --git a/proto_gen/com/openpositioning/PositionMe/Traj.java b/proto_gen/com/openpositioning/PositionMe/Traj.java new file mode 100644 index 00000000..7755fc84 --- /dev/null +++ b/proto_gen/com/openpositioning/PositionMe/Traj.java @@ -0,0 +1,21107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: traj.proto +// Protobuf Java Version: 4.29.6 + +package com.openpositioning.PositionMe; + +public final class Traj { + private Traj() {} + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + Traj.class.getName()); + } + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface TrajectoryOrBuilder extends + // @@protoc_insertion_point(interface_extends:Trajectory) + com.google.protobuf.MessageOrBuilder { + + /** + * string android_version = 1; + * @return The androidVersion. + */ + java.lang.String getAndroidVersion(); + /** + * string android_version = 1; + * @return The bytes for androidVersion. + */ + com.google.protobuf.ByteString + getAndroidVersionBytes(); + + /** + *
+     * version 2.0
+     * 
+ * + * float trajectory_version = 2; + * @return The trajectoryVersion. + */ + float getTrajectoryVersion(); + + /** + *
+     * trajectory id/name for identification
+     * 
+ * + * string trajectory_id = 3; + * @return The trajectoryId. + */ + java.lang.String getTrajectoryId(); + /** + *
+     * trajectory id/name for identification
+     * 
+ * + * string trajectory_id = 3; + * @return The bytes for trajectoryId. + */ + com.google.protobuf.ByteString + getTrajectoryIdBytes(); + + /** + * repeated .IMUReading imu_data = 4; + */ + java.util.List + getImuDataList(); + /** + * repeated .IMUReading imu_data = 4; + */ + com.openpositioning.PositionMe.Traj.IMUReading getImuData(int index); + /** + * repeated .IMUReading imu_data = 4; + */ + int getImuDataCount(); + /** + * repeated .IMUReading imu_data = 4; + */ + java.util.List + getImuDataOrBuilderList(); + /** + * repeated .IMUReading imu_data = 4; + */ + com.openpositioning.PositionMe.Traj.IMUReadingOrBuilder getImuDataOrBuilder( + int index); + + /** + * repeated .RelativePosition pdr_data = 5; + */ + java.util.List + getPdrDataList(); + /** + * repeated .RelativePosition pdr_data = 5; + */ + com.openpositioning.PositionMe.Traj.RelativePosition getPdrData(int index); + /** + * repeated .RelativePosition pdr_data = 5; + */ + int getPdrDataCount(); + /** + * repeated .RelativePosition pdr_data = 5; + */ + java.util.List + getPdrDataOrBuilderList(); + /** + * repeated .RelativePosition pdr_data = 5; + */ + com.openpositioning.PositionMe.Traj.RelativePositionOrBuilder getPdrDataOrBuilder( + int index); + + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + java.util.List + getMagnetometerDataList(); + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + com.openpositioning.PositionMe.Traj.MagnetometerReading getMagnetometerData(int index); + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + int getMagnetometerDataCount(); + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + java.util.List + getMagnetometerDataOrBuilderList(); + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + com.openpositioning.PositionMe.Traj.MagnetometerReadingOrBuilder getMagnetometerDataOrBuilder( + int index); + + /** + * repeated .BarometerReading pressure_data = 7; + */ + java.util.List + getPressureDataList(); + /** + * repeated .BarometerReading pressure_data = 7; + */ + com.openpositioning.PositionMe.Traj.BarometerReading getPressureData(int index); + /** + * repeated .BarometerReading pressure_data = 7; + */ + int getPressureDataCount(); + /** + * repeated .BarometerReading pressure_data = 7; + */ + java.util.List + getPressureDataOrBuilderList(); + /** + * repeated .BarometerReading pressure_data = 7; + */ + com.openpositioning.PositionMe.Traj.BarometerReadingOrBuilder getPressureDataOrBuilder( + int index); + + /** + * repeated .LightReading light_data = 8; + */ + java.util.List + getLightDataList(); + /** + * repeated .LightReading light_data = 8; + */ + com.openpositioning.PositionMe.Traj.LightReading getLightData(int index); + /** + * repeated .LightReading light_data = 8; + */ + int getLightDataCount(); + /** + * repeated .LightReading light_data = 8; + */ + java.util.List + getLightDataOrBuilderList(); + /** + * repeated .LightReading light_data = 8; + */ + com.openpositioning.PositionMe.Traj.LightReadingOrBuilder getLightDataOrBuilder( + int index); + + /** + * repeated .ProximityReading proximity_data = 9; + */ + java.util.List + getProximityDataList(); + /** + * repeated .ProximityReading proximity_data = 9; + */ + com.openpositioning.PositionMe.Traj.ProximityReading getProximityData(int index); + /** + * repeated .ProximityReading proximity_data = 9; + */ + int getProximityDataCount(); + /** + * repeated .ProximityReading proximity_data = 9; + */ + java.util.List + getProximityDataOrBuilderList(); + /** + * repeated .ProximityReading proximity_data = 9; + */ + com.openpositioning.PositionMe.Traj.ProximityReadingOrBuilder getProximityDataOrBuilder( + int index); + + /** + * repeated .GNSSReading gnss_data = 10; + */ + java.util.List + getGnssDataList(); + /** + * repeated .GNSSReading gnss_data = 10; + */ + com.openpositioning.PositionMe.Traj.GNSSReading getGnssData(int index); + /** + * repeated .GNSSReading gnss_data = 10; + */ + int getGnssDataCount(); + /** + * repeated .GNSSReading gnss_data = 10; + */ + java.util.List + getGnssDataOrBuilderList(); + /** + * repeated .GNSSReading gnss_data = 10; + */ + com.openpositioning.PositionMe.Traj.GNSSReadingOrBuilder getGnssDataOrBuilder( + int index); + + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + java.util.List + getWifiFingerprintsList(); + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + com.openpositioning.PositionMe.Traj.Fingerprint getWifiFingerprints(int index); + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + int getWifiFingerprintsCount(); + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + java.util.List + getWifiFingerprintsOrBuilderList(); + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + com.openpositioning.PositionMe.Traj.FingerprintOrBuilder getWifiFingerprintsOrBuilder( + int index); + + /** + * repeated .WiFiAPData aps_data = 12; + */ + java.util.List + getApsDataList(); + /** + * repeated .WiFiAPData aps_data = 12; + */ + com.openpositioning.PositionMe.Traj.WiFiAPData getApsData(int index); + /** + * repeated .WiFiAPData aps_data = 12; + */ + int getApsDataCount(); + /** + * repeated .WiFiAPData aps_data = 12; + */ + java.util.List + getApsDataOrBuilderList(); + /** + * repeated .WiFiAPData aps_data = 12; + */ + com.openpositioning.PositionMe.Traj.WiFiAPDataOrBuilder getApsDataOrBuilder( + int index); + + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + java.util.List + getWifiRttDataList(); + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + com.openpositioning.PositionMe.Traj.WiFiRTTReading getWifiRttData(int index); + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + int getWifiRttDataCount(); + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + java.util.List + getWifiRttDataOrBuilderList(); + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + com.openpositioning.PositionMe.Traj.WiFiRTTReadingOrBuilder getWifiRttDataOrBuilder( + int index); + + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + java.util.List + getBleFingerprintsList(); + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + com.openpositioning.PositionMe.Traj.Fingerprint getBleFingerprints(int index); + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + int getBleFingerprintsCount(); + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + java.util.List + getBleFingerprintsOrBuilderList(); + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + com.openpositioning.PositionMe.Traj.FingerprintOrBuilder getBleFingerprintsOrBuilder( + int index); + + /** + * repeated .BleData ble_data = 15; + */ + java.util.List + getBleDataList(); + /** + * repeated .BleData ble_data = 15; + */ + com.openpositioning.PositionMe.Traj.BleData getBleData(int index); + /** + * repeated .BleData ble_data = 15; + */ + int getBleDataCount(); + /** + * repeated .BleData ble_data = 15; + */ + java.util.List + getBleDataOrBuilderList(); + /** + * repeated .BleData ble_data = 15; + */ + com.openpositioning.PositionMe.Traj.BleDataOrBuilder getBleDataOrBuilder( + 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)
+     * 
+ * + * int64 start_timestamp = 16; + * @return The startTimestamp. + */ + long getStartTimestamp(); + + /** + * .GNSSPosition initial_position = 17; + * @return Whether the initialPosition field is set. + */ + boolean hasInitialPosition(); + /** + * .GNSSPosition initial_position = 17; + * @return The initialPosition. + */ + com.openpositioning.PositionMe.Traj.GNSSPosition getInitialPosition(); + /** + * .GNSSPosition initial_position = 17; + */ + com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getInitialPositionOrBuilder(); + + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + java.util.List + getCorrectedPositionsList(); + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + com.openpositioning.PositionMe.Traj.GNSSPosition getCorrectedPositions(int index); + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + int getCorrectedPositionsCount(); + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + java.util.List + getCorrectedPositionsOrBuilderList(); + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getCorrectedPositionsOrBuilder( + int index); + + /** + * .SensorInfo accelerometer_info = 19; + * @return Whether the accelerometerInfo field is set. + */ + boolean hasAccelerometerInfo(); + /** + * .SensorInfo accelerometer_info = 19; + * @return The accelerometerInfo. + */ + com.openpositioning.PositionMe.Traj.SensorInfo getAccelerometerInfo(); + /** + * .SensorInfo accelerometer_info = 19; + */ + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getAccelerometerInfoOrBuilder(); + + /** + * .SensorInfo gyroscope_info = 20; + * @return Whether the gyroscopeInfo field is set. + */ + boolean hasGyroscopeInfo(); + /** + * .SensorInfo gyroscope_info = 20; + * @return The gyroscopeInfo. + */ + com.openpositioning.PositionMe.Traj.SensorInfo getGyroscopeInfo(); + /** + * .SensorInfo gyroscope_info = 20; + */ + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getGyroscopeInfoOrBuilder(); + + /** + * .SensorInfo rotation_vector_info = 21; + * @return Whether the rotationVectorInfo field is set. + */ + boolean hasRotationVectorInfo(); + /** + * .SensorInfo rotation_vector_info = 21; + * @return The rotationVectorInfo. + */ + com.openpositioning.PositionMe.Traj.SensorInfo getRotationVectorInfo(); + /** + * .SensorInfo rotation_vector_info = 21; + */ + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getRotationVectorInfoOrBuilder(); + + /** + * .SensorInfo magnetometer_info = 22; + * @return Whether the magnetometerInfo field is set. + */ + boolean hasMagnetometerInfo(); + /** + * .SensorInfo magnetometer_info = 22; + * @return The magnetometerInfo. + */ + com.openpositioning.PositionMe.Traj.SensorInfo getMagnetometerInfo(); + /** + * .SensorInfo magnetometer_info = 22; + */ + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getMagnetometerInfoOrBuilder(); + + /** + * .SensorInfo barometer_info = 23; + * @return Whether the barometerInfo field is set. + */ + boolean hasBarometerInfo(); + /** + * .SensorInfo barometer_info = 23; + * @return The barometerInfo. + */ + com.openpositioning.PositionMe.Traj.SensorInfo getBarometerInfo(); + /** + * .SensorInfo barometer_info = 23; + */ + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getBarometerInfoOrBuilder(); + + /** + * .SensorInfo light_SensorInfo = 24; + * @return Whether the lightSensorInfo field is set. + */ + boolean hasLightSensorInfo(); + /** + * .SensorInfo light_SensorInfo = 24; + * @return The lightSensorInfo. + */ + com.openpositioning.PositionMe.Traj.SensorInfo getLightSensorInfo(); + /** + * .SensorInfo light_SensorInfo = 24; + */ + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getLightSensorInfoOrBuilder(); + + /** + * .SensorInfo proximity_info = 25; + * @return Whether the proximityInfo field is set. + */ + boolean hasProximityInfo(); + /** + * .SensorInfo proximity_info = 25; + * @return The proximityInfo. + */ + com.openpositioning.PositionMe.Traj.SensorInfo getProximityInfo(); + /** + * .SensorInfo proximity_info = 25; + */ + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getProximityInfoOrBuilder(); + + /** + * repeated .GNSSPosition test_points = 26; + */ + java.util.List + getTestPointsList(); + /** + * repeated .GNSSPosition test_points = 26; + */ + com.openpositioning.PositionMe.Traj.GNSSPosition getTestPoints(int index); + /** + * repeated .GNSSPosition test_points = 26; + */ + int getTestPointsCount(); + /** + * repeated .GNSSPosition test_points = 26; + */ + java.util.List + getTestPointsOrBuilderList(); + /** + * repeated .GNSSPosition test_points = 26; + */ + com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getTestPointsOrBuilder( + int index); + } + /** + * Protobuf type {@code Trajectory} + */ + public static final class Trajectory extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Trajectory) + TrajectoryOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + Trajectory.class.getName()); + } + // Use Trajectory.newBuilder() to construct. + private Trajectory(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Trajectory() { + androidVersion_ = ""; + trajectoryId_ = ""; + imuData_ = java.util.Collections.emptyList(); + pdrData_ = java.util.Collections.emptyList(); + magnetometerData_ = java.util.Collections.emptyList(); + pressureData_ = java.util.Collections.emptyList(); + lightData_ = java.util.Collections.emptyList(); + proximityData_ = java.util.Collections.emptyList(); + gnssData_ = java.util.Collections.emptyList(); + wifiFingerprints_ = java.util.Collections.emptyList(); + apsData_ = java.util.Collections.emptyList(); + wifiRttData_ = java.util.Collections.emptyList(); + bleFingerprints_ = java.util.Collections.emptyList(); + bleData_ = java.util.Collections.emptyList(); + correctedPositions_ = java.util.Collections.emptyList(); + testPoints_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Trajectory_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Trajectory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Trajectory.class, com.openpositioning.PositionMe.Traj.Trajectory.Builder.class); + } + + private int bitField0_; + public static final int ANDROID_VERSION_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object androidVersion_ = ""; + /** + * string android_version = 1; + * @return The androidVersion. + */ + @java.lang.Override + public java.lang.String getAndroidVersion() { + java.lang.Object ref = androidVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + androidVersion_ = s; + return s; + } + } + /** + * string android_version = 1; + * @return The bytes for androidVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAndroidVersionBytes() { + java.lang.Object ref = androidVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + androidVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRAJECTORY_VERSION_FIELD_NUMBER = 2; + private float trajectoryVersion_ = 0F; + /** + *
+     * version 2.0
+     * 
+ * + * float trajectory_version = 2; + * @return The trajectoryVersion. + */ + @java.lang.Override + public float getTrajectoryVersion() { + return trajectoryVersion_; + } + + public static final int TRAJECTORY_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object trajectoryId_ = ""; + /** + *
+     * trajectory id/name for identification
+     * 
+ * + * string trajectory_id = 3; + * @return The trajectoryId. + */ + @java.lang.Override + public java.lang.String getTrajectoryId() { + java.lang.Object ref = trajectoryId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trajectoryId_ = s; + return s; + } + } + /** + *
+     * trajectory id/name for identification
+     * 
+ * + * string trajectory_id = 3; + * @return The bytes for trajectoryId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTrajectoryIdBytes() { + java.lang.Object ref = trajectoryId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trajectoryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IMU_DATA_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List imuData_; + /** + * repeated .IMUReading imu_data = 4; + */ + @java.lang.Override + public java.util.List getImuDataList() { + return imuData_; + } + /** + * repeated .IMUReading imu_data = 4; + */ + @java.lang.Override + public java.util.List + getImuDataOrBuilderList() { + return imuData_; + } + /** + * repeated .IMUReading imu_data = 4; + */ + @java.lang.Override + public int getImuDataCount() { + return imuData_.size(); + } + /** + * repeated .IMUReading imu_data = 4; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.IMUReading getImuData(int index) { + return imuData_.get(index); + } + /** + * repeated .IMUReading imu_data = 4; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.IMUReadingOrBuilder getImuDataOrBuilder( + int index) { + return imuData_.get(index); + } + + public static final int PDR_DATA_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List pdrData_; + /** + * repeated .RelativePosition pdr_data = 5; + */ + @java.lang.Override + public java.util.List getPdrDataList() { + return pdrData_; + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + @java.lang.Override + public java.util.List + getPdrDataOrBuilderList() { + return pdrData_; + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + @java.lang.Override + public int getPdrDataCount() { + return pdrData_.size(); + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RelativePosition getPdrData(int index) { + return pdrData_.get(index); + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RelativePositionOrBuilder getPdrDataOrBuilder( + int index) { + return pdrData_.get(index); + } + + public static final int MAGNETOMETER_DATA_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private java.util.List magnetometerData_; + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + @java.lang.Override + public java.util.List getMagnetometerDataList() { + return magnetometerData_; + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + @java.lang.Override + public java.util.List + getMagnetometerDataOrBuilderList() { + return magnetometerData_; + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + @java.lang.Override + public int getMagnetometerDataCount() { + return magnetometerData_.size(); + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.MagnetometerReading getMagnetometerData(int index) { + return magnetometerData_.get(index); + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.MagnetometerReadingOrBuilder getMagnetometerDataOrBuilder( + int index) { + return magnetometerData_.get(index); + } + + public static final int PRESSURE_DATA_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private java.util.List pressureData_; + /** + * repeated .BarometerReading pressure_data = 7; + */ + @java.lang.Override + public java.util.List getPressureDataList() { + return pressureData_; + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + @java.lang.Override + public java.util.List + getPressureDataOrBuilderList() { + return pressureData_; + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + @java.lang.Override + public int getPressureDataCount() { + return pressureData_.size(); + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BarometerReading getPressureData(int index) { + return pressureData_.get(index); + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BarometerReadingOrBuilder getPressureDataOrBuilder( + int index) { + return pressureData_.get(index); + } + + public static final int LIGHT_DATA_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private java.util.List lightData_; + /** + * repeated .LightReading light_data = 8; + */ + @java.lang.Override + public java.util.List getLightDataList() { + return lightData_; + } + /** + * repeated .LightReading light_data = 8; + */ + @java.lang.Override + public java.util.List + getLightDataOrBuilderList() { + return lightData_; + } + /** + * repeated .LightReading light_data = 8; + */ + @java.lang.Override + public int getLightDataCount() { + return lightData_.size(); + } + /** + * repeated .LightReading light_data = 8; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.LightReading getLightData(int index) { + return lightData_.get(index); + } + /** + * repeated .LightReading light_data = 8; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.LightReadingOrBuilder getLightDataOrBuilder( + int index) { + return lightData_.get(index); + } + + public static final int PROXIMITY_DATA_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private java.util.List proximityData_; + /** + * repeated .ProximityReading proximity_data = 9; + */ + @java.lang.Override + public java.util.List getProximityDataList() { + return proximityData_; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + @java.lang.Override + public java.util.List + getProximityDataOrBuilderList() { + return proximityData_; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + @java.lang.Override + public int getProximityDataCount() { + return proximityData_.size(); + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.ProximityReading getProximityData(int index) { + return proximityData_.get(index); + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.ProximityReadingOrBuilder getProximityDataOrBuilder( + int index) { + return proximityData_.get(index); + } + + public static final int GNSS_DATA_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private java.util.List gnssData_; + /** + * repeated .GNSSReading gnss_data = 10; + */ + @java.lang.Override + public java.util.List getGnssDataList() { + return gnssData_; + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + @java.lang.Override + public java.util.List + getGnssDataOrBuilderList() { + return gnssData_; + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + @java.lang.Override + public int getGnssDataCount() { + return gnssData_.size(); + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSReading getGnssData(int index) { + return gnssData_.get(index); + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSReadingOrBuilder getGnssDataOrBuilder( + int index) { + return gnssData_.get(index); + } + + public static final int WIFI_FINGERPRINTS_FIELD_NUMBER = 11; + @SuppressWarnings("serial") + private java.util.List wifiFingerprints_; + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + @java.lang.Override + public java.util.List getWifiFingerprintsList() { + return wifiFingerprints_; + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + @java.lang.Override + public java.util.List + getWifiFingerprintsOrBuilderList() { + return wifiFingerprints_; + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + @java.lang.Override + public int getWifiFingerprintsCount() { + return wifiFingerprints_.size(); + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Fingerprint getWifiFingerprints(int index) { + return wifiFingerprints_.get(index); + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.FingerprintOrBuilder getWifiFingerprintsOrBuilder( + int index) { + return wifiFingerprints_.get(index); + } + + public static final int APS_DATA_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private java.util.List apsData_; + /** + * repeated .WiFiAPData aps_data = 12; + */ + @java.lang.Override + public java.util.List getApsDataList() { + return apsData_; + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + @java.lang.Override + public java.util.List + getApsDataOrBuilderList() { + return apsData_; + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + @java.lang.Override + public int getApsDataCount() { + return apsData_.size(); + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiAPData getApsData(int index) { + return apsData_.get(index); + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiAPDataOrBuilder getApsDataOrBuilder( + int index) { + return apsData_.get(index); + } + + public static final int WIFI_RTT_DATA_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private java.util.List wifiRttData_; + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + @java.lang.Override + public java.util.List getWifiRttDataList() { + return wifiRttData_; + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + @java.lang.Override + public java.util.List + getWifiRttDataOrBuilderList() { + return wifiRttData_; + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + @java.lang.Override + public int getWifiRttDataCount() { + return wifiRttData_.size(); + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiRTTReading getWifiRttData(int index) { + return wifiRttData_.get(index); + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiRTTReadingOrBuilder getWifiRttDataOrBuilder( + int index) { + return wifiRttData_.get(index); + } + + public static final int BLE_FINGERPRINTS_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private java.util.List bleFingerprints_; + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + @java.lang.Override + public java.util.List getBleFingerprintsList() { + return bleFingerprints_; + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + @java.lang.Override + public java.util.List + getBleFingerprintsOrBuilderList() { + return bleFingerprints_; + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + @java.lang.Override + public int getBleFingerprintsCount() { + return bleFingerprints_.size(); + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Fingerprint getBleFingerprints(int index) { + return bleFingerprints_.get(index); + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.FingerprintOrBuilder getBleFingerprintsOrBuilder( + int index) { + return bleFingerprints_.get(index); + } + + public static final int BLE_DATA_FIELD_NUMBER = 15; + @SuppressWarnings("serial") + private java.util.List bleData_; + /** + * repeated .BleData ble_data = 15; + */ + @java.lang.Override + public java.util.List getBleDataList() { + return bleData_; + } + /** + * repeated .BleData ble_data = 15; + */ + @java.lang.Override + public java.util.List + getBleDataOrBuilderList() { + return bleData_; + } + /** + * repeated .BleData ble_data = 15; + */ + @java.lang.Override + public int getBleDataCount() { + return bleData_.size(); + } + /** + * repeated .BleData ble_data = 15; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BleData getBleData(int index) { + return bleData_.get(index); + } + /** + * repeated .BleData ble_data = 15; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BleDataOrBuilder getBleDataOrBuilder( + int index) { + return bleData_.get(index); + } + + public static final int START_TIMESTAMP_FIELD_NUMBER = 16; + private long startTimestamp_ = 0L; + /** + *
+     * 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)
+     * 
+ * + * int64 start_timestamp = 16; + * @return The startTimestamp. + */ + @java.lang.Override + public long getStartTimestamp() { + return startTimestamp_; + } + + public static final int INITIAL_POSITION_FIELD_NUMBER = 17; + private com.openpositioning.PositionMe.Traj.GNSSPosition initialPosition_; + /** + * .GNSSPosition initial_position = 17; + * @return Whether the initialPosition field is set. + */ + @java.lang.Override + public boolean hasInitialPosition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .GNSSPosition initial_position = 17; + * @return The initialPosition. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition getInitialPosition() { + return initialPosition_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : initialPosition_; + } + /** + * .GNSSPosition initial_position = 17; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getInitialPositionOrBuilder() { + return initialPosition_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : initialPosition_; + } + + public static final int CORRECTED_POSITIONS_FIELD_NUMBER = 18; + @SuppressWarnings("serial") + private java.util.List correctedPositions_; + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + @java.lang.Override + public java.util.List getCorrectedPositionsList() { + return correctedPositions_; + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + @java.lang.Override + public java.util.List + getCorrectedPositionsOrBuilderList() { + return correctedPositions_; + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + @java.lang.Override + public int getCorrectedPositionsCount() { + return correctedPositions_.size(); + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition getCorrectedPositions(int index) { + return correctedPositions_.get(index); + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getCorrectedPositionsOrBuilder( + int index) { + return correctedPositions_.get(index); + } + + public static final int ACCELEROMETER_INFO_FIELD_NUMBER = 19; + private com.openpositioning.PositionMe.Traj.SensorInfo accelerometerInfo_; + /** + * .SensorInfo accelerometer_info = 19; + * @return Whether the accelerometerInfo field is set. + */ + @java.lang.Override + public boolean hasAccelerometerInfo() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .SensorInfo accelerometer_info = 19; + * @return The accelerometerInfo. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getAccelerometerInfo() { + return accelerometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : accelerometerInfo_; + } + /** + * .SensorInfo accelerometer_info = 19; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getAccelerometerInfoOrBuilder() { + return accelerometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : accelerometerInfo_; + } + + public static final int GYROSCOPE_INFO_FIELD_NUMBER = 20; + private com.openpositioning.PositionMe.Traj.SensorInfo gyroscopeInfo_; + /** + * .SensorInfo gyroscope_info = 20; + * @return Whether the gyroscopeInfo field is set. + */ + @java.lang.Override + public boolean hasGyroscopeInfo() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .SensorInfo gyroscope_info = 20; + * @return The gyroscopeInfo. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getGyroscopeInfo() { + return gyroscopeInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : gyroscopeInfo_; + } + /** + * .SensorInfo gyroscope_info = 20; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getGyroscopeInfoOrBuilder() { + return gyroscopeInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : gyroscopeInfo_; + } + + public static final int ROTATION_VECTOR_INFO_FIELD_NUMBER = 21; + private com.openpositioning.PositionMe.Traj.SensorInfo rotationVectorInfo_; + /** + * .SensorInfo rotation_vector_info = 21; + * @return Whether the rotationVectorInfo field is set. + */ + @java.lang.Override + public boolean hasRotationVectorInfo() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + * .SensorInfo rotation_vector_info = 21; + * @return The rotationVectorInfo. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getRotationVectorInfo() { + return rotationVectorInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : rotationVectorInfo_; + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getRotationVectorInfoOrBuilder() { + return rotationVectorInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : rotationVectorInfo_; + } + + public static final int MAGNETOMETER_INFO_FIELD_NUMBER = 22; + private com.openpositioning.PositionMe.Traj.SensorInfo magnetometerInfo_; + /** + * .SensorInfo magnetometer_info = 22; + * @return Whether the magnetometerInfo field is set. + */ + @java.lang.Override + public boolean hasMagnetometerInfo() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .SensorInfo magnetometer_info = 22; + * @return The magnetometerInfo. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getMagnetometerInfo() { + return magnetometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : magnetometerInfo_; + } + /** + * .SensorInfo magnetometer_info = 22; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getMagnetometerInfoOrBuilder() { + return magnetometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : magnetometerInfo_; + } + + public static final int BAROMETER_INFO_FIELD_NUMBER = 23; + private com.openpositioning.PositionMe.Traj.SensorInfo barometerInfo_; + /** + * .SensorInfo barometer_info = 23; + * @return Whether the barometerInfo field is set. + */ + @java.lang.Override + public boolean hasBarometerInfo() { + return ((bitField0_ & 0x00000020) != 0); + } + /** + * .SensorInfo barometer_info = 23; + * @return The barometerInfo. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getBarometerInfo() { + return barometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : barometerInfo_; + } + /** + * .SensorInfo barometer_info = 23; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getBarometerInfoOrBuilder() { + return barometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : barometerInfo_; + } + + public static final int LIGHT_SensorInfo_FIELD_NUMBER = 24; + private com.openpositioning.PositionMe.Traj.SensorInfo lightSensorInfo_; + /** + * .SensorInfo light_SensorInfo = 24; + * @return Whether the lightSensorInfo field is set. + */ + @java.lang.Override + public boolean hasLightSensorInfo() { + return ((bitField0_ & 0x00000040) != 0); + } + /** + * .SensorInfo light_SensorInfo = 24; + * @return The lightSensorInfo. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getLightSensorInfo() { + return lightSensorInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : lightSensorInfo_; + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getLightSensorInfoOrBuilder() { + return lightSensorInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : lightSensorInfo_; + } + + public static final int PROXIMITY_INFO_FIELD_NUMBER = 25; + private com.openpositioning.PositionMe.Traj.SensorInfo proximityInfo_; + /** + * .SensorInfo proximity_info = 25; + * @return Whether the proximityInfo field is set. + */ + @java.lang.Override + public boolean hasProximityInfo() { + return ((bitField0_ & 0x00000080) != 0); + } + /** + * .SensorInfo proximity_info = 25; + * @return The proximityInfo. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getProximityInfo() { + return proximityInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : proximityInfo_; + } + /** + * .SensorInfo proximity_info = 25; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getProximityInfoOrBuilder() { + return proximityInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : proximityInfo_; + } + + public static final int TEST_POINTS_FIELD_NUMBER = 26; + @SuppressWarnings("serial") + private java.util.List testPoints_; + /** + * repeated .GNSSPosition test_points = 26; + */ + @java.lang.Override + public java.util.List getTestPointsList() { + return testPoints_; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + @java.lang.Override + public java.util.List + getTestPointsOrBuilderList() { + return testPoints_; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + @java.lang.Override + public int getTestPointsCount() { + return testPoints_.size(); + } + /** + * repeated .GNSSPosition test_points = 26; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition getTestPoints(int index) { + return testPoints_.get(index); + } + /** + * repeated .GNSSPosition test_points = 26; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getTestPointsOrBuilder( + int index) { + return testPoints_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(androidVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, androidVersion_); + } + if (java.lang.Float.floatToRawIntBits(trajectoryVersion_) != 0) { + output.writeFloat(2, trajectoryVersion_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trajectoryId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, trajectoryId_); + } + for (int i = 0; i < imuData_.size(); i++) { + output.writeMessage(4, imuData_.get(i)); + } + for (int i = 0; i < pdrData_.size(); i++) { + output.writeMessage(5, pdrData_.get(i)); + } + for (int i = 0; i < magnetometerData_.size(); i++) { + output.writeMessage(6, magnetometerData_.get(i)); + } + for (int i = 0; i < pressureData_.size(); i++) { + output.writeMessage(7, pressureData_.get(i)); + } + for (int i = 0; i < lightData_.size(); i++) { + output.writeMessage(8, lightData_.get(i)); + } + for (int i = 0; i < proximityData_.size(); i++) { + output.writeMessage(9, proximityData_.get(i)); + } + for (int i = 0; i < gnssData_.size(); i++) { + output.writeMessage(10, gnssData_.get(i)); + } + for (int i = 0; i < wifiFingerprints_.size(); i++) { + output.writeMessage(11, wifiFingerprints_.get(i)); + } + for (int i = 0; i < apsData_.size(); i++) { + output.writeMessage(12, apsData_.get(i)); + } + for (int i = 0; i < wifiRttData_.size(); i++) { + output.writeMessage(13, wifiRttData_.get(i)); + } + for (int i = 0; i < bleFingerprints_.size(); i++) { + output.writeMessage(14, bleFingerprints_.get(i)); + } + for (int i = 0; i < bleData_.size(); i++) { + output.writeMessage(15, bleData_.get(i)); + } + if (startTimestamp_ != 0L) { + output.writeInt64(16, startTimestamp_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(17, getInitialPosition()); + } + for (int i = 0; i < correctedPositions_.size(); i++) { + output.writeMessage(18, correctedPositions_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(19, getAccelerometerInfo()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(20, getGyroscopeInfo()); + } + if (((bitField0_ & 0x00000008) != 0)) { + output.writeMessage(21, getRotationVectorInfo()); + } + if (((bitField0_ & 0x00000010) != 0)) { + output.writeMessage(22, getMagnetometerInfo()); + } + if (((bitField0_ & 0x00000020) != 0)) { + output.writeMessage(23, getBarometerInfo()); + } + if (((bitField0_ & 0x00000040) != 0)) { + output.writeMessage(24, getLightSensorInfo()); + } + if (((bitField0_ & 0x00000080) != 0)) { + output.writeMessage(25, getProximityInfo()); + } + for (int i = 0; i < testPoints_.size(); i++) { + output.writeMessage(26, testPoints_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(androidVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, androidVersion_); + } + if (java.lang.Float.floatToRawIntBits(trajectoryVersion_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, trajectoryVersion_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(trajectoryId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, trajectoryId_); + } + for (int i = 0; i < imuData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, imuData_.get(i)); + } + for (int i = 0; i < pdrData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, pdrData_.get(i)); + } + for (int i = 0; i < magnetometerData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, magnetometerData_.get(i)); + } + for (int i = 0; i < pressureData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, pressureData_.get(i)); + } + for (int i = 0; i < lightData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, lightData_.get(i)); + } + for (int i = 0; i < proximityData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, proximityData_.get(i)); + } + for (int i = 0; i < gnssData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, gnssData_.get(i)); + } + for (int i = 0; i < wifiFingerprints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, wifiFingerprints_.get(i)); + } + for (int i = 0; i < apsData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, apsData_.get(i)); + } + for (int i = 0; i < wifiRttData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, wifiRttData_.get(i)); + } + for (int i = 0; i < bleFingerprints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, bleFingerprints_.get(i)); + } + for (int i = 0; i < bleData_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, bleData_.get(i)); + } + if (startTimestamp_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(16, startTimestamp_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getInitialPosition()); + } + for (int i = 0; i < correctedPositions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, correctedPositions_.get(i)); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, getAccelerometerInfo()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, getGyroscopeInfo()); + } + if (((bitField0_ & 0x00000008) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, getRotationVectorInfo()); + } + if (((bitField0_ & 0x00000010) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(22, getMagnetometerInfo()); + } + if (((bitField0_ & 0x00000020) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(23, getBarometerInfo()); + } + if (((bitField0_ & 0x00000040) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(24, getLightSensorInfo()); + } + if (((bitField0_ & 0x00000080) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(25, getProximityInfo()); + } + for (int i = 0; i < testPoints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(26, testPoints_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.Trajectory)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.Trajectory other = (com.openpositioning.PositionMe.Traj.Trajectory) obj; + + if (!getAndroidVersion() + .equals(other.getAndroidVersion())) return false; + if (java.lang.Float.floatToIntBits(getTrajectoryVersion()) + != java.lang.Float.floatToIntBits( + other.getTrajectoryVersion())) return false; + if (!getTrajectoryId() + .equals(other.getTrajectoryId())) return false; + if (!getImuDataList() + .equals(other.getImuDataList())) return false; + if (!getPdrDataList() + .equals(other.getPdrDataList())) return false; + if (!getMagnetometerDataList() + .equals(other.getMagnetometerDataList())) return false; + if (!getPressureDataList() + .equals(other.getPressureDataList())) return false; + if (!getLightDataList() + .equals(other.getLightDataList())) return false; + if (!getProximityDataList() + .equals(other.getProximityDataList())) return false; + if (!getGnssDataList() + .equals(other.getGnssDataList())) return false; + if (!getWifiFingerprintsList() + .equals(other.getWifiFingerprintsList())) return false; + if (!getApsDataList() + .equals(other.getApsDataList())) return false; + if (!getWifiRttDataList() + .equals(other.getWifiRttDataList())) return false; + if (!getBleFingerprintsList() + .equals(other.getBleFingerprintsList())) return false; + if (!getBleDataList() + .equals(other.getBleDataList())) return false; + if (getStartTimestamp() + != other.getStartTimestamp()) return false; + if (hasInitialPosition() != other.hasInitialPosition()) return false; + if (hasInitialPosition()) { + if (!getInitialPosition() + .equals(other.getInitialPosition())) return false; + } + if (!getCorrectedPositionsList() + .equals(other.getCorrectedPositionsList())) return false; + if (hasAccelerometerInfo() != other.hasAccelerometerInfo()) return false; + if (hasAccelerometerInfo()) { + if (!getAccelerometerInfo() + .equals(other.getAccelerometerInfo())) return false; + } + if (hasGyroscopeInfo() != other.hasGyroscopeInfo()) return false; + if (hasGyroscopeInfo()) { + if (!getGyroscopeInfo() + .equals(other.getGyroscopeInfo())) return false; + } + if (hasRotationVectorInfo() != other.hasRotationVectorInfo()) return false; + if (hasRotationVectorInfo()) { + if (!getRotationVectorInfo() + .equals(other.getRotationVectorInfo())) return false; + } + if (hasMagnetometerInfo() != other.hasMagnetometerInfo()) return false; + if (hasMagnetometerInfo()) { + if (!getMagnetometerInfo() + .equals(other.getMagnetometerInfo())) return false; + } + if (hasBarometerInfo() != other.hasBarometerInfo()) return false; + if (hasBarometerInfo()) { + if (!getBarometerInfo() + .equals(other.getBarometerInfo())) return false; + } + if (hasLightSensorInfo() != other.hasLightSensorInfo()) return false; + if (hasLightSensorInfo()) { + if (!getLightSensorInfo() + .equals(other.getLightSensorInfo())) return false; + } + if (hasProximityInfo() != other.hasProximityInfo()) return false; + if (hasProximityInfo()) { + if (!getProximityInfo() + .equals(other.getProximityInfo())) return false; + } + if (!getTestPointsList() + .equals(other.getTestPointsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ANDROID_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getAndroidVersion().hashCode(); + hash = (37 * hash) + TRAJECTORY_VERSION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getTrajectoryVersion()); + hash = (37 * hash) + TRAJECTORY_ID_FIELD_NUMBER; + hash = (53 * hash) + getTrajectoryId().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 (getMagnetometerDataCount() > 0) { + hash = (37 * hash) + MAGNETOMETER_DATA_FIELD_NUMBER; + hash = (53 * hash) + getMagnetometerDataList().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 (getProximityDataCount() > 0) { + hash = (37 * hash) + PROXIMITY_DATA_FIELD_NUMBER; + hash = (53 * hash) + getProximityDataList().hashCode(); + } + if (getGnssDataCount() > 0) { + hash = (37 * hash) + GNSS_DATA_FIELD_NUMBER; + hash = (53 * hash) + getGnssDataList().hashCode(); + } + if (getWifiFingerprintsCount() > 0) { + hash = (37 * hash) + WIFI_FINGERPRINTS_FIELD_NUMBER; + hash = (53 * hash) + getWifiFingerprintsList().hashCode(); + } + if (getApsDataCount() > 0) { + hash = (37 * hash) + APS_DATA_FIELD_NUMBER; + hash = (53 * hash) + getApsDataList().hashCode(); + } + if (getWifiRttDataCount() > 0) { + hash = (37 * hash) + WIFI_RTT_DATA_FIELD_NUMBER; + hash = (53 * hash) + getWifiRttDataList().hashCode(); + } + if (getBleFingerprintsCount() > 0) { + hash = (37 * hash) + BLE_FINGERPRINTS_FIELD_NUMBER; + hash = (53 * hash) + getBleFingerprintsList().hashCode(); + } + if (getBleDataCount() > 0) { + hash = (37 * hash) + BLE_DATA_FIELD_NUMBER; + hash = (53 * hash) + getBleDataList().hashCode(); + } + hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getStartTimestamp()); + if (hasInitialPosition()) { + hash = (37 * hash) + INITIAL_POSITION_FIELD_NUMBER; + hash = (53 * hash) + getInitialPosition().hashCode(); + } + if (getCorrectedPositionsCount() > 0) { + hash = (37 * hash) + CORRECTED_POSITIONS_FIELD_NUMBER; + hash = (53 * hash) + getCorrectedPositionsList().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_SensorInfo_FIELD_NUMBER; + hash = (53 * hash) + getLightSensorInfo().hashCode(); + } + if (hasProximityInfo()) { + hash = (37 * hash) + PROXIMITY_INFO_FIELD_NUMBER; + hash = (53 * hash) + getProximityInfo().hashCode(); + } + if (getTestPointsCount() > 0) { + hash = (37 * hash) + TEST_POINTS_FIELD_NUMBER; + hash = (53 * hash) + getTestPointsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.Trajectory parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.Trajectory parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Trajectory parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.Trajectory prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Trajectory} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Trajectory) + com.openpositioning.PositionMe.Traj.TrajectoryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Trajectory_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Trajectory_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Trajectory.class, com.openpositioning.PositionMe.Traj.Trajectory.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.Trajectory.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getImuDataFieldBuilder(); + getPdrDataFieldBuilder(); + getMagnetometerDataFieldBuilder(); + getPressureDataFieldBuilder(); + getLightDataFieldBuilder(); + getProximityDataFieldBuilder(); + getGnssDataFieldBuilder(); + getWifiFingerprintsFieldBuilder(); + getApsDataFieldBuilder(); + getWifiRttDataFieldBuilder(); + getBleFingerprintsFieldBuilder(); + getBleDataFieldBuilder(); + getInitialPositionFieldBuilder(); + getCorrectedPositionsFieldBuilder(); + getAccelerometerInfoFieldBuilder(); + getGyroscopeInfoFieldBuilder(); + getRotationVectorInfoFieldBuilder(); + getMagnetometerInfoFieldBuilder(); + getBarometerInfoFieldBuilder(); + getLightSensorInfoFieldBuilder(); + getProximityInfoFieldBuilder(); + getTestPointsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + androidVersion_ = ""; + trajectoryVersion_ = 0F; + trajectoryId_ = ""; + if (imuDataBuilder_ == null) { + imuData_ = java.util.Collections.emptyList(); + } else { + imuData_ = null; + imuDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (pdrDataBuilder_ == null) { + pdrData_ = java.util.Collections.emptyList(); + } else { + pdrData_ = null; + pdrDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + if (magnetometerDataBuilder_ == null) { + magnetometerData_ = java.util.Collections.emptyList(); + } else { + magnetometerData_ = null; + magnetometerDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000020); + if (pressureDataBuilder_ == null) { + pressureData_ = java.util.Collections.emptyList(); + } else { + pressureData_ = null; + pressureDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000040); + if (lightDataBuilder_ == null) { + lightData_ = java.util.Collections.emptyList(); + } else { + lightData_ = null; + lightDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + if (proximityDataBuilder_ == null) { + proximityData_ = java.util.Collections.emptyList(); + } else { + proximityData_ = null; + proximityDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + if (gnssDataBuilder_ == null) { + gnssData_ = java.util.Collections.emptyList(); + } else { + gnssData_ = null; + gnssDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + if (wifiFingerprintsBuilder_ == null) { + wifiFingerprints_ = java.util.Collections.emptyList(); + } else { + wifiFingerprints_ = null; + wifiFingerprintsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000400); + if (apsDataBuilder_ == null) { + apsData_ = java.util.Collections.emptyList(); + } else { + apsData_ = null; + apsDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + if (wifiRttDataBuilder_ == null) { + wifiRttData_ = java.util.Collections.emptyList(); + } else { + wifiRttData_ = null; + wifiRttDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00001000); + if (bleFingerprintsBuilder_ == null) { + bleFingerprints_ = java.util.Collections.emptyList(); + } else { + bleFingerprints_ = null; + bleFingerprintsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); + if (bleDataBuilder_ == null) { + bleData_ = java.util.Collections.emptyList(); + } else { + bleData_ = null; + bleDataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00004000); + startTimestamp_ = 0L; + initialPosition_ = null; + if (initialPositionBuilder_ != null) { + initialPositionBuilder_.dispose(); + initialPositionBuilder_ = null; + } + if (correctedPositionsBuilder_ == null) { + correctedPositions_ = java.util.Collections.emptyList(); + } else { + correctedPositions_ = null; + correctedPositionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00020000); + accelerometerInfo_ = null; + if (accelerometerInfoBuilder_ != null) { + accelerometerInfoBuilder_.dispose(); + accelerometerInfoBuilder_ = null; + } + gyroscopeInfo_ = null; + if (gyroscopeInfoBuilder_ != null) { + gyroscopeInfoBuilder_.dispose(); + gyroscopeInfoBuilder_ = null; + } + rotationVectorInfo_ = null; + if (rotationVectorInfoBuilder_ != null) { + rotationVectorInfoBuilder_.dispose(); + rotationVectorInfoBuilder_ = null; + } + magnetometerInfo_ = null; + if (magnetometerInfoBuilder_ != null) { + magnetometerInfoBuilder_.dispose(); + magnetometerInfoBuilder_ = null; + } + barometerInfo_ = null; + if (barometerInfoBuilder_ != null) { + barometerInfoBuilder_.dispose(); + barometerInfoBuilder_ = null; + } + lightSensorInfo_ = null; + if (lightSensorInfoBuilder_ != null) { + lightSensorInfoBuilder_.dispose(); + lightSensorInfoBuilder_ = null; + } + proximityInfo_ = null; + if (proximityInfoBuilder_ != null) { + proximityInfoBuilder_.dispose(); + proximityInfoBuilder_ = null; + } + if (testPointsBuilder_ == null) { + testPoints_ = java.util.Collections.emptyList(); + } else { + testPoints_ = null; + testPointsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x02000000); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_Trajectory_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Trajectory getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.Trajectory.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Trajectory build() { + com.openpositioning.PositionMe.Traj.Trajectory result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Trajectory buildPartial() { + com.openpositioning.PositionMe.Traj.Trajectory result = new com.openpositioning.PositionMe.Traj.Trajectory(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.openpositioning.PositionMe.Traj.Trajectory result) { + if (imuDataBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + imuData_ = java.util.Collections.unmodifiableList(imuData_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.imuData_ = imuData_; + } else { + result.imuData_ = imuDataBuilder_.build(); + } + if (pdrDataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + pdrData_ = java.util.Collections.unmodifiableList(pdrData_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.pdrData_ = pdrData_; + } else { + result.pdrData_ = pdrDataBuilder_.build(); + } + if (magnetometerDataBuilder_ == null) { + if (((bitField0_ & 0x00000020) != 0)) { + magnetometerData_ = java.util.Collections.unmodifiableList(magnetometerData_); + bitField0_ = (bitField0_ & ~0x00000020); + } + result.magnetometerData_ = magnetometerData_; + } else { + result.magnetometerData_ = magnetometerDataBuilder_.build(); + } + if (pressureDataBuilder_ == null) { + if (((bitField0_ & 0x00000040) != 0)) { + pressureData_ = java.util.Collections.unmodifiableList(pressureData_); + bitField0_ = (bitField0_ & ~0x00000040); + } + result.pressureData_ = pressureData_; + } else { + result.pressureData_ = pressureDataBuilder_.build(); + } + if (lightDataBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + lightData_ = java.util.Collections.unmodifiableList(lightData_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.lightData_ = lightData_; + } else { + result.lightData_ = lightDataBuilder_.build(); + } + if (proximityDataBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + proximityData_ = java.util.Collections.unmodifiableList(proximityData_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.proximityData_ = proximityData_; + } else { + result.proximityData_ = proximityDataBuilder_.build(); + } + if (gnssDataBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + gnssData_ = java.util.Collections.unmodifiableList(gnssData_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.gnssData_ = gnssData_; + } else { + result.gnssData_ = gnssDataBuilder_.build(); + } + if (wifiFingerprintsBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0)) { + wifiFingerprints_ = java.util.Collections.unmodifiableList(wifiFingerprints_); + bitField0_ = (bitField0_ & ~0x00000400); + } + result.wifiFingerprints_ = wifiFingerprints_; + } else { + result.wifiFingerprints_ = wifiFingerprintsBuilder_.build(); + } + if (apsDataBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0)) { + apsData_ = java.util.Collections.unmodifiableList(apsData_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.apsData_ = apsData_; + } else { + result.apsData_ = apsDataBuilder_.build(); + } + if (wifiRttDataBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0)) { + wifiRttData_ = java.util.Collections.unmodifiableList(wifiRttData_); + bitField0_ = (bitField0_ & ~0x00001000); + } + result.wifiRttData_ = wifiRttData_; + } else { + result.wifiRttData_ = wifiRttDataBuilder_.build(); + } + if (bleFingerprintsBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0)) { + bleFingerprints_ = java.util.Collections.unmodifiableList(bleFingerprints_); + bitField0_ = (bitField0_ & ~0x00002000); + } + result.bleFingerprints_ = bleFingerprints_; + } else { + result.bleFingerprints_ = bleFingerprintsBuilder_.build(); + } + if (bleDataBuilder_ == null) { + if (((bitField0_ & 0x00004000) != 0)) { + bleData_ = java.util.Collections.unmodifiableList(bleData_); + bitField0_ = (bitField0_ & ~0x00004000); + } + result.bleData_ = bleData_; + } else { + result.bleData_ = bleDataBuilder_.build(); + } + if (correctedPositionsBuilder_ == null) { + if (((bitField0_ & 0x00020000) != 0)) { + correctedPositions_ = java.util.Collections.unmodifiableList(correctedPositions_); + bitField0_ = (bitField0_ & ~0x00020000); + } + result.correctedPositions_ = correctedPositions_; + } else { + result.correctedPositions_ = correctedPositionsBuilder_.build(); + } + if (testPointsBuilder_ == null) { + if (((bitField0_ & 0x02000000) != 0)) { + testPoints_ = java.util.Collections.unmodifiableList(testPoints_); + bitField0_ = (bitField0_ & ~0x02000000); + } + result.testPoints_ = testPoints_; + } else { + result.testPoints_ = testPointsBuilder_.build(); + } + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.Trajectory result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.androidVersion_ = androidVersion_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.trajectoryVersion_ = trajectoryVersion_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.trajectoryId_ = trajectoryId_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.startTimestamp_ = startTimestamp_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00010000) != 0)) { + result.initialPosition_ = initialPositionBuilder_ == null + ? initialPosition_ + : initialPositionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.accelerometerInfo_ = accelerometerInfoBuilder_ == null + ? accelerometerInfo_ + : accelerometerInfoBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.gyroscopeInfo_ = gyroscopeInfoBuilder_ == null + ? gyroscopeInfo_ + : gyroscopeInfoBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.rotationVectorInfo_ = rotationVectorInfoBuilder_ == null + ? rotationVectorInfo_ + : rotationVectorInfoBuilder_.build(); + to_bitField0_ |= 0x00000008; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.magnetometerInfo_ = magnetometerInfoBuilder_ == null + ? magnetometerInfo_ + : magnetometerInfoBuilder_.build(); + to_bitField0_ |= 0x00000010; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.barometerInfo_ = barometerInfoBuilder_ == null + ? barometerInfo_ + : barometerInfoBuilder_.build(); + to_bitField0_ |= 0x00000020; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.lightSensorInfo_ = lightSensorInfoBuilder_ == null + ? lightSensorInfo_ + : lightSensorInfoBuilder_.build(); + to_bitField0_ |= 0x00000040; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.proximityInfo_ = proximityInfoBuilder_ == null + ? proximityInfo_ + : proximityInfoBuilder_.build(); + to_bitField0_ |= 0x00000080; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.Trajectory) { + return mergeFrom((com.openpositioning.PositionMe.Traj.Trajectory)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.Trajectory other) { + if (other == com.openpositioning.PositionMe.Traj.Trajectory.getDefaultInstance()) return this; + if (!other.getAndroidVersion().isEmpty()) { + androidVersion_ = other.androidVersion_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getTrajectoryVersion() != 0F) { + setTrajectoryVersion(other.getTrajectoryVersion()); + } + if (!other.getTrajectoryId().isEmpty()) { + trajectoryId_ = other.trajectoryId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (imuDataBuilder_ == null) { + if (!other.imuData_.isEmpty()) { + if (imuData_.isEmpty()) { + imuData_ = other.imuData_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureImuDataIsMutable(); + imuData_.addAll(other.imuData_); + } + onChanged(); + } + } else { + if (!other.imuData_.isEmpty()) { + if (imuDataBuilder_.isEmpty()) { + imuDataBuilder_.dispose(); + imuDataBuilder_ = null; + imuData_ = other.imuData_; + bitField0_ = (bitField0_ & ~0x00000008); + imuDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getImuDataFieldBuilder() : null; + } else { + imuDataBuilder_.addAllMessages(other.imuData_); + } + } + } + if (pdrDataBuilder_ == null) { + if (!other.pdrData_.isEmpty()) { + if (pdrData_.isEmpty()) { + pdrData_ = other.pdrData_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensurePdrDataIsMutable(); + pdrData_.addAll(other.pdrData_); + } + onChanged(); + } + } else { + if (!other.pdrData_.isEmpty()) { + if (pdrDataBuilder_.isEmpty()) { + pdrDataBuilder_.dispose(); + pdrDataBuilder_ = null; + pdrData_ = other.pdrData_; + bitField0_ = (bitField0_ & ~0x00000010); + pdrDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPdrDataFieldBuilder() : null; + } else { + pdrDataBuilder_.addAllMessages(other.pdrData_); + } + } + } + if (magnetometerDataBuilder_ == null) { + if (!other.magnetometerData_.isEmpty()) { + if (magnetometerData_.isEmpty()) { + magnetometerData_ = other.magnetometerData_; + bitField0_ = (bitField0_ & ~0x00000020); + } else { + ensureMagnetometerDataIsMutable(); + magnetometerData_.addAll(other.magnetometerData_); + } + onChanged(); + } + } else { + if (!other.magnetometerData_.isEmpty()) { + if (magnetometerDataBuilder_.isEmpty()) { + magnetometerDataBuilder_.dispose(); + magnetometerDataBuilder_ = null; + magnetometerData_ = other.magnetometerData_; + bitField0_ = (bitField0_ & ~0x00000020); + magnetometerDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getMagnetometerDataFieldBuilder() : null; + } else { + magnetometerDataBuilder_.addAllMessages(other.magnetometerData_); + } + } + } + if (pressureDataBuilder_ == null) { + if (!other.pressureData_.isEmpty()) { + if (pressureData_.isEmpty()) { + pressureData_ = other.pressureData_; + bitField0_ = (bitField0_ & ~0x00000040); + } else { + ensurePressureDataIsMutable(); + pressureData_.addAll(other.pressureData_); + } + onChanged(); + } + } else { + if (!other.pressureData_.isEmpty()) { + if (pressureDataBuilder_.isEmpty()) { + pressureDataBuilder_.dispose(); + pressureDataBuilder_ = null; + pressureData_ = other.pressureData_; + bitField0_ = (bitField0_ & ~0x00000040); + pressureDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getPressureDataFieldBuilder() : null; + } else { + pressureDataBuilder_.addAllMessages(other.pressureData_); + } + } + } + if (lightDataBuilder_ == null) { + if (!other.lightData_.isEmpty()) { + if (lightData_.isEmpty()) { + lightData_ = other.lightData_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureLightDataIsMutable(); + lightData_.addAll(other.lightData_); + } + onChanged(); + } + } else { + if (!other.lightData_.isEmpty()) { + if (lightDataBuilder_.isEmpty()) { + lightDataBuilder_.dispose(); + lightDataBuilder_ = null; + lightData_ = other.lightData_; + bitField0_ = (bitField0_ & ~0x00000080); + lightDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getLightDataFieldBuilder() : null; + } else { + lightDataBuilder_.addAllMessages(other.lightData_); + } + } + } + if (proximityDataBuilder_ == null) { + if (!other.proximityData_.isEmpty()) { + if (proximityData_.isEmpty()) { + proximityData_ = other.proximityData_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureProximityDataIsMutable(); + proximityData_.addAll(other.proximityData_); + } + onChanged(); + } + } else { + if (!other.proximityData_.isEmpty()) { + if (proximityDataBuilder_.isEmpty()) { + proximityDataBuilder_.dispose(); + proximityDataBuilder_ = null; + proximityData_ = other.proximityData_; + bitField0_ = (bitField0_ & ~0x00000100); + proximityDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getProximityDataFieldBuilder() : null; + } else { + proximityDataBuilder_.addAllMessages(other.proximityData_); + } + } + } + if (gnssDataBuilder_ == null) { + if (!other.gnssData_.isEmpty()) { + if (gnssData_.isEmpty()) { + gnssData_ = other.gnssData_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureGnssDataIsMutable(); + gnssData_.addAll(other.gnssData_); + } + onChanged(); + } + } else { + if (!other.gnssData_.isEmpty()) { + if (gnssDataBuilder_.isEmpty()) { + gnssDataBuilder_.dispose(); + gnssDataBuilder_ = null; + gnssData_ = other.gnssData_; + bitField0_ = (bitField0_ & ~0x00000200); + gnssDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getGnssDataFieldBuilder() : null; + } else { + gnssDataBuilder_.addAllMessages(other.gnssData_); + } + } + } + if (wifiFingerprintsBuilder_ == null) { + if (!other.wifiFingerprints_.isEmpty()) { + if (wifiFingerprints_.isEmpty()) { + wifiFingerprints_ = other.wifiFingerprints_; + bitField0_ = (bitField0_ & ~0x00000400); + } else { + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.addAll(other.wifiFingerprints_); + } + onChanged(); + } + } else { + if (!other.wifiFingerprints_.isEmpty()) { + if (wifiFingerprintsBuilder_.isEmpty()) { + wifiFingerprintsBuilder_.dispose(); + wifiFingerprintsBuilder_ = null; + wifiFingerprints_ = other.wifiFingerprints_; + bitField0_ = (bitField0_ & ~0x00000400); + wifiFingerprintsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getWifiFingerprintsFieldBuilder() : null; + } else { + wifiFingerprintsBuilder_.addAllMessages(other.wifiFingerprints_); + } + } + } + if (apsDataBuilder_ == null) { + if (!other.apsData_.isEmpty()) { + if (apsData_.isEmpty()) { + apsData_ = other.apsData_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensureApsDataIsMutable(); + apsData_.addAll(other.apsData_); + } + onChanged(); + } + } else { + if (!other.apsData_.isEmpty()) { + if (apsDataBuilder_.isEmpty()) { + apsDataBuilder_.dispose(); + apsDataBuilder_ = null; + apsData_ = other.apsData_; + bitField0_ = (bitField0_ & ~0x00000800); + apsDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getApsDataFieldBuilder() : null; + } else { + apsDataBuilder_.addAllMessages(other.apsData_); + } + } + } + if (wifiRttDataBuilder_ == null) { + if (!other.wifiRttData_.isEmpty()) { + if (wifiRttData_.isEmpty()) { + wifiRttData_ = other.wifiRttData_; + bitField0_ = (bitField0_ & ~0x00001000); + } else { + ensureWifiRttDataIsMutable(); + wifiRttData_.addAll(other.wifiRttData_); + } + onChanged(); + } + } else { + if (!other.wifiRttData_.isEmpty()) { + if (wifiRttDataBuilder_.isEmpty()) { + wifiRttDataBuilder_.dispose(); + wifiRttDataBuilder_ = null; + wifiRttData_ = other.wifiRttData_; + bitField0_ = (bitField0_ & ~0x00001000); + wifiRttDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getWifiRttDataFieldBuilder() : null; + } else { + wifiRttDataBuilder_.addAllMessages(other.wifiRttData_); + } + } + } + if (bleFingerprintsBuilder_ == null) { + if (!other.bleFingerprints_.isEmpty()) { + if (bleFingerprints_.isEmpty()) { + bleFingerprints_ = other.bleFingerprints_; + bitField0_ = (bitField0_ & ~0x00002000); + } else { + ensureBleFingerprintsIsMutable(); + bleFingerprints_.addAll(other.bleFingerprints_); + } + onChanged(); + } + } else { + if (!other.bleFingerprints_.isEmpty()) { + if (bleFingerprintsBuilder_.isEmpty()) { + bleFingerprintsBuilder_.dispose(); + bleFingerprintsBuilder_ = null; + bleFingerprints_ = other.bleFingerprints_; + bitField0_ = (bitField0_ & ~0x00002000); + bleFingerprintsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getBleFingerprintsFieldBuilder() : null; + } else { + bleFingerprintsBuilder_.addAllMessages(other.bleFingerprints_); + } + } + } + if (bleDataBuilder_ == null) { + if (!other.bleData_.isEmpty()) { + if (bleData_.isEmpty()) { + bleData_ = other.bleData_; + bitField0_ = (bitField0_ & ~0x00004000); + } else { + ensureBleDataIsMutable(); + bleData_.addAll(other.bleData_); + } + onChanged(); + } + } else { + if (!other.bleData_.isEmpty()) { + if (bleDataBuilder_.isEmpty()) { + bleDataBuilder_.dispose(); + bleDataBuilder_ = null; + bleData_ = other.bleData_; + bitField0_ = (bitField0_ & ~0x00004000); + bleDataBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getBleDataFieldBuilder() : null; + } else { + bleDataBuilder_.addAllMessages(other.bleData_); + } + } + } + if (other.getStartTimestamp() != 0L) { + setStartTimestamp(other.getStartTimestamp()); + } + if (other.hasInitialPosition()) { + mergeInitialPosition(other.getInitialPosition()); + } + if (correctedPositionsBuilder_ == null) { + if (!other.correctedPositions_.isEmpty()) { + if (correctedPositions_.isEmpty()) { + correctedPositions_ = other.correctedPositions_; + bitField0_ = (bitField0_ & ~0x00020000); + } else { + ensureCorrectedPositionsIsMutable(); + correctedPositions_.addAll(other.correctedPositions_); + } + onChanged(); + } + } else { + if (!other.correctedPositions_.isEmpty()) { + if (correctedPositionsBuilder_.isEmpty()) { + correctedPositionsBuilder_.dispose(); + correctedPositionsBuilder_ = null; + correctedPositions_ = other.correctedPositions_; + bitField0_ = (bitField0_ & ~0x00020000); + correctedPositionsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getCorrectedPositionsFieldBuilder() : null; + } else { + correctedPositionsBuilder_.addAllMessages(other.correctedPositions_); + } + } + } + if (other.hasAccelerometerInfo()) { + mergeAccelerometerInfo(other.getAccelerometerInfo()); + } + if (other.hasGyroscopeInfo()) { + mergeGyroscopeInfo(other.getGyroscopeInfo()); + } + if (other.hasRotationVectorInfo()) { + mergeRotationVectorInfo(other.getRotationVectorInfo()); + } + if (other.hasMagnetometerInfo()) { + mergeMagnetometerInfo(other.getMagnetometerInfo()); + } + if (other.hasBarometerInfo()) { + mergeBarometerInfo(other.getBarometerInfo()); + } + if (other.hasLightSensorInfo()) { + mergeLightSensorInfo(other.getLightSensorInfo()); + } + if (other.hasProximityInfo()) { + mergeProximityInfo(other.getProximityInfo()); + } + if (testPointsBuilder_ == null) { + if (!other.testPoints_.isEmpty()) { + if (testPoints_.isEmpty()) { + testPoints_ = other.testPoints_; + bitField0_ = (bitField0_ & ~0x02000000); + } else { + ensureTestPointsIsMutable(); + testPoints_.addAll(other.testPoints_); + } + onChanged(); + } + } else { + if (!other.testPoints_.isEmpty()) { + if (testPointsBuilder_.isEmpty()) { + testPointsBuilder_.dispose(); + testPointsBuilder_ = null; + testPoints_ = other.testPoints_; + bitField0_ = (bitField0_ & ~0x02000000); + testPointsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getTestPointsFieldBuilder() : null; + } else { + testPointsBuilder_.addAllMessages(other.testPoints_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + androidVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: { + trajectoryVersion_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 26: { + trajectoryId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.openpositioning.PositionMe.Traj.IMUReading m = + input.readMessage( + com.openpositioning.PositionMe.Traj.IMUReading.parser(), + extensionRegistry); + if (imuDataBuilder_ == null) { + ensureImuDataIsMutable(); + imuData_.add(m); + } else { + imuDataBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + com.openpositioning.PositionMe.Traj.RelativePosition m = + input.readMessage( + com.openpositioning.PositionMe.Traj.RelativePosition.parser(), + extensionRegistry); + if (pdrDataBuilder_ == null) { + ensurePdrDataIsMutable(); + pdrData_.add(m); + } else { + pdrDataBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: { + com.openpositioning.PositionMe.Traj.MagnetometerReading m = + input.readMessage( + com.openpositioning.PositionMe.Traj.MagnetometerReading.parser(), + extensionRegistry); + if (magnetometerDataBuilder_ == null) { + ensureMagnetometerDataIsMutable(); + magnetometerData_.add(m); + } else { + magnetometerDataBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: { + com.openpositioning.PositionMe.Traj.BarometerReading m = + input.readMessage( + com.openpositioning.PositionMe.Traj.BarometerReading.parser(), + extensionRegistry); + if (pressureDataBuilder_ == null) { + ensurePressureDataIsMutable(); + pressureData_.add(m); + } else { + pressureDataBuilder_.addMessage(m); + } + break; + } // case 58 + case 66: { + com.openpositioning.PositionMe.Traj.LightReading m = + input.readMessage( + com.openpositioning.PositionMe.Traj.LightReading.parser(), + extensionRegistry); + if (lightDataBuilder_ == null) { + ensureLightDataIsMutable(); + lightData_.add(m); + } else { + lightDataBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: { + com.openpositioning.PositionMe.Traj.ProximityReading m = + input.readMessage( + com.openpositioning.PositionMe.Traj.ProximityReading.parser(), + extensionRegistry); + if (proximityDataBuilder_ == null) { + ensureProximityDataIsMutable(); + proximityData_.add(m); + } else { + proximityDataBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: { + com.openpositioning.PositionMe.Traj.GNSSReading m = + input.readMessage( + com.openpositioning.PositionMe.Traj.GNSSReading.parser(), + extensionRegistry); + if (gnssDataBuilder_ == null) { + ensureGnssDataIsMutable(); + gnssData_.add(m); + } else { + gnssDataBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: { + com.openpositioning.PositionMe.Traj.Fingerprint m = + input.readMessage( + com.openpositioning.PositionMe.Traj.Fingerprint.parser(), + extensionRegistry); + if (wifiFingerprintsBuilder_ == null) { + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.add(m); + } else { + wifiFingerprintsBuilder_.addMessage(m); + } + break; + } // case 90 + case 98: { + com.openpositioning.PositionMe.Traj.WiFiAPData m = + input.readMessage( + com.openpositioning.PositionMe.Traj.WiFiAPData.parser(), + extensionRegistry); + if (apsDataBuilder_ == null) { + ensureApsDataIsMutable(); + apsData_.add(m); + } else { + apsDataBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: { + com.openpositioning.PositionMe.Traj.WiFiRTTReading m = + input.readMessage( + com.openpositioning.PositionMe.Traj.WiFiRTTReading.parser(), + extensionRegistry); + if (wifiRttDataBuilder_ == null) { + ensureWifiRttDataIsMutable(); + wifiRttData_.add(m); + } else { + wifiRttDataBuilder_.addMessage(m); + } + break; + } // case 106 + case 114: { + com.openpositioning.PositionMe.Traj.Fingerprint m = + input.readMessage( + com.openpositioning.PositionMe.Traj.Fingerprint.parser(), + extensionRegistry); + if (bleFingerprintsBuilder_ == null) { + ensureBleFingerprintsIsMutable(); + bleFingerprints_.add(m); + } else { + bleFingerprintsBuilder_.addMessage(m); + } + break; + } // case 114 + case 122: { + com.openpositioning.PositionMe.Traj.BleData m = + input.readMessage( + com.openpositioning.PositionMe.Traj.BleData.parser(), + extensionRegistry); + if (bleDataBuilder_ == null) { + ensureBleDataIsMutable(); + bleData_.add(m); + } else { + bleDataBuilder_.addMessage(m); + } + break; + } // case 122 + case 128: { + startTimestamp_ = input.readInt64(); + bitField0_ |= 0x00008000; + break; + } // case 128 + case 138: { + input.readMessage( + getInitialPositionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 138 + case 146: { + com.openpositioning.PositionMe.Traj.GNSSPosition m = + input.readMessage( + com.openpositioning.PositionMe.Traj.GNSSPosition.parser(), + extensionRegistry); + if (correctedPositionsBuilder_ == null) { + ensureCorrectedPositionsIsMutable(); + correctedPositions_.add(m); + } else { + correctedPositionsBuilder_.addMessage(m); + } + break; + } // case 146 + case 154: { + input.readMessage( + getAccelerometerInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 154 + case 162: { + input.readMessage( + getGyroscopeInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 162 + case 170: { + input.readMessage( + getRotationVectorInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 170 + case 178: { + input.readMessage( + getMagnetometerInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case 178 + case 186: { + input.readMessage( + getBarometerInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00400000; + break; + } // case 186 + case 194: { + input.readMessage( + getLightSensorInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00800000; + break; + } // case 194 + case 202: { + input.readMessage( + getProximityInfoFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x01000000; + break; + } // case 202 + case 210: { + com.openpositioning.PositionMe.Traj.GNSSPosition m = + input.readMessage( + com.openpositioning.PositionMe.Traj.GNSSPosition.parser(), + extensionRegistry); + if (testPointsBuilder_ == null) { + ensureTestPointsIsMutable(); + testPoints_.add(m); + } else { + testPointsBuilder_.addMessage(m); + } + break; + } // case 210 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object androidVersion_ = ""; + /** + * string android_version = 1; + * @return The androidVersion. + */ + public java.lang.String getAndroidVersion() { + java.lang.Object ref = androidVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + androidVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string android_version = 1; + * @return The bytes for androidVersion. + */ + public com.google.protobuf.ByteString + getAndroidVersionBytes() { + java.lang.Object ref = androidVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + androidVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string android_version = 1; + * @param value The androidVersion to set. + * @return This builder for chaining. + */ + public Builder setAndroidVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + androidVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string android_version = 1; + * @return This builder for chaining. + */ + public Builder clearAndroidVersion() { + androidVersion_ = getDefaultInstance().getAndroidVersion(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string android_version = 1; + * @param value The bytes for androidVersion to set. + * @return This builder for chaining. + */ + public Builder setAndroidVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + androidVersion_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private float trajectoryVersion_ ; + /** + *
+       * version 2.0
+       * 
+ * + * float trajectory_version = 2; + * @return The trajectoryVersion. + */ + @java.lang.Override + public float getTrajectoryVersion() { + return trajectoryVersion_; + } + /** + *
+       * version 2.0
+       * 
+ * + * float trajectory_version = 2; + * @param value The trajectoryVersion to set. + * @return This builder for chaining. + */ + public Builder setTrajectoryVersion(float value) { + + trajectoryVersion_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * version 2.0
+       * 
+ * + * float trajectory_version = 2; + * @return This builder for chaining. + */ + public Builder clearTrajectoryVersion() { + bitField0_ = (bitField0_ & ~0x00000002); + trajectoryVersion_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object trajectoryId_ = ""; + /** + *
+       * trajectory id/name for identification
+       * 
+ * + * string trajectory_id = 3; + * @return The trajectoryId. + */ + public java.lang.String getTrajectoryId() { + java.lang.Object ref = trajectoryId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + trajectoryId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * trajectory id/name for identification
+       * 
+ * + * string trajectory_id = 3; + * @return The bytes for trajectoryId. + */ + public com.google.protobuf.ByteString + getTrajectoryIdBytes() { + java.lang.Object ref = trajectoryId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + trajectoryId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * trajectory id/name for identification
+       * 
+ * + * string trajectory_id = 3; + * @param value The trajectoryId to set. + * @return This builder for chaining. + */ + public Builder setTrajectoryId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + trajectoryId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * trajectory id/name for identification
+       * 
+ * + * string trajectory_id = 3; + * @return This builder for chaining. + */ + public Builder clearTrajectoryId() { + trajectoryId_ = getDefaultInstance().getTrajectoryId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+       * trajectory id/name for identification
+       * 
+ * + * string trajectory_id = 3; + * @param value The bytes for trajectoryId to set. + * @return This builder for chaining. + */ + public Builder setTrajectoryIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + trajectoryId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List imuData_ = + java.util.Collections.emptyList(); + private void ensureImuDataIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + imuData_ = new java.util.ArrayList(imuData_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.IMUReading, com.openpositioning.PositionMe.Traj.IMUReading.Builder, com.openpositioning.PositionMe.Traj.IMUReadingOrBuilder> imuDataBuilder_; + + /** + * repeated .IMUReading imu_data = 4; + */ + public java.util.List getImuDataList() { + if (imuDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(imuData_); + } else { + return imuDataBuilder_.getMessageList(); + } + } + /** + * repeated .IMUReading imu_data = 4; + */ + public int getImuDataCount() { + if (imuDataBuilder_ == null) { + return imuData_.size(); + } else { + return imuDataBuilder_.getCount(); + } + } + /** + * repeated .IMUReading imu_data = 4; + */ + public com.openpositioning.PositionMe.Traj.IMUReading getImuData(int index) { + if (imuDataBuilder_ == null) { + return imuData_.get(index); + } else { + return imuDataBuilder_.getMessage(index); + } + } + /** + * repeated .IMUReading imu_data = 4; + */ + public Builder setImuData( + int index, com.openpositioning.PositionMe.Traj.IMUReading value) { + if (imuDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImuDataIsMutable(); + imuData_.set(index, value); + onChanged(); + } else { + imuDataBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .IMUReading imu_data = 4; + */ + public Builder setImuData( + int index, com.openpositioning.PositionMe.Traj.IMUReading.Builder builderForValue) { + if (imuDataBuilder_ == null) { + ensureImuDataIsMutable(); + imuData_.set(index, builderForValue.build()); + onChanged(); + } else { + imuDataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .IMUReading imu_data = 4; + */ + public Builder addImuData(com.openpositioning.PositionMe.Traj.IMUReading value) { + if (imuDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImuDataIsMutable(); + imuData_.add(value); + onChanged(); + } else { + imuDataBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .IMUReading imu_data = 4; + */ + public Builder addImuData( + int index, com.openpositioning.PositionMe.Traj.IMUReading value) { + if (imuDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureImuDataIsMutable(); + imuData_.add(index, value); + onChanged(); + } else { + imuDataBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .IMUReading imu_data = 4; + */ + public Builder addImuData( + com.openpositioning.PositionMe.Traj.IMUReading.Builder builderForValue) { + if (imuDataBuilder_ == null) { + ensureImuDataIsMutable(); + imuData_.add(builderForValue.build()); + onChanged(); + } else { + imuDataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .IMUReading imu_data = 4; + */ + public Builder addImuData( + int index, com.openpositioning.PositionMe.Traj.IMUReading.Builder builderForValue) { + if (imuDataBuilder_ == null) { + ensureImuDataIsMutable(); + imuData_.add(index, builderForValue.build()); + onChanged(); + } else { + imuDataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .IMUReading imu_data = 4; + */ + public Builder addAllImuData( + java.lang.Iterable values) { + if (imuDataBuilder_ == null) { + ensureImuDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, imuData_); + onChanged(); + } else { + imuDataBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .IMUReading imu_data = 4; + */ + public Builder clearImuData() { + if (imuDataBuilder_ == null) { + imuData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + imuDataBuilder_.clear(); + } + return this; + } + /** + * repeated .IMUReading imu_data = 4; + */ + public Builder removeImuData(int index) { + if (imuDataBuilder_ == null) { + ensureImuDataIsMutable(); + imuData_.remove(index); + onChanged(); + } else { + imuDataBuilder_.remove(index); + } + return this; + } + /** + * repeated .IMUReading imu_data = 4; + */ + public com.openpositioning.PositionMe.Traj.IMUReading.Builder getImuDataBuilder( + int index) { + return getImuDataFieldBuilder().getBuilder(index); + } + /** + * repeated .IMUReading imu_data = 4; + */ + public com.openpositioning.PositionMe.Traj.IMUReadingOrBuilder getImuDataOrBuilder( + int index) { + if (imuDataBuilder_ == null) { + return imuData_.get(index); } else { + return imuDataBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .IMUReading imu_data = 4; + */ + public java.util.List + getImuDataOrBuilderList() { + if (imuDataBuilder_ != null) { + return imuDataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(imuData_); + } + } + /** + * repeated .IMUReading imu_data = 4; + */ + public com.openpositioning.PositionMe.Traj.IMUReading.Builder addImuDataBuilder() { + return getImuDataFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.IMUReading.getDefaultInstance()); + } + /** + * repeated .IMUReading imu_data = 4; + */ + public com.openpositioning.PositionMe.Traj.IMUReading.Builder addImuDataBuilder( + int index) { + return getImuDataFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.IMUReading.getDefaultInstance()); + } + /** + * repeated .IMUReading imu_data = 4; + */ + public java.util.List + getImuDataBuilderList() { + return getImuDataFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.IMUReading, com.openpositioning.PositionMe.Traj.IMUReading.Builder, com.openpositioning.PositionMe.Traj.IMUReadingOrBuilder> + getImuDataFieldBuilder() { + if (imuDataBuilder_ == null) { + imuDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.IMUReading, com.openpositioning.PositionMe.Traj.IMUReading.Builder, com.openpositioning.PositionMe.Traj.IMUReadingOrBuilder>( + imuData_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + imuData_ = null; + } + return imuDataBuilder_; + } + + private java.util.List pdrData_ = + java.util.Collections.emptyList(); + private void ensurePdrDataIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + pdrData_ = new java.util.ArrayList(pdrData_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.RelativePosition, com.openpositioning.PositionMe.Traj.RelativePosition.Builder, com.openpositioning.PositionMe.Traj.RelativePositionOrBuilder> pdrDataBuilder_; + + /** + * repeated .RelativePosition pdr_data = 5; + */ + public java.util.List getPdrDataList() { + if (pdrDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(pdrData_); + } else { + return pdrDataBuilder_.getMessageList(); + } + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public int getPdrDataCount() { + if (pdrDataBuilder_ == null) { + return pdrData_.size(); + } else { + return pdrDataBuilder_.getCount(); + } + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public com.openpositioning.PositionMe.Traj.RelativePosition getPdrData(int index) { + if (pdrDataBuilder_ == null) { + return pdrData_.get(index); + } else { + return pdrDataBuilder_.getMessage(index); + } + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public Builder setPdrData( + int index, com.openpositioning.PositionMe.Traj.RelativePosition value) { + if (pdrDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePdrDataIsMutable(); + pdrData_.set(index, value); + onChanged(); + } else { + pdrDataBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public Builder setPdrData( + int index, com.openpositioning.PositionMe.Traj.RelativePosition.Builder builderForValue) { + if (pdrDataBuilder_ == null) { + ensurePdrDataIsMutable(); + pdrData_.set(index, builderForValue.build()); + onChanged(); + } else { + pdrDataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public Builder addPdrData(com.openpositioning.PositionMe.Traj.RelativePosition value) { + if (pdrDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePdrDataIsMutable(); + pdrData_.add(value); + onChanged(); + } else { + pdrDataBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public Builder addPdrData( + int index, com.openpositioning.PositionMe.Traj.RelativePosition value) { + if (pdrDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePdrDataIsMutable(); + pdrData_.add(index, value); + onChanged(); + } else { + pdrDataBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public Builder addPdrData( + com.openpositioning.PositionMe.Traj.RelativePosition.Builder builderForValue) { + if (pdrDataBuilder_ == null) { + ensurePdrDataIsMutable(); + pdrData_.add(builderForValue.build()); + onChanged(); + } else { + pdrDataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public Builder addPdrData( + int index, com.openpositioning.PositionMe.Traj.RelativePosition.Builder builderForValue) { + if (pdrDataBuilder_ == null) { + ensurePdrDataIsMutable(); + pdrData_.add(index, builderForValue.build()); + onChanged(); + } else { + pdrDataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public Builder addAllPdrData( + java.lang.Iterable values) { + if (pdrDataBuilder_ == null) { + ensurePdrDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pdrData_); + onChanged(); + } else { + pdrDataBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public Builder clearPdrData() { + if (pdrDataBuilder_ == null) { + pdrData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + pdrDataBuilder_.clear(); + } + return this; + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public Builder removePdrData(int index) { + if (pdrDataBuilder_ == null) { + ensurePdrDataIsMutable(); + pdrData_.remove(index); + onChanged(); + } else { + pdrDataBuilder_.remove(index); + } + return this; + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public com.openpositioning.PositionMe.Traj.RelativePosition.Builder getPdrDataBuilder( + int index) { + return getPdrDataFieldBuilder().getBuilder(index); + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public com.openpositioning.PositionMe.Traj.RelativePositionOrBuilder getPdrDataOrBuilder( + int index) { + if (pdrDataBuilder_ == null) { + return pdrData_.get(index); } else { + return pdrDataBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public java.util.List + getPdrDataOrBuilderList() { + if (pdrDataBuilder_ != null) { + return pdrDataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pdrData_); + } + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public com.openpositioning.PositionMe.Traj.RelativePosition.Builder addPdrDataBuilder() { + return getPdrDataFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.RelativePosition.getDefaultInstance()); + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public com.openpositioning.PositionMe.Traj.RelativePosition.Builder addPdrDataBuilder( + int index) { + return getPdrDataFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.RelativePosition.getDefaultInstance()); + } + /** + * repeated .RelativePosition pdr_data = 5; + */ + public java.util.List + getPdrDataBuilderList() { + return getPdrDataFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.RelativePosition, com.openpositioning.PositionMe.Traj.RelativePosition.Builder, com.openpositioning.PositionMe.Traj.RelativePositionOrBuilder> + getPdrDataFieldBuilder() { + if (pdrDataBuilder_ == null) { + pdrDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.RelativePosition, com.openpositioning.PositionMe.Traj.RelativePosition.Builder, com.openpositioning.PositionMe.Traj.RelativePositionOrBuilder>( + pdrData_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + pdrData_ = null; + } + return pdrDataBuilder_; + } + + private java.util.List magnetometerData_ = + java.util.Collections.emptyList(); + private void ensureMagnetometerDataIsMutable() { + if (!((bitField0_ & 0x00000020) != 0)) { + magnetometerData_ = new java.util.ArrayList(magnetometerData_); + bitField0_ |= 0x00000020; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.MagnetometerReading, com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder, com.openpositioning.PositionMe.Traj.MagnetometerReadingOrBuilder> magnetometerDataBuilder_; + + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public java.util.List getMagnetometerDataList() { + if (magnetometerDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(magnetometerData_); + } else { + return magnetometerDataBuilder_.getMessageList(); + } + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public int getMagnetometerDataCount() { + if (magnetometerDataBuilder_ == null) { + return magnetometerData_.size(); + } else { + return magnetometerDataBuilder_.getCount(); + } + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public com.openpositioning.PositionMe.Traj.MagnetometerReading getMagnetometerData(int index) { + if (magnetometerDataBuilder_ == null) { + return magnetometerData_.get(index); + } else { + return magnetometerDataBuilder_.getMessage(index); + } + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public Builder setMagnetometerData( + int index, com.openpositioning.PositionMe.Traj.MagnetometerReading value) { + if (magnetometerDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMagnetometerDataIsMutable(); + magnetometerData_.set(index, value); + onChanged(); + } else { + magnetometerDataBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public Builder setMagnetometerData( + int index, com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder builderForValue) { + if (magnetometerDataBuilder_ == null) { + ensureMagnetometerDataIsMutable(); + magnetometerData_.set(index, builderForValue.build()); + onChanged(); + } else { + magnetometerDataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public Builder addMagnetometerData(com.openpositioning.PositionMe.Traj.MagnetometerReading value) { + if (magnetometerDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMagnetometerDataIsMutable(); + magnetometerData_.add(value); + onChanged(); + } else { + magnetometerDataBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public Builder addMagnetometerData( + int index, com.openpositioning.PositionMe.Traj.MagnetometerReading value) { + if (magnetometerDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMagnetometerDataIsMutable(); + magnetometerData_.add(index, value); + onChanged(); + } else { + magnetometerDataBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public Builder addMagnetometerData( + com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder builderForValue) { + if (magnetometerDataBuilder_ == null) { + ensureMagnetometerDataIsMutable(); + magnetometerData_.add(builderForValue.build()); + onChanged(); + } else { + magnetometerDataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public Builder addMagnetometerData( + int index, com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder builderForValue) { + if (magnetometerDataBuilder_ == null) { + ensureMagnetometerDataIsMutable(); + magnetometerData_.add(index, builderForValue.build()); + onChanged(); + } else { + magnetometerDataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public Builder addAllMagnetometerData( + java.lang.Iterable values) { + if (magnetometerDataBuilder_ == null) { + ensureMagnetometerDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, magnetometerData_); + onChanged(); + } else { + magnetometerDataBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public Builder clearMagnetometerData() { + if (magnetometerDataBuilder_ == null) { + magnetometerData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + magnetometerDataBuilder_.clear(); + } + return this; + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public Builder removeMagnetometerData(int index) { + if (magnetometerDataBuilder_ == null) { + ensureMagnetometerDataIsMutable(); + magnetometerData_.remove(index); + onChanged(); + } else { + magnetometerDataBuilder_.remove(index); + } + return this; + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder getMagnetometerDataBuilder( + int index) { + return getMagnetometerDataFieldBuilder().getBuilder(index); + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public com.openpositioning.PositionMe.Traj.MagnetometerReadingOrBuilder getMagnetometerDataOrBuilder( + int index) { + if (magnetometerDataBuilder_ == null) { + return magnetometerData_.get(index); } else { + return magnetometerDataBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public java.util.List + getMagnetometerDataOrBuilderList() { + if (magnetometerDataBuilder_ != null) { + return magnetometerDataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(magnetometerData_); + } + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder addMagnetometerDataBuilder() { + return getMagnetometerDataFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.MagnetometerReading.getDefaultInstance()); + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder addMagnetometerDataBuilder( + int index) { + return getMagnetometerDataFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.MagnetometerReading.getDefaultInstance()); + } + /** + * repeated .MagnetometerReading magnetometer_data = 6; + */ + public java.util.List + getMagnetometerDataBuilderList() { + return getMagnetometerDataFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.MagnetometerReading, com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder, com.openpositioning.PositionMe.Traj.MagnetometerReadingOrBuilder> + getMagnetometerDataFieldBuilder() { + if (magnetometerDataBuilder_ == null) { + magnetometerDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.MagnetometerReading, com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder, com.openpositioning.PositionMe.Traj.MagnetometerReadingOrBuilder>( + magnetometerData_, + ((bitField0_ & 0x00000020) != 0), + getParentForChildren(), + isClean()); + magnetometerData_ = null; + } + return magnetometerDataBuilder_; + } + + private java.util.List pressureData_ = + java.util.Collections.emptyList(); + private void ensurePressureDataIsMutable() { + if (!((bitField0_ & 0x00000040) != 0)) { + pressureData_ = new java.util.ArrayList(pressureData_); + bitField0_ |= 0x00000040; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.BarometerReading, com.openpositioning.PositionMe.Traj.BarometerReading.Builder, com.openpositioning.PositionMe.Traj.BarometerReadingOrBuilder> pressureDataBuilder_; + + /** + * repeated .BarometerReading pressure_data = 7; + */ + public java.util.List getPressureDataList() { + if (pressureDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(pressureData_); + } else { + return pressureDataBuilder_.getMessageList(); + } + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public int getPressureDataCount() { + if (pressureDataBuilder_ == null) { + return pressureData_.size(); + } else { + return pressureDataBuilder_.getCount(); + } + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public com.openpositioning.PositionMe.Traj.BarometerReading getPressureData(int index) { + if (pressureDataBuilder_ == null) { + return pressureData_.get(index); + } else { + return pressureDataBuilder_.getMessage(index); + } + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public Builder setPressureData( + int index, com.openpositioning.PositionMe.Traj.BarometerReading value) { + if (pressureDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePressureDataIsMutable(); + pressureData_.set(index, value); + onChanged(); + } else { + pressureDataBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public Builder setPressureData( + int index, com.openpositioning.PositionMe.Traj.BarometerReading.Builder builderForValue) { + if (pressureDataBuilder_ == null) { + ensurePressureDataIsMutable(); + pressureData_.set(index, builderForValue.build()); + onChanged(); + } else { + pressureDataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public Builder addPressureData(com.openpositioning.PositionMe.Traj.BarometerReading value) { + if (pressureDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePressureDataIsMutable(); + pressureData_.add(value); + onChanged(); + } else { + pressureDataBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public Builder addPressureData( + int index, com.openpositioning.PositionMe.Traj.BarometerReading value) { + if (pressureDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePressureDataIsMutable(); + pressureData_.add(index, value); + onChanged(); + } else { + pressureDataBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public Builder addPressureData( + com.openpositioning.PositionMe.Traj.BarometerReading.Builder builderForValue) { + if (pressureDataBuilder_ == null) { + ensurePressureDataIsMutable(); + pressureData_.add(builderForValue.build()); + onChanged(); + } else { + pressureDataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public Builder addPressureData( + int index, com.openpositioning.PositionMe.Traj.BarometerReading.Builder builderForValue) { + if (pressureDataBuilder_ == null) { + ensurePressureDataIsMutable(); + pressureData_.add(index, builderForValue.build()); + onChanged(); + } else { + pressureDataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public Builder addAllPressureData( + java.lang.Iterable values) { + if (pressureDataBuilder_ == null) { + ensurePressureDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, pressureData_); + onChanged(); + } else { + pressureDataBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public Builder clearPressureData() { + if (pressureDataBuilder_ == null) { + pressureData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + } else { + pressureDataBuilder_.clear(); + } + return this; + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public Builder removePressureData(int index) { + if (pressureDataBuilder_ == null) { + ensurePressureDataIsMutable(); + pressureData_.remove(index); + onChanged(); + } else { + pressureDataBuilder_.remove(index); + } + return this; + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public com.openpositioning.PositionMe.Traj.BarometerReading.Builder getPressureDataBuilder( + int index) { + return getPressureDataFieldBuilder().getBuilder(index); + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public com.openpositioning.PositionMe.Traj.BarometerReadingOrBuilder getPressureDataOrBuilder( + int index) { + if (pressureDataBuilder_ == null) { + return pressureData_.get(index); } else { + return pressureDataBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public java.util.List + getPressureDataOrBuilderList() { + if (pressureDataBuilder_ != null) { + return pressureDataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pressureData_); + } + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public com.openpositioning.PositionMe.Traj.BarometerReading.Builder addPressureDataBuilder() { + return getPressureDataFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.BarometerReading.getDefaultInstance()); + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public com.openpositioning.PositionMe.Traj.BarometerReading.Builder addPressureDataBuilder( + int index) { + return getPressureDataFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.BarometerReading.getDefaultInstance()); + } + /** + * repeated .BarometerReading pressure_data = 7; + */ + public java.util.List + getPressureDataBuilderList() { + return getPressureDataFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.BarometerReading, com.openpositioning.PositionMe.Traj.BarometerReading.Builder, com.openpositioning.PositionMe.Traj.BarometerReadingOrBuilder> + getPressureDataFieldBuilder() { + if (pressureDataBuilder_ == null) { + pressureDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.BarometerReading, com.openpositioning.PositionMe.Traj.BarometerReading.Builder, com.openpositioning.PositionMe.Traj.BarometerReadingOrBuilder>( + pressureData_, + ((bitField0_ & 0x00000040) != 0), + getParentForChildren(), + isClean()); + pressureData_ = null; + } + return pressureDataBuilder_; + } + + private java.util.List lightData_ = + java.util.Collections.emptyList(); + private void ensureLightDataIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + lightData_ = new java.util.ArrayList(lightData_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.LightReading, com.openpositioning.PositionMe.Traj.LightReading.Builder, com.openpositioning.PositionMe.Traj.LightReadingOrBuilder> lightDataBuilder_; + + /** + * repeated .LightReading light_data = 8; + */ + public java.util.List getLightDataList() { + if (lightDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(lightData_); + } else { + return lightDataBuilder_.getMessageList(); + } + } + /** + * repeated .LightReading light_data = 8; + */ + public int getLightDataCount() { + if (lightDataBuilder_ == null) { + return lightData_.size(); + } else { + return lightDataBuilder_.getCount(); + } + } + /** + * repeated .LightReading light_data = 8; + */ + public com.openpositioning.PositionMe.Traj.LightReading getLightData(int index) { + if (lightDataBuilder_ == null) { + return lightData_.get(index); + } else { + return lightDataBuilder_.getMessage(index); + } + } + /** + * repeated .LightReading light_data = 8; + */ + public Builder setLightData( + int index, com.openpositioning.PositionMe.Traj.LightReading value) { + if (lightDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLightDataIsMutable(); + lightData_.set(index, value); + onChanged(); + } else { + lightDataBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .LightReading light_data = 8; + */ + public Builder setLightData( + int index, com.openpositioning.PositionMe.Traj.LightReading.Builder builderForValue) { + if (lightDataBuilder_ == null) { + ensureLightDataIsMutable(); + lightData_.set(index, builderForValue.build()); + onChanged(); + } else { + lightDataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .LightReading light_data = 8; + */ + public Builder addLightData(com.openpositioning.PositionMe.Traj.LightReading value) { + if (lightDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLightDataIsMutable(); + lightData_.add(value); + onChanged(); + } else { + lightDataBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .LightReading light_data = 8; + */ + public Builder addLightData( + int index, com.openpositioning.PositionMe.Traj.LightReading value) { + if (lightDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLightDataIsMutable(); + lightData_.add(index, value); + onChanged(); + } else { + lightDataBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .LightReading light_data = 8; + */ + public Builder addLightData( + com.openpositioning.PositionMe.Traj.LightReading.Builder builderForValue) { + if (lightDataBuilder_ == null) { + ensureLightDataIsMutable(); + lightData_.add(builderForValue.build()); + onChanged(); + } else { + lightDataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .LightReading light_data = 8; + */ + public Builder addLightData( + int index, com.openpositioning.PositionMe.Traj.LightReading.Builder builderForValue) { + if (lightDataBuilder_ == null) { + ensureLightDataIsMutable(); + lightData_.add(index, builderForValue.build()); + onChanged(); + } else { + lightDataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .LightReading light_data = 8; + */ + public Builder addAllLightData( + java.lang.Iterable values) { + if (lightDataBuilder_ == null) { + ensureLightDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, lightData_); + onChanged(); + } else { + lightDataBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .LightReading light_data = 8; + */ + public Builder clearLightData() { + if (lightDataBuilder_ == null) { + lightData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + lightDataBuilder_.clear(); + } + return this; + } + /** + * repeated .LightReading light_data = 8; + */ + public Builder removeLightData(int index) { + if (lightDataBuilder_ == null) { + ensureLightDataIsMutable(); + lightData_.remove(index); + onChanged(); + } else { + lightDataBuilder_.remove(index); + } + return this; + } + /** + * repeated .LightReading light_data = 8; + */ + public com.openpositioning.PositionMe.Traj.LightReading.Builder getLightDataBuilder( + int index) { + return getLightDataFieldBuilder().getBuilder(index); + } + /** + * repeated .LightReading light_data = 8; + */ + public com.openpositioning.PositionMe.Traj.LightReadingOrBuilder getLightDataOrBuilder( + int index) { + if (lightDataBuilder_ == null) { + return lightData_.get(index); } else { + return lightDataBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .LightReading light_data = 8; + */ + public java.util.List + getLightDataOrBuilderList() { + if (lightDataBuilder_ != null) { + return lightDataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(lightData_); + } + } + /** + * repeated .LightReading light_data = 8; + */ + public com.openpositioning.PositionMe.Traj.LightReading.Builder addLightDataBuilder() { + return getLightDataFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.LightReading.getDefaultInstance()); + } + /** + * repeated .LightReading light_data = 8; + */ + public com.openpositioning.PositionMe.Traj.LightReading.Builder addLightDataBuilder( + int index) { + return getLightDataFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.LightReading.getDefaultInstance()); + } + /** + * repeated .LightReading light_data = 8; + */ + public java.util.List + getLightDataBuilderList() { + return getLightDataFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.LightReading, com.openpositioning.PositionMe.Traj.LightReading.Builder, com.openpositioning.PositionMe.Traj.LightReadingOrBuilder> + getLightDataFieldBuilder() { + if (lightDataBuilder_ == null) { + lightDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.LightReading, com.openpositioning.PositionMe.Traj.LightReading.Builder, com.openpositioning.PositionMe.Traj.LightReadingOrBuilder>( + lightData_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + lightData_ = null; + } + return lightDataBuilder_; + } + + private java.util.List proximityData_ = + java.util.Collections.emptyList(); + private void ensureProximityDataIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + proximityData_ = new java.util.ArrayList(proximityData_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.ProximityReading, com.openpositioning.PositionMe.Traj.ProximityReading.Builder, com.openpositioning.PositionMe.Traj.ProximityReadingOrBuilder> proximityDataBuilder_; + + /** + * repeated .ProximityReading proximity_data = 9; + */ + public java.util.List getProximityDataList() { + if (proximityDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(proximityData_); + } else { + return proximityDataBuilder_.getMessageList(); + } + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public int getProximityDataCount() { + if (proximityDataBuilder_ == null) { + return proximityData_.size(); + } else { + return proximityDataBuilder_.getCount(); + } + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public com.openpositioning.PositionMe.Traj.ProximityReading getProximityData(int index) { + if (proximityDataBuilder_ == null) { + return proximityData_.get(index); + } else { + return proximityDataBuilder_.getMessage(index); + } + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder setProximityData( + int index, com.openpositioning.PositionMe.Traj.ProximityReading value) { + if (proximityDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProximityDataIsMutable(); + proximityData_.set(index, value); + onChanged(); + } else { + proximityDataBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder setProximityData( + int index, com.openpositioning.PositionMe.Traj.ProximityReading.Builder builderForValue) { + if (proximityDataBuilder_ == null) { + ensureProximityDataIsMutable(); + proximityData_.set(index, builderForValue.build()); + onChanged(); + } else { + proximityDataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder addProximityData(com.openpositioning.PositionMe.Traj.ProximityReading value) { + if (proximityDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProximityDataIsMutable(); + proximityData_.add(value); + onChanged(); + } else { + proximityDataBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder addProximityData( + int index, com.openpositioning.PositionMe.Traj.ProximityReading value) { + if (proximityDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProximityDataIsMutable(); + proximityData_.add(index, value); + onChanged(); + } else { + proximityDataBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder addProximityData( + com.openpositioning.PositionMe.Traj.ProximityReading.Builder builderForValue) { + if (proximityDataBuilder_ == null) { + ensureProximityDataIsMutable(); + proximityData_.add(builderForValue.build()); + onChanged(); + } else { + proximityDataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder addProximityData( + int index, com.openpositioning.PositionMe.Traj.ProximityReading.Builder builderForValue) { + if (proximityDataBuilder_ == null) { + ensureProximityDataIsMutable(); + proximityData_.add(index, builderForValue.build()); + onChanged(); + } else { + proximityDataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder addAllProximityData( + java.lang.Iterable values) { + if (proximityDataBuilder_ == null) { + ensureProximityDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, proximityData_); + onChanged(); + } else { + proximityDataBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder clearProximityData() { + if (proximityDataBuilder_ == null) { + proximityData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + proximityDataBuilder_.clear(); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public Builder removeProximityData(int index) { + if (proximityDataBuilder_ == null) { + ensureProximityDataIsMutable(); + proximityData_.remove(index); + onChanged(); + } else { + proximityDataBuilder_.remove(index); + } + return this; + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public com.openpositioning.PositionMe.Traj.ProximityReading.Builder getProximityDataBuilder( + int index) { + return getProximityDataFieldBuilder().getBuilder(index); + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public com.openpositioning.PositionMe.Traj.ProximityReadingOrBuilder getProximityDataOrBuilder( + int index) { + if (proximityDataBuilder_ == null) { + return proximityData_.get(index); } else { + return proximityDataBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public java.util.List + getProximityDataOrBuilderList() { + if (proximityDataBuilder_ != null) { + return proximityDataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(proximityData_); + } + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public com.openpositioning.PositionMe.Traj.ProximityReading.Builder addProximityDataBuilder() { + return getProximityDataFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.ProximityReading.getDefaultInstance()); + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public com.openpositioning.PositionMe.Traj.ProximityReading.Builder addProximityDataBuilder( + int index) { + return getProximityDataFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.ProximityReading.getDefaultInstance()); + } + /** + * repeated .ProximityReading proximity_data = 9; + */ + public java.util.List + getProximityDataBuilderList() { + return getProximityDataFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.ProximityReading, com.openpositioning.PositionMe.Traj.ProximityReading.Builder, com.openpositioning.PositionMe.Traj.ProximityReadingOrBuilder> + getProximityDataFieldBuilder() { + if (proximityDataBuilder_ == null) { + proximityDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.ProximityReading, com.openpositioning.PositionMe.Traj.ProximityReading.Builder, com.openpositioning.PositionMe.Traj.ProximityReadingOrBuilder>( + proximityData_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + proximityData_ = null; + } + return proximityDataBuilder_; + } + + private java.util.List gnssData_ = + java.util.Collections.emptyList(); + private void ensureGnssDataIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + gnssData_ = new java.util.ArrayList(gnssData_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSReading, com.openpositioning.PositionMe.Traj.GNSSReading.Builder, com.openpositioning.PositionMe.Traj.GNSSReadingOrBuilder> gnssDataBuilder_; + + /** + * repeated .GNSSReading gnss_data = 10; + */ + public java.util.List getGnssDataList() { + if (gnssDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(gnssData_); + } else { + return gnssDataBuilder_.getMessageList(); + } + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public int getGnssDataCount() { + if (gnssDataBuilder_ == null) { + return gnssData_.size(); + } else { + return gnssDataBuilder_.getCount(); + } + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public com.openpositioning.PositionMe.Traj.GNSSReading getGnssData(int index) { + if (gnssDataBuilder_ == null) { + return gnssData_.get(index); + } else { + return gnssDataBuilder_.getMessage(index); + } + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public Builder setGnssData( + int index, com.openpositioning.PositionMe.Traj.GNSSReading value) { + if (gnssDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGnssDataIsMutable(); + gnssData_.set(index, value); + onChanged(); + } else { + gnssDataBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public Builder setGnssData( + int index, com.openpositioning.PositionMe.Traj.GNSSReading.Builder builderForValue) { + if (gnssDataBuilder_ == null) { + ensureGnssDataIsMutable(); + gnssData_.set(index, builderForValue.build()); + onChanged(); + } else { + gnssDataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public Builder addGnssData(com.openpositioning.PositionMe.Traj.GNSSReading value) { + if (gnssDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGnssDataIsMutable(); + gnssData_.add(value); + onChanged(); + } else { + gnssDataBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public Builder addGnssData( + int index, com.openpositioning.PositionMe.Traj.GNSSReading value) { + if (gnssDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureGnssDataIsMutable(); + gnssData_.add(index, value); + onChanged(); + } else { + gnssDataBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public Builder addGnssData( + com.openpositioning.PositionMe.Traj.GNSSReading.Builder builderForValue) { + if (gnssDataBuilder_ == null) { + ensureGnssDataIsMutable(); + gnssData_.add(builderForValue.build()); + onChanged(); + } else { + gnssDataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public Builder addGnssData( + int index, com.openpositioning.PositionMe.Traj.GNSSReading.Builder builderForValue) { + if (gnssDataBuilder_ == null) { + ensureGnssDataIsMutable(); + gnssData_.add(index, builderForValue.build()); + onChanged(); + } else { + gnssDataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public Builder addAllGnssData( + java.lang.Iterable values) { + if (gnssDataBuilder_ == null) { + ensureGnssDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, gnssData_); + onChanged(); + } else { + gnssDataBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public Builder clearGnssData() { + if (gnssDataBuilder_ == null) { + gnssData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + gnssDataBuilder_.clear(); + } + return this; + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public Builder removeGnssData(int index) { + if (gnssDataBuilder_ == null) { + ensureGnssDataIsMutable(); + gnssData_.remove(index); + onChanged(); + } else { + gnssDataBuilder_.remove(index); + } + return this; + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public com.openpositioning.PositionMe.Traj.GNSSReading.Builder getGnssDataBuilder( + int index) { + return getGnssDataFieldBuilder().getBuilder(index); + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public com.openpositioning.PositionMe.Traj.GNSSReadingOrBuilder getGnssDataOrBuilder( + int index) { + if (gnssDataBuilder_ == null) { + return gnssData_.get(index); } else { + return gnssDataBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public java.util.List + getGnssDataOrBuilderList() { + if (gnssDataBuilder_ != null) { + return gnssDataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(gnssData_); + } + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public com.openpositioning.PositionMe.Traj.GNSSReading.Builder addGnssDataBuilder() { + return getGnssDataFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.GNSSReading.getDefaultInstance()); + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public com.openpositioning.PositionMe.Traj.GNSSReading.Builder addGnssDataBuilder( + int index) { + return getGnssDataFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.GNSSReading.getDefaultInstance()); + } + /** + * repeated .GNSSReading gnss_data = 10; + */ + public java.util.List + getGnssDataBuilderList() { + return getGnssDataFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSReading, com.openpositioning.PositionMe.Traj.GNSSReading.Builder, com.openpositioning.PositionMe.Traj.GNSSReadingOrBuilder> + getGnssDataFieldBuilder() { + if (gnssDataBuilder_ == null) { + gnssDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSReading, com.openpositioning.PositionMe.Traj.GNSSReading.Builder, com.openpositioning.PositionMe.Traj.GNSSReadingOrBuilder>( + gnssData_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + gnssData_ = null; + } + return gnssDataBuilder_; + } + + private java.util.List wifiFingerprints_ = + java.util.Collections.emptyList(); + private void ensureWifiFingerprintsIsMutable() { + if (!((bitField0_ & 0x00000400) != 0)) { + wifiFingerprints_ = new java.util.ArrayList(wifiFingerprints_); + bitField0_ |= 0x00000400; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.Fingerprint, com.openpositioning.PositionMe.Traj.Fingerprint.Builder, com.openpositioning.PositionMe.Traj.FingerprintOrBuilder> wifiFingerprintsBuilder_; + + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public java.util.List getWifiFingerprintsList() { + if (wifiFingerprintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(wifiFingerprints_); + } else { + return wifiFingerprintsBuilder_.getMessageList(); + } + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public int getWifiFingerprintsCount() { + if (wifiFingerprintsBuilder_ == null) { + return wifiFingerprints_.size(); + } else { + return wifiFingerprintsBuilder_.getCount(); + } + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public com.openpositioning.PositionMe.Traj.Fingerprint getWifiFingerprints(int index) { + if (wifiFingerprintsBuilder_ == null) { + return wifiFingerprints_.get(index); + } else { + return wifiFingerprintsBuilder_.getMessage(index); + } + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public Builder setWifiFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint value) { + if (wifiFingerprintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.set(index, value); + onChanged(); + } else { + wifiFingerprintsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public Builder setWifiFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint.Builder builderForValue) { + if (wifiFingerprintsBuilder_ == null) { + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.set(index, builderForValue.build()); + onChanged(); + } else { + wifiFingerprintsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public Builder addWifiFingerprints(com.openpositioning.PositionMe.Traj.Fingerprint value) { + if (wifiFingerprintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.add(value); + onChanged(); + } else { + wifiFingerprintsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public Builder addWifiFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint value) { + if (wifiFingerprintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.add(index, value); + onChanged(); + } else { + wifiFingerprintsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public Builder addWifiFingerprints( + com.openpositioning.PositionMe.Traj.Fingerprint.Builder builderForValue) { + if (wifiFingerprintsBuilder_ == null) { + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.add(builderForValue.build()); + onChanged(); + } else { + wifiFingerprintsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public Builder addWifiFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint.Builder builderForValue) { + if (wifiFingerprintsBuilder_ == null) { + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.add(index, builderForValue.build()); + onChanged(); + } else { + wifiFingerprintsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public Builder addAllWifiFingerprints( + java.lang.Iterable values) { + if (wifiFingerprintsBuilder_ == null) { + ensureWifiFingerprintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, wifiFingerprints_); + onChanged(); + } else { + wifiFingerprintsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public Builder clearWifiFingerprints() { + if (wifiFingerprintsBuilder_ == null) { + wifiFingerprints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000400); + onChanged(); + } else { + wifiFingerprintsBuilder_.clear(); + } + return this; + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public Builder removeWifiFingerprints(int index) { + if (wifiFingerprintsBuilder_ == null) { + ensureWifiFingerprintsIsMutable(); + wifiFingerprints_.remove(index); + onChanged(); + } else { + wifiFingerprintsBuilder_.remove(index); + } + return this; + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public com.openpositioning.PositionMe.Traj.Fingerprint.Builder getWifiFingerprintsBuilder( + int index) { + return getWifiFingerprintsFieldBuilder().getBuilder(index); + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public com.openpositioning.PositionMe.Traj.FingerprintOrBuilder getWifiFingerprintsOrBuilder( + int index) { + if (wifiFingerprintsBuilder_ == null) { + return wifiFingerprints_.get(index); } else { + return wifiFingerprintsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public java.util.List + getWifiFingerprintsOrBuilderList() { + if (wifiFingerprintsBuilder_ != null) { + return wifiFingerprintsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(wifiFingerprints_); + } + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public com.openpositioning.PositionMe.Traj.Fingerprint.Builder addWifiFingerprintsBuilder() { + return getWifiFingerprintsFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.Fingerprint.getDefaultInstance()); + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public com.openpositioning.PositionMe.Traj.Fingerprint.Builder addWifiFingerprintsBuilder( + int index) { + return getWifiFingerprintsFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.Fingerprint.getDefaultInstance()); + } + /** + * repeated .Fingerprint wifi_fingerprints = 11; + */ + public java.util.List + getWifiFingerprintsBuilderList() { + return getWifiFingerprintsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.Fingerprint, com.openpositioning.PositionMe.Traj.Fingerprint.Builder, com.openpositioning.PositionMe.Traj.FingerprintOrBuilder> + getWifiFingerprintsFieldBuilder() { + if (wifiFingerprintsBuilder_ == null) { + wifiFingerprintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.Fingerprint, com.openpositioning.PositionMe.Traj.Fingerprint.Builder, com.openpositioning.PositionMe.Traj.FingerprintOrBuilder>( + wifiFingerprints_, + ((bitField0_ & 0x00000400) != 0), + getParentForChildren(), + isClean()); + wifiFingerprints_ = null; + } + return wifiFingerprintsBuilder_; + } + + private java.util.List apsData_ = + java.util.Collections.emptyList(); + private void ensureApsDataIsMutable() { + if (!((bitField0_ & 0x00000800) != 0)) { + apsData_ = new java.util.ArrayList(apsData_); + bitField0_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.WiFiAPData, com.openpositioning.PositionMe.Traj.WiFiAPData.Builder, com.openpositioning.PositionMe.Traj.WiFiAPDataOrBuilder> apsDataBuilder_; + + /** + * repeated .WiFiAPData aps_data = 12; + */ + public java.util.List getApsDataList() { + if (apsDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(apsData_); + } else { + return apsDataBuilder_.getMessageList(); + } + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public int getApsDataCount() { + if (apsDataBuilder_ == null) { + return apsData_.size(); + } else { + return apsDataBuilder_.getCount(); + } + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public com.openpositioning.PositionMe.Traj.WiFiAPData getApsData(int index) { + if (apsDataBuilder_ == null) { + return apsData_.get(index); + } else { + return apsDataBuilder_.getMessage(index); + } + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public Builder setApsData( + int index, com.openpositioning.PositionMe.Traj.WiFiAPData value) { + if (apsDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApsDataIsMutable(); + apsData_.set(index, value); + onChanged(); + } else { + apsDataBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public Builder setApsData( + int index, com.openpositioning.PositionMe.Traj.WiFiAPData.Builder builderForValue) { + if (apsDataBuilder_ == null) { + ensureApsDataIsMutable(); + apsData_.set(index, builderForValue.build()); + onChanged(); + } else { + apsDataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public Builder addApsData(com.openpositioning.PositionMe.Traj.WiFiAPData value) { + if (apsDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApsDataIsMutable(); + apsData_.add(value); + onChanged(); + } else { + apsDataBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public Builder addApsData( + int index, com.openpositioning.PositionMe.Traj.WiFiAPData value) { + if (apsDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureApsDataIsMutable(); + apsData_.add(index, value); + onChanged(); + } else { + apsDataBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public Builder addApsData( + com.openpositioning.PositionMe.Traj.WiFiAPData.Builder builderForValue) { + if (apsDataBuilder_ == null) { + ensureApsDataIsMutable(); + apsData_.add(builderForValue.build()); + onChanged(); + } else { + apsDataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public Builder addApsData( + int index, com.openpositioning.PositionMe.Traj.WiFiAPData.Builder builderForValue) { + if (apsDataBuilder_ == null) { + ensureApsDataIsMutable(); + apsData_.add(index, builderForValue.build()); + onChanged(); + } else { + apsDataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public Builder addAllApsData( + java.lang.Iterable values) { + if (apsDataBuilder_ == null) { + ensureApsDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, apsData_); + onChanged(); + } else { + apsDataBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public Builder clearApsData() { + if (apsDataBuilder_ == null) { + apsData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + } else { + apsDataBuilder_.clear(); + } + return this; + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public Builder removeApsData(int index) { + if (apsDataBuilder_ == null) { + ensureApsDataIsMutable(); + apsData_.remove(index); + onChanged(); + } else { + apsDataBuilder_.remove(index); + } + return this; + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public com.openpositioning.PositionMe.Traj.WiFiAPData.Builder getApsDataBuilder( + int index) { + return getApsDataFieldBuilder().getBuilder(index); + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public com.openpositioning.PositionMe.Traj.WiFiAPDataOrBuilder getApsDataOrBuilder( + int index) { + if (apsDataBuilder_ == null) { + return apsData_.get(index); } else { + return apsDataBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public java.util.List + getApsDataOrBuilderList() { + if (apsDataBuilder_ != null) { + return apsDataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(apsData_); + } + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public com.openpositioning.PositionMe.Traj.WiFiAPData.Builder addApsDataBuilder() { + return getApsDataFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.WiFiAPData.getDefaultInstance()); + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public com.openpositioning.PositionMe.Traj.WiFiAPData.Builder addApsDataBuilder( + int index) { + return getApsDataFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.WiFiAPData.getDefaultInstance()); + } + /** + * repeated .WiFiAPData aps_data = 12; + */ + public java.util.List + getApsDataBuilderList() { + return getApsDataFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.WiFiAPData, com.openpositioning.PositionMe.Traj.WiFiAPData.Builder, com.openpositioning.PositionMe.Traj.WiFiAPDataOrBuilder> + getApsDataFieldBuilder() { + if (apsDataBuilder_ == null) { + apsDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.WiFiAPData, com.openpositioning.PositionMe.Traj.WiFiAPData.Builder, com.openpositioning.PositionMe.Traj.WiFiAPDataOrBuilder>( + apsData_, + ((bitField0_ & 0x00000800) != 0), + getParentForChildren(), + isClean()); + apsData_ = null; + } + return apsDataBuilder_; + } + + private java.util.List wifiRttData_ = + java.util.Collections.emptyList(); + private void ensureWifiRttDataIsMutable() { + if (!((bitField0_ & 0x00001000) != 0)) { + wifiRttData_ = new java.util.ArrayList(wifiRttData_); + bitField0_ |= 0x00001000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.WiFiRTTReading, com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder, com.openpositioning.PositionMe.Traj.WiFiRTTReadingOrBuilder> wifiRttDataBuilder_; + + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public java.util.List getWifiRttDataList() { + if (wifiRttDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(wifiRttData_); + } else { + return wifiRttDataBuilder_.getMessageList(); + } + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public int getWifiRttDataCount() { + if (wifiRttDataBuilder_ == null) { + return wifiRttData_.size(); + } else { + return wifiRttDataBuilder_.getCount(); + } + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public com.openpositioning.PositionMe.Traj.WiFiRTTReading getWifiRttData(int index) { + if (wifiRttDataBuilder_ == null) { + return wifiRttData_.get(index); + } else { + return wifiRttDataBuilder_.getMessage(index); + } + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public Builder setWifiRttData( + int index, com.openpositioning.PositionMe.Traj.WiFiRTTReading value) { + if (wifiRttDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWifiRttDataIsMutable(); + wifiRttData_.set(index, value); + onChanged(); + } else { + wifiRttDataBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public Builder setWifiRttData( + int index, com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder builderForValue) { + if (wifiRttDataBuilder_ == null) { + ensureWifiRttDataIsMutable(); + wifiRttData_.set(index, builderForValue.build()); + onChanged(); + } else { + wifiRttDataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public Builder addWifiRttData(com.openpositioning.PositionMe.Traj.WiFiRTTReading value) { + if (wifiRttDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWifiRttDataIsMutable(); + wifiRttData_.add(value); + onChanged(); + } else { + wifiRttDataBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public Builder addWifiRttData( + int index, com.openpositioning.PositionMe.Traj.WiFiRTTReading value) { + if (wifiRttDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureWifiRttDataIsMutable(); + wifiRttData_.add(index, value); + onChanged(); + } else { + wifiRttDataBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public Builder addWifiRttData( + com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder builderForValue) { + if (wifiRttDataBuilder_ == null) { + ensureWifiRttDataIsMutable(); + wifiRttData_.add(builderForValue.build()); + onChanged(); + } else { + wifiRttDataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public Builder addWifiRttData( + int index, com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder builderForValue) { + if (wifiRttDataBuilder_ == null) { + ensureWifiRttDataIsMutable(); + wifiRttData_.add(index, builderForValue.build()); + onChanged(); + } else { + wifiRttDataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public Builder addAllWifiRttData( + java.lang.Iterable values) { + if (wifiRttDataBuilder_ == null) { + ensureWifiRttDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, wifiRttData_); + onChanged(); + } else { + wifiRttDataBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public Builder clearWifiRttData() { + if (wifiRttDataBuilder_ == null) { + wifiRttData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + } else { + wifiRttDataBuilder_.clear(); + } + return this; + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public Builder removeWifiRttData(int index) { + if (wifiRttDataBuilder_ == null) { + ensureWifiRttDataIsMutable(); + wifiRttData_.remove(index); + onChanged(); + } else { + wifiRttDataBuilder_.remove(index); + } + return this; + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder getWifiRttDataBuilder( + int index) { + return getWifiRttDataFieldBuilder().getBuilder(index); + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public com.openpositioning.PositionMe.Traj.WiFiRTTReadingOrBuilder getWifiRttDataOrBuilder( + int index) { + if (wifiRttDataBuilder_ == null) { + return wifiRttData_.get(index); } else { + return wifiRttDataBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public java.util.List + getWifiRttDataOrBuilderList() { + if (wifiRttDataBuilder_ != null) { + return wifiRttDataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(wifiRttData_); + } + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder addWifiRttDataBuilder() { + return getWifiRttDataFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.WiFiRTTReading.getDefaultInstance()); + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder addWifiRttDataBuilder( + int index) { + return getWifiRttDataFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.WiFiRTTReading.getDefaultInstance()); + } + /** + * repeated .WiFiRTTReading wifi_rtt_data = 13; + */ + public java.util.List + getWifiRttDataBuilderList() { + return getWifiRttDataFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.WiFiRTTReading, com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder, com.openpositioning.PositionMe.Traj.WiFiRTTReadingOrBuilder> + getWifiRttDataFieldBuilder() { + if (wifiRttDataBuilder_ == null) { + wifiRttDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.WiFiRTTReading, com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder, com.openpositioning.PositionMe.Traj.WiFiRTTReadingOrBuilder>( + wifiRttData_, + ((bitField0_ & 0x00001000) != 0), + getParentForChildren(), + isClean()); + wifiRttData_ = null; + } + return wifiRttDataBuilder_; + } + + private java.util.List bleFingerprints_ = + java.util.Collections.emptyList(); + private void ensureBleFingerprintsIsMutable() { + if (!((bitField0_ & 0x00002000) != 0)) { + bleFingerprints_ = new java.util.ArrayList(bleFingerprints_); + bitField0_ |= 0x00002000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.Fingerprint, com.openpositioning.PositionMe.Traj.Fingerprint.Builder, com.openpositioning.PositionMe.Traj.FingerprintOrBuilder> bleFingerprintsBuilder_; + + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public java.util.List getBleFingerprintsList() { + if (bleFingerprintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(bleFingerprints_); + } else { + return bleFingerprintsBuilder_.getMessageList(); + } + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public int getBleFingerprintsCount() { + if (bleFingerprintsBuilder_ == null) { + return bleFingerprints_.size(); + } else { + return bleFingerprintsBuilder_.getCount(); + } + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public com.openpositioning.PositionMe.Traj.Fingerprint getBleFingerprints(int index) { + if (bleFingerprintsBuilder_ == null) { + return bleFingerprints_.get(index); + } else { + return bleFingerprintsBuilder_.getMessage(index); + } + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public Builder setBleFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint value) { + if (bleFingerprintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBleFingerprintsIsMutable(); + bleFingerprints_.set(index, value); + onChanged(); + } else { + bleFingerprintsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public Builder setBleFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint.Builder builderForValue) { + if (bleFingerprintsBuilder_ == null) { + ensureBleFingerprintsIsMutable(); + bleFingerprints_.set(index, builderForValue.build()); + onChanged(); + } else { + bleFingerprintsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public Builder addBleFingerprints(com.openpositioning.PositionMe.Traj.Fingerprint value) { + if (bleFingerprintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBleFingerprintsIsMutable(); + bleFingerprints_.add(value); + onChanged(); + } else { + bleFingerprintsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public Builder addBleFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint value) { + if (bleFingerprintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBleFingerprintsIsMutable(); + bleFingerprints_.add(index, value); + onChanged(); + } else { + bleFingerprintsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public Builder addBleFingerprints( + com.openpositioning.PositionMe.Traj.Fingerprint.Builder builderForValue) { + if (bleFingerprintsBuilder_ == null) { + ensureBleFingerprintsIsMutable(); + bleFingerprints_.add(builderForValue.build()); + onChanged(); + } else { + bleFingerprintsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public Builder addBleFingerprints( + int index, com.openpositioning.PositionMe.Traj.Fingerprint.Builder builderForValue) { + if (bleFingerprintsBuilder_ == null) { + ensureBleFingerprintsIsMutable(); + bleFingerprints_.add(index, builderForValue.build()); + onChanged(); + } else { + bleFingerprintsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public Builder addAllBleFingerprints( + java.lang.Iterable values) { + if (bleFingerprintsBuilder_ == null) { + ensureBleFingerprintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bleFingerprints_); + onChanged(); + } else { + bleFingerprintsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public Builder clearBleFingerprints() { + if (bleFingerprintsBuilder_ == null) { + bleFingerprints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + } else { + bleFingerprintsBuilder_.clear(); + } + return this; + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public Builder removeBleFingerprints(int index) { + if (bleFingerprintsBuilder_ == null) { + ensureBleFingerprintsIsMutable(); + bleFingerprints_.remove(index); + onChanged(); + } else { + bleFingerprintsBuilder_.remove(index); + } + return this; + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public com.openpositioning.PositionMe.Traj.Fingerprint.Builder getBleFingerprintsBuilder( + int index) { + return getBleFingerprintsFieldBuilder().getBuilder(index); + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public com.openpositioning.PositionMe.Traj.FingerprintOrBuilder getBleFingerprintsOrBuilder( + int index) { + if (bleFingerprintsBuilder_ == null) { + return bleFingerprints_.get(index); } else { + return bleFingerprintsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public java.util.List + getBleFingerprintsOrBuilderList() { + if (bleFingerprintsBuilder_ != null) { + return bleFingerprintsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bleFingerprints_); + } + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public com.openpositioning.PositionMe.Traj.Fingerprint.Builder addBleFingerprintsBuilder() { + return getBleFingerprintsFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.Fingerprint.getDefaultInstance()); + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public com.openpositioning.PositionMe.Traj.Fingerprint.Builder addBleFingerprintsBuilder( + int index) { + return getBleFingerprintsFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.Fingerprint.getDefaultInstance()); + } + /** + * repeated .Fingerprint ble_fingerprints = 14; + */ + public java.util.List + getBleFingerprintsBuilderList() { + return getBleFingerprintsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.Fingerprint, com.openpositioning.PositionMe.Traj.Fingerprint.Builder, com.openpositioning.PositionMe.Traj.FingerprintOrBuilder> + getBleFingerprintsFieldBuilder() { + if (bleFingerprintsBuilder_ == null) { + bleFingerprintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.Fingerprint, com.openpositioning.PositionMe.Traj.Fingerprint.Builder, com.openpositioning.PositionMe.Traj.FingerprintOrBuilder>( + bleFingerprints_, + ((bitField0_ & 0x00002000) != 0), + getParentForChildren(), + isClean()); + bleFingerprints_ = null; + } + return bleFingerprintsBuilder_; + } + + private java.util.List bleData_ = + java.util.Collections.emptyList(); + private void ensureBleDataIsMutable() { + if (!((bitField0_ & 0x00004000) != 0)) { + bleData_ = new java.util.ArrayList(bleData_); + bitField0_ |= 0x00004000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.BleData, com.openpositioning.PositionMe.Traj.BleData.Builder, com.openpositioning.PositionMe.Traj.BleDataOrBuilder> bleDataBuilder_; + + /** + * repeated .BleData ble_data = 15; + */ + public java.util.List getBleDataList() { + if (bleDataBuilder_ == null) { + return java.util.Collections.unmodifiableList(bleData_); + } else { + return bleDataBuilder_.getMessageList(); + } + } + /** + * repeated .BleData ble_data = 15; + */ + public int getBleDataCount() { + if (bleDataBuilder_ == null) { + return bleData_.size(); + } else { + return bleDataBuilder_.getCount(); + } + } + /** + * repeated .BleData ble_data = 15; + */ + public com.openpositioning.PositionMe.Traj.BleData getBleData(int index) { + if (bleDataBuilder_ == null) { + return bleData_.get(index); + } else { + return bleDataBuilder_.getMessage(index); + } + } + /** + * repeated .BleData ble_data = 15; + */ + public Builder setBleData( + int index, com.openpositioning.PositionMe.Traj.BleData value) { + if (bleDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBleDataIsMutable(); + bleData_.set(index, value); + onChanged(); + } else { + bleDataBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .BleData ble_data = 15; + */ + public Builder setBleData( + int index, com.openpositioning.PositionMe.Traj.BleData.Builder builderForValue) { + if (bleDataBuilder_ == null) { + ensureBleDataIsMutable(); + bleData_.set(index, builderForValue.build()); + onChanged(); + } else { + bleDataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .BleData ble_data = 15; + */ + public Builder addBleData(com.openpositioning.PositionMe.Traj.BleData value) { + if (bleDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBleDataIsMutable(); + bleData_.add(value); + onChanged(); + } else { + bleDataBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .BleData ble_data = 15; + */ + public Builder addBleData( + int index, com.openpositioning.PositionMe.Traj.BleData value) { + if (bleDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBleDataIsMutable(); + bleData_.add(index, value); + onChanged(); + } else { + bleDataBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .BleData ble_data = 15; + */ + public Builder addBleData( + com.openpositioning.PositionMe.Traj.BleData.Builder builderForValue) { + if (bleDataBuilder_ == null) { + ensureBleDataIsMutable(); + bleData_.add(builderForValue.build()); + onChanged(); + } else { + bleDataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .BleData ble_data = 15; + */ + public Builder addBleData( + int index, com.openpositioning.PositionMe.Traj.BleData.Builder builderForValue) { + if (bleDataBuilder_ == null) { + ensureBleDataIsMutable(); + bleData_.add(index, builderForValue.build()); + onChanged(); + } else { + bleDataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .BleData ble_data = 15; + */ + public Builder addAllBleData( + java.lang.Iterable values) { + if (bleDataBuilder_ == null) { + ensureBleDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bleData_); + onChanged(); + } else { + bleDataBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .BleData ble_data = 15; + */ + public Builder clearBleData() { + if (bleDataBuilder_ == null) { + bleData_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00004000); + onChanged(); + } else { + bleDataBuilder_.clear(); + } + return this; + } + /** + * repeated .BleData ble_data = 15; + */ + public Builder removeBleData(int index) { + if (bleDataBuilder_ == null) { + ensureBleDataIsMutable(); + bleData_.remove(index); + onChanged(); + } else { + bleDataBuilder_.remove(index); + } + return this; + } + /** + * repeated .BleData ble_data = 15; + */ + public com.openpositioning.PositionMe.Traj.BleData.Builder getBleDataBuilder( + int index) { + return getBleDataFieldBuilder().getBuilder(index); + } + /** + * repeated .BleData ble_data = 15; + */ + public com.openpositioning.PositionMe.Traj.BleDataOrBuilder getBleDataOrBuilder( + int index) { + if (bleDataBuilder_ == null) { + return bleData_.get(index); } else { + return bleDataBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .BleData ble_data = 15; + */ + public java.util.List + getBleDataOrBuilderList() { + if (bleDataBuilder_ != null) { + return bleDataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bleData_); + } + } + /** + * repeated .BleData ble_data = 15; + */ + public com.openpositioning.PositionMe.Traj.BleData.Builder addBleDataBuilder() { + return getBleDataFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.BleData.getDefaultInstance()); + } + /** + * repeated .BleData ble_data = 15; + */ + public com.openpositioning.PositionMe.Traj.BleData.Builder addBleDataBuilder( + int index) { + return getBleDataFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.BleData.getDefaultInstance()); + } + /** + * repeated .BleData ble_data = 15; + */ + public java.util.List + getBleDataBuilderList() { + return getBleDataFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.BleData, com.openpositioning.PositionMe.Traj.BleData.Builder, com.openpositioning.PositionMe.Traj.BleDataOrBuilder> + getBleDataFieldBuilder() { + if (bleDataBuilder_ == null) { + bleDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.BleData, com.openpositioning.PositionMe.Traj.BleData.Builder, com.openpositioning.PositionMe.Traj.BleDataOrBuilder>( + bleData_, + ((bitField0_ & 0x00004000) != 0), + getParentForChildren(), + isClean()); + bleData_ = null; + } + return bleDataBuilder_; + } + + 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)
+       * 
+ * + * int64 start_timestamp = 16; + * @return The startTimestamp. + */ + @java.lang.Override + 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)
+       * 
+ * + * int64 start_timestamp = 16; + * @param value The startTimestamp to set. + * @return This builder for chaining. + */ + public Builder setStartTimestamp(long value) { + + startTimestamp_ = value; + bitField0_ |= 0x00008000; + 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)
+       * 
+ * + * int64 start_timestamp = 16; + * @return This builder for chaining. + */ + public Builder clearStartTimestamp() { + bitField0_ = (bitField0_ & ~0x00008000); + startTimestamp_ = 0L; + onChanged(); + return this; + } + + private com.openpositioning.PositionMe.Traj.GNSSPosition initialPosition_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> initialPositionBuilder_; + /** + * .GNSSPosition initial_position = 17; + * @return Whether the initialPosition field is set. + */ + public boolean hasInitialPosition() { + return ((bitField0_ & 0x00010000) != 0); + } + /** + * .GNSSPosition initial_position = 17; + * @return The initialPosition. + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition getInitialPosition() { + if (initialPositionBuilder_ == null) { + return initialPosition_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : initialPosition_; + } else { + return initialPositionBuilder_.getMessage(); + } + } + /** + * .GNSSPosition initial_position = 17; + */ + public Builder setInitialPosition(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (initialPositionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + initialPosition_ = value; + } else { + initialPositionBuilder_.setMessage(value); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * .GNSSPosition initial_position = 17; + */ + public Builder setInitialPosition( + com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (initialPositionBuilder_ == null) { + initialPosition_ = builderForValue.build(); + } else { + initialPositionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * .GNSSPosition initial_position = 17; + */ + public Builder mergeInitialPosition(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (initialPositionBuilder_ == null) { + if (((bitField0_ & 0x00010000) != 0) && + initialPosition_ != null && + initialPosition_ != com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()) { + getInitialPositionBuilder().mergeFrom(value); + } else { + initialPosition_ = value; + } + } else { + initialPositionBuilder_.mergeFrom(value); + } + if (initialPosition_ != null) { + bitField0_ |= 0x00010000; + onChanged(); + } + return this; + } + /** + * .GNSSPosition initial_position = 17; + */ + public Builder clearInitialPosition() { + bitField0_ = (bitField0_ & ~0x00010000); + initialPosition_ = null; + if (initialPositionBuilder_ != null) { + initialPositionBuilder_.dispose(); + initialPositionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .GNSSPosition initial_position = 17; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder getInitialPositionBuilder() { + bitField0_ |= 0x00010000; + onChanged(); + return getInitialPositionFieldBuilder().getBuilder(); + } + /** + * .GNSSPosition initial_position = 17; + */ + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getInitialPositionOrBuilder() { + if (initialPositionBuilder_ != null) { + return initialPositionBuilder_.getMessageOrBuilder(); + } else { + return initialPosition_ == null ? + com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : initialPosition_; + } + } + /** + * .GNSSPosition initial_position = 17; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> + getInitialPositionFieldBuilder() { + if (initialPositionBuilder_ == null) { + initialPositionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder>( + getInitialPosition(), + getParentForChildren(), + isClean()); + initialPosition_ = null; + } + return initialPositionBuilder_; + } + + private java.util.List correctedPositions_ = + java.util.Collections.emptyList(); + private void ensureCorrectedPositionsIsMutable() { + if (!((bitField0_ & 0x00020000) != 0)) { + correctedPositions_ = new java.util.ArrayList(correctedPositions_); + bitField0_ |= 0x00020000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> correctedPositionsBuilder_; + + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public java.util.List getCorrectedPositionsList() { + if (correctedPositionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(correctedPositions_); + } else { + return correctedPositionsBuilder_.getMessageList(); + } + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public int getCorrectedPositionsCount() { + if (correctedPositionsBuilder_ == null) { + return correctedPositions_.size(); + } else { + return correctedPositionsBuilder_.getCount(); + } + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition getCorrectedPositions(int index) { + if (correctedPositionsBuilder_ == null) { + return correctedPositions_.get(index); + } else { + return correctedPositionsBuilder_.getMessage(index); + } + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public Builder setCorrectedPositions( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (correctedPositionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCorrectedPositionsIsMutable(); + correctedPositions_.set(index, value); + onChanged(); + } else { + correctedPositionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public Builder setCorrectedPositions( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (correctedPositionsBuilder_ == null) { + ensureCorrectedPositionsIsMutable(); + correctedPositions_.set(index, builderForValue.build()); + onChanged(); + } else { + correctedPositionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public Builder addCorrectedPositions(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (correctedPositionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCorrectedPositionsIsMutable(); + correctedPositions_.add(value); + onChanged(); + } else { + correctedPositionsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public Builder addCorrectedPositions( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (correctedPositionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCorrectedPositionsIsMutable(); + correctedPositions_.add(index, value); + onChanged(); + } else { + correctedPositionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public Builder addCorrectedPositions( + com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (correctedPositionsBuilder_ == null) { + ensureCorrectedPositionsIsMutable(); + correctedPositions_.add(builderForValue.build()); + onChanged(); + } else { + correctedPositionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public Builder addCorrectedPositions( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (correctedPositionsBuilder_ == null) { + ensureCorrectedPositionsIsMutable(); + correctedPositions_.add(index, builderForValue.build()); + onChanged(); + } else { + correctedPositionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public Builder addAllCorrectedPositions( + java.lang.Iterable values) { + if (correctedPositionsBuilder_ == null) { + ensureCorrectedPositionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, correctedPositions_); + onChanged(); + } else { + correctedPositionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public Builder clearCorrectedPositions() { + if (correctedPositionsBuilder_ == null) { + correctedPositions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00020000); + onChanged(); + } else { + correctedPositionsBuilder_.clear(); + } + return this; + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public Builder removeCorrectedPositions(int index) { + if (correctedPositionsBuilder_ == null) { + ensureCorrectedPositionsIsMutable(); + correctedPositions_.remove(index); + onChanged(); + } else { + correctedPositionsBuilder_.remove(index); + } + return this; + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder getCorrectedPositionsBuilder( + int index) { + return getCorrectedPositionsFieldBuilder().getBuilder(index); + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getCorrectedPositionsOrBuilder( + int index) { + if (correctedPositionsBuilder_ == null) { + return correctedPositions_.get(index); } else { + return correctedPositionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public java.util.List + getCorrectedPositionsOrBuilderList() { + if (correctedPositionsBuilder_ != null) { + return correctedPositionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(correctedPositions_); + } + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder addCorrectedPositionsBuilder() { + return getCorrectedPositionsFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()); + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder addCorrectedPositionsBuilder( + int index) { + return getCorrectedPositionsFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()); + } + /** + * repeated .GNSSPosition corrected_positions = 18; + */ + public java.util.List + getCorrectedPositionsBuilderList() { + return getCorrectedPositionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> + getCorrectedPositionsFieldBuilder() { + if (correctedPositionsBuilder_ == null) { + correctedPositionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder>( + correctedPositions_, + ((bitField0_ & 0x00020000) != 0), + getParentForChildren(), + isClean()); + correctedPositions_ = null; + } + return correctedPositionsBuilder_; + } + + private com.openpositioning.PositionMe.Traj.SensorInfo accelerometerInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> accelerometerInfoBuilder_; + /** + * .SensorInfo accelerometer_info = 19; + * @return Whether the accelerometerInfo field is set. + */ + public boolean hasAccelerometerInfo() { + return ((bitField0_ & 0x00040000) != 0); + } + /** + * .SensorInfo accelerometer_info = 19; + * @return The accelerometerInfo. + */ + public com.openpositioning.PositionMe.Traj.SensorInfo getAccelerometerInfo() { + if (accelerometerInfoBuilder_ == null) { + return accelerometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : accelerometerInfo_; + } else { + return accelerometerInfoBuilder_.getMessage(); + } + } + /** + * .SensorInfo accelerometer_info = 19; + */ + public Builder setAccelerometerInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (accelerometerInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + accelerometerInfo_ = value; + } else { + accelerometerInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * .SensorInfo accelerometer_info = 19; + */ + public Builder setAccelerometerInfo( + com.openpositioning.PositionMe.Traj.SensorInfo.Builder builderForValue) { + if (accelerometerInfoBuilder_ == null) { + accelerometerInfo_ = builderForValue.build(); + } else { + accelerometerInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * .SensorInfo accelerometer_info = 19; + */ + public Builder mergeAccelerometerInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (accelerometerInfoBuilder_ == null) { + if (((bitField0_ & 0x00040000) != 0) && + accelerometerInfo_ != null && + accelerometerInfo_ != com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) { + getAccelerometerInfoBuilder().mergeFrom(value); + } else { + accelerometerInfo_ = value; + } + } else { + accelerometerInfoBuilder_.mergeFrom(value); + } + if (accelerometerInfo_ != null) { + bitField0_ |= 0x00040000; + onChanged(); + } + return this; + } + /** + * .SensorInfo accelerometer_info = 19; + */ + public Builder clearAccelerometerInfo() { + bitField0_ = (bitField0_ & ~0x00040000); + accelerometerInfo_ = null; + if (accelerometerInfoBuilder_ != null) { + accelerometerInfoBuilder_.dispose(); + accelerometerInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SensorInfo accelerometer_info = 19; + */ + public com.openpositioning.PositionMe.Traj.SensorInfo.Builder getAccelerometerInfoBuilder() { + bitField0_ |= 0x00040000; + onChanged(); + return getAccelerometerInfoFieldBuilder().getBuilder(); + } + /** + * .SensorInfo accelerometer_info = 19; + */ + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getAccelerometerInfoOrBuilder() { + if (accelerometerInfoBuilder_ != null) { + return accelerometerInfoBuilder_.getMessageOrBuilder(); + } else { + return accelerometerInfo_ == null ? + com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : accelerometerInfo_; + } + } + /** + * .SensorInfo accelerometer_info = 19; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> + getAccelerometerInfoFieldBuilder() { + if (accelerometerInfoBuilder_ == null) { + accelerometerInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder>( + getAccelerometerInfo(), + getParentForChildren(), + isClean()); + accelerometerInfo_ = null; + } + return accelerometerInfoBuilder_; + } + + private com.openpositioning.PositionMe.Traj.SensorInfo gyroscopeInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> gyroscopeInfoBuilder_; + /** + * .SensorInfo gyroscope_info = 20; + * @return Whether the gyroscopeInfo field is set. + */ + public boolean hasGyroscopeInfo() { + return ((bitField0_ & 0x00080000) != 0); + } + /** + * .SensorInfo gyroscope_info = 20; + * @return The gyroscopeInfo. + */ + public com.openpositioning.PositionMe.Traj.SensorInfo getGyroscopeInfo() { + if (gyroscopeInfoBuilder_ == null) { + return gyroscopeInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : gyroscopeInfo_; + } else { + return gyroscopeInfoBuilder_.getMessage(); + } + } + /** + * .SensorInfo gyroscope_info = 20; + */ + public Builder setGyroscopeInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (gyroscopeInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gyroscopeInfo_ = value; + } else { + gyroscopeInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * .SensorInfo gyroscope_info = 20; + */ + public Builder setGyroscopeInfo( + com.openpositioning.PositionMe.Traj.SensorInfo.Builder builderForValue) { + if (gyroscopeInfoBuilder_ == null) { + gyroscopeInfo_ = builderForValue.build(); + } else { + gyroscopeInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * .SensorInfo gyroscope_info = 20; + */ + public Builder mergeGyroscopeInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (gyroscopeInfoBuilder_ == null) { + if (((bitField0_ & 0x00080000) != 0) && + gyroscopeInfo_ != null && + gyroscopeInfo_ != com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) { + getGyroscopeInfoBuilder().mergeFrom(value); + } else { + gyroscopeInfo_ = value; + } + } else { + gyroscopeInfoBuilder_.mergeFrom(value); + } + if (gyroscopeInfo_ != null) { + bitField0_ |= 0x00080000; + onChanged(); + } + return this; + } + /** + * .SensorInfo gyroscope_info = 20; + */ + public Builder clearGyroscopeInfo() { + bitField0_ = (bitField0_ & ~0x00080000); + gyroscopeInfo_ = null; + if (gyroscopeInfoBuilder_ != null) { + gyroscopeInfoBuilder_.dispose(); + gyroscopeInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SensorInfo gyroscope_info = 20; + */ + public com.openpositioning.PositionMe.Traj.SensorInfo.Builder getGyroscopeInfoBuilder() { + bitField0_ |= 0x00080000; + onChanged(); + return getGyroscopeInfoFieldBuilder().getBuilder(); + } + /** + * .SensorInfo gyroscope_info = 20; + */ + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getGyroscopeInfoOrBuilder() { + if (gyroscopeInfoBuilder_ != null) { + return gyroscopeInfoBuilder_.getMessageOrBuilder(); + } else { + return gyroscopeInfo_ == null ? + com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : gyroscopeInfo_; + } + } + /** + * .SensorInfo gyroscope_info = 20; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> + getGyroscopeInfoFieldBuilder() { + if (gyroscopeInfoBuilder_ == null) { + gyroscopeInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder>( + getGyroscopeInfo(), + getParentForChildren(), + isClean()); + gyroscopeInfo_ = null; + } + return gyroscopeInfoBuilder_; + } + + private com.openpositioning.PositionMe.Traj.SensorInfo rotationVectorInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> rotationVectorInfoBuilder_; + /** + * .SensorInfo rotation_vector_info = 21; + * @return Whether the rotationVectorInfo field is set. + */ + public boolean hasRotationVectorInfo() { + return ((bitField0_ & 0x00100000) != 0); + } + /** + * .SensorInfo rotation_vector_info = 21; + * @return The rotationVectorInfo. + */ + public com.openpositioning.PositionMe.Traj.SensorInfo getRotationVectorInfo() { + if (rotationVectorInfoBuilder_ == null) { + return rotationVectorInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : rotationVectorInfo_; + } else { + return rotationVectorInfoBuilder_.getMessage(); + } + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + public Builder setRotationVectorInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (rotationVectorInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rotationVectorInfo_ = value; + } else { + rotationVectorInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + public Builder setRotationVectorInfo( + com.openpositioning.PositionMe.Traj.SensorInfo.Builder builderForValue) { + if (rotationVectorInfoBuilder_ == null) { + rotationVectorInfo_ = builderForValue.build(); + } else { + rotationVectorInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + public Builder mergeRotationVectorInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (rotationVectorInfoBuilder_ == null) { + if (((bitField0_ & 0x00100000) != 0) && + rotationVectorInfo_ != null && + rotationVectorInfo_ != com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) { + getRotationVectorInfoBuilder().mergeFrom(value); + } else { + rotationVectorInfo_ = value; + } + } else { + rotationVectorInfoBuilder_.mergeFrom(value); + } + if (rotationVectorInfo_ != null) { + bitField0_ |= 0x00100000; + onChanged(); + } + return this; + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + public Builder clearRotationVectorInfo() { + bitField0_ = (bitField0_ & ~0x00100000); + rotationVectorInfo_ = null; + if (rotationVectorInfoBuilder_ != null) { + rotationVectorInfoBuilder_.dispose(); + rotationVectorInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + public com.openpositioning.PositionMe.Traj.SensorInfo.Builder getRotationVectorInfoBuilder() { + bitField0_ |= 0x00100000; + onChanged(); + return getRotationVectorInfoFieldBuilder().getBuilder(); + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getRotationVectorInfoOrBuilder() { + if (rotationVectorInfoBuilder_ != null) { + return rotationVectorInfoBuilder_.getMessageOrBuilder(); + } else { + return rotationVectorInfo_ == null ? + com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : rotationVectorInfo_; + } + } + /** + * .SensorInfo rotation_vector_info = 21; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> + getRotationVectorInfoFieldBuilder() { + if (rotationVectorInfoBuilder_ == null) { + rotationVectorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder>( + getRotationVectorInfo(), + getParentForChildren(), + isClean()); + rotationVectorInfo_ = null; + } + return rotationVectorInfoBuilder_; + } + + private com.openpositioning.PositionMe.Traj.SensorInfo magnetometerInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> magnetometerInfoBuilder_; + /** + * .SensorInfo magnetometer_info = 22; + * @return Whether the magnetometerInfo field is set. + */ + public boolean hasMagnetometerInfo() { + return ((bitField0_ & 0x00200000) != 0); + } + /** + * .SensorInfo magnetometer_info = 22; + * @return The magnetometerInfo. + */ + public com.openpositioning.PositionMe.Traj.SensorInfo getMagnetometerInfo() { + if (magnetometerInfoBuilder_ == null) { + return magnetometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : magnetometerInfo_; + } else { + return magnetometerInfoBuilder_.getMessage(); + } + } + /** + * .SensorInfo magnetometer_info = 22; + */ + public Builder setMagnetometerInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (magnetometerInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + magnetometerInfo_ = value; + } else { + magnetometerInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * .SensorInfo magnetometer_info = 22; + */ + public Builder setMagnetometerInfo( + com.openpositioning.PositionMe.Traj.SensorInfo.Builder builderForValue) { + if (magnetometerInfoBuilder_ == null) { + magnetometerInfo_ = builderForValue.build(); + } else { + magnetometerInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * .SensorInfo magnetometer_info = 22; + */ + public Builder mergeMagnetometerInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (magnetometerInfoBuilder_ == null) { + if (((bitField0_ & 0x00200000) != 0) && + magnetometerInfo_ != null && + magnetometerInfo_ != com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) { + getMagnetometerInfoBuilder().mergeFrom(value); + } else { + magnetometerInfo_ = value; + } + } else { + magnetometerInfoBuilder_.mergeFrom(value); + } + if (magnetometerInfo_ != null) { + bitField0_ |= 0x00200000; + onChanged(); + } + return this; + } + /** + * .SensorInfo magnetometer_info = 22; + */ + public Builder clearMagnetometerInfo() { + bitField0_ = (bitField0_ & ~0x00200000); + magnetometerInfo_ = null; + if (magnetometerInfoBuilder_ != null) { + magnetometerInfoBuilder_.dispose(); + magnetometerInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SensorInfo magnetometer_info = 22; + */ + public com.openpositioning.PositionMe.Traj.SensorInfo.Builder getMagnetometerInfoBuilder() { + bitField0_ |= 0x00200000; + onChanged(); + return getMagnetometerInfoFieldBuilder().getBuilder(); + } + /** + * .SensorInfo magnetometer_info = 22; + */ + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getMagnetometerInfoOrBuilder() { + if (magnetometerInfoBuilder_ != null) { + return magnetometerInfoBuilder_.getMessageOrBuilder(); + } else { + return magnetometerInfo_ == null ? + com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : magnetometerInfo_; + } + } + /** + * .SensorInfo magnetometer_info = 22; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> + getMagnetometerInfoFieldBuilder() { + if (magnetometerInfoBuilder_ == null) { + magnetometerInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder>( + getMagnetometerInfo(), + getParentForChildren(), + isClean()); + magnetometerInfo_ = null; + } + return magnetometerInfoBuilder_; + } + + private com.openpositioning.PositionMe.Traj.SensorInfo barometerInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> barometerInfoBuilder_; + /** + * .SensorInfo barometer_info = 23; + * @return Whether the barometerInfo field is set. + */ + public boolean hasBarometerInfo() { + return ((bitField0_ & 0x00400000) != 0); + } + /** + * .SensorInfo barometer_info = 23; + * @return The barometerInfo. + */ + public com.openpositioning.PositionMe.Traj.SensorInfo getBarometerInfo() { + if (barometerInfoBuilder_ == null) { + return barometerInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : barometerInfo_; + } else { + return barometerInfoBuilder_.getMessage(); + } + } + /** + * .SensorInfo barometer_info = 23; + */ + public Builder setBarometerInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (barometerInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + barometerInfo_ = value; + } else { + barometerInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * .SensorInfo barometer_info = 23; + */ + public Builder setBarometerInfo( + com.openpositioning.PositionMe.Traj.SensorInfo.Builder builderForValue) { + if (barometerInfoBuilder_ == null) { + barometerInfo_ = builderForValue.build(); + } else { + barometerInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * .SensorInfo barometer_info = 23; + */ + public Builder mergeBarometerInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (barometerInfoBuilder_ == null) { + if (((bitField0_ & 0x00400000) != 0) && + barometerInfo_ != null && + barometerInfo_ != com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) { + getBarometerInfoBuilder().mergeFrom(value); + } else { + barometerInfo_ = value; + } + } else { + barometerInfoBuilder_.mergeFrom(value); + } + if (barometerInfo_ != null) { + bitField0_ |= 0x00400000; + onChanged(); + } + return this; + } + /** + * .SensorInfo barometer_info = 23; + */ + public Builder clearBarometerInfo() { + bitField0_ = (bitField0_ & ~0x00400000); + barometerInfo_ = null; + if (barometerInfoBuilder_ != null) { + barometerInfoBuilder_.dispose(); + barometerInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SensorInfo barometer_info = 23; + */ + public com.openpositioning.PositionMe.Traj.SensorInfo.Builder getBarometerInfoBuilder() { + bitField0_ |= 0x00400000; + onChanged(); + return getBarometerInfoFieldBuilder().getBuilder(); + } + /** + * .SensorInfo barometer_info = 23; + */ + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getBarometerInfoOrBuilder() { + if (barometerInfoBuilder_ != null) { + return barometerInfoBuilder_.getMessageOrBuilder(); + } else { + return barometerInfo_ == null ? + com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : barometerInfo_; + } + } + /** + * .SensorInfo barometer_info = 23; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> + getBarometerInfoFieldBuilder() { + if (barometerInfoBuilder_ == null) { + barometerInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder>( + getBarometerInfo(), + getParentForChildren(), + isClean()); + barometerInfo_ = null; + } + return barometerInfoBuilder_; + } + + private com.openpositioning.PositionMe.Traj.SensorInfo lightSensorInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> lightSensorInfoBuilder_; + /** + * .SensorInfo light_SensorInfo = 24; + * @return Whether the lightSensorInfo field is set. + */ + public boolean hasLightSensorInfo() { + return ((bitField0_ & 0x00800000) != 0); + } + /** + * .SensorInfo light_SensorInfo = 24; + * @return The lightSensorInfo. + */ + public com.openpositioning.PositionMe.Traj.SensorInfo getLightSensorInfo() { + if (lightSensorInfoBuilder_ == null) { + return lightSensorInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : lightSensorInfo_; + } else { + return lightSensorInfoBuilder_.getMessage(); + } + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + public Builder setLightSensorInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (lightSensorInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lightSensorInfo_ = value; + } else { + lightSensorInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + public Builder setLightSensorInfo( + com.openpositioning.PositionMe.Traj.SensorInfo.Builder builderForValue) { + if (lightSensorInfoBuilder_ == null) { + lightSensorInfo_ = builderForValue.build(); + } else { + lightSensorInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + public Builder mergeLightSensorInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (lightSensorInfoBuilder_ == null) { + if (((bitField0_ & 0x00800000) != 0) && + lightSensorInfo_ != null && + lightSensorInfo_ != com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) { + getLightSensorInfoBuilder().mergeFrom(value); + } else { + lightSensorInfo_ = value; + } + } else { + lightSensorInfoBuilder_.mergeFrom(value); + } + if (lightSensorInfo_ != null) { + bitField0_ |= 0x00800000; + onChanged(); + } + return this; + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + public Builder clearLightSensorInfo() { + bitField0_ = (bitField0_ & ~0x00800000); + lightSensorInfo_ = null; + if (lightSensorInfoBuilder_ != null) { + lightSensorInfoBuilder_.dispose(); + lightSensorInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + public com.openpositioning.PositionMe.Traj.SensorInfo.Builder getLightSensorInfoBuilder() { + bitField0_ |= 0x00800000; + onChanged(); + return getLightSensorInfoFieldBuilder().getBuilder(); + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getLightSensorInfoOrBuilder() { + if (lightSensorInfoBuilder_ != null) { + return lightSensorInfoBuilder_.getMessageOrBuilder(); + } else { + return lightSensorInfo_ == null ? + com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : lightSensorInfo_; + } + } + /** + * .SensorInfo light_SensorInfo = 24; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> + getLightSensorInfoFieldBuilder() { + if (lightSensorInfoBuilder_ == null) { + lightSensorInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder>( + getLightSensorInfo(), + getParentForChildren(), + isClean()); + lightSensorInfo_ = null; + } + return lightSensorInfoBuilder_; + } + + private com.openpositioning.PositionMe.Traj.SensorInfo proximityInfo_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> proximityInfoBuilder_; + /** + * .SensorInfo proximity_info = 25; + * @return Whether the proximityInfo field is set. + */ + public boolean hasProximityInfo() { + return ((bitField0_ & 0x01000000) != 0); + } + /** + * .SensorInfo proximity_info = 25; + * @return The proximityInfo. + */ + public com.openpositioning.PositionMe.Traj.SensorInfo getProximityInfo() { + if (proximityInfoBuilder_ == null) { + return proximityInfo_ == null ? com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : proximityInfo_; + } else { + return proximityInfoBuilder_.getMessage(); + } + } + /** + * .SensorInfo proximity_info = 25; + */ + public Builder setProximityInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (proximityInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + proximityInfo_ = value; + } else { + proximityInfoBuilder_.setMessage(value); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * .SensorInfo proximity_info = 25; + */ + public Builder setProximityInfo( + com.openpositioning.PositionMe.Traj.SensorInfo.Builder builderForValue) { + if (proximityInfoBuilder_ == null) { + proximityInfo_ = builderForValue.build(); + } else { + proximityInfoBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * .SensorInfo proximity_info = 25; + */ + public Builder mergeProximityInfo(com.openpositioning.PositionMe.Traj.SensorInfo value) { + if (proximityInfoBuilder_ == null) { + if (((bitField0_ & 0x01000000) != 0) && + proximityInfo_ != null && + proximityInfo_ != com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) { + getProximityInfoBuilder().mergeFrom(value); + } else { + proximityInfo_ = value; + } + } else { + proximityInfoBuilder_.mergeFrom(value); + } + if (proximityInfo_ != null) { + bitField0_ |= 0x01000000; + onChanged(); + } + return this; + } + /** + * .SensorInfo proximity_info = 25; + */ + public Builder clearProximityInfo() { + bitField0_ = (bitField0_ & ~0x01000000); + proximityInfo_ = null; + if (proximityInfoBuilder_ != null) { + proximityInfoBuilder_.dispose(); + proximityInfoBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .SensorInfo proximity_info = 25; + */ + public com.openpositioning.PositionMe.Traj.SensorInfo.Builder getProximityInfoBuilder() { + bitField0_ |= 0x01000000; + onChanged(); + return getProximityInfoFieldBuilder().getBuilder(); + } + /** + * .SensorInfo proximity_info = 25; + */ + public com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder getProximityInfoOrBuilder() { + if (proximityInfoBuilder_ != null) { + return proximityInfoBuilder_.getMessageOrBuilder(); + } else { + return proximityInfo_ == null ? + com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance() : proximityInfo_; + } + } + /** + * .SensorInfo proximity_info = 25; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder> + getProximityInfoFieldBuilder() { + if (proximityInfoBuilder_ == null) { + proximityInfoBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.SensorInfo, com.openpositioning.PositionMe.Traj.SensorInfo.Builder, com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder>( + getProximityInfo(), + getParentForChildren(), + isClean()); + proximityInfo_ = null; + } + return proximityInfoBuilder_; + } + + private java.util.List testPoints_ = + java.util.Collections.emptyList(); + private void ensureTestPointsIsMutable() { + if (!((bitField0_ & 0x02000000) != 0)) { + testPoints_ = new java.util.ArrayList(testPoints_); + bitField0_ |= 0x02000000; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> testPointsBuilder_; + + /** + * repeated .GNSSPosition test_points = 26; + */ + public java.util.List getTestPointsList() { + if (testPointsBuilder_ == null) { + return java.util.Collections.unmodifiableList(testPoints_); + } else { + return testPointsBuilder_.getMessageList(); + } + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public int getTestPointsCount() { + if (testPointsBuilder_ == null) { + return testPoints_.size(); + } else { + return testPointsBuilder_.getCount(); + } + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition getTestPoints(int index) { + if (testPointsBuilder_ == null) { + return testPoints_.get(index); + } else { + return testPointsBuilder_.getMessage(index); + } + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder setTestPoints( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (testPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestPointsIsMutable(); + testPoints_.set(index, value); + onChanged(); + } else { + testPointsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder setTestPoints( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (testPointsBuilder_ == null) { + ensureTestPointsIsMutable(); + testPoints_.set(index, builderForValue.build()); + onChanged(); + } else { + testPointsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder addTestPoints(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (testPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestPointsIsMutable(); + testPoints_.add(value); + onChanged(); + } else { + testPointsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder addTestPoints( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (testPointsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestPointsIsMutable(); + testPoints_.add(index, value); + onChanged(); + } else { + testPointsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder addTestPoints( + com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (testPointsBuilder_ == null) { + ensureTestPointsIsMutable(); + testPoints_.add(builderForValue.build()); + onChanged(); + } else { + testPointsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder addTestPoints( + int index, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (testPointsBuilder_ == null) { + ensureTestPointsIsMutable(); + testPoints_.add(index, builderForValue.build()); + onChanged(); + } else { + testPointsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder addAllTestPoints( + java.lang.Iterable values) { + if (testPointsBuilder_ == null) { + ensureTestPointsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, testPoints_); + onChanged(); + } else { + testPointsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder clearTestPoints() { + if (testPointsBuilder_ == null) { + testPoints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x02000000); + onChanged(); + } else { + testPointsBuilder_.clear(); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public Builder removeTestPoints(int index) { + if (testPointsBuilder_ == null) { + ensureTestPointsIsMutable(); + testPoints_.remove(index); + onChanged(); + } else { + testPointsBuilder_.remove(index); + } + return this; + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder getTestPointsBuilder( + int index) { + return getTestPointsFieldBuilder().getBuilder(index); + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getTestPointsOrBuilder( + int index) { + if (testPointsBuilder_ == null) { + return testPoints_.get(index); } else { + return testPointsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public java.util.List + getTestPointsOrBuilderList() { + if (testPointsBuilder_ != null) { + return testPointsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(testPoints_); + } + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder addTestPointsBuilder() { + return getTestPointsFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()); + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder addTestPointsBuilder( + int index) { + return getTestPointsFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()); + } + /** + * repeated .GNSSPosition test_points = 26; + */ + public java.util.List + getTestPointsBuilderList() { + return getTestPointsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> + getTestPointsFieldBuilder() { + if (testPointsBuilder_ == null) { + testPointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder>( + testPoints_, + ((bitField0_ & 0x02000000) != 0), + getParentForChildren(), + isClean()); + testPoints_ = null; + } + return testPointsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:Trajectory) + } + + // @@protoc_insertion_point(class_scope:Trajectory) + private static final com.openpositioning.PositionMe.Traj.Trajectory DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.Trajectory(); + } + + public static com.openpositioning.PositionMe.Traj.Trajectory getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Trajectory parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Trajectory getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RelativePositionOrBuilder extends + // @@protoc_insertion_point(interface_extends:RelativePosition) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * milliseconds from the start_timestamp
+     * 
+ * + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + 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
+     * 
+ * + * float x = 2; + * @return The x. + */ + float getX(); + + /** + * float y = 3; + * @return The y. + */ + float getY(); + } + /** + * Protobuf type {@code RelativePosition} + */ + public static final class RelativePosition extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:RelativePosition) + RelativePositionOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + RelativePosition.class.getName()); + } + // Use RelativePosition.newBuilder() to construct. + private RelativePosition(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private RelativePosition() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_RelativePosition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_RelativePosition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.RelativePosition.class, com.openpositioning.PositionMe.Traj.RelativePosition.Builder.class); + } + + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + *
+     * milliseconds from the start_timestamp
+     * 
+ * + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int X_FIELD_NUMBER = 2; + private float x_ = 0F; + /** + *
+     * 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
+     * 
+ * + * float x = 2; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 3; + private float y_ = 0F; + /** + * float y = 3; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relativeTimestamp_ != 0L) { + output.writeInt64(1, relativeTimestamp_); + } + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(2, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(3, y_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, y_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.RelativePosition)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.RelativePosition other = (com.openpositioning.PositionMe.Traj.RelativePosition) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().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) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.RelativePosition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.RelativePosition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.RelativePosition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.RelativePosition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code RelativePosition} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:RelativePosition) + com.openpositioning.PositionMe.Traj.RelativePositionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_RelativePosition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_RelativePosition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.RelativePosition.class, com.openpositioning.PositionMe.Traj.RelativePosition.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.RelativePosition.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + x_ = 0F; + y_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_RelativePosition_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RelativePosition getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.RelativePosition.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RelativePosition build() { + com.openpositioning.PositionMe.Traj.RelativePosition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RelativePosition buildPartial() { + com.openpositioning.PositionMe.Traj.RelativePosition result = new com.openpositioning.PositionMe.Traj.RelativePosition(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.RelativePosition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.y_ = y_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.RelativePosition) { + return mergeFrom((com.openpositioning.PositionMe.Traj.RelativePosition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.RelativePosition other) { + if (other == com.openpositioning.PositionMe.Traj.RelativePosition.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 21: { + x_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: { + y_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + *
+       * milliseconds from the start_timestamp
+       * 
+ * + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + *
+       * milliseconds from the start_timestamp
+       * 
+ * + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * milliseconds from the start_timestamp
+       * 
+ * + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + 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
+       * 
+ * + * float x = 2; + * @return The x. + */ + @java.lang.Override + 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
+       * 
+ * + * float x = 2; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + bitField0_ |= 0x00000002; + 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
+       * 
+ * + * float x = 2; + * @return This builder for chaining. + */ + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000002); + x_ = 0F; + onChanged(); + return this; + } + + private float y_ ; + /** + * float y = 3; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + * float y = 3; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * float y = 3; + * @return This builder for chaining. + */ + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000004); + y_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:RelativePosition) + } + + // @@protoc_insertion_point(class_scope:RelativePosition) + private static final com.openpositioning.PositionMe.Traj.RelativePosition DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.RelativePosition(); + } + + public static com.openpositioning.PositionMe.Traj.RelativePosition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RelativePosition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RelativePosition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface IMUReadingOrBuilder extends + // @@protoc_insertion_point(interface_extends:IMUReading) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * milliseconds
+     * 
+ * + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); + + /** + *
+     * Accelerometer [m/s^2]
+     * 
+ * + * .Vector3 acc = 2; + * @return Whether the acc field is set. + */ + boolean hasAcc(); + /** + *
+     * Accelerometer [m/s^2]
+     * 
+ * + * .Vector3 acc = 2; + * @return The acc. + */ + com.openpositioning.PositionMe.Traj.Vector3 getAcc(); + /** + *
+     * Accelerometer [m/s^2]
+     * 
+ * + * .Vector3 acc = 2; + */ + com.openpositioning.PositionMe.Traj.Vector3OrBuilder getAccOrBuilder(); + + /** + *
+     * Gyroscope [radians/s]
+     * 
+ * + * .Vector3 gyr = 3; + * @return Whether the gyr field is set. + */ + boolean hasGyr(); + /** + *
+     * Gyroscope [radians/s]
+     * 
+ * + * .Vector3 gyr = 3; + * @return The gyr. + */ + com.openpositioning.PositionMe.Traj.Vector3 getGyr(); + /** + *
+     * Gyroscope [radians/s]
+     * 
+ * + * .Vector3 gyr = 3; + */ + com.openpositioning.PositionMe.Traj.Vector3OrBuilder getGyrOrBuilder(); + + /** + *
+     * Orientation [unitless], 4 components should square sum to ~1
+     * 
+ * + * .Quaternion rotation_vector = 4; + * @return Whether the rotationVector field is set. + */ + boolean hasRotationVector(); + /** + *
+     * Orientation [unitless], 4 components should square sum to ~1
+     * 
+ * + * .Quaternion rotation_vector = 4; + * @return The rotationVector. + */ + com.openpositioning.PositionMe.Traj.Quaternion getRotationVector(); + /** + *
+     * Orientation [unitless], 4 components should square sum to ~1
+     * 
+ * + * .Quaternion rotation_vector = 4; + */ + com.openpositioning.PositionMe.Traj.QuaternionOrBuilder getRotationVectorOrBuilder(); + + /** + *
+     * Number of steps so far
+     * 
+ * + * int32 step_count = 5; + * @return The stepCount. + */ + int getStepCount(); + } + /** + * Protobuf type {@code IMUReading} + */ + public static final class IMUReading extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:IMUReading) + IMUReadingOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + IMUReading.class.getName()); + } + // Use IMUReading.newBuilder() to construct. + private IMUReading(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private IMUReading() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_IMUReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_IMUReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.IMUReading.class, com.openpositioning.PositionMe.Traj.IMUReading.Builder.class); + } + + private int bitField0_; + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + *
+     * milliseconds
+     * 
+ * + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int ACC_FIELD_NUMBER = 2; + private com.openpositioning.PositionMe.Traj.Vector3 acc_; + /** + *
+     * Accelerometer [m/s^2]
+     * 
+ * + * .Vector3 acc = 2; + * @return Whether the acc field is set. + */ + @java.lang.Override + public boolean hasAcc() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Accelerometer [m/s^2]
+     * 
+ * + * .Vector3 acc = 2; + * @return The acc. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3 getAcc() { + return acc_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : acc_; + } + /** + *
+     * Accelerometer [m/s^2]
+     * 
+ * + * .Vector3 acc = 2; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3OrBuilder getAccOrBuilder() { + return acc_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : acc_; + } + + public static final int GYR_FIELD_NUMBER = 3; + private com.openpositioning.PositionMe.Traj.Vector3 gyr_; + /** + *
+     * Gyroscope [radians/s]
+     * 
+ * + * .Vector3 gyr = 3; + * @return Whether the gyr field is set. + */ + @java.lang.Override + public boolean hasGyr() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+     * Gyroscope [radians/s]
+     * 
+ * + * .Vector3 gyr = 3; + * @return The gyr. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3 getGyr() { + return gyr_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : gyr_; + } + /** + *
+     * Gyroscope [radians/s]
+     * 
+ * + * .Vector3 gyr = 3; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3OrBuilder getGyrOrBuilder() { + return gyr_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : gyr_; + } + + public static final int ROTATION_VECTOR_FIELD_NUMBER = 4; + private com.openpositioning.PositionMe.Traj.Quaternion rotationVector_; + /** + *
+     * Orientation [unitless], 4 components should square sum to ~1
+     * 
+ * + * .Quaternion rotation_vector = 4; + * @return Whether the rotationVector field is set. + */ + @java.lang.Override + public boolean hasRotationVector() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+     * Orientation [unitless], 4 components should square sum to ~1
+     * 
+ * + * .Quaternion rotation_vector = 4; + * @return The rotationVector. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Quaternion getRotationVector() { + return rotationVector_ == null ? com.openpositioning.PositionMe.Traj.Quaternion.getDefaultInstance() : rotationVector_; + } + /** + *
+     * Orientation [unitless], 4 components should square sum to ~1
+     * 
+ * + * .Quaternion rotation_vector = 4; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.QuaternionOrBuilder getRotationVectorOrBuilder() { + return rotationVector_ == null ? com.openpositioning.PositionMe.Traj.Quaternion.getDefaultInstance() : rotationVector_; + } + + public static final int STEP_COUNT_FIELD_NUMBER = 5; + private int stepCount_ = 0; + /** + *
+     * Number of steps so far
+     * 
+ * + * int32 step_count = 5; + * @return The stepCount. + */ + @java.lang.Override + public int getStepCount() { + return stepCount_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relativeTimestamp_ != 0L) { + output.writeInt64(1, relativeTimestamp_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getAcc()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getGyr()); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getRotationVector()); + } + if (stepCount_ != 0) { + output.writeInt32(5, stepCount_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getAcc()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getGyr()); + } + if (((bitField0_ & 0x00000004) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getRotationVector()); + } + if (stepCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, stepCount_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.IMUReading)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.IMUReading other = (com.openpositioning.PositionMe.Traj.IMUReading) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (hasAcc() != other.hasAcc()) return false; + if (hasAcc()) { + if (!getAcc() + .equals(other.getAcc())) return false; + } + if (hasGyr() != other.hasGyr()) return false; + if (hasGyr()) { + if (!getGyr() + .equals(other.getGyr())) return false; + } + if (hasRotationVector() != other.hasRotationVector()) return false; + if (hasRotationVector()) { + if (!getRotationVector() + .equals(other.getRotationVector())) return false; + } + if (getStepCount() + != other.getStepCount()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRelativeTimestamp()); + if (hasAcc()) { + hash = (37 * hash) + ACC_FIELD_NUMBER; + hash = (53 * hash) + getAcc().hashCode(); + } + if (hasGyr()) { + hash = (37 * hash) + GYR_FIELD_NUMBER; + hash = (53 * hash) + getGyr().hashCode(); + } + if (hasRotationVector()) { + hash = (37 * hash) + ROTATION_VECTOR_FIELD_NUMBER; + hash = (53 * hash) + getRotationVector().hashCode(); + } + hash = (37 * hash) + STEP_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getStepCount(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.IMUReading parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.IMUReading parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.IMUReading parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.IMUReading prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code IMUReading} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:IMUReading) + com.openpositioning.PositionMe.Traj.IMUReadingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_IMUReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_IMUReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.IMUReading.class, com.openpositioning.PositionMe.Traj.IMUReading.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.IMUReading.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getAccFieldBuilder(); + getGyrFieldBuilder(); + getRotationVectorFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + acc_ = null; + if (accBuilder_ != null) { + accBuilder_.dispose(); + accBuilder_ = null; + } + gyr_ = null; + if (gyrBuilder_ != null) { + gyrBuilder_.dispose(); + gyrBuilder_ = null; + } + rotationVector_ = null; + if (rotationVectorBuilder_ != null) { + rotationVectorBuilder_.dispose(); + rotationVectorBuilder_ = null; + } + stepCount_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_IMUReading_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.IMUReading getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.IMUReading.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.IMUReading build() { + com.openpositioning.PositionMe.Traj.IMUReading result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.IMUReading buildPartial() { + com.openpositioning.PositionMe.Traj.IMUReading result = new com.openpositioning.PositionMe.Traj.IMUReading(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.IMUReading result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.acc_ = accBuilder_ == null + ? acc_ + : accBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.gyr_ = gyrBuilder_ == null + ? gyr_ + : gyrBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.rotationVector_ = rotationVectorBuilder_ == null + ? rotationVector_ + : rotationVectorBuilder_.build(); + to_bitField0_ |= 0x00000004; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.stepCount_ = stepCount_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.IMUReading) { + return mergeFrom((com.openpositioning.PositionMe.Traj.IMUReading)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.IMUReading other) { + if (other == com.openpositioning.PositionMe.Traj.IMUReading.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.hasAcc()) { + mergeAcc(other.getAcc()); + } + if (other.hasGyr()) { + mergeGyr(other.getGyr()); + } + if (other.hasRotationVector()) { + mergeRotationVector(other.getRotationVector()); + } + if (other.getStepCount() != 0) { + setStepCount(other.getStepCount()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getAccFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getGyrFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getRotationVectorFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 40: { + stepCount_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + *
+       * milliseconds
+       * 
+ * + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + *
+       * milliseconds
+       * 
+ * + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * milliseconds
+       * 
+ * + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private com.openpositioning.PositionMe.Traj.Vector3 acc_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder> accBuilder_; + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + * @return Whether the acc field is set. + */ + public boolean hasAcc() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + * @return The acc. + */ + public com.openpositioning.PositionMe.Traj.Vector3 getAcc() { + if (accBuilder_ == null) { + return acc_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : acc_; + } else { + return accBuilder_.getMessage(); + } + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + */ + public Builder setAcc(com.openpositioning.PositionMe.Traj.Vector3 value) { + if (accBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + acc_ = value; + } else { + accBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + */ + public Builder setAcc( + com.openpositioning.PositionMe.Traj.Vector3.Builder builderForValue) { + if (accBuilder_ == null) { + acc_ = builderForValue.build(); + } else { + accBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + */ + public Builder mergeAcc(com.openpositioning.PositionMe.Traj.Vector3 value) { + if (accBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + acc_ != null && + acc_ != com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance()) { + getAccBuilder().mergeFrom(value); + } else { + acc_ = value; + } + } else { + accBuilder_.mergeFrom(value); + } + if (acc_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + */ + public Builder clearAcc() { + bitField0_ = (bitField0_ & ~0x00000002); + acc_ = null; + if (accBuilder_ != null) { + accBuilder_.dispose(); + accBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + */ + public com.openpositioning.PositionMe.Traj.Vector3.Builder getAccBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getAccFieldBuilder().getBuilder(); + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + */ + public com.openpositioning.PositionMe.Traj.Vector3OrBuilder getAccOrBuilder() { + if (accBuilder_ != null) { + return accBuilder_.getMessageOrBuilder(); + } else { + return acc_ == null ? + com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : acc_; + } + } + /** + *
+       * Accelerometer [m/s^2]
+       * 
+ * + * .Vector3 acc = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder> + getAccFieldBuilder() { + if (accBuilder_ == null) { + accBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder>( + getAcc(), + getParentForChildren(), + isClean()); + acc_ = null; + } + return accBuilder_; + } + + private com.openpositioning.PositionMe.Traj.Vector3 gyr_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder> gyrBuilder_; + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + * @return Whether the gyr field is set. + */ + public boolean hasGyr() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + * @return The gyr. + */ + public com.openpositioning.PositionMe.Traj.Vector3 getGyr() { + if (gyrBuilder_ == null) { + return gyr_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : gyr_; + } else { + return gyrBuilder_.getMessage(); + } + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + */ + public Builder setGyr(com.openpositioning.PositionMe.Traj.Vector3 value) { + if (gyrBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + gyr_ = value; + } else { + gyrBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + */ + public Builder setGyr( + com.openpositioning.PositionMe.Traj.Vector3.Builder builderForValue) { + if (gyrBuilder_ == null) { + gyr_ = builderForValue.build(); + } else { + gyrBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + */ + public Builder mergeGyr(com.openpositioning.PositionMe.Traj.Vector3 value) { + if (gyrBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + gyr_ != null && + gyr_ != com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance()) { + getGyrBuilder().mergeFrom(value); + } else { + gyr_ = value; + } + } else { + gyrBuilder_.mergeFrom(value); + } + if (gyr_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + */ + public Builder clearGyr() { + bitField0_ = (bitField0_ & ~0x00000004); + gyr_ = null; + if (gyrBuilder_ != null) { + gyrBuilder_.dispose(); + gyrBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + */ + public com.openpositioning.PositionMe.Traj.Vector3.Builder getGyrBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getGyrFieldBuilder().getBuilder(); + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + */ + public com.openpositioning.PositionMe.Traj.Vector3OrBuilder getGyrOrBuilder() { + if (gyrBuilder_ != null) { + return gyrBuilder_.getMessageOrBuilder(); + } else { + return gyr_ == null ? + com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : gyr_; + } + } + /** + *
+       * Gyroscope [radians/s]
+       * 
+ * + * .Vector3 gyr = 3; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder> + getGyrFieldBuilder() { + if (gyrBuilder_ == null) { + gyrBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder>( + getGyr(), + getParentForChildren(), + isClean()); + gyr_ = null; + } + return gyrBuilder_; + } + + private com.openpositioning.PositionMe.Traj.Quaternion rotationVector_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Quaternion, com.openpositioning.PositionMe.Traj.Quaternion.Builder, com.openpositioning.PositionMe.Traj.QuaternionOrBuilder> rotationVectorBuilder_; + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + * @return Whether the rotationVector field is set. + */ + public boolean hasRotationVector() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + * @return The rotationVector. + */ + public com.openpositioning.PositionMe.Traj.Quaternion getRotationVector() { + if (rotationVectorBuilder_ == null) { + return rotationVector_ == null ? com.openpositioning.PositionMe.Traj.Quaternion.getDefaultInstance() : rotationVector_; + } else { + return rotationVectorBuilder_.getMessage(); + } + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + */ + public Builder setRotationVector(com.openpositioning.PositionMe.Traj.Quaternion value) { + if (rotationVectorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rotationVector_ = value; + } else { + rotationVectorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + */ + public Builder setRotationVector( + com.openpositioning.PositionMe.Traj.Quaternion.Builder builderForValue) { + if (rotationVectorBuilder_ == null) { + rotationVector_ = builderForValue.build(); + } else { + rotationVectorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + */ + public Builder mergeRotationVector(com.openpositioning.PositionMe.Traj.Quaternion value) { + if (rotationVectorBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + rotationVector_ != null && + rotationVector_ != com.openpositioning.PositionMe.Traj.Quaternion.getDefaultInstance()) { + getRotationVectorBuilder().mergeFrom(value); + } else { + rotationVector_ = value; + } + } else { + rotationVectorBuilder_.mergeFrom(value); + } + if (rotationVector_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + */ + public Builder clearRotationVector() { + bitField0_ = (bitField0_ & ~0x00000008); + rotationVector_ = null; + if (rotationVectorBuilder_ != null) { + rotationVectorBuilder_.dispose(); + rotationVectorBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + */ + public com.openpositioning.PositionMe.Traj.Quaternion.Builder getRotationVectorBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getRotationVectorFieldBuilder().getBuilder(); + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + */ + public com.openpositioning.PositionMe.Traj.QuaternionOrBuilder getRotationVectorOrBuilder() { + if (rotationVectorBuilder_ != null) { + return rotationVectorBuilder_.getMessageOrBuilder(); + } else { + return rotationVector_ == null ? + com.openpositioning.PositionMe.Traj.Quaternion.getDefaultInstance() : rotationVector_; + } + } + /** + *
+       * Orientation [unitless], 4 components should square sum to ~1
+       * 
+ * + * .Quaternion rotation_vector = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Quaternion, com.openpositioning.PositionMe.Traj.Quaternion.Builder, com.openpositioning.PositionMe.Traj.QuaternionOrBuilder> + getRotationVectorFieldBuilder() { + if (rotationVectorBuilder_ == null) { + rotationVectorBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Quaternion, com.openpositioning.PositionMe.Traj.Quaternion.Builder, com.openpositioning.PositionMe.Traj.QuaternionOrBuilder>( + getRotationVector(), + getParentForChildren(), + isClean()); + rotationVector_ = null; + } + return rotationVectorBuilder_; + } + + private int stepCount_ ; + /** + *
+       * Number of steps so far
+       * 
+ * + * int32 step_count = 5; + * @return The stepCount. + */ + @java.lang.Override + public int getStepCount() { + return stepCount_; + } + /** + *
+       * Number of steps so far
+       * 
+ * + * int32 step_count = 5; + * @param value The stepCount to set. + * @return This builder for chaining. + */ + public Builder setStepCount(int value) { + + stepCount_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * Number of steps so far
+       * 
+ * + * int32 step_count = 5; + * @return This builder for chaining. + */ + public Builder clearStepCount() { + bitField0_ = (bitField0_ & ~0x00000010); + stepCount_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:IMUReading) + } + + // @@protoc_insertion_point(class_scope:IMUReading) + private static final com.openpositioning.PositionMe.Traj.IMUReading DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.IMUReading(); + } + + public static com.openpositioning.PositionMe.Traj.IMUReading getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public IMUReading parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.IMUReading getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MagnetometerReadingOrBuilder extends + // @@protoc_insertion_point(interface_extends:MagnetometerReading) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); + + /** + *
+     * Magnetometer [uT]
+     * 
+ * + * .Vector3 mag = 2; + * @return Whether the mag field is set. + */ + boolean hasMag(); + /** + *
+     * Magnetometer [uT]
+     * 
+ * + * .Vector3 mag = 2; + * @return The mag. + */ + com.openpositioning.PositionMe.Traj.Vector3 getMag(); + /** + *
+     * Magnetometer [uT]
+     * 
+ * + * .Vector3 mag = 2; + */ + com.openpositioning.PositionMe.Traj.Vector3OrBuilder getMagOrBuilder(); + } + /** + * Protobuf type {@code MagnetometerReading} + */ + public static final class MagnetometerReading extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:MagnetometerReading) + MagnetometerReadingOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + MagnetometerReading.class.getName()); + } + // Use MagnetometerReading.newBuilder() to construct. + private MagnetometerReading(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private MagnetometerReading() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_MagnetometerReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_MagnetometerReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.MagnetometerReading.class, com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder.class); + } + + private int bitField0_; + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int MAG_FIELD_NUMBER = 2; + private com.openpositioning.PositionMe.Traj.Vector3 mag_; + /** + *
+     * Magnetometer [uT]
+     * 
+ * + * .Vector3 mag = 2; + * @return Whether the mag field is set. + */ + @java.lang.Override + public boolean hasMag() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * Magnetometer [uT]
+     * 
+ * + * .Vector3 mag = 2; + * @return The mag. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3 getMag() { + return mag_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : mag_; + } + /** + *
+     * Magnetometer [uT]
+     * 
+ * + * .Vector3 mag = 2; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3OrBuilder getMagOrBuilder() { + return mag_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : mag_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relativeTimestamp_ != 0L) { + output.writeInt64(1, relativeTimestamp_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getMag()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getMag()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.MagnetometerReading)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.MagnetometerReading other = (com.openpositioning.PositionMe.Traj.MagnetometerReading) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (hasMag() != other.hasMag()) return false; + if (hasMag()) { + if (!getMag() + .equals(other.getMag())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRelativeTimestamp()); + if (hasMag()) { + hash = (37 * hash) + MAG_FIELD_NUMBER; + hash = (53 * hash) + getMag().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.MagnetometerReading parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.MagnetometerReading prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code MagnetometerReading} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:MagnetometerReading) + com.openpositioning.PositionMe.Traj.MagnetometerReadingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_MagnetometerReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_MagnetometerReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.MagnetometerReading.class, com.openpositioning.PositionMe.Traj.MagnetometerReading.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.MagnetometerReading.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getMagFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + mag_ = null; + if (magBuilder_ != null) { + magBuilder_.dispose(); + magBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_MagnetometerReading_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.MagnetometerReading getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.MagnetometerReading.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.MagnetometerReading build() { + com.openpositioning.PositionMe.Traj.MagnetometerReading result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.MagnetometerReading buildPartial() { + com.openpositioning.PositionMe.Traj.MagnetometerReading result = new com.openpositioning.PositionMe.Traj.MagnetometerReading(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.MagnetometerReading result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.mag_ = magBuilder_ == null + ? mag_ + : magBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.MagnetometerReading) { + return mergeFrom((com.openpositioning.PositionMe.Traj.MagnetometerReading)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.MagnetometerReading other) { + if (other == com.openpositioning.PositionMe.Traj.MagnetometerReading.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.hasMag()) { + mergeMag(other.getMag()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + input.readMessage( + getMagFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private com.openpositioning.PositionMe.Traj.Vector3 mag_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder> magBuilder_; + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + * @return Whether the mag field is set. + */ + public boolean hasMag() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + * @return The mag. + */ + public com.openpositioning.PositionMe.Traj.Vector3 getMag() { + if (magBuilder_ == null) { + return mag_ == null ? com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : mag_; + } else { + return magBuilder_.getMessage(); + } + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + */ + public Builder setMag(com.openpositioning.PositionMe.Traj.Vector3 value) { + if (magBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + mag_ = value; + } else { + magBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + */ + public Builder setMag( + com.openpositioning.PositionMe.Traj.Vector3.Builder builderForValue) { + if (magBuilder_ == null) { + mag_ = builderForValue.build(); + } else { + magBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + */ + public Builder mergeMag(com.openpositioning.PositionMe.Traj.Vector3 value) { + if (magBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + mag_ != null && + mag_ != com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance()) { + getMagBuilder().mergeFrom(value); + } else { + mag_ = value; + } + } else { + magBuilder_.mergeFrom(value); + } + if (mag_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + */ + public Builder clearMag() { + bitField0_ = (bitField0_ & ~0x00000002); + mag_ = null; + if (magBuilder_ != null) { + magBuilder_.dispose(); + magBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + */ + public com.openpositioning.PositionMe.Traj.Vector3.Builder getMagBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMagFieldBuilder().getBuilder(); + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + */ + public com.openpositioning.PositionMe.Traj.Vector3OrBuilder getMagOrBuilder() { + if (magBuilder_ != null) { + return magBuilder_.getMessageOrBuilder(); + } else { + return mag_ == null ? + com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance() : mag_; + } + } + /** + *
+       * Magnetometer [uT]
+       * 
+ * + * .Vector3 mag = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder> + getMagFieldBuilder() { + if (magBuilder_ == null) { + magBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.Vector3, com.openpositioning.PositionMe.Traj.Vector3.Builder, com.openpositioning.PositionMe.Traj.Vector3OrBuilder>( + getMag(), + getParentForChildren(), + isClean()); + mag_ = null; + } + return magBuilder_; + } + + // @@protoc_insertion_point(builder_scope:MagnetometerReading) + } + + // @@protoc_insertion_point(class_scope:MagnetometerReading) + private static final com.openpositioning.PositionMe.Traj.MagnetometerReading DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.MagnetometerReading(); + } + + public static com.openpositioning.PositionMe.Traj.MagnetometerReading getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MagnetometerReading parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.MagnetometerReading getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BarometerReadingOrBuilder extends + // @@protoc_insertion_point(interface_extends:BarometerReading) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); + + /** + *
+     * mbar
+     * 
+ * + * float pressure = 2; + * @return The pressure. + */ + float getPressure(); + } + /** + * Protobuf type {@code BarometerReading} + */ + public static final class BarometerReading extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:BarometerReading) + BarometerReadingOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + BarometerReading.class.getName()); + } + // Use BarometerReading.newBuilder() to construct. + private BarometerReading(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BarometerReading() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_BarometerReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_BarometerReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.BarometerReading.class, com.openpositioning.PositionMe.Traj.BarometerReading.Builder.class); + } + + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int PRESSURE_FIELD_NUMBER = 2; + private float pressure_ = 0F; + /** + *
+     * mbar
+     * 
+ * + * float pressure = 2; + * @return The pressure. + */ + @java.lang.Override + public float getPressure() { + return pressure_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relativeTimestamp_ != 0L) { + output.writeInt64(1, relativeTimestamp_); + } + if (java.lang.Float.floatToRawIntBits(pressure_) != 0) { + output.writeFloat(2, pressure_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (java.lang.Float.floatToRawIntBits(pressure_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, pressure_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.BarometerReading)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.BarometerReading other = (com.openpositioning.PositionMe.Traj.BarometerReading) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (java.lang.Float.floatToIntBits(getPressure()) + != java.lang.Float.floatToIntBits( + other.getPressure())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().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) + java.lang.Float.floatToIntBits( + getPressure()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.BarometerReading parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.BarometerReading parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.BarometerReading parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.BarometerReading prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code BarometerReading} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:BarometerReading) + com.openpositioning.PositionMe.Traj.BarometerReadingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_BarometerReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_BarometerReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.BarometerReading.class, com.openpositioning.PositionMe.Traj.BarometerReading.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.BarometerReading.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + pressure_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_BarometerReading_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BarometerReading getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.BarometerReading.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BarometerReading build() { + com.openpositioning.PositionMe.Traj.BarometerReading result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BarometerReading buildPartial() { + com.openpositioning.PositionMe.Traj.BarometerReading result = new com.openpositioning.PositionMe.Traj.BarometerReading(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.BarometerReading result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pressure_ = pressure_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.BarometerReading) { + return mergeFrom((com.openpositioning.PositionMe.Traj.BarometerReading)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.BarometerReading other) { + if (other == com.openpositioning.PositionMe.Traj.BarometerReading.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.getPressure() != 0F) { + setPressure(other.getPressure()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 21: { + pressure_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private float pressure_ ; + /** + *
+       * mbar
+       * 
+ * + * float pressure = 2; + * @return The pressure. + */ + @java.lang.Override + public float getPressure() { + return pressure_; + } + /** + *
+       * mbar
+       * 
+ * + * float pressure = 2; + * @param value The pressure to set. + * @return This builder for chaining. + */ + public Builder setPressure(float value) { + + pressure_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * mbar
+       * 
+ * + * float pressure = 2; + * @return This builder for chaining. + */ + public Builder clearPressure() { + bitField0_ = (bitField0_ & ~0x00000002); + pressure_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:BarometerReading) + } + + // @@protoc_insertion_point(class_scope:BarometerReading) + private static final com.openpositioning.PositionMe.Traj.BarometerReading DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.BarometerReading(); + } + + public static com.openpositioning.PositionMe.Traj.BarometerReading getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BarometerReading parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BarometerReading getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface LightReadingOrBuilder extends + // @@protoc_insertion_point(interface_extends:LightReading) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); + + /** + *
+     * lux
+     * 
+ * + * float light = 2; + * @return The light. + */ + float getLight(); + } + /** + * Protobuf type {@code LightReading} + */ + public static final class LightReading extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:LightReading) + LightReadingOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + LightReading.class.getName()); + } + // Use LightReading.newBuilder() to construct. + private LightReading(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private LightReading() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_LightReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_LightReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.LightReading.class, com.openpositioning.PositionMe.Traj.LightReading.Builder.class); + } + + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int LIGHT_FIELD_NUMBER = 2; + private float light_ = 0F; + /** + *
+     * lux
+     * 
+ * + * float light = 2; + * @return The light. + */ + @java.lang.Override + public float getLight() { + return light_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relativeTimestamp_ != 0L) { + output.writeInt64(1, relativeTimestamp_); + } + if (java.lang.Float.floatToRawIntBits(light_) != 0) { + output.writeFloat(2, light_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (java.lang.Float.floatToRawIntBits(light_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, light_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.LightReading)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.LightReading other = (com.openpositioning.PositionMe.Traj.LightReading) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (java.lang.Float.floatToIntBits(getLight()) + != java.lang.Float.floatToIntBits( + other.getLight())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().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) + java.lang.Float.floatToIntBits( + getLight()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.LightReading parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.LightReading parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.LightReading parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.LightReading prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code LightReading} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:LightReading) + com.openpositioning.PositionMe.Traj.LightReadingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_LightReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_LightReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.LightReading.class, com.openpositioning.PositionMe.Traj.LightReading.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.LightReading.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + light_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_LightReading_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.LightReading getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.LightReading.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.LightReading build() { + com.openpositioning.PositionMe.Traj.LightReading result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.LightReading buildPartial() { + com.openpositioning.PositionMe.Traj.LightReading result = new com.openpositioning.PositionMe.Traj.LightReading(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.LightReading result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.light_ = light_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.LightReading) { + return mergeFrom((com.openpositioning.PositionMe.Traj.LightReading)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.LightReading other) { + if (other == com.openpositioning.PositionMe.Traj.LightReading.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.getLight() != 0F) { + setLight(other.getLight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 21: { + light_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private float light_ ; + /** + *
+       * lux
+       * 
+ * + * float light = 2; + * @return The light. + */ + @java.lang.Override + public float getLight() { + return light_; + } + /** + *
+       * lux
+       * 
+ * + * float light = 2; + * @param value The light to set. + * @return This builder for chaining. + */ + public Builder setLight(float value) { + + light_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * lux
+       * 
+ * + * float light = 2; + * @return This builder for chaining. + */ + public Builder clearLight() { + bitField0_ = (bitField0_ & ~0x00000002); + light_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:LightReading) + } + + // @@protoc_insertion_point(class_scope:LightReading) + private static final com.openpositioning.PositionMe.Traj.LightReading DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.LightReading(); + } + + public static com.openpositioning.PositionMe.Traj.LightReading getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public LightReading parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.LightReading getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface ProximityReadingOrBuilder extends + // @@protoc_insertion_point(interface_extends:ProximityReading) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); + + /** + *
+     * cm
+     * 
+ * + * float distance = 2; + * @return The distance. + */ + float getDistance(); + } + /** + * Protobuf type {@code ProximityReading} + */ + public static final class ProximityReading extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:ProximityReading) + ProximityReadingOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + ProximityReading.class.getName()); + } + // Use ProximityReading.newBuilder() to construct. + private ProximityReading(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ProximityReading() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_ProximityReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_ProximityReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.ProximityReading.class, com.openpositioning.PositionMe.Traj.ProximityReading.Builder.class); + } + + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int DISTANCE_FIELD_NUMBER = 2; + private float distance_ = 0F; + /** + *
+     * cm
+     * 
+ * + * float distance = 2; + * @return The distance. + */ + @java.lang.Override + public float getDistance() { + return distance_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relativeTimestamp_ != 0L) { + output.writeInt64(1, relativeTimestamp_); + } + if (java.lang.Float.floatToRawIntBits(distance_) != 0) { + output.writeFloat(2, distance_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (java.lang.Float.floatToRawIntBits(distance_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, distance_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.ProximityReading)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.ProximityReading other = (com.openpositioning.PositionMe.Traj.ProximityReading) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (java.lang.Float.floatToIntBits(getDistance()) + != java.lang.Float.floatToIntBits( + other.getDistance())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRelativeTimestamp()); + hash = (37 * hash) + DISTANCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getDistance()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.ProximityReading parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.ProximityReading parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.ProximityReading parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.ProximityReading prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code ProximityReading} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:ProximityReading) + com.openpositioning.PositionMe.Traj.ProximityReadingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_ProximityReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_ProximityReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.ProximityReading.class, com.openpositioning.PositionMe.Traj.ProximityReading.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.ProximityReading.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + distance_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_ProximityReading_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.ProximityReading getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.ProximityReading.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.ProximityReading build() { + com.openpositioning.PositionMe.Traj.ProximityReading result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.ProximityReading buildPartial() { + com.openpositioning.PositionMe.Traj.ProximityReading result = new com.openpositioning.PositionMe.Traj.ProximityReading(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.ProximityReading result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.distance_ = distance_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.ProximityReading) { + return mergeFrom((com.openpositioning.PositionMe.Traj.ProximityReading)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.ProximityReading other) { + if (other == com.openpositioning.PositionMe.Traj.ProximityReading.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.getDistance() != 0F) { + setDistance(other.getDistance()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 21: { + distance_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private float distance_ ; + /** + *
+       * cm
+       * 
+ * + * float distance = 2; + * @return The distance. + */ + @java.lang.Override + public float getDistance() { + return distance_; + } + /** + *
+       * cm
+       * 
+ * + * float distance = 2; + * @param value The distance to set. + * @return This builder for chaining. + */ + public Builder setDistance(float value) { + + distance_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * cm
+       * 
+ * + * float distance = 2; + * @return This builder for chaining. + */ + public Builder clearDistance() { + bitField0_ = (bitField0_ & ~0x00000002); + distance_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:ProximityReading) + } + + // @@protoc_insertion_point(class_scope:ProximityReading) + private static final com.openpositioning.PositionMe.Traj.ProximityReading DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.ProximityReading(); + } + + public static com.openpositioning.PositionMe.Traj.ProximityReading getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProximityReading parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.ProximityReading getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GNSSPositionOrBuilder extends + // @@protoc_insertion_point(interface_extends:GNSSPosition) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); + + /** + *
+     * degrees (minimum 6 significant figures)
+     * latitude between -90 and 90
+     * 
+ * + * double latitude = 2; + * @return The latitude. + */ + double getLatitude(); + + /** + *
+     * longitude between -180 and 180
+     * 
+ * + * double longitude = 3; + * @return The longitude. + */ + double getLongitude(); + + /** + *
+     * metres
+     * 
+ * + * double altitude = 4; + * @return The altitude. + */ + double getAltitude(); + + /** + *
+     * floor name
+     * 
+ * + * optional string floor = 5; + * @return Whether the floor field is set. + */ + boolean hasFloor(); + /** + *
+     * floor name
+     * 
+ * + * optional string floor = 5; + * @return The floor. + */ + java.lang.String getFloor(); + /** + *
+     * floor name
+     * 
+ * + * optional string floor = 5; + * @return The bytes for floor. + */ + com.google.protobuf.ByteString + getFloorBytes(); + } + /** + * Protobuf type {@code GNSSPosition} + */ + public static final class GNSSPosition extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:GNSSPosition) + GNSSPositionOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + GNSSPosition.class.getName()); + } + // Use GNSSPosition.newBuilder() to construct. + private GNSSPosition(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GNSSPosition() { + floor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSPosition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSPosition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.GNSSPosition.class, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder.class); + } + + private int bitField0_; + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int LATITUDE_FIELD_NUMBER = 2; + private double latitude_ = 0D; + /** + *
+     * degrees (minimum 6 significant figures)
+     * latitude between -90 and 90
+     * 
+ * + * double latitude = 2; + * @return The latitude. + */ + @java.lang.Override + public double getLatitude() { + return latitude_; + } + + public static final int LONGITUDE_FIELD_NUMBER = 3; + private double longitude_ = 0D; + /** + *
+     * longitude between -180 and 180
+     * 
+ * + * double longitude = 3; + * @return The longitude. + */ + @java.lang.Override + public double getLongitude() { + return longitude_; + } + + public static final int ALTITUDE_FIELD_NUMBER = 4; + private double altitude_ = 0D; + /** + *
+     * metres
+     * 
+ * + * double altitude = 4; + * @return The altitude. + */ + @java.lang.Override + public double getAltitude() { + return altitude_; + } + + public static final int FLOOR_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object floor_ = ""; + /** + *
+     * floor name
+     * 
+ * + * optional string floor = 5; + * @return Whether the floor field is set. + */ + @java.lang.Override + public boolean hasFloor() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * floor name
+     * 
+ * + * optional string floor = 5; + * @return The floor. + */ + @java.lang.Override + public java.lang.String getFloor() { + java.lang.Object ref = floor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + floor_ = s; + return s; + } + } + /** + *
+     * floor name
+     * 
+ * + * optional string floor = 5; + * @return The bytes for floor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFloorBytes() { + java.lang.Object ref = floor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + floor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relativeTimestamp_ != 0L) { + output.writeInt64(1, relativeTimestamp_); + } + if (java.lang.Double.doubleToRawLongBits(latitude_) != 0) { + output.writeDouble(2, latitude_); + } + if (java.lang.Double.doubleToRawLongBits(longitude_) != 0) { + output.writeDouble(3, longitude_); + } + if (java.lang.Double.doubleToRawLongBits(altitude_) != 0) { + output.writeDouble(4, altitude_); + } + if (((bitField0_ & 0x00000001) != 0)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, floor_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (java.lang.Double.doubleToRawLongBits(latitude_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, latitude_); + } + if (java.lang.Double.doubleToRawLongBits(longitude_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, longitude_); + } + if (java.lang.Double.doubleToRawLongBits(altitude_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(4, altitude_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, floor_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.GNSSPosition)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.GNSSPosition other = (com.openpositioning.PositionMe.Traj.GNSSPosition) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (java.lang.Double.doubleToLongBits(getLatitude()) + != java.lang.Double.doubleToLongBits( + other.getLatitude())) return false; + if (java.lang.Double.doubleToLongBits(getLongitude()) + != java.lang.Double.doubleToLongBits( + other.getLongitude())) return false; + if (java.lang.Double.doubleToLongBits(getAltitude()) + != java.lang.Double.doubleToLongBits( + other.getAltitude())) return false; + if (hasFloor() != other.hasFloor()) return false; + if (hasFloor()) { + if (!getFloor() + .equals(other.getFloor())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().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) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLatitude())); + hash = (37 * hash) + LONGITUDE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLongitude())); + hash = (37 * hash) + ALTITUDE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getAltitude())); + if (hasFloor()) { + hash = (37 * hash) + FLOOR_FIELD_NUMBER; + hash = (53 * hash) + getFloor().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.GNSSPosition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.GNSSPosition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code GNSSPosition} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:GNSSPosition) + com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSPosition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSPosition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.GNSSPosition.class, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.GNSSPosition.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + latitude_ = 0D; + longitude_ = 0D; + altitude_ = 0D; + floor_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSPosition_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition build() { + com.openpositioning.PositionMe.Traj.GNSSPosition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition buildPartial() { + com.openpositioning.PositionMe.Traj.GNSSPosition result = new com.openpositioning.PositionMe.Traj.GNSSPosition(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.GNSSPosition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.latitude_ = latitude_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.longitude_ = longitude_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.altitude_ = altitude_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.floor_ = floor_; + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.GNSSPosition) { + return mergeFrom((com.openpositioning.PositionMe.Traj.GNSSPosition)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.GNSSPosition other) { + if (other == com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.getLatitude() != 0D) { + setLatitude(other.getLatitude()); + } + if (other.getLongitude() != 0D) { + setLongitude(other.getLongitude()); + } + if (other.getAltitude() != 0D) { + setAltitude(other.getAltitude()); + } + if (other.hasFloor()) { + floor_ = other.floor_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 17: { + latitude_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 25: { + longitude_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + case 33: { + altitude_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + case 42: { + floor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private double latitude_ ; + /** + *
+       * degrees (minimum 6 significant figures)
+       * latitude between -90 and 90
+       * 
+ * + * double latitude = 2; + * @return The latitude. + */ + @java.lang.Override + public double getLatitude() { + return latitude_; + } + /** + *
+       * degrees (minimum 6 significant figures)
+       * latitude between -90 and 90
+       * 
+ * + * double latitude = 2; + * @param value The latitude to set. + * @return This builder for chaining. + */ + public Builder setLatitude(double value) { + + latitude_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * degrees (minimum 6 significant figures)
+       * latitude between -90 and 90
+       * 
+ * + * double latitude = 2; + * @return This builder for chaining. + */ + public Builder clearLatitude() { + bitField0_ = (bitField0_ & ~0x00000002); + latitude_ = 0D; + onChanged(); + return this; + } + + private double longitude_ ; + /** + *
+       * longitude between -180 and 180
+       * 
+ * + * double longitude = 3; + * @return The longitude. + */ + @java.lang.Override + public double getLongitude() { + return longitude_; + } + /** + *
+       * longitude between -180 and 180
+       * 
+ * + * double longitude = 3; + * @param value The longitude to set. + * @return This builder for chaining. + */ + public Builder setLongitude(double value) { + + longitude_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * longitude between -180 and 180
+       * 
+ * + * double longitude = 3; + * @return This builder for chaining. + */ + public Builder clearLongitude() { + bitField0_ = (bitField0_ & ~0x00000004); + longitude_ = 0D; + onChanged(); + return this; + } + + private double altitude_ ; + /** + *
+       * metres
+       * 
+ * + * double altitude = 4; + * @return The altitude. + */ + @java.lang.Override + public double getAltitude() { + return altitude_; + } + /** + *
+       * metres
+       * 
+ * + * double altitude = 4; + * @param value The altitude to set. + * @return This builder for chaining. + */ + public Builder setAltitude(double value) { + + altitude_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * metres
+       * 
+ * + * double altitude = 4; + * @return This builder for chaining. + */ + public Builder clearAltitude() { + bitField0_ = (bitField0_ & ~0x00000008); + altitude_ = 0D; + onChanged(); + return this; + } + + private java.lang.Object floor_ = ""; + /** + *
+       * floor name
+       * 
+ * + * optional string floor = 5; + * @return Whether the floor field is set. + */ + public boolean hasFloor() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
+       * floor name
+       * 
+ * + * optional string floor = 5; + * @return The floor. + */ + public java.lang.String getFloor() { + java.lang.Object ref = floor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + floor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * floor name
+       * 
+ * + * optional string floor = 5; + * @return The bytes for floor. + */ + public com.google.protobuf.ByteString + getFloorBytes() { + java.lang.Object ref = floor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + floor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * floor name
+       * 
+ * + * optional string floor = 5; + * @param value The floor to set. + * @return This builder for chaining. + */ + public Builder setFloor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + floor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * floor name
+       * 
+ * + * optional string floor = 5; + * @return This builder for chaining. + */ + public Builder clearFloor() { + floor_ = getDefaultInstance().getFloor(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+       * floor name
+       * 
+ * + * optional string floor = 5; + * @param value The bytes for floor to set. + * @return This builder for chaining. + */ + public Builder setFloorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + floor_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:GNSSPosition) + } + + // @@protoc_insertion_point(class_scope:GNSSPosition) + private static final com.openpositioning.PositionMe.Traj.GNSSPosition DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.GNSSPosition(); + } + + public static com.openpositioning.PositionMe.Traj.GNSSPosition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GNSSPosition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface GNSSReadingOrBuilder extends + // @@protoc_insertion_point(interface_extends:GNSSReading) + com.google.protobuf.MessageOrBuilder { + + /** + * .GNSSPosition position = 1; + * @return Whether the position field is set. + */ + boolean hasPosition(); + /** + * .GNSSPosition position = 1; + * @return The position. + */ + com.openpositioning.PositionMe.Traj.GNSSPosition getPosition(); + /** + * .GNSSPosition position = 1; + */ + com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getPositionOrBuilder(); + + /** + *
+     * metres
+     * 
+ * + * float accuracy = 2; + * @return The accuracy. + */ + float getAccuracy(); + + /** + *
+     * m/s
+     * 
+ * + * float speed = 3; + * @return The speed. + */ + float getSpeed(); + + /** + *
+     * degrees
+     * 
+ * + * float bearing = 4; + * @return The bearing. + */ + float getBearing(); + + /** + *
+     * e.g 'gps' or 'network'
+     * 
+ * + * string provider = 5; + * @return The provider. + */ + java.lang.String getProvider(); + /** + *
+     * e.g 'gps' or 'network'
+     * 
+ * + * string provider = 5; + * @return The bytes for provider. + */ + com.google.protobuf.ByteString + getProviderBytes(); + } + /** + * Protobuf type {@code GNSSReading} + */ + public static final class GNSSReading extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:GNSSReading) + GNSSReadingOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + GNSSReading.class.getName()); + } + // Use GNSSReading.newBuilder() to construct. + private GNSSReading(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private GNSSReading() { + provider_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.GNSSReading.class, com.openpositioning.PositionMe.Traj.GNSSReading.Builder.class); + } + + private int bitField0_; + public static final int POSITION_FIELD_NUMBER = 1; + private com.openpositioning.PositionMe.Traj.GNSSPosition position_; + /** + * .GNSSPosition position = 1; + * @return Whether the position field is set. + */ + @java.lang.Override + public boolean hasPosition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .GNSSPosition position = 1; + * @return The position. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition getPosition() { + return position_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; + } + /** + * .GNSSPosition position = 1; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getPositionOrBuilder() { + return position_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; + } + + public static final int ACCURACY_FIELD_NUMBER = 2; + private float accuracy_ = 0F; + /** + *
+     * metres
+     * 
+ * + * float accuracy = 2; + * @return The accuracy. + */ + @java.lang.Override + public float getAccuracy() { + return accuracy_; + } + + public static final int SPEED_FIELD_NUMBER = 3; + private float speed_ = 0F; + /** + *
+     * m/s
+     * 
+ * + * float speed = 3; + * @return The speed. + */ + @java.lang.Override + public float getSpeed() { + return speed_; + } + + public static final int BEARING_FIELD_NUMBER = 4; + private float bearing_ = 0F; + /** + *
+     * degrees
+     * 
+ * + * float bearing = 4; + * @return The bearing. + */ + @java.lang.Override + public float getBearing() { + return bearing_; + } + + public static final int PROVIDER_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private volatile java.lang.Object provider_ = ""; + /** + *
+     * e.g 'gps' or 'network'
+     * 
+ * + * string provider = 5; + * @return The provider. + */ + @java.lang.Override + public java.lang.String getProvider() { + java.lang.Object ref = provider_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provider_ = s; + return s; + } + } + /** + *
+     * e.g 'gps' or 'network'
+     * 
+ * + * string provider = 5; + * @return The bytes for provider. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProviderBytes() { + java.lang.Object ref = provider_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + provider_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(1, getPosition()); + } + if (java.lang.Float.floatToRawIntBits(accuracy_) != 0) { + output.writeFloat(2, accuracy_); + } + if (java.lang.Float.floatToRawIntBits(speed_) != 0) { + output.writeFloat(3, speed_); + } + if (java.lang.Float.floatToRawIntBits(bearing_) != 0) { + output.writeFloat(4, bearing_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(provider_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, provider_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getPosition()); + } + if (java.lang.Float.floatToRawIntBits(accuracy_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, accuracy_); + } + if (java.lang.Float.floatToRawIntBits(speed_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, speed_); + } + if (java.lang.Float.floatToRawIntBits(bearing_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, bearing_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(provider_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, provider_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.GNSSReading)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.GNSSReading other = (com.openpositioning.PositionMe.Traj.GNSSReading) obj; + + if (hasPosition() != other.hasPosition()) return false; + if (hasPosition()) { + if (!getPosition() + .equals(other.getPosition())) return false; + } + if (java.lang.Float.floatToIntBits(getAccuracy()) + != java.lang.Float.floatToIntBits( + other.getAccuracy())) return false; + if (java.lang.Float.floatToIntBits(getSpeed()) + != java.lang.Float.floatToIntBits( + other.getSpeed())) return false; + if (java.lang.Float.floatToIntBits(getBearing()) + != java.lang.Float.floatToIntBits( + other.getBearing())) return false; + if (!getProvider() + .equals(other.getProvider())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPosition()) { + hash = (37 * hash) + POSITION_FIELD_NUMBER; + hash = (53 * hash) + getPosition().hashCode(); + } + hash = (37 * hash) + ACCURACY_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getAccuracy()); + hash = (37 * hash) + SPEED_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getSpeed()); + hash = (37 * hash) + BEARING_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getBearing()); + hash = (37 * hash) + PROVIDER_FIELD_NUMBER; + hash = (53 * hash) + getProvider().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.GNSSReading parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.GNSSReading parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.GNSSReading parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.GNSSReading prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code GNSSReading} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:GNSSReading) + com.openpositioning.PositionMe.Traj.GNSSReadingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.GNSSReading.class, com.openpositioning.PositionMe.Traj.GNSSReading.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.GNSSReading.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPositionFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + position_ = null; + if (positionBuilder_ != null) { + positionBuilder_.dispose(); + positionBuilder_ = null; + } + accuracy_ = 0F; + speed_ = 0F; + bearing_ = 0F; + provider_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_GNSSReading_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSReading getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.GNSSReading.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSReading build() { + com.openpositioning.PositionMe.Traj.GNSSReading result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSReading buildPartial() { + com.openpositioning.PositionMe.Traj.GNSSReading result = new com.openpositioning.PositionMe.Traj.GNSSReading(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.GNSSReading result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.position_ = positionBuilder_ == null + ? position_ + : positionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.accuracy_ = accuracy_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.speed_ = speed_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.bearing_ = bearing_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.provider_ = provider_; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.GNSSReading) { + return mergeFrom((com.openpositioning.PositionMe.Traj.GNSSReading)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.GNSSReading other) { + if (other == com.openpositioning.PositionMe.Traj.GNSSReading.getDefaultInstance()) return this; + if (other.hasPosition()) { + mergePosition(other.getPosition()); + } + if (other.getAccuracy() != 0F) { + setAccuracy(other.getAccuracy()); + } + if (other.getSpeed() != 0F) { + setSpeed(other.getSpeed()); + } + if (other.getBearing() != 0F) { + setBearing(other.getBearing()); + } + if (!other.getProvider().isEmpty()) { + provider_ = other.provider_; + bitField0_ |= 0x00000010; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getPositionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 21: { + accuracy_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: { + speed_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 37: { + bearing_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + case 42: { + provider_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.openpositioning.PositionMe.Traj.GNSSPosition position_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> positionBuilder_; + /** + * .GNSSPosition position = 1; + * @return Whether the position field is set. + */ + public boolean hasPosition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .GNSSPosition position = 1; + * @return The position. + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition getPosition() { + if (positionBuilder_ == null) { + return position_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; + } else { + return positionBuilder_.getMessage(); + } + } + /** + * .GNSSPosition position = 1; + */ + public Builder setPosition(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (positionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + position_ = value; + } else { + positionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .GNSSPosition position = 1; + */ + public Builder setPosition( + com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (positionBuilder_ == null) { + position_ = builderForValue.build(); + } else { + positionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .GNSSPosition position = 1; + */ + public Builder mergePosition(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (positionBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + position_ != null && + position_ != com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()) { + getPositionBuilder().mergeFrom(value); + } else { + position_ = value; + } + } else { + positionBuilder_.mergeFrom(value); + } + if (position_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .GNSSPosition position = 1; + */ + public Builder clearPosition() { + bitField0_ = (bitField0_ & ~0x00000001); + position_ = null; + if (positionBuilder_ != null) { + positionBuilder_.dispose(); + positionBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .GNSSPosition position = 1; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder getPositionBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPositionFieldBuilder().getBuilder(); + } + /** + * .GNSSPosition position = 1; + */ + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getPositionOrBuilder() { + if (positionBuilder_ != null) { + return positionBuilder_.getMessageOrBuilder(); + } else { + return position_ == null ? + com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; + } + } + /** + * .GNSSPosition position = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> + getPositionFieldBuilder() { + if (positionBuilder_ == null) { + positionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder>( + getPosition(), + getParentForChildren(), + isClean()); + position_ = null; + } + return positionBuilder_; + } + + private float accuracy_ ; + /** + *
+       * metres
+       * 
+ * + * float accuracy = 2; + * @return The accuracy. + */ + @java.lang.Override + public float getAccuracy() { + return accuracy_; + } + /** + *
+       * metres
+       * 
+ * + * float accuracy = 2; + * @param value The accuracy to set. + * @return This builder for chaining. + */ + public Builder setAccuracy(float value) { + + accuracy_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * metres
+       * 
+ * + * float accuracy = 2; + * @return This builder for chaining. + */ + public Builder clearAccuracy() { + bitField0_ = (bitField0_ & ~0x00000002); + accuracy_ = 0F; + onChanged(); + return this; + } + + private float speed_ ; + /** + *
+       * m/s
+       * 
+ * + * float speed = 3; + * @return The speed. + */ + @java.lang.Override + public float getSpeed() { + return speed_; + } + /** + *
+       * m/s
+       * 
+ * + * float speed = 3; + * @param value The speed to set. + * @return This builder for chaining. + */ + public Builder setSpeed(float value) { + + speed_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * m/s
+       * 
+ * + * float speed = 3; + * @return This builder for chaining. + */ + public Builder clearSpeed() { + bitField0_ = (bitField0_ & ~0x00000004); + speed_ = 0F; + onChanged(); + return this; + } + + private float bearing_ ; + /** + *
+       * degrees
+       * 
+ * + * float bearing = 4; + * @return The bearing. + */ + @java.lang.Override + public float getBearing() { + return bearing_; + } + /** + *
+       * degrees
+       * 
+ * + * float bearing = 4; + * @param value The bearing to set. + * @return This builder for chaining. + */ + public Builder setBearing(float value) { + + bearing_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * degrees
+       * 
+ * + * float bearing = 4; + * @return This builder for chaining. + */ + public Builder clearBearing() { + bitField0_ = (bitField0_ & ~0x00000008); + bearing_ = 0F; + onChanged(); + return this; + } + + private java.lang.Object provider_ = ""; + /** + *
+       * e.g 'gps' or 'network'
+       * 
+ * + * string provider = 5; + * @return The provider. + */ + public java.lang.String getProvider() { + java.lang.Object ref = provider_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provider_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * e.g 'gps' or 'network'
+       * 
+ * + * string provider = 5; + * @return The bytes for provider. + */ + public com.google.protobuf.ByteString + getProviderBytes() { + java.lang.Object ref = provider_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + provider_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * e.g 'gps' or 'network'
+       * 
+ * + * string provider = 5; + * @param value The provider to set. + * @return This builder for chaining. + */ + public Builder setProvider( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + provider_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * e.g 'gps' or 'network'
+       * 
+ * + * string provider = 5; + * @return This builder for chaining. + */ + public Builder clearProvider() { + provider_ = getDefaultInstance().getProvider(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + /** + *
+       * e.g 'gps' or 'network'
+       * 
+ * + * string provider = 5; + * @param value The bytes for provider to set. + * @return This builder for chaining. + */ + public Builder setProviderBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + provider_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:GNSSReading) + } + + // @@protoc_insertion_point(class_scope:GNSSReading) + private static final com.openpositioning.PositionMe.Traj.GNSSReading DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.GNSSReading(); + } + + public static com.openpositioning.PositionMe.Traj.GNSSReading getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GNSSReading parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSReading getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface FingerprintOrBuilder extends + // @@protoc_insertion_point(interface_extends:Fingerprint) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); + + /** + * repeated .RFScan rf_scans = 2; + */ + java.util.List + getRfScansList(); + /** + * repeated .RFScan rf_scans = 2; + */ + com.openpositioning.PositionMe.Traj.RFScan getRfScans(int index); + /** + * repeated .RFScan rf_scans = 2; + */ + int getRfScansCount(); + /** + * repeated .RFScan rf_scans = 2; + */ + java.util.List + getRfScansOrBuilderList(); + /** + * repeated .RFScan rf_scans = 2; + */ + com.openpositioning.PositionMe.Traj.RFScanOrBuilder getRfScansOrBuilder( + int index); + } + /** + * Protobuf type {@code Fingerprint} + */ + public static final class Fingerprint extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Fingerprint) + FingerprintOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + Fingerprint.class.getName()); + } + // Use Fingerprint.newBuilder() to construct. + private Fingerprint(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Fingerprint() { + rfScans_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Fingerprint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Fingerprint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Fingerprint.class, com.openpositioning.PositionMe.Traj.Fingerprint.Builder.class); + } + + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int RF_SCANS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List rfScans_; + /** + * repeated .RFScan rf_scans = 2; + */ + @java.lang.Override + public java.util.List getRfScansList() { + return rfScans_; + } + /** + * repeated .RFScan rf_scans = 2; + */ + @java.lang.Override + public java.util.List + getRfScansOrBuilderList() { + return rfScans_; + } + /** + * repeated .RFScan rf_scans = 2; + */ + @java.lang.Override + public int getRfScansCount() { + return rfScans_.size(); + } + /** + * repeated .RFScan rf_scans = 2; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RFScan getRfScans(int index) { + return rfScans_.get(index); + } + /** + * repeated .RFScan rf_scans = 2; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RFScanOrBuilder getRfScansOrBuilder( + int index) { + return rfScans_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (relativeTimestamp_ != 0L) { + output.writeInt64(1, relativeTimestamp_); + } + for (int i = 0; i < rfScans_.size(); i++) { + output.writeMessage(2, rfScans_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 < rfScans_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, rfScans_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.Fingerprint)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.Fingerprint other = (com.openpositioning.PositionMe.Traj.Fingerprint) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (!getRfScansList() + .equals(other.getRfScansList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RELATIVE_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getRelativeTimestamp()); + if (getRfScansCount() > 0) { + hash = (37 * hash) + RF_SCANS_FIELD_NUMBER; + hash = (53 * hash) + getRfScansList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.Fingerprint parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.Fingerprint parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Fingerprint parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.Fingerprint prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Fingerprint} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Fingerprint) + com.openpositioning.PositionMe.Traj.FingerprintOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Fingerprint_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Fingerprint_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Fingerprint.class, com.openpositioning.PositionMe.Traj.Fingerprint.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.Fingerprint.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + if (rfScansBuilder_ == null) { + rfScans_ = java.util.Collections.emptyList(); + } else { + rfScans_ = null; + rfScansBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_Fingerprint_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Fingerprint getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.Fingerprint.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Fingerprint build() { + com.openpositioning.PositionMe.Traj.Fingerprint result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Fingerprint buildPartial() { + com.openpositioning.PositionMe.Traj.Fingerprint result = new com.openpositioning.PositionMe.Traj.Fingerprint(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.openpositioning.PositionMe.Traj.Fingerprint result) { + if (rfScansBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + rfScans_ = java.util.Collections.unmodifiableList(rfScans_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.rfScans_ = rfScans_; + } else { + result.rfScans_ = rfScansBuilder_.build(); + } + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.Fingerprint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.Fingerprint) { + return mergeFrom((com.openpositioning.PositionMe.Traj.Fingerprint)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.Fingerprint other) { + if (other == com.openpositioning.PositionMe.Traj.Fingerprint.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (rfScansBuilder_ == null) { + if (!other.rfScans_.isEmpty()) { + if (rfScans_.isEmpty()) { + rfScans_ = other.rfScans_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureRfScansIsMutable(); + rfScans_.addAll(other.rfScans_); + } + onChanged(); + } + } else { + if (!other.rfScans_.isEmpty()) { + if (rfScansBuilder_.isEmpty()) { + rfScansBuilder_.dispose(); + rfScansBuilder_ = null; + rfScans_ = other.rfScans_; + bitField0_ = (bitField0_ & ~0x00000002); + rfScansBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? + getRfScansFieldBuilder() : null; + } else { + rfScansBuilder_.addAllMessages(other.rfScans_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + com.openpositioning.PositionMe.Traj.RFScan m = + input.readMessage( + com.openpositioning.PositionMe.Traj.RFScan.parser(), + extensionRegistry); + if (rfScansBuilder_ == null) { + ensureRfScansIsMutable(); + rfScans_.add(m); + } else { + rfScansBuilder_.addMessage(m); + } + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private java.util.List rfScans_ = + java.util.Collections.emptyList(); + private void ensureRfScansIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + rfScans_ = new java.util.ArrayList(rfScans_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.RFScan, com.openpositioning.PositionMe.Traj.RFScan.Builder, com.openpositioning.PositionMe.Traj.RFScanOrBuilder> rfScansBuilder_; + + /** + * repeated .RFScan rf_scans = 2; + */ + public java.util.List getRfScansList() { + if (rfScansBuilder_ == null) { + return java.util.Collections.unmodifiableList(rfScans_); + } else { + return rfScansBuilder_.getMessageList(); + } + } + /** + * repeated .RFScan rf_scans = 2; + */ + public int getRfScansCount() { + if (rfScansBuilder_ == null) { + return rfScans_.size(); + } else { + return rfScansBuilder_.getCount(); + } + } + /** + * repeated .RFScan rf_scans = 2; + */ + public com.openpositioning.PositionMe.Traj.RFScan getRfScans(int index) { + if (rfScansBuilder_ == null) { + return rfScans_.get(index); + } else { + return rfScansBuilder_.getMessage(index); + } + } + /** + * repeated .RFScan rf_scans = 2; + */ + public Builder setRfScans( + int index, com.openpositioning.PositionMe.Traj.RFScan value) { + if (rfScansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRfScansIsMutable(); + rfScans_.set(index, value); + onChanged(); + } else { + rfScansBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .RFScan rf_scans = 2; + */ + public Builder setRfScans( + int index, com.openpositioning.PositionMe.Traj.RFScan.Builder builderForValue) { + if (rfScansBuilder_ == null) { + ensureRfScansIsMutable(); + rfScans_.set(index, builderForValue.build()); + onChanged(); + } else { + rfScansBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .RFScan rf_scans = 2; + */ + public Builder addRfScans(com.openpositioning.PositionMe.Traj.RFScan value) { + if (rfScansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRfScansIsMutable(); + rfScans_.add(value); + onChanged(); + } else { + rfScansBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .RFScan rf_scans = 2; + */ + public Builder addRfScans( + int index, com.openpositioning.PositionMe.Traj.RFScan value) { + if (rfScansBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRfScansIsMutable(); + rfScans_.add(index, value); + onChanged(); + } else { + rfScansBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .RFScan rf_scans = 2; + */ + public Builder addRfScans( + com.openpositioning.PositionMe.Traj.RFScan.Builder builderForValue) { + if (rfScansBuilder_ == null) { + ensureRfScansIsMutable(); + rfScans_.add(builderForValue.build()); + onChanged(); + } else { + rfScansBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .RFScan rf_scans = 2; + */ + public Builder addRfScans( + int index, com.openpositioning.PositionMe.Traj.RFScan.Builder builderForValue) { + if (rfScansBuilder_ == null) { + ensureRfScansIsMutable(); + rfScans_.add(index, builderForValue.build()); + onChanged(); + } else { + rfScansBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .RFScan rf_scans = 2; + */ + public Builder addAllRfScans( + java.lang.Iterable values) { + if (rfScansBuilder_ == null) { + ensureRfScansIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, rfScans_); + onChanged(); + } else { + rfScansBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .RFScan rf_scans = 2; + */ + public Builder clearRfScans() { + if (rfScansBuilder_ == null) { + rfScans_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + rfScansBuilder_.clear(); + } + return this; + } + /** + * repeated .RFScan rf_scans = 2; + */ + public Builder removeRfScans(int index) { + if (rfScansBuilder_ == null) { + ensureRfScansIsMutable(); + rfScans_.remove(index); + onChanged(); + } else { + rfScansBuilder_.remove(index); + } + return this; + } + /** + * repeated .RFScan rf_scans = 2; + */ + public com.openpositioning.PositionMe.Traj.RFScan.Builder getRfScansBuilder( + int index) { + return getRfScansFieldBuilder().getBuilder(index); + } + /** + * repeated .RFScan rf_scans = 2; + */ + public com.openpositioning.PositionMe.Traj.RFScanOrBuilder getRfScansOrBuilder( + int index) { + if (rfScansBuilder_ == null) { + return rfScans_.get(index); } else { + return rfScansBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .RFScan rf_scans = 2; + */ + public java.util.List + getRfScansOrBuilderList() { + if (rfScansBuilder_ != null) { + return rfScansBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rfScans_); + } + } + /** + * repeated .RFScan rf_scans = 2; + */ + public com.openpositioning.PositionMe.Traj.RFScan.Builder addRfScansBuilder() { + return getRfScansFieldBuilder().addBuilder( + com.openpositioning.PositionMe.Traj.RFScan.getDefaultInstance()); + } + /** + * repeated .RFScan rf_scans = 2; + */ + public com.openpositioning.PositionMe.Traj.RFScan.Builder addRfScansBuilder( + int index) { + return getRfScansFieldBuilder().addBuilder( + index, com.openpositioning.PositionMe.Traj.RFScan.getDefaultInstance()); + } + /** + * repeated .RFScan rf_scans = 2; + */ + public java.util.List + getRfScansBuilderList() { + return getRfScansFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.RFScan, com.openpositioning.PositionMe.Traj.RFScan.Builder, com.openpositioning.PositionMe.Traj.RFScanOrBuilder> + getRfScansFieldBuilder() { + if (rfScansBuilder_ == null) { + rfScansBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + com.openpositioning.PositionMe.Traj.RFScan, com.openpositioning.PositionMe.Traj.RFScan.Builder, com.openpositioning.PositionMe.Traj.RFScanOrBuilder>( + rfScans_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + rfScans_ = null; + } + return rfScansBuilder_; + } + + // @@protoc_insertion_point(builder_scope:Fingerprint) + } + + // @@protoc_insertion_point(class_scope:Fingerprint) + private static final com.openpositioning.PositionMe.Traj.Fingerprint DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.Fingerprint(); + } + + public static com.openpositioning.PositionMe.Traj.Fingerprint getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Fingerprint parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Fingerprint getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface RFScanOrBuilder extends + // @@protoc_insertion_point(interface_extends:RFScan) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); + + /** + *
+     * Integer encoding of the hex mac address (BSSID)
+     * e.g. 207394925843984
+     * 
+ * + * int64 mac = 2; + * @return The mac. + */ + long getMac(); + + /** + *
+     * rssi integer in dBm.
+     * typically between -120 and -10
+     * 
+ * + * int32 rssi = 3; + * @return The rssi. + */ + int getRssi(); + + /** + *
+     * returned position
+     * 
+ * + * optional .GNSSPosition position = 4; + * @return Whether the position field is set. + */ + boolean hasPosition(); + /** + *
+     * returned position
+     * 
+ * + * optional .GNSSPosition position = 4; + * @return The position. + */ + com.openpositioning.PositionMe.Traj.GNSSPosition getPosition(); + /** + *
+     * returned position
+     * 
+ * + * optional .GNSSPosition position = 4; + */ + com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getPositionOrBuilder(); + } + /** + * Protobuf type {@code RFScan} + */ + public static final class RFScan extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:RFScan) + RFScanOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + RFScan.class.getName()); + } + // Use RFScan.newBuilder() to construct. + private RFScan(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private RFScan() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_RFScan_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_RFScan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.RFScan.class, com.openpositioning.PositionMe.Traj.RFScan.Builder.class); + } + + private int bitField0_; + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int MAC_FIELD_NUMBER = 2; + private long mac_ = 0L; + /** + *
+     * Integer encoding of the hex mac address (BSSID)
+     * e.g. 207394925843984
+     * 
+ * + * int64 mac = 2; + * @return The mac. + */ + @java.lang.Override + public long getMac() { + return mac_; + } + + public static final int RSSI_FIELD_NUMBER = 3; + private int rssi_ = 0; + /** + *
+     * rssi integer in dBm.
+     * typically between -120 and -10
+     * 
+ * + * int32 rssi = 3; + * @return The rssi. + */ + @java.lang.Override + public int getRssi() { + return rssi_; + } + + public static final int POSITION_FIELD_NUMBER = 4; + private com.openpositioning.PositionMe.Traj.GNSSPosition position_; + /** + *
+     * returned position
+     * 
+ * + * optional .GNSSPosition position = 4; + * @return Whether the position field is set. + */ + @java.lang.Override + public boolean hasPosition() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
+     * returned position
+     * 
+ * + * optional .GNSSPosition position = 4; + * @return The position. + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPosition getPosition() { + return position_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; + } + /** + *
+     * returned position
+     * 
+ * + * optional .GNSSPosition position = 4; + */ + @java.lang.Override + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getPositionOrBuilder() { + return position_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + 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_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(4, getPosition()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getPosition()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.RFScan)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.RFScan other = (com.openpositioning.PositionMe.Traj.RFScan) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (getMac() + != other.getMac()) return false; + if (getRssi() + != other.getRssi()) return false; + if (hasPosition() != other.hasPosition()) return false; + if (hasPosition()) { + if (!getPosition() + .equals(other.getPosition())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().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(); + if (hasPosition()) { + hash = (37 * hash) + POSITION_FIELD_NUMBER; + hash = (53 * hash) + getPosition().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.RFScan parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.RFScan parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.RFScan parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.RFScan prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code RFScan} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:RFScan) + com.openpositioning.PositionMe.Traj.RFScanOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_RFScan_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_RFScan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.RFScan.class, com.openpositioning.PositionMe.Traj.RFScan.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.RFScan.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage + .alwaysUseFieldBuilders) { + getPositionFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + mac_ = 0L; + rssi_ = 0; + position_ = null; + if (positionBuilder_ != null) { + positionBuilder_.dispose(); + positionBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_RFScan_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RFScan getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.RFScan.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RFScan build() { + com.openpositioning.PositionMe.Traj.RFScan result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RFScan buildPartial() { + com.openpositioning.PositionMe.Traj.RFScan result = new com.openpositioning.PositionMe.Traj.RFScan(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.RFScan result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.mac_ = mac_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.rssi_ = rssi_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.position_ = positionBuilder_ == null + ? position_ + : positionBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.RFScan) { + return mergeFrom((com.openpositioning.PositionMe.Traj.RFScan)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.RFScan other) { + if (other == com.openpositioning.PositionMe.Traj.RFScan.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.getMac() != 0L) { + setMac(other.getMac()); + } + if (other.getRssi() != 0) { + setRssi(other.getRssi()); + } + if (other.hasPosition()) { + mergePosition(other.getPosition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + mac_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + rssi_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + input.readMessage( + getPositionFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private long mac_ ; + /** + *
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
+       * 
+ * + * int64 mac = 2; + * @return The mac. + */ + @java.lang.Override + public long getMac() { + return mac_; + } + /** + *
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
+       * 
+ * + * int64 mac = 2; + * @param value The mac to set. + * @return This builder for chaining. + */ + public Builder setMac(long value) { + + mac_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
+       * 
+ * + * int64 mac = 2; + * @return This builder for chaining. + */ + public Builder clearMac() { + bitField0_ = (bitField0_ & ~0x00000002); + mac_ = 0L; + onChanged(); + return this; + } + + private int rssi_ ; + /** + *
+       * rssi integer in dBm.
+       * typically between -120 and -10
+       * 
+ * + * int32 rssi = 3; + * @return The rssi. + */ + @java.lang.Override + public int getRssi() { + return rssi_; + } + /** + *
+       * rssi integer in dBm.
+       * typically between -120 and -10
+       * 
+ * + * int32 rssi = 3; + * @param value The rssi to set. + * @return This builder for chaining. + */ + public Builder setRssi(int value) { + + rssi_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * rssi integer in dBm.
+       * typically between -120 and -10
+       * 
+ * + * int32 rssi = 3; + * @return This builder for chaining. + */ + public Builder clearRssi() { + bitField0_ = (bitField0_ & ~0x00000004); + rssi_ = 0; + onChanged(); + return this; + } + + private com.openpositioning.PositionMe.Traj.GNSSPosition position_; + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> positionBuilder_; + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + * @return Whether the position field is set. + */ + public boolean hasPosition() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + * @return The position. + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition getPosition() { + if (positionBuilder_ == null) { + return position_ == null ? com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; + } else { + return positionBuilder_.getMessage(); + } + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + */ + public Builder setPosition(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (positionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + position_ = value; + } else { + positionBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + */ + public Builder setPosition( + com.openpositioning.PositionMe.Traj.GNSSPosition.Builder builderForValue) { + if (positionBuilder_ == null) { + position_ = builderForValue.build(); + } else { + positionBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + */ + public Builder mergePosition(com.openpositioning.PositionMe.Traj.GNSSPosition value) { + if (positionBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + position_ != null && + position_ != com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance()) { + getPositionBuilder().mergeFrom(value); + } else { + position_ = value; + } + } else { + positionBuilder_.mergeFrom(value); + } + if (position_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + */ + public Builder clearPosition() { + bitField0_ = (bitField0_ & ~0x00000008); + position_ = null; + if (positionBuilder_ != null) { + positionBuilder_.dispose(); + positionBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + */ + public com.openpositioning.PositionMe.Traj.GNSSPosition.Builder getPositionBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getPositionFieldBuilder().getBuilder(); + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + */ + public com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder getPositionOrBuilder() { + if (positionBuilder_ != null) { + return positionBuilder_.getMessageOrBuilder(); + } else { + return position_ == null ? + com.openpositioning.PositionMe.Traj.GNSSPosition.getDefaultInstance() : position_; + } + } + /** + *
+       * returned position
+       * 
+ * + * optional .GNSSPosition position = 4; + */ + private com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder> + getPositionFieldBuilder() { + if (positionBuilder_ == null) { + positionBuilder_ = new com.google.protobuf.SingleFieldBuilder< + com.openpositioning.PositionMe.Traj.GNSSPosition, com.openpositioning.PositionMe.Traj.GNSSPosition.Builder, com.openpositioning.PositionMe.Traj.GNSSPositionOrBuilder>( + getPosition(), + getParentForChildren(), + isClean()); + position_ = null; + } + return positionBuilder_; + } + + // @@protoc_insertion_point(builder_scope:RFScan) + } + + // @@protoc_insertion_point(class_scope:RFScan) + private static final com.openpositioning.PositionMe.Traj.RFScan DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.RFScan(); + } + + public static com.openpositioning.PositionMe.Traj.RFScan getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RFScan parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.RFScan getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WiFiRTTReadingOrBuilder extends + // @@protoc_insertion_point(interface_extends:WiFiRTTReading) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + long getRelativeTimestamp(); + + /** + *
+     * Integer encoding of the hex mac address (BSSID)
+     * e.g. 207394925843984
+     * 
+ * + * int64 mac = 2; + * @return The mac. + */ + long getMac(); + + /** + *
+     * in mm
+     * 
+ * + * float distance = 3; + * @return The distance. + */ + float getDistance(); + + /** + *
+     * in mm
+     * 
+ * + * float distance_std = 4; + * @return The distanceStd. + */ + float getDistanceStd(); + + /** + *
+     * rssi integer in dBm.
+     * typically between -120 and -10
+     * 
+ * + * int32 rssi = 5; + * @return The rssi. + */ + int getRssi(); + } + /** + * Protobuf type {@code WiFiRTTReading} + */ + public static final class WiFiRTTReading extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:WiFiRTTReading) + WiFiRTTReadingOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + WiFiRTTReading.class.getName()); + } + // Use WiFiRTTReading.newBuilder() to construct. + private WiFiRTTReading(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private WiFiRTTReading() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiRTTReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiRTTReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.WiFiRTTReading.class, com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder.class); + } + + public static final int RELATIVE_TIMESTAMP_FIELD_NUMBER = 1; + private long relativeTimestamp_ = 0L; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + + public static final int MAC_FIELD_NUMBER = 2; + private long mac_ = 0L; + /** + *
+     * Integer encoding of the hex mac address (BSSID)
+     * e.g. 207394925843984
+     * 
+ * + * int64 mac = 2; + * @return The mac. + */ + @java.lang.Override + public long getMac() { + return mac_; + } + + public static final int DISTANCE_FIELD_NUMBER = 3; + private float distance_ = 0F; + /** + *
+     * in mm
+     * 
+ * + * float distance = 3; + * @return The distance. + */ + @java.lang.Override + public float getDistance() { + return distance_; + } + + public static final int DISTANCE_STD_FIELD_NUMBER = 4; + private float distanceStd_ = 0F; + /** + *
+     * in mm
+     * 
+ * + * float distance_std = 4; + * @return The distanceStd. + */ + @java.lang.Override + public float getDistanceStd() { + return distanceStd_; + } + + public static final int RSSI_FIELD_NUMBER = 5; + private int rssi_ = 0; + /** + *
+     * rssi integer in dBm.
+     * typically between -120 and -10
+     * 
+ * + * int32 rssi = 5; + * @return The rssi. + */ + @java.lang.Override + public int getRssi() { + return rssi_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + 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 (java.lang.Float.floatToRawIntBits(distance_) != 0) { + output.writeFloat(3, distance_); + } + if (java.lang.Float.floatToRawIntBits(distanceStd_) != 0) { + output.writeFloat(4, distanceStd_); + } + if (rssi_ != 0) { + output.writeInt32(5, rssi_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (java.lang.Float.floatToRawIntBits(distance_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, distance_); + } + if (java.lang.Float.floatToRawIntBits(distanceStd_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, distanceStd_); + } + if (rssi_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, rssi_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.WiFiRTTReading)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.WiFiRTTReading other = (com.openpositioning.PositionMe.Traj.WiFiRTTReading) obj; + + if (getRelativeTimestamp() + != other.getRelativeTimestamp()) return false; + if (getMac() + != other.getMac()) return false; + if (java.lang.Float.floatToIntBits(getDistance()) + != java.lang.Float.floatToIntBits( + other.getDistance())) return false; + if (java.lang.Float.floatToIntBits(getDistanceStd()) + != java.lang.Float.floatToIntBits( + other.getDistanceStd())) return false; + if (getRssi() + != other.getRssi()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().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) + DISTANCE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getDistance()); + hash = (37 * hash) + DISTANCE_STD_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getDistanceStd()); + hash = (37 * hash) + RSSI_FIELD_NUMBER; + hash = (53 * hash) + getRssi(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.WiFiRTTReading prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code WiFiRTTReading} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:WiFiRTTReading) + com.openpositioning.PositionMe.Traj.WiFiRTTReadingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiRTTReading_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiRTTReading_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.WiFiRTTReading.class, com.openpositioning.PositionMe.Traj.WiFiRTTReading.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.WiFiRTTReading.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + relativeTimestamp_ = 0L; + mac_ = 0L; + distance_ = 0F; + distanceStd_ = 0F; + rssi_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiRTTReading_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiRTTReading getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.WiFiRTTReading.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiRTTReading build() { + com.openpositioning.PositionMe.Traj.WiFiRTTReading result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiRTTReading buildPartial() { + com.openpositioning.PositionMe.Traj.WiFiRTTReading result = new com.openpositioning.PositionMe.Traj.WiFiRTTReading(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.WiFiRTTReading result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.relativeTimestamp_ = relativeTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.mac_ = mac_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.distance_ = distance_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.distanceStd_ = distanceStd_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.rssi_ = rssi_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.WiFiRTTReading) { + return mergeFrom((com.openpositioning.PositionMe.Traj.WiFiRTTReading)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.WiFiRTTReading other) { + if (other == com.openpositioning.PositionMe.Traj.WiFiRTTReading.getDefaultInstance()) return this; + if (other.getRelativeTimestamp() != 0L) { + setRelativeTimestamp(other.getRelativeTimestamp()); + } + if (other.getMac() != 0L) { + setMac(other.getMac()); + } + if (other.getDistance() != 0F) { + setDistance(other.getDistance()); + } + if (other.getDistanceStd() != 0F) { + setDistanceStd(other.getDistanceStd()); + } + if (other.getRssi() != 0) { + setRssi(other.getRssi()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + relativeTimestamp_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + mac_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 29: { + distance_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 37: { + distanceStd_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + case 40: { + rssi_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long relativeTimestamp_ ; + /** + * int64 relative_timestamp = 1; + * @return The relativeTimestamp. + */ + @java.lang.Override + public long getRelativeTimestamp() { + return relativeTimestamp_; + } + /** + * int64 relative_timestamp = 1; + * @param value The relativeTimestamp to set. + * @return This builder for chaining. + */ + public Builder setRelativeTimestamp(long value) { + + relativeTimestamp_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 relative_timestamp = 1; + * @return This builder for chaining. + */ + public Builder clearRelativeTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); + relativeTimestamp_ = 0L; + onChanged(); + return this; + } + + private long mac_ ; + /** + *
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
+       * 
+ * + * int64 mac = 2; + * @return The mac. + */ + @java.lang.Override + public long getMac() { + return mac_; + } + /** + *
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
+       * 
+ * + * int64 mac = 2; + * @param value The mac to set. + * @return This builder for chaining. + */ + public Builder setMac(long value) { + + mac_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
+       * 
+ * + * int64 mac = 2; + * @return This builder for chaining. + */ + public Builder clearMac() { + bitField0_ = (bitField0_ & ~0x00000002); + mac_ = 0L; + onChanged(); + return this; + } + + private float distance_ ; + /** + *
+       * in mm
+       * 
+ * + * float distance = 3; + * @return The distance. + */ + @java.lang.Override + public float getDistance() { + return distance_; + } + /** + *
+       * in mm
+       * 
+ * + * float distance = 3; + * @param value The distance to set. + * @return This builder for chaining. + */ + public Builder setDistance(float value) { + + distance_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * in mm
+       * 
+ * + * float distance = 3; + * @return This builder for chaining. + */ + public Builder clearDistance() { + bitField0_ = (bitField0_ & ~0x00000004); + distance_ = 0F; + onChanged(); + return this; + } + + private float distanceStd_ ; + /** + *
+       * in mm
+       * 
+ * + * float distance_std = 4; + * @return The distanceStd. + */ + @java.lang.Override + public float getDistanceStd() { + return distanceStd_; + } + /** + *
+       * in mm
+       * 
+ * + * float distance_std = 4; + * @param value The distanceStd to set. + * @return This builder for chaining. + */ + public Builder setDistanceStd(float value) { + + distanceStd_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * in mm
+       * 
+ * + * float distance_std = 4; + * @return This builder for chaining. + */ + public Builder clearDistanceStd() { + bitField0_ = (bitField0_ & ~0x00000008); + distanceStd_ = 0F; + onChanged(); + return this; + } + + private int rssi_ ; + /** + *
+       * rssi integer in dBm.
+       * typically between -120 and -10
+       * 
+ * + * int32 rssi = 5; + * @return The rssi. + */ + @java.lang.Override + public int getRssi() { + return rssi_; + } + /** + *
+       * rssi integer in dBm.
+       * typically between -120 and -10
+       * 
+ * + * int32 rssi = 5; + * @param value The rssi to set. + * @return This builder for chaining. + */ + public Builder setRssi(int value) { + + rssi_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
+       * rssi integer in dBm.
+       * typically between -120 and -10
+       * 
+ * + * int32 rssi = 5; + * @return This builder for chaining. + */ + public Builder clearRssi() { + bitField0_ = (bitField0_ & ~0x00000010); + rssi_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:WiFiRTTReading) + } + + // @@protoc_insertion_point(class_scope:WiFiRTTReading) + private static final com.openpositioning.PositionMe.Traj.WiFiRTTReading DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.WiFiRTTReading(); + } + + public static com.openpositioning.PositionMe.Traj.WiFiRTTReading getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WiFiRTTReading parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiRTTReading getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface WiFiAPDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:WiFiAPData) + com.google.protobuf.MessageOrBuilder { + + /** + *
+     * Integer encoding of the hex mac address (BSSID)
+     * e.g. 207394925843984
+     * 
+ * + * int64 mac = 1; + * @return The mac. + */ + long getMac(); + + /** + *
+     * E.g. 'Eduroam' or 'Starbucks_free_wifi'
+     * 
+ * + * string ssid = 2; + * @return The ssid. + */ + java.lang.String getSsid(); + /** + *
+     * E.g. 'Eduroam' or 'Starbucks_free_wifi'
+     * 
+ * + * string ssid = 2; + * @return The bytes for ssid. + */ + com.google.protobuf.ByteString + getSsidBytes(); + + /** + *
+     * Typically 2.4GHz or 5GHz
+     * 
+ * + * int64 frequency = 3; + * @return The frequency. + */ + long getFrequency(); + + /** + *
+     * Flag to indicate if the AP supports RTT measurements
+     * 
+ * + * bool rtt_enabled = 4; + * @return The rttEnabled. + */ + boolean getRttEnabled(); + } + /** + * Protobuf type {@code WiFiAPData} + */ + public static final class WiFiAPData extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:WiFiAPData) + WiFiAPDataOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + WiFiAPData.class.getName()); + } + // Use WiFiAPData.newBuilder() to construct. + private WiFiAPData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private WiFiAPData() { + ssid_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiAPData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiAPData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.WiFiAPData.class, com.openpositioning.PositionMe.Traj.WiFiAPData.Builder.class); + } + + public static final int MAC_FIELD_NUMBER = 1; + private long mac_ = 0L; + /** + *
+     * Integer encoding of the hex mac address (BSSID)
+     * e.g. 207394925843984
+     * 
+ * + * int64 mac = 1; + * @return The mac. + */ + @java.lang.Override + public long getMac() { + return mac_; + } + + public static final int SSID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object ssid_ = ""; + /** + *
+     * E.g. 'Eduroam' or 'Starbucks_free_wifi'
+     * 
+ * + * string ssid = 2; + * @return The ssid. + */ + @java.lang.Override + public java.lang.String getSsid() { + java.lang.Object ref = ssid_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ssid_ = s; + return s; + } + } + /** + *
+     * E.g. 'Eduroam' or 'Starbucks_free_wifi'
+     * 
+ * + * string ssid = 2; + * @return The bytes for ssid. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSsidBytes() { + java.lang.Object ref = ssid_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ssid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FREQUENCY_FIELD_NUMBER = 3; + private long frequency_ = 0L; + /** + *
+     * Typically 2.4GHz or 5GHz
+     * 
+ * + * int64 frequency = 3; + * @return The frequency. + */ + @java.lang.Override + public long getFrequency() { + return frequency_; + } + + public static final int RTT_ENABLED_FIELD_NUMBER = 4; + private boolean rttEnabled_ = false; + /** + *
+     * Flag to indicate if the AP supports RTT measurements
+     * 
+ * + * bool rtt_enabled = 4; + * @return The rttEnabled. + */ + @java.lang.Override + public boolean getRttEnabled() { + return rttEnabled_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (mac_ != 0L) { + output.writeInt64(1, mac_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ssid_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, ssid_); + } + if (frequency_ != 0L) { + output.writeInt64(3, frequency_); + } + if (rttEnabled_ != false) { + output.writeBool(4, rttEnabled_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(ssid_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, ssid_); + } + if (frequency_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(3, frequency_); + } + if (rttEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, rttEnabled_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.WiFiAPData)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.WiFiAPData other = (com.openpositioning.PositionMe.Traj.WiFiAPData) obj; + + if (getMac() + != other.getMac()) return false; + if (!getSsid() + .equals(other.getSsid())) return false; + if (getFrequency() + != other.getFrequency()) return false; + if (getRttEnabled() + != other.getRttEnabled()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().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 = (37 * hash) + RTT_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getRttEnabled()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.WiFiAPData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.WiFiAPData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code WiFiAPData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:WiFiAPData) + com.openpositioning.PositionMe.Traj.WiFiAPDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiAPData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiAPData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.WiFiAPData.class, com.openpositioning.PositionMe.Traj.WiFiAPData.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.WiFiAPData.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + mac_ = 0L; + ssid_ = ""; + frequency_ = 0L; + rttEnabled_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_WiFiAPData_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiAPData getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.WiFiAPData.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiAPData build() { + com.openpositioning.PositionMe.Traj.WiFiAPData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiAPData buildPartial() { + com.openpositioning.PositionMe.Traj.WiFiAPData result = new com.openpositioning.PositionMe.Traj.WiFiAPData(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.WiFiAPData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.mac_ = mac_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ssid_ = ssid_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.frequency_ = frequency_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.rttEnabled_ = rttEnabled_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.WiFiAPData) { + return mergeFrom((com.openpositioning.PositionMe.Traj.WiFiAPData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.WiFiAPData other) { + if (other == com.openpositioning.PositionMe.Traj.WiFiAPData.getDefaultInstance()) return this; + if (other.getMac() != 0L) { + setMac(other.getMac()); + } + if (!other.getSsid().isEmpty()) { + ssid_ = other.ssid_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getFrequency() != 0L) { + setFrequency(other.getFrequency()); + } + if (other.getRttEnabled() != false) { + setRttEnabled(other.getRttEnabled()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + mac_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + ssid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + frequency_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + rttEnabled_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private long mac_ ; + /** + *
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
+       * 
+ * + * int64 mac = 1; + * @return The mac. + */ + @java.lang.Override + public long getMac() { + return mac_; + } + /** + *
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
+       * 
+ * + * int64 mac = 1; + * @param value The mac to set. + * @return This builder for chaining. + */ + public Builder setMac(long value) { + + mac_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+       * Integer encoding of the hex mac address (BSSID)
+       * e.g. 207394925843984
+       * 
+ * + * int64 mac = 1; + * @return This builder for chaining. + */ + public Builder clearMac() { + bitField0_ = (bitField0_ & ~0x00000001); + mac_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object ssid_ = ""; + /** + *
+       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
+       * 
+ * + * string ssid = 2; + * @return The ssid. + */ + public java.lang.String getSsid() { + java.lang.Object ref = ssid_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ssid_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
+       * 
+ * + * string ssid = 2; + * @return The bytes for ssid. + */ + public com.google.protobuf.ByteString + getSsidBytes() { + java.lang.Object ref = ssid_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + ssid_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
+       * 
+ * + * string ssid = 2; + * @param value The ssid to set. + * @return This builder for chaining. + */ + public Builder setSsid( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ssid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
+       * 
+ * + * string ssid = 2; + * @return This builder for chaining. + */ + public Builder clearSsid() { + ssid_ = getDefaultInstance().getSsid(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+       * E.g. 'Eduroam' or 'Starbucks_free_wifi'
+       * 
+ * + * string ssid = 2; + * @param value The bytes for ssid to set. + * @return This builder for chaining. + */ + public Builder setSsidBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ssid_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private long frequency_ ; + /** + *
+       * Typically 2.4GHz or 5GHz
+       * 
+ * + * int64 frequency = 3; + * @return The frequency. + */ + @java.lang.Override + public long getFrequency() { + return frequency_; + } + /** + *
+       * Typically 2.4GHz or 5GHz
+       * 
+ * + * int64 frequency = 3; + * @param value The frequency to set. + * @return This builder for chaining. + */ + public Builder setFrequency(long value) { + + frequency_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+       * Typically 2.4GHz or 5GHz
+       * 
+ * + * int64 frequency = 3; + * @return This builder for chaining. + */ + public Builder clearFrequency() { + bitField0_ = (bitField0_ & ~0x00000004); + frequency_ = 0L; + onChanged(); + return this; + } + + private boolean rttEnabled_ ; + /** + *
+       * Flag to indicate if the AP supports RTT measurements
+       * 
+ * + * bool rtt_enabled = 4; + * @return The rttEnabled. + */ + @java.lang.Override + public boolean getRttEnabled() { + return rttEnabled_; + } + /** + *
+       * Flag to indicate if the AP supports RTT measurements
+       * 
+ * + * bool rtt_enabled = 4; + * @param value The rttEnabled to set. + * @return This builder for chaining. + */ + public Builder setRttEnabled(boolean value) { + + rttEnabled_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+       * Flag to indicate if the AP supports RTT measurements
+       * 
+ * + * bool rtt_enabled = 4; + * @return This builder for chaining. + */ + public Builder clearRttEnabled() { + bitField0_ = (bitField0_ & ~0x00000008); + rttEnabled_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:WiFiAPData) + } + + // @@protoc_insertion_point(class_scope:WiFiAPData) + private static final com.openpositioning.PositionMe.Traj.WiFiAPData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.WiFiAPData(); + } + + public static com.openpositioning.PositionMe.Traj.WiFiAPData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public WiFiAPData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.WiFiAPData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface BleDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:BleData) + com.google.protobuf.MessageOrBuilder { + + /** + * string mac_address = 1; + * @return The macAddress. + */ + java.lang.String getMacAddress(); + /** + * string mac_address = 1; + * @return The bytes for macAddress. + */ + com.google.protobuf.ByteString + getMacAddressBytes(); + + /** + * string name = 2; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 2; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * int32 tx_power_level = 3; + * @return The txPowerLevel. + */ + int getTxPowerLevel(); + + /** + * int32 advertise_flags = 4; + * @return The advertiseFlags. + */ + int getAdvertiseFlags(); + + /** + * repeated string service_uuids = 5; + * @return A list containing the serviceUuids. + */ + java.util.List + getServiceUuidsList(); + /** + * repeated string service_uuids = 5; + * @return The count of serviceUuids. + */ + int getServiceUuidsCount(); + /** + * repeated string service_uuids = 5; + * @param index The index of the element to return. + * @return The serviceUuids at the given index. + */ + java.lang.String getServiceUuids(int index); + /** + * repeated string service_uuids = 5; + * @param index The index of the value to return. + * @return The bytes of the serviceUuids at the given index. + */ + com.google.protobuf.ByteString + getServiceUuidsBytes(int index); + + /** + * bytes manufacturer_data = 6; + * @return The manufacturerData. + */ + com.google.protobuf.ByteString getManufacturerData(); + } + /** + * Protobuf type {@code BleData} + */ + public static final class BleData extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:BleData) + BleDataOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + BleData.class.getName()); + } + // Use BleData.newBuilder() to construct. + private BleData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private BleData() { + macAddress_ = ""; + name_ = ""; + serviceUuids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + manufacturerData_ = com.google.protobuf.ByteString.EMPTY; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_BleData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_BleData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.BleData.class, com.openpositioning.PositionMe.Traj.BleData.Builder.class); + } + + public static final int MAC_ADDRESS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object macAddress_ = ""; + /** + * string mac_address = 1; + * @return The macAddress. + */ + @java.lang.Override + public java.lang.String getMacAddress() { + java.lang.Object ref = macAddress_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + macAddress_ = s; + return s; + } + } + /** + * string mac_address = 1; + * @return The bytes for macAddress. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMacAddressBytes() { + java.lang.Object ref = macAddress_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + macAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 2; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 2; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TX_POWER_LEVEL_FIELD_NUMBER = 3; + private int txPowerLevel_ = 0; + /** + * int32 tx_power_level = 3; + * @return The txPowerLevel. + */ + @java.lang.Override + public int getTxPowerLevel() { + return txPowerLevel_; + } + + public static final int ADVERTISE_FLAGS_FIELD_NUMBER = 4; + private int advertiseFlags_ = 0; + /** + * int32 advertise_flags = 4; + * @return The advertiseFlags. + */ + @java.lang.Override + public int getAdvertiseFlags() { + return advertiseFlags_; + } + + public static final int SERVICE_UUIDS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList serviceUuids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string service_uuids = 5; + * @return A list containing the serviceUuids. + */ + public com.google.protobuf.ProtocolStringList + getServiceUuidsList() { + return serviceUuids_; + } + /** + * repeated string service_uuids = 5; + * @return The count of serviceUuids. + */ + public int getServiceUuidsCount() { + return serviceUuids_.size(); + } + /** + * repeated string service_uuids = 5; + * @param index The index of the element to return. + * @return The serviceUuids at the given index. + */ + public java.lang.String getServiceUuids(int index) { + return serviceUuids_.get(index); + } + /** + * repeated string service_uuids = 5; + * @param index The index of the value to return. + * @return The bytes of the serviceUuids at the given index. + */ + public com.google.protobuf.ByteString + getServiceUuidsBytes(int index) { + return serviceUuids_.getByteString(index); + } + + public static final int MANUFACTURER_DATA_FIELD_NUMBER = 6; + private com.google.protobuf.ByteString manufacturerData_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes manufacturer_data = 6; + * @return The manufacturerData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getManufacturerData() { + return manufacturerData_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(macAddress_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, macAddress_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, name_); + } + if (txPowerLevel_ != 0) { + output.writeInt32(3, txPowerLevel_); + } + if (advertiseFlags_ != 0) { + output.writeInt32(4, advertiseFlags_); + } + for (int i = 0; i < serviceUuids_.size(); i++) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, serviceUuids_.getRaw(i)); + } + if (!manufacturerData_.isEmpty()) { + output.writeBytes(6, manufacturerData_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(macAddress_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, macAddress_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_); + } + if (txPowerLevel_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, txPowerLevel_); + } + if (advertiseFlags_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, advertiseFlags_); + } + { + int dataSize = 0; + for (int i = 0; i < serviceUuids_.size(); i++) { + dataSize += computeStringSizeNoTag(serviceUuids_.getRaw(i)); + } + size += dataSize; + size += 1 * getServiceUuidsList().size(); + } + if (!manufacturerData_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(6, manufacturerData_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.BleData)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.BleData other = (com.openpositioning.PositionMe.Traj.BleData) obj; + + if (!getMacAddress() + .equals(other.getMacAddress())) return false; + if (!getName() + .equals(other.getName())) return false; + if (getTxPowerLevel() + != other.getTxPowerLevel()) return false; + if (getAdvertiseFlags() + != other.getAdvertiseFlags()) return false; + if (!getServiceUuidsList() + .equals(other.getServiceUuidsList())) return false; + if (!getManufacturerData() + .equals(other.getManufacturerData())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAC_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getMacAddress().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TX_POWER_LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getTxPowerLevel(); + hash = (37 * hash) + ADVERTISE_FLAGS_FIELD_NUMBER; + hash = (53 * hash) + getAdvertiseFlags(); + if (getServiceUuidsCount() > 0) { + hash = (37 * hash) + SERVICE_UUIDS_FIELD_NUMBER; + hash = (53 * hash) + getServiceUuidsList().hashCode(); + } + hash = (37 * hash) + MANUFACTURER_DATA_FIELD_NUMBER; + hash = (53 * hash) + getManufacturerData().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.BleData parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.BleData parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.BleData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.BleData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.BleData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.BleData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.BleData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.BleData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.BleData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.BleData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.BleData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.BleData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.BleData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code BleData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:BleData) + com.openpositioning.PositionMe.Traj.BleDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_BleData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_BleData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.BleData.class, com.openpositioning.PositionMe.Traj.BleData.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.BleData.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + macAddress_ = ""; + name_ = ""; + txPowerLevel_ = 0; + advertiseFlags_ = 0; + serviceUuids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + manufacturerData_ = com.google.protobuf.ByteString.EMPTY; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_BleData_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BleData getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.BleData.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BleData build() { + com.openpositioning.PositionMe.Traj.BleData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BleData buildPartial() { + com.openpositioning.PositionMe.Traj.BleData result = new com.openpositioning.PositionMe.Traj.BleData(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.BleData result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.macAddress_ = macAddress_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.txPowerLevel_ = txPowerLevel_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.advertiseFlags_ = advertiseFlags_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + serviceUuids_.makeImmutable(); + result.serviceUuids_ = serviceUuids_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.manufacturerData_ = manufacturerData_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.BleData) { + return mergeFrom((com.openpositioning.PositionMe.Traj.BleData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.BleData other) { + if (other == com.openpositioning.PositionMe.Traj.BleData.getDefaultInstance()) return this; + if (!other.getMacAddress().isEmpty()) { + macAddress_ = other.macAddress_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getTxPowerLevel() != 0) { + setTxPowerLevel(other.getTxPowerLevel()); + } + if (other.getAdvertiseFlags() != 0) { + setAdvertiseFlags(other.getAdvertiseFlags()); + } + if (!other.serviceUuids_.isEmpty()) { + if (serviceUuids_.isEmpty()) { + serviceUuids_ = other.serviceUuids_; + bitField0_ |= 0x00000010; + } else { + ensureServiceUuidsIsMutable(); + serviceUuids_.addAll(other.serviceUuids_); + } + onChanged(); + } + if (other.getManufacturerData() != com.google.protobuf.ByteString.EMPTY) { + setManufacturerData(other.getManufacturerData()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + macAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + txPowerLevel_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + advertiseFlags_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + ensureServiceUuidsIsMutable(); + serviceUuids_.add(s); + break; + } // case 42 + case 50: { + manufacturerData_ = input.readBytes(); + bitField0_ |= 0x00000020; + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object macAddress_ = ""; + /** + * string mac_address = 1; + * @return The macAddress. + */ + public java.lang.String getMacAddress() { + java.lang.Object ref = macAddress_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + macAddress_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string mac_address = 1; + * @return The bytes for macAddress. + */ + public com.google.protobuf.ByteString + getMacAddressBytes() { + java.lang.Object ref = macAddress_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + macAddress_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string mac_address = 1; + * @param value The macAddress to set. + * @return This builder for chaining. + */ + public Builder setMacAddress( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + macAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string mac_address = 1; + * @return This builder for chaining. + */ + public Builder clearMacAddress() { + macAddress_ = getDefaultInstance().getMacAddress(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string mac_address = 1; + * @param value The bytes for macAddress to set. + * @return This builder for chaining. + */ + public Builder setMacAddressBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + macAddress_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * string name = 2; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 2; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 2; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string name = 2; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string name = 2; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int txPowerLevel_ ; + /** + * int32 tx_power_level = 3; + * @return The txPowerLevel. + */ + @java.lang.Override + public int getTxPowerLevel() { + return txPowerLevel_; + } + /** + * int32 tx_power_level = 3; + * @param value The txPowerLevel to set. + * @return This builder for chaining. + */ + public Builder setTxPowerLevel(int value) { + + txPowerLevel_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int32 tx_power_level = 3; + * @return This builder for chaining. + */ + public Builder clearTxPowerLevel() { + bitField0_ = (bitField0_ & ~0x00000004); + txPowerLevel_ = 0; + onChanged(); + return this; + } + + private int advertiseFlags_ ; + /** + * int32 advertise_flags = 4; + * @return The advertiseFlags. + */ + @java.lang.Override + public int getAdvertiseFlags() { + return advertiseFlags_; + } + /** + * int32 advertise_flags = 4; + * @param value The advertiseFlags to set. + * @return This builder for chaining. + */ + public Builder setAdvertiseFlags(int value) { + + advertiseFlags_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int32 advertise_flags = 4; + * @return This builder for chaining. + */ + public Builder clearAdvertiseFlags() { + bitField0_ = (bitField0_ & ~0x00000008); + advertiseFlags_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList serviceUuids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureServiceUuidsIsMutable() { + if (!serviceUuids_.isModifiable()) { + serviceUuids_ = new com.google.protobuf.LazyStringArrayList(serviceUuids_); + } + bitField0_ |= 0x00000010; + } + /** + * repeated string service_uuids = 5; + * @return A list containing the serviceUuids. + */ + public com.google.protobuf.ProtocolStringList + getServiceUuidsList() { + serviceUuids_.makeImmutable(); + return serviceUuids_; + } + /** + * repeated string service_uuids = 5; + * @return The count of serviceUuids. + */ + public int getServiceUuidsCount() { + return serviceUuids_.size(); + } + /** + * repeated string service_uuids = 5; + * @param index The index of the element to return. + * @return The serviceUuids at the given index. + */ + public java.lang.String getServiceUuids(int index) { + return serviceUuids_.get(index); + } + /** + * repeated string service_uuids = 5; + * @param index The index of the value to return. + * @return The bytes of the serviceUuids at the given index. + */ + public com.google.protobuf.ByteString + getServiceUuidsBytes(int index) { + return serviceUuids_.getByteString(index); + } + /** + * repeated string service_uuids = 5; + * @param index The index to set the value at. + * @param value The serviceUuids to set. + * @return This builder for chaining. + */ + public Builder setServiceUuids( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureServiceUuidsIsMutable(); + serviceUuids_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * repeated string service_uuids = 5; + * @param value The serviceUuids to add. + * @return This builder for chaining. + */ + public Builder addServiceUuids( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureServiceUuidsIsMutable(); + serviceUuids_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * repeated string service_uuids = 5; + * @param values The serviceUuids to add. + * @return This builder for chaining. + */ + public Builder addAllServiceUuids( + java.lang.Iterable values) { + ensureServiceUuidsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, serviceUuids_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * repeated string service_uuids = 5; + * @return This builder for chaining. + */ + public Builder clearServiceUuids() { + serviceUuids_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010);; + onChanged(); + return this; + } + /** + * repeated string service_uuids = 5; + * @param value The bytes of the serviceUuids to add. + * @return This builder for chaining. + */ + public Builder addServiceUuidsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureServiceUuidsIsMutable(); + serviceUuids_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString manufacturerData_ = com.google.protobuf.ByteString.EMPTY; + /** + * bytes manufacturer_data = 6; + * @return The manufacturerData. + */ + @java.lang.Override + public com.google.protobuf.ByteString getManufacturerData() { + return manufacturerData_; + } + /** + * bytes manufacturer_data = 6; + * @param value The manufacturerData to set. + * @return This builder for chaining. + */ + public Builder setManufacturerData(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + manufacturerData_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * bytes manufacturer_data = 6; + * @return This builder for chaining. + */ + public Builder clearManufacturerData() { + bitField0_ = (bitField0_ & ~0x00000020); + manufacturerData_ = getDefaultInstance().getManufacturerData(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:BleData) + } + + // @@protoc_insertion_point(class_scope:BleData) + private static final com.openpositioning.PositionMe.Traj.BleData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.BleData(); + } + + public static com.openpositioning.PositionMe.Traj.BleData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BleData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.BleData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface Vector3OrBuilder extends + // @@protoc_insertion_point(interface_extends:Vector3) + com.google.protobuf.MessageOrBuilder { + + /** + * float x = 1; + * @return The x. + */ + float getX(); + + /** + * float y = 2; + * @return The y. + */ + float getY(); + + /** + * float z = 3; + * @return The z. + */ + float getZ(); + } + /** + *
+   * --- Common Types ---
+   * 
+ * + * Protobuf type {@code Vector3} + */ + public static final class Vector3 extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Vector3) + Vector3OrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + Vector3.class.getName()); + } + // Use Vector3.newBuilder() to construct. + private Vector3(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Vector3() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Vector3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Vector3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Vector3.class, com.openpositioning.PositionMe.Traj.Vector3.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_ = 0F; + /** + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_ = 0F; + /** + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + + public static final int Z_FIELD_NUMBER = 3; + private float z_ = 0F; + /** + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + output.writeFloat(3, z_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, z_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.Vector3)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.Vector3 other = (com.openpositioning.PositionMe.Traj.Vector3) obj; + + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (java.lang.Float.floatToIntBits(getZ()) + != java.lang.Float.floatToIntBits( + other.getZ())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (37 * hash) + Z_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getZ()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.Vector3 parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.Vector3 parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Vector3 parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.Vector3 prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+     * --- Common Types ---
+     * 
+ * + * Protobuf type {@code Vector3} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Vector3) + com.openpositioning.PositionMe.Traj.Vector3OrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Vector3_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Vector3_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Vector3.class, com.openpositioning.PositionMe.Traj.Vector3.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.Vector3.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + x_ = 0F; + y_ = 0F; + z_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_Vector3_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3 getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3 build() { + com.openpositioning.PositionMe.Traj.Vector3 result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3 buildPartial() { + com.openpositioning.PositionMe.Traj.Vector3 result = new com.openpositioning.PositionMe.Traj.Vector3(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.Vector3 result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.y_ = y_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.z_ = z_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.Vector3) { + return mergeFrom((com.openpositioning.PositionMe.Traj.Vector3)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.Vector3 other) { + if (other == com.openpositioning.PositionMe.Traj.Vector3.getDefaultInstance()) return this; + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + if (other.getZ() != 0F) { + setZ(other.getZ()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + x_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: { + y_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: { + z_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private float x_ ; + /** + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + /** + * float x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * float x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000001); + x_ = 0F; + onChanged(); + return this; + } + + private float y_ ; + /** + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + * float y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * float y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000002); + y_ = 0F; + onChanged(); + return this; + } + + private float z_ ; + /** + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + /** + * float z = 3; + * @param value The z to set. + * @return This builder for chaining. + */ + public Builder setZ(float value) { + + z_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * float z = 3; + * @return This builder for chaining. + */ + public Builder clearZ() { + bitField0_ = (bitField0_ & ~0x00000004); + z_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:Vector3) + } + + // @@protoc_insertion_point(class_scope:Vector3) + private static final com.openpositioning.PositionMe.Traj.Vector3 DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.Vector3(); + } + + public static com.openpositioning.PositionMe.Traj.Vector3 getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Vector3 parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Vector3 getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface QuaternionOrBuilder extends + // @@protoc_insertion_point(interface_extends:Quaternion) + com.google.protobuf.MessageOrBuilder { + + /** + * float x = 1; + * @return The x. + */ + float getX(); + + /** + * float y = 2; + * @return The y. + */ + float getY(); + + /** + * float z = 3; + * @return The z. + */ + float getZ(); + + /** + * float w = 4; + * @return The w. + */ + float getW(); + } + /** + * Protobuf type {@code Quaternion} + */ + public static final class Quaternion extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:Quaternion) + QuaternionOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + Quaternion.class.getName()); + } + // Use Quaternion.newBuilder() to construct. + private Quaternion(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Quaternion() { + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Quaternion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Quaternion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Quaternion.class, com.openpositioning.PositionMe.Traj.Quaternion.Builder.class); + } + + public static final int X_FIELD_NUMBER = 1; + private float x_ = 0F; + /** + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + + public static final int Y_FIELD_NUMBER = 2; + private float y_ = 0F; + /** + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + + public static final int Z_FIELD_NUMBER = 3; + private float z_ = 0F; + /** + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + + public static final int W_FIELD_NUMBER = 4; + private float w_ = 0F; + /** + * float w = 4; + * @return The w. + */ + @java.lang.Override + public float getW() { + return w_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + output.writeFloat(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + output.writeFloat(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + output.writeFloat(3, z_); + } + if (java.lang.Float.floatToRawIntBits(w_) != 0) { + output.writeFloat(4, w_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(x_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, x_); + } + if (java.lang.Float.floatToRawIntBits(y_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, y_); + } + if (java.lang.Float.floatToRawIntBits(z_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, z_); + } + if (java.lang.Float.floatToRawIntBits(w_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(4, w_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.Quaternion)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.Quaternion other = (com.openpositioning.PositionMe.Traj.Quaternion) obj; + + if (java.lang.Float.floatToIntBits(getX()) + != java.lang.Float.floatToIntBits( + other.getX())) return false; + if (java.lang.Float.floatToIntBits(getY()) + != java.lang.Float.floatToIntBits( + other.getY())) return false; + if (java.lang.Float.floatToIntBits(getZ()) + != java.lang.Float.floatToIntBits( + other.getZ())) return false; + if (java.lang.Float.floatToIntBits(getW()) + != java.lang.Float.floatToIntBits( + other.getW())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + X_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getX()); + hash = (37 * hash) + Y_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getY()); + hash = (37 * hash) + Z_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getZ()); + hash = (37 * hash) + W_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getW()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.Quaternion parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.Quaternion parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.Quaternion parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.Quaternion prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Quaternion} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:Quaternion) + com.openpositioning.PositionMe.Traj.QuaternionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_Quaternion_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_Quaternion_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.Quaternion.class, com.openpositioning.PositionMe.Traj.Quaternion.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.Quaternion.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + x_ = 0F; + y_ = 0F; + z_ = 0F; + w_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_Quaternion_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Quaternion getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.Quaternion.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Quaternion build() { + com.openpositioning.PositionMe.Traj.Quaternion result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Quaternion buildPartial() { + com.openpositioning.PositionMe.Traj.Quaternion result = new com.openpositioning.PositionMe.Traj.Quaternion(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.Quaternion result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.x_ = x_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.y_ = y_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.z_ = z_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.w_ = w_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.Quaternion) { + return mergeFrom((com.openpositioning.PositionMe.Traj.Quaternion)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.Quaternion other) { + if (other == com.openpositioning.PositionMe.Traj.Quaternion.getDefaultInstance()) return this; + if (other.getX() != 0F) { + setX(other.getX()); + } + if (other.getY() != 0F) { + setY(other.getY()); + } + if (other.getZ() != 0F) { + setZ(other.getZ()); + } + if (other.getW() != 0F) { + setW(other.getW()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + x_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: { + y_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + case 29: { + z_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 37: { + w_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private float x_ ; + /** + * float x = 1; + * @return The x. + */ + @java.lang.Override + public float getX() { + return x_; + } + /** + * float x = 1; + * @param value The x to set. + * @return This builder for chaining. + */ + public Builder setX(float value) { + + x_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * float x = 1; + * @return This builder for chaining. + */ + public Builder clearX() { + bitField0_ = (bitField0_ & ~0x00000001); + x_ = 0F; + onChanged(); + return this; + } + + private float y_ ; + /** + * float y = 2; + * @return The y. + */ + @java.lang.Override + public float getY() { + return y_; + } + /** + * float y = 2; + * @param value The y to set. + * @return This builder for chaining. + */ + public Builder setY(float value) { + + y_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * float y = 2; + * @return This builder for chaining. + */ + public Builder clearY() { + bitField0_ = (bitField0_ & ~0x00000002); + y_ = 0F; + onChanged(); + return this; + } + + private float z_ ; + /** + * float z = 3; + * @return The z. + */ + @java.lang.Override + public float getZ() { + return z_; + } + /** + * float z = 3; + * @param value The z to set. + * @return This builder for chaining. + */ + public Builder setZ(float value) { + + z_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * float z = 3; + * @return This builder for chaining. + */ + public Builder clearZ() { + bitField0_ = (bitField0_ & ~0x00000004); + z_ = 0F; + onChanged(); + return this; + } + + private float w_ ; + /** + * float w = 4; + * @return The w. + */ + @java.lang.Override + public float getW() { + return w_; + } + /** + * float w = 4; + * @param value The w to set. + * @return This builder for chaining. + */ + public Builder setW(float value) { + + w_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * float w = 4; + * @return This builder for chaining. + */ + public Builder clearW() { + bitField0_ = (bitField0_ & ~0x00000008); + w_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:Quaternion) + } + + // @@protoc_insertion_point(class_scope:Quaternion) + private static final com.openpositioning.PositionMe.Traj.Quaternion DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.Quaternion(); + } + + public static com.openpositioning.PositionMe.Traj.Quaternion getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Quaternion parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.Quaternion getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface SensorInfoOrBuilder extends + // @@protoc_insertion_point(interface_extends:SensorInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * string name = 1; + * @return The name. + */ + java.lang.String getName(); + /** + * string name = 1; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * string vendor = 2; + * @return The vendor. + */ + java.lang.String getVendor(); + /** + * string vendor = 2; + * @return The bytes for vendor. + */ + com.google.protobuf.ByteString + getVendorBytes(); + + /** + * float resolution = 3; + * @return The resolution. + */ + float getResolution(); + + /** + * float power = 4; + * @return The power. + */ + float getPower(); + + /** + * int32 version = 5; + * @return The version. + */ + int getVersion(); + + /** + * int32 type = 6; + * @return The type. + */ + int getType(); + + /** + * float max_range = 7; + * @return The maxRange. + */ + float getMaxRange(); + + /** + * float frequency = 8; + * @return The frequency. + */ + float getFrequency(); + } + /** + * Protobuf type {@code SensorInfo} + */ + public static final class SensorInfo extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:SensorInfo) + SensorInfoOrBuilder { + private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 29, + /* patch= */ 6, + /* suffix= */ "", + SensorInfo.class.getName()); + } + // Use SensorInfo.newBuilder() to construct. + private SensorInfo(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SensorInfo() { + name_ = ""; + vendor_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_SensorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_SensorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.SensorInfo.class, com.openpositioning.PositionMe.Traj.SensorInfo.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + * string name = 1; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * string name = 1; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VENDOR_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object vendor_ = ""; + /** + * string vendor = 2; + * @return The vendor. + */ + @java.lang.Override + public java.lang.String getVendor() { + java.lang.Object ref = vendor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vendor_ = s; + return s; + } + } + /** + * string vendor = 2; + * @return The bytes for vendor. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getVendorBytes() { + java.lang.Object ref = vendor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + vendor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESOLUTION_FIELD_NUMBER = 3; + private float resolution_ = 0F; + /** + * float resolution = 3; + * @return The resolution. + */ + @java.lang.Override + public float getResolution() { + return resolution_; + } + + public static final int POWER_FIELD_NUMBER = 4; + private float power_ = 0F; + /** + * float power = 4; + * @return The power. + */ + @java.lang.Override + public float getPower() { + return power_; + } + + public static final int VERSION_FIELD_NUMBER = 5; + private int version_ = 0; + /** + * int32 version = 5; + * @return The version. + */ + @java.lang.Override + public int getVersion() { + return version_; + } + + public static final int TYPE_FIELD_NUMBER = 6; + private int type_ = 0; + /** + * int32 type = 6; + * @return The type. + */ + @java.lang.Override + public int getType() { + return type_; + } + + public static final int MAX_RANGE_FIELD_NUMBER = 7; + private float maxRange_ = 0F; + /** + * float max_range = 7; + * @return The maxRange. + */ + @java.lang.Override + public float getMaxRange() { + return maxRange_; + } + + public static final int FREQUENCY_FIELD_NUMBER = 8; + private float frequency_ = 0F; + /** + * float frequency = 8; + * @return The frequency. + */ + @java.lang.Override + public float getFrequency() { + return frequency_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vendor_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, vendor_); + } + if (java.lang.Float.floatToRawIntBits(resolution_) != 0) { + output.writeFloat(3, resolution_); + } + if (java.lang.Float.floatToRawIntBits(power_) != 0) { + output.writeFloat(4, power_); + } + if (version_ != 0) { + output.writeInt32(5, version_); + } + if (type_ != 0) { + output.writeInt32(6, type_); + } + if (java.lang.Float.floatToRawIntBits(maxRange_) != 0) { + output.writeFloat(7, maxRange_); + } + if (java.lang.Float.floatToRawIntBits(frequency_) != 0) { + output.writeFloat(8, frequency_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(vendor_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, vendor_); + } + if (java.lang.Float.floatToRawIntBits(resolution_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(3, resolution_); + } + if (java.lang.Float.floatToRawIntBits(power_) != 0) { + 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_); + } + if (java.lang.Float.floatToRawIntBits(maxRange_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(7, maxRange_); + } + if (java.lang.Float.floatToRawIntBits(frequency_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(8, frequency_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.openpositioning.PositionMe.Traj.SensorInfo)) { + return super.equals(obj); + } + com.openpositioning.PositionMe.Traj.SensorInfo other = (com.openpositioning.PositionMe.Traj.SensorInfo) obj; + + if (!getName() + .equals(other.getName())) return false; + if (!getVendor() + .equals(other.getVendor())) return false; + if (java.lang.Float.floatToIntBits(getResolution()) + != java.lang.Float.floatToIntBits( + other.getResolution())) return false; + if (java.lang.Float.floatToIntBits(getPower()) + != java.lang.Float.floatToIntBits( + other.getPower())) return false; + if (getVersion() + != other.getVersion()) return false; + if (getType() + != other.getType()) return false; + if (java.lang.Float.floatToIntBits(getMaxRange()) + != java.lang.Float.floatToIntBits( + other.getMaxRange())) return false; + if (java.lang.Float.floatToIntBits(getFrequency()) + != java.lang.Float.floatToIntBits( + other.getFrequency())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().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) + java.lang.Float.floatToIntBits( + getResolution()); + hash = (37 * hash) + POWER_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getPower()); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType(); + hash = (37 * hash) + MAX_RANGE_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getMaxRange()); + hash = (37 * hash) + FREQUENCY_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getFrequency()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static com.openpositioning.PositionMe.Traj.SensorInfo parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static com.openpositioning.PositionMe.Traj.SensorInfo parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static com.openpositioning.PositionMe.Traj.SensorInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.openpositioning.PositionMe.Traj.SensorInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code SensorInfo} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:SensorInfo) + com.openpositioning.PositionMe.Traj.SensorInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.openpositioning.PositionMe.Traj.internal_static_SensorInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.openpositioning.PositionMe.Traj.internal_static_SensorInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.openpositioning.PositionMe.Traj.SensorInfo.class, com.openpositioning.PositionMe.Traj.SensorInfo.Builder.class); + } + + // Construct using com.openpositioning.PositionMe.Traj.SensorInfo.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + vendor_ = ""; + resolution_ = 0F; + power_ = 0F; + version_ = 0; + type_ = 0; + maxRange_ = 0F; + frequency_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.openpositioning.PositionMe.Traj.internal_static_SensorInfo_descriptor; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getDefaultInstanceForType() { + return com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo build() { + com.openpositioning.PositionMe.Traj.SensorInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo buildPartial() { + com.openpositioning.PositionMe.Traj.SensorInfo result = new com.openpositioning.PositionMe.Traj.SensorInfo(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.openpositioning.PositionMe.Traj.SensorInfo result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.vendor_ = vendor_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.resolution_ = resolution_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.power_ = power_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.version_ = version_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.maxRange_ = maxRange_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.frequency_ = frequency_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.openpositioning.PositionMe.Traj.SensorInfo) { + return mergeFrom((com.openpositioning.PositionMe.Traj.SensorInfo)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.openpositioning.PositionMe.Traj.SensorInfo other) { + if (other == com.openpositioning.PositionMe.Traj.SensorInfo.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getVendor().isEmpty()) { + vendor_ = other.vendor_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getResolution() != 0F) { + setResolution(other.getResolution()); + } + if (other.getPower() != 0F) { + setPower(other.getPower()); + } + if (other.getVersion() != 0) { + setVersion(other.getVersion()); + } + if (other.getType() != 0) { + setType(other.getType()); + } + if (other.getMaxRange() != 0F) { + setMaxRange(other.getMaxRange()); + } + if (other.getFrequency() != 0F) { + setFrequency(other.getFrequency()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + vendor_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 29: { + resolution_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 29 + case 37: { + power_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 37 + case 40: { + version_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + type_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 61: { + maxRange_ = input.readFloat(); + bitField0_ |= 0x00000040; + break; + } // case 61 + case 69: { + frequency_ = input.readFloat(); + bitField0_ |= 0x00000080; + break; + } // case 69 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * string name = 1; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string name = 1; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string name = 1; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string name = 1; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string name = 1; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object vendor_ = ""; + /** + * string vendor = 2; + * @return The vendor. + */ + public java.lang.String getVendor() { + java.lang.Object ref = vendor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + vendor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string vendor = 2; + * @return The bytes for vendor. + */ + public com.google.protobuf.ByteString + getVendorBytes() { + java.lang.Object ref = vendor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + vendor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string vendor = 2; + * @param value The vendor to set. + * @return This builder for chaining. + */ + public Builder setVendor( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + vendor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string vendor = 2; + * @return This builder for chaining. + */ + public Builder clearVendor() { + vendor_ = getDefaultInstance().getVendor(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string vendor = 2; + * @param value The bytes for vendor to set. + * @return This builder for chaining. + */ + public Builder setVendorBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + vendor_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private float resolution_ ; + /** + * float resolution = 3; + * @return The resolution. + */ + @java.lang.Override + public float getResolution() { + return resolution_; + } + /** + * float resolution = 3; + * @param value The resolution to set. + * @return This builder for chaining. + */ + public Builder setResolution(float value) { + + resolution_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * float resolution = 3; + * @return This builder for chaining. + */ + public Builder clearResolution() { + bitField0_ = (bitField0_ & ~0x00000004); + resolution_ = 0F; + onChanged(); + return this; + } + + private float power_ ; + /** + * float power = 4; + * @return The power. + */ + @java.lang.Override + public float getPower() { + return power_; + } + /** + * float power = 4; + * @param value The power to set. + * @return This builder for chaining. + */ + public Builder setPower(float value) { + + power_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * float power = 4; + * @return This builder for chaining. + */ + public Builder clearPower() { + bitField0_ = (bitField0_ & ~0x00000008); + power_ = 0F; + onChanged(); + return this; + } + + private int version_ ; + /** + * int32 version = 5; + * @return The version. + */ + @java.lang.Override + public int getVersion() { + return version_; + } + /** + * int32 version = 5; + * @param value The version to set. + * @return This builder for chaining. + */ + public Builder setVersion(int value) { + + version_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * int32 version = 5; + * @return This builder for chaining. + */ + public Builder clearVersion() { + bitField0_ = (bitField0_ & ~0x00000010); + version_ = 0; + onChanged(); + return this; + } + + private int type_ ; + /** + * int32 type = 6; + * @return The type. + */ + @java.lang.Override + public int getType() { + return type_; + } + /** + * int32 type = 6; + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(int value) { + + type_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * int32 type = 6; + * @return This builder for chaining. + */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000020); + type_ = 0; + onChanged(); + return this; + } + + private float maxRange_ ; + /** + * float max_range = 7; + * @return The maxRange. + */ + @java.lang.Override + public float getMaxRange() { + return maxRange_; + } + /** + * float max_range = 7; + * @param value The maxRange to set. + * @return This builder for chaining. + */ + public Builder setMaxRange(float value) { + + maxRange_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * float max_range = 7; + * @return This builder for chaining. + */ + public Builder clearMaxRange() { + bitField0_ = (bitField0_ & ~0x00000040); + maxRange_ = 0F; + onChanged(); + return this; + } + + private float frequency_ ; + /** + * float frequency = 8; + * @return The frequency. + */ + @java.lang.Override + public float getFrequency() { + return frequency_; + } + /** + * float frequency = 8; + * @param value The frequency to set. + * @return This builder for chaining. + */ + public Builder setFrequency(float value) { + + frequency_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * float frequency = 8; + * @return This builder for chaining. + */ + public Builder clearFrequency() { + bitField0_ = (bitField0_ & ~0x00000080); + frequency_ = 0F; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:SensorInfo) + } + + // @@protoc_insertion_point(class_scope:SensorInfo) + private static final com.openpositioning.PositionMe.Traj.SensorInfo DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.openpositioning.PositionMe.Traj.SensorInfo(); + } + + public static com.openpositioning.PositionMe.Traj.SensorInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SensorInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.openpositioning.PositionMe.Traj.SensorInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Trajectory_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_Trajectory_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_RelativePosition_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_RelativePosition_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_IMUReading_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_IMUReading_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_MagnetometerReading_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_MagnetometerReading_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_BarometerReading_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_BarometerReading_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_LightReading_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_LightReading_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_ProximityReading_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_ProximityReading_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GNSSPosition_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_GNSSPosition_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_GNSSReading_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_GNSSReading_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Fingerprint_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_Fingerprint_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_RFScan_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_RFScan_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WiFiRTTReading_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_WiFiRTTReading_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_WiFiAPData_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_WiFiAPData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_BleData_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_BleData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Vector3_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_Vector3_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Quaternion_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_Quaternion_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_SensorInfo_descriptor; + private static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_SensorInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\ntraj.proto\"\277\007\n\nTrajectory\022\027\n\017android_v" + + "ersion\030\001 \001(\t\022\032\n\022trajectory_version\030\002 \001(\002" + + "\022\025\n\rtrajectory_id\030\003 \001(\t\022\035\n\010imu_data\030\004 \003(" + + "\0132\013.IMUReading\022#\n\010pdr_data\030\005 \003(\0132\021.Relat" + + "ivePosition\022/\n\021magnetometer_data\030\006 \003(\0132\024" + + ".MagnetometerReading\022(\n\rpressure_data\030\007 " + + "\003(\0132\021.BarometerReading\022!\n\nlight_data\030\010 \003" + + "(\0132\r.LightReading\022)\n\016proximity_data\030\t \003(" + + "\0132\021.ProximityReading\022\037\n\tgnss_data\030\n \003(\0132" + + "\014.GNSSReading\022\'\n\021wifi_fingerprints\030\013 \003(\013" + + "2\014.Fingerprint\022\035\n\010aps_data\030\014 \003(\0132\013.WiFiA" + + "PData\022&\n\rwifi_rtt_data\030\r \003(\0132\017.WiFiRTTRe" + + "ading\022&\n\020ble_fingerprints\030\016 \003(\0132\014.Finger" + + "print\022\032\n\010ble_data\030\017 \003(\0132\010.BleData\022\027\n\017sta" + + "rt_timestamp\030\020 \001(\003\022\'\n\020initial_position\030\021" + + " \001(\0132\r.GNSSPosition\022*\n\023corrected_positio" + + "ns\030\022 \003(\0132\r.GNSSPosition\022\'\n\022accelerometer" + + "_info\030\023 \001(\0132\013.SensorInfo\022#\n\016gyroscope_in" + + "fo\030\024 \001(\0132\013.SensorInfo\022)\n\024rotation_vector" + + "_info\030\025 \001(\0132\013.SensorInfo\022&\n\021magnetometer" + + "_info\030\026 \001(\0132\013.SensorInfo\022#\n\016barometer_in" + + "fo\030\027 \001(\0132\013.SensorInfo\022&\n\021light_sensor_in" + + "fo\030\030 \001(\0132\013.SensorInfo\022#\n\016proximity_info\030" + + "\031 \001(\0132\013.SensorInfo\022\"\n\013test_points\030\032 \003(\0132" + + "\r.GNSSPosition\"D\n\020RelativePosition\022\032\n\022re" + + "lative_timestamp\030\001 \001(\003\022\t\n\001x\030\002 \001(\002\022\t\n\001y\030\003" + + " \001(\002\"\220\001\n\nIMUReading\022\032\n\022relative_timestam" + + "p\030\001 \001(\003\022\025\n\003acc\030\002 \001(\0132\010.Vector3\022\025\n\003gyr\030\003 " + + "\001(\0132\010.Vector3\022$\n\017rotation_vector\030\004 \001(\0132\013" + + ".Quaternion\022\022\n\nstep_count\030\005 \001(\005\"H\n\023Magne" + + "tometerReading\022\032\n\022relative_timestamp\030\001 \001" + + "(\003\022\025\n\003mag\030\002 \001(\0132\010.Vector3\"@\n\020BarometerRe" + + "ading\022\032\n\022relative_timestamp\030\001 \001(\003\022\020\n\010pre" + + "ssure\030\002 \001(\002\"9\n\014LightReading\022\032\n\022relative_" + + "timestamp\030\001 \001(\003\022\r\n\005light\030\002 \001(\002\"@\n\020Proxim" + + "ityReading\022\032\n\022relative_timestamp\030\001 \001(\003\022\020" + + "\n\010distance\030\002 \001(\002\"\177\n\014GNSSPosition\022\032\n\022rela" + + "tive_timestamp\030\001 \001(\003\022\020\n\010latitude\030\002 \001(\001\022\021" + + "\n\tlongitude\030\003 \001(\001\022\020\n\010altitude\030\004 \001(\001\022\022\n\005f" + + "loor\030\005 \001(\tH\000\210\001\001B\010\n\006_floor\"r\n\013GNSSReading" + + "\022\037\n\010position\030\001 \001(\0132\r.GNSSPosition\022\020\n\010acc" + + "uracy\030\002 \001(\002\022\r\n\005speed\030\003 \001(\002\022\017\n\007bearing\030\004 " + + "\001(\002\022\020\n\010provider\030\005 \001(\t\"D\n\013Fingerprint\022\032\n\022" + + "relative_timestamp\030\001 \001(\003\022\031\n\010rf_scans\030\002 \003" + + "(\0132\007.RFScan\"r\n\006RFScan\022\032\n\022relative_timest" + + "amp\030\001 \001(\003\022\013\n\003mac\030\002 \001(\003\022\014\n\004rssi\030\003 \001(\005\022$\n\010" + + "position\030\004 \001(\0132\r.GNSSPositionH\000\210\001\001B\013\n\t_p" + + "osition\"o\n\016WiFiRTTReading\022\032\n\022relative_ti" + + "mestamp\030\001 \001(\003\022\013\n\003mac\030\002 \001(\003\022\020\n\010distance\030\003" + + " \001(\002\022\024\n\014distance_std\030\004 \001(\002\022\014\n\004rssi\030\005 \001(\005" + + "\"O\n\nWiFiAPData\022\013\n\003mac\030\001 \001(\003\022\014\n\004ssid\030\002 \001(" + + "\t\022\021\n\tfrequency\030\003 \001(\003\022\023\n\013rtt_enabled\030\004 \001(" + + "\010\"\217\001\n\007BleData\022\023\n\013mac_address\030\001 \001(\t\022\014\n\004na" + + "me\030\002 \001(\t\022\026\n\016tx_power_level\030\003 \001(\005\022\027\n\017adve" + + "rtise_flags\030\004 \001(\005\022\025\n\rservice_uuids\030\005 \003(\t" + + "\022\031\n\021manufacturer_data\030\006 \001(\014\"*\n\007Vector3\022\t" + + "\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\"8\n\nQuate" + + "rnion\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002\022\t" + + "\n\001w\030\004 \001(\002\"\222\001\n\nSensorInfo\022\014\n\004name\030\001 \001(\t\022\016" + + "\n\006vendor\030\002 \001(\t\022\022\n\nresolution\030\003 \001(\002\022\r\n\005po" + + "wer\030\004 \001(\002\022\017\n\007version\030\005 \001(\005\022\014\n\004type\030\006 \001(\005" + + "\022\021\n\tmax_range\030\007 \001(\002\022\021\n\tfrequency\030\010 \001(\002B(" + + "\n\036com.openpositioning.PositionMeB\004TrajP\000" + + "b\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_Trajectory_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Trajectory_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Trajectory_descriptor, + new java.lang.String[] { "AndroidVersion", "TrajectoryVersion", "TrajectoryId", "ImuData", "PdrData", "MagnetometerData", "PressureData", "LightData", "ProximityData", "GnssData", "WifiFingerprints", "ApsData", "WifiRttData", "BleFingerprints", "BleData", "StartTimestamp", "InitialPosition", "CorrectedPositions", "AccelerometerInfo", "GyroscopeInfo", "RotationVectorInfo", "MagnetometerInfo", "BarometerInfo", "LightSensorInfo", "ProximityInfo", "TestPoints", }); + internal_static_RelativePosition_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_RelativePosition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_RelativePosition_descriptor, + new java.lang.String[] { "RelativeTimestamp", "X", "Y", }); + internal_static_IMUReading_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_IMUReading_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_IMUReading_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Acc", "Gyr", "RotationVector", "StepCount", }); + internal_static_MagnetometerReading_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_MagnetometerReading_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_MagnetometerReading_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Mag", }); + internal_static_BarometerReading_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_BarometerReading_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_BarometerReading_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Pressure", }); + internal_static_LightReading_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_LightReading_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_LightReading_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Light", }); + internal_static_ProximityReading_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_ProximityReading_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_ProximityReading_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Distance", }); + internal_static_GNSSPosition_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_GNSSPosition_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_GNSSPosition_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Latitude", "Longitude", "Altitude", "Floor", }); + internal_static_GNSSReading_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_GNSSReading_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_GNSSReading_descriptor, + new java.lang.String[] { "Position", "Accuracy", "Speed", "Bearing", "Provider", }); + internal_static_Fingerprint_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_Fingerprint_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Fingerprint_descriptor, + new java.lang.String[] { "RelativeTimestamp", "RfScans", }); + internal_static_RFScan_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_RFScan_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_RFScan_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Mac", "Rssi", "Position", }); + internal_static_WiFiRTTReading_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_WiFiRTTReading_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_WiFiRTTReading_descriptor, + new java.lang.String[] { "RelativeTimestamp", "Mac", "Distance", "DistanceStd", "Rssi", }); + internal_static_WiFiAPData_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_WiFiAPData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_WiFiAPData_descriptor, + new java.lang.String[] { "Mac", "Ssid", "Frequency", "RttEnabled", }); + internal_static_BleData_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_BleData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_BleData_descriptor, + new java.lang.String[] { "MacAddress", "Name", "TxPowerLevel", "AdvertiseFlags", "ServiceUuids", "ManufacturerData", }); + internal_static_Vector3_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_Vector3_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Vector3_descriptor, + new java.lang.String[] { "X", "Y", "Z", }); + internal_static_Quaternion_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_Quaternion_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_Quaternion_descriptor, + new java.lang.String[] { "X", "Y", "Z", "W", }); + internal_static_SensorInfo_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_SensorInfo_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_SensorInfo_descriptor, + new java.lang.String[] { "Name", "Vendor", "Resolution", "Power", "Version", "Type", "MaxRange", "Frequency", }); + descriptor.resolveAllFeaturesImmutable(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/secrets.properties b/secrets.properties deleted file mode 100644 index f0dc54fd..00000000 --- a/secrets.properties +++ /dev/null @@ -1,6 +0,0 @@ -# -# Modify the variables to set your keys -# -MAPS_API_KEY= -OPENPOSITIONING_API_KEY= -OPENPOSITIONING_MASTER_KEY=