cmake 错误提示改明显

This commit is contained in:
2026-08-10 10:11:01 +08:00
parent cf6e2f8e61
commit 5e4fc67a69
@@ -1,33 +1,47 @@
#include "Base_Station.h"
#include "../../../third_party/CPP_Core/src/Psc_Cpp_Core/socket/Socket.h"
namespace SSR {
struct HULC_Status_Message;
namespace SSR
{
struct HULC_Status_Message;
}
double Base_Station::theoretical_detection_range_meters(double base_height_meters, double target_height_meters) {
double Base_Station::theoretical_detection_range_meters(double base_height_meters, double target_height_meters)
{
return static_cast<double>(SSR::CPR::radio_line_of_sight_range_meters(base_height_meters, target_height_meters));
}
std::optional<SSR::Position_3D> Base_Station::get_pos() {
std::optional<SSR::Position_3D> Base_Station::get_pos()
{
std::lock_guard g(mtx);
if (!hulc.GPS_has_valid_fix()) {
if (!hulc.GPS_has_valid_fix())
{
return std::nullopt;
}
return SSR::Position_3D{hulc.get_latitude(), hulc.get_longitude(), static_cast<SSR::CPR::D>(hulc.Alt)};
}
bool Base_Station::has_valid_position() {
bool Base_Station::has_valid_position()
{
std::lock_guard g(mtx);
return hulc.GPS_has_valid_fix();
}
void Base_Station::set_msg(const SSR::HULC_Status_Message& msg) {
void Base_Station::set_msg(const SSR::HULC_Status_Message& msg)
{
std::lock_guard g(mtx);
hulc = msg;
if (handle_when_updated)
handle_when_updated(msg);
}
std::string Base_Station::to_string() {
std::string Base_Station::to_string()
{
std::lock_guard g(mtx);
return "BaseStation:[" + std::to_string(hulc.get_latitude()) + ", " + std::to_string(hulc.get_longitude()) + "]";
}
Psc::JSON Base_Station::to_Json() {
Psc::JSON Base_Station::to_Json()
{
std::lock_guard g(mtx);
auto ret = Psc::JSON::object();
ret.append({"序列号", hulc.SerNum});