Added the proposed new geotagging from flipper files. kept the old ones for compatibility (#2289)

This commit is contained in:
Totoo 2024-10-08 06:26:08 +02:00 committed by GitHub
parent 09c2c43be0
commit 99d8fbdff0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,8 +31,10 @@ using namespace std::literals;
const std::string_view filetype_name = "Filetype"sv;
const std::string_view frequency_name = "Frequency"sv;
const std::string_view latitude_name = "Latitute"sv;
const std::string_view longitude_name = "Longitude"sv;
const std::string_view latitude_name_old = "Latitute"sv;
const std::string_view longitude_name_old = "Longitude"sv;
const std::string_view latitude_name = "Lat"sv;
const std::string_view longitude_name = "Lon"sv;
const std::string_view protocol_name = "Protocol"sv;
const std::string_view preset_name = "Preset"sv;
const std::string_view te_name = "TE"sv; // only in BinRAW
@ -93,6 +95,10 @@ Optional<flippersub_metadata> read_flippersub_file(const fs::path& path) {
parse_float_meta(fixed, metadata.latitude);
else if (cols[0] == longitude_name)
parse_float_meta(fixed, metadata.longitude);
else if (cols[0] == latitude_name_old)
parse_float_meta(fixed, metadata.latitude);
else if (cols[0] == longitude_name_old)
parse_float_meta(fixed, metadata.longitude);
else if (cols[0] == protocol_name) {
if (fixed == "RAW") metadata.protocol = FLIPPER_PROTO_RAW;
if (fixed == "BinRAW") metadata.protocol = FLIPPER_PROTO_BINRAW;