blob: 489413e21debc3be6d72f250fd6d3809604c3a16 [file] [log] [blame]
Yu-Han Yanga2f77322018-03-06 10:12:55 -08001/*
Yu-Han Yanga5098612019-02-08 16:22:07 -08002 * Copyright (C) 2019 The Android Open Source Project
Yu-Han Yanga2f77322018-03-06 10:12:55 -08003 *
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
Yu-Han Yanga5098612019-02-08 16:22:07 -080017#ifndef android_hardware_gnss_common_Constants_H_
18#define android_hardware_gnss_common_Constants_H_
19
20#include <cstdint>
Yu-Han Yanga2f77322018-03-06 10:12:55 -080021
22namespace android {
23namespace hardware {
24namespace gnss {
Yu-Han Yanga5098612019-02-08 16:22:07 -080025namespace common {
Yu-Han Yanga2f77322018-03-06 10:12:55 -080026
Yu-Han Yanga2f77322018-03-06 10:12:55 -080027const float kMockHorizontalAccuracyMeters = 5;
28const float kMockVerticalAccuracyMeters = 5;
29const float kMockSpeedAccuracyMetersPerSecond = 1;
30const float kMockBearingAccuracyDegrees = 90;
31const int64_t kMockTimestamp = 1519930775453L;
Yu-Han Yang703ac962021-07-20 16:47:37 -070032const float kGpsL1FreqHz = 1575.42 * 1e6;
33const float kGpsL5FreqHz = 1176.45 * 1e6;
34const float kGloG1FreqHz = 1602.0 * 1e6;
35const float kIrnssL5FreqHz = 1176.45 * 1e6;
Yu-Han Yanga2f77322018-03-06 10:12:55 -080036
Yuchen He95276a22021-06-10 17:10:15 -070037// Location replay constants
38constexpr char GNSS_PATH[] = "/dev/gnss0";
Yuchen Hef46bb4a2022-01-20 22:57:09 +000039constexpr char FIXED_LOCATION_PATH[] = "/dev/gnss1";
Yuchen He95276a22021-06-10 17:10:15 -070040constexpr int INPUT_BUFFER_SIZE = 256;
41constexpr char CMD_GET_LOCATION[] = "CMD_GET_LOCATION";
42constexpr char CMD_GET_RAWMEASUREMENT[] = "CMD_GET_RAWMEASUREMENT";
43constexpr char LINE_SEPARATOR = '\n';
44constexpr char COMMA_SEPARATOR = ',';
45constexpr char GPGA_RECORD_TAG[] = "$GPGGA";
46constexpr char GPRMC_RECORD_TAG[] = "$GPRMC";
47constexpr double TIMESTAMP_EPSILON = 0.001;
48constexpr int MIN_COL_NUM = 13;
49
Yu-Han Yanga5098612019-02-08 16:22:07 -080050} // namespace common
Yu-Han Yanga2f77322018-03-06 10:12:55 -080051} // namespace gnss
52} // namespace hardware
53} // namespace android
54
Yu-Han Yanga5098612019-02-08 16:22:07 -080055#endif // android_hardware_gnss_common_Constants_H_