This directory contains code and tools for generating and debugging binary satellite s2 file.
s2storage
src/write
S2 write code used by tools to write the s2 cells into a binary file. This code is also used by TeleServiceTests
.src/readonly
S2 read-only code used by the above read-write code and the class S2RangeSatelliteOnDeviceAccessController
.tools
src/main
Contains the tools for generating binary satellite s2 file, and tools for dumping the binary file into human-readable format.src/test
Contains the test code for the tools.configdatagenerator
src/main
Contains the tool for generating satellite configdata protobuf file.src/test
Contains the test code for the configdatagenerator tool.packages/services/Telephony/tools/ satellite
) in the local workspace and run mm
, e.g.,$atest SatelliteToolsTests
, $atest SatelliteGenerateProtoTests
satellite_createsats2file
satellite_createsats2file
to create a binary satellite S2 file from a list of S2 cells ID.$satellite_createsats2file --input-file <s2cells.txt> --s2-level <12> --is-allowed-list <true> --output-file <sats2.dat>
--input-file
Each line in the file contains a unsigned-64bit
number which represents the ID of a S2 cell.--s2-level
The S2 level of all the cells in the input file.--is-allowed-list
Should be either trrue
or false
true
The input file contains a list of S2 cells where satellite services are allowed.false
The input file contains a list of S2 cells where satellite services are disallowed.--output-file
The created binary satellite S2 file, which will be used by the SatelliteAccessController
module in determining if satellite communication is allowed at a location.packages/services/Telephony/tools/satellite
) in the local workspace and run mm
.$satellite_createsats2file --input-file s2cells.txt --s2-level 12 --is-allowed-list true --output-file sats2.dat
satellite_generateprotobuf
satellite_generateprotobuf
to create a binary file of TelephonyConfigProto whose format is defined in telephony_config_update.protosatellite_generateprotobuf --input-file <input.xml> --output-file <telephony_config.pb>
--input-file
input XML file contains input information such as carrier id, carrier plmn, allowed service list and country code list. This is example of input file.<satelliteconfig> <!-- version --> <version>14</version> <!-- CarrierSupportedSatelliteServicesProto --> <carriersupportedservices> <carrier_id>1</carrier_id> <providercapability> <carrier_plmn>310160</carrier_plmn> <service>1</service> </providercapability> <providercapability> <carrier_plmn>310240</carrier_plmn> <service>6</service> </providercapability> </carriersupportedservices> <carriersupportedservices> <carrier_id>1891</carrier_id> <providercapability> <carrier_plmn>45005</carrier_plmn> <service>1</service> <service>2</service> </providercapability> </carriersupportedservices> <!-- SatelliteRegionProto --> <satelliteregion> <s2_cell_file>sats2.dat</s2_cell_file> <country_code>US</country_code> <country_code>KR</country_code> <is_allowed>TRUE</is_allowed> </satelliteregion> </satelliteconfig>
--output-file
The created binary TelephonyConfigProto file, which will be used by the ConfigUpdater
module for Satellite Project.packages/services/Telephony/tools/satellite
) in the local workspace and run mm
.satellite_generateprotobuf --input-file input.xml --output-file telephony_config.pb
satellite_createsats2file_test
satellite_createsats2file_test /tmp/foo.dat
/tmp/foo.dat
with the above S2 ranges.satellite_dumpsats2file
$satellite_dumpsats2file /tmp/foo.dat /tmp/foo
/tmp/foo.dat
Input binary satellite S2 cell file./tmp/foo
Output directory which contains the output text files.satellite_location_lookup
$satellite_location_lookup --input-file <...> --lat-degrees <...> --lng-degrees <...>