1/* 2 * Copyright 2022 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 17syntax = "proto2"; 18 19package com.android.internal.location.altitude; 20 21option java_package = "com.android.internal.location.altitude"; 22option java_multiple_files = true; 23 24// Defines parameters for a spherically projected geoid map and corresponding 25// tile management. 26message MapParamsProto { 27 // Defines the resolution of the map in terms of an S2 level. 28 optional int32 map_s2_level = 1; 29 // Defines the resolution of the tiles in cache in terms of an S2 level. 30 optional int32 cache_tile_s2_level = 2; 31 // Defines the resolution of the tiles on disk in terms of an S2 level. 32 optional int32 disk_tile_s2_level = 3; 33 // Defines the `a` coefficient in the expression `a * map_value + b` used to 34 // calculate a geoid height in meters. 35 optional double model_a_meters = 4; 36 // Defines the `b` coefficient in the expression `a * map_value + b` used to 37 // calculate a geoid height in meters. 38 optional double model_b_meters = 5; 39 // Defines the root mean square error in meters of the geoid height. 40 optional double model_rmse_meters = 6; 41} 42 43// A single tile associating values in the unit interval [0, 1] to map cells. 44message S2TileProto { 45 // The S2 token associated with the common parent of all map cells in this 46 // tile. 47 optional string tile_key = 1; 48 49 // Encoded data that merge into a value in the unit interval [0, 1] for each 50 // map cell in this tile. 51 optional bytes byte_buffer = 2; 52 optional bytes byte_jpeg = 3; 53 optional bytes byte_png = 4; 54} 55