40 auto manager = MonitorManager::Instance();
41 Component* component = apollo::common::util::FindOrNull(
42 *manager->GetStatus()->mutable_components(), FLAGS_gps_component_name);
43 if (component ==
nullptr) {
47 ComponentStatus* component_status = component->mutable_other_status();
48 component_status->clear_status();
50 static auto gnss_best_pose_reader =
51 manager->CreateReader<
GnssBestPose>(FLAGS_gnss_best_pose_topic);
52 gnss_best_pose_reader->Observe();
53 const auto gnss_best_pose_status = gnss_best_pose_reader->GetLatestObserved();
54 if (gnss_best_pose_status ==
nullptr) {
56 "No GnssBestPose message", component_status);
59 switch (gnss_best_pose_status->sol_type()) {
60 case SolutionType::NARROW_INT:
63 case SolutionType::SINGLE:
65 ComponentStatus::WARN,
"SolutionType is SINGLE", component_status);
69 "SolutionType is wrong", component_status);