1 /*
2 * Copyright (C) 2020 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #include <vector>
18 #include "GnssDebug.h"
19
20 namespace aidl {
21 namespace android {
22 namespace hardware {
23 namespace gnss {
24 namespace implementation {
25
getDebugData(DebugData * debugData)26 ndk::ScopedAStatus GnssDebug::getDebugData(DebugData* debugData) {
27 PositionDebug positionDebug = {.valid = true,
28 .latitudeDegrees = 37.4219999,
29 .longitudeDegrees = -122.0840575,
30 .altitudeMeters = 1.60062531,
31 .speedMetersPerSec = 0,
32 .bearingDegrees = 0,
33 .horizontalAccuracyMeters = 5,
34 .verticalAccuracyMeters = 5,
35 .speedAccuracyMetersPerSecond = 1,
36 .bearingAccuracyDegrees = 90,
37 .ageSeconds = 0.99};
38
39 TimeDebug timeDebug = {.timeEstimateMs = 1519930775453L,
40 .timeUncertaintyNs = 1000,
41 .frequencyUncertaintyNsPerSec = 5.0e4};
42
43 std::vector<SatelliteData> satelliteDataArrayDebug = {};
44 debugData->position = positionDebug;
45 debugData->time = timeDebug;
46 debugData->satelliteDataArray = satelliteDataArrayDebug;
47
48 return ndk::ScopedAStatus::ok();
49 }
50
51 } // namespace implementation
52 } // namespace gnss
53 } // namespace hardware
54 } // namespace android
55 } // namespace aidl
56