异常抛出
This commit is contained in:
+1009
-884
File diff suppressed because it is too large
Load Diff
+13
-5
@@ -76,10 +76,16 @@ namespace SSR {
|
||||
{
|
||||
{"ICAO", icao},
|
||||
{"DF", std::to_string(static_cast<int>(df))},
|
||||
{"signal_level", std::to_string((int) mode_s_msg->signal_level)},
|
||||
{"mlat", mode_s_msg->mlat_timestamp.to_string()},
|
||||
{"msg", msg_hex}
|
||||
});
|
||||
if (df == Downlink_Format::Extended_Squitter_17) {
|
||||
int tc = type_code(mode_s_msg->msg_bin);
|
||||
std::string tc_string = std::to_string(tc);
|
||||
std::string_view tc_view = tc_string;
|
||||
lt.append("tc", tc_view);
|
||||
}
|
||||
lt.append("signal_level", std::to_string((int) mode_s_msg->signal_level));
|
||||
lt.append("mlat", mode_s_msg->mlat_timestamp.to_string());
|
||||
lt.append("msg", msg_hex);
|
||||
mode_s_logger->debug("mode_s/json", lt, msg_json.to_json_string());
|
||||
};
|
||||
|
||||
@@ -134,6 +140,7 @@ namespace SSR {
|
||||
parse_pos_call_back(&info, mode_s_msg, true);
|
||||
msg_json.append_list(t.toJson().children);
|
||||
}
|
||||
msg_json.append(Psc::JSON("地表位置消息", get_current_time_as_string()));
|
||||
} else if ((tc >= 9 && tc <= 18) || (tc >= 20 && tc <= 22)) {
|
||||
Parse_no_json(t, BDS05_airborne_position)
|
||||
info.refresh_pos(true);
|
||||
@@ -143,8 +150,8 @@ namespace SSR {
|
||||
Parse(t2, BDS05_airborne_Position_v2)
|
||||
}
|
||||
using namespace std::chrono;
|
||||
auto tp = t.parse_message(mode_s_msg, mode_s_msg->time().abs_sec(),
|
||||
max_speed_m_s, air_pos_time_out, cpr_cb);
|
||||
auto tp = t.parse_message(mode_s_msg, mode_s_msg->time().abs_sec(), max_speed_m_s, air_pos_time_out,
|
||||
cpr_cb);
|
||||
if (tp.has_value()) {
|
||||
auto alt = t.get_alt_meter();
|
||||
Position_Info p(tp.value(), alt);
|
||||
@@ -153,6 +160,7 @@ namespace SSR {
|
||||
parse_pos_call_back(&info, mode_s_msg, false);
|
||||
msg_json.append_list(t.toJson().children);
|
||||
}
|
||||
msg_json.append(Psc::JSON("空中位置消息", get_current_time_as_string()));
|
||||
} else if (tc == 19) {
|
||||
// 速度
|
||||
Parse(t, BDS09_Base)
|
||||
|
||||
Reference in New Issue
Block a user