|
|
@ -497,8 +497,6 @@ int Localizer::locationd_thread() { |
|
|
|
PubMaster pm({ "liveLocationKalman" }); |
|
|
|
PubMaster pm({ "liveLocationKalman" }); |
|
|
|
SubMaster sm(service_list, nullptr, { "gpsLocationExternal" }); |
|
|
|
SubMaster sm(service_list, nullptr, { "gpsLocationExternal" }); |
|
|
|
|
|
|
|
|
|
|
|
Params params; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while (!do_exit) { |
|
|
|
while (!do_exit) { |
|
|
|
sm.update(); |
|
|
|
sm.update(); |
|
|
|
for (const char* service : service_list) { |
|
|
|
for (const char* service : service_list) { |
|
|
@ -523,8 +521,8 @@ int Localizer::locationd_thread() { |
|
|
|
std::string lastGPSPosJSON = util::string_format( |
|
|
|
std::string lastGPSPosJSON = util::string_format( |
|
|
|
"{\"latitude\": %.15f, \"longitude\": %.15f, \"altitude\": %.15f}", posGeo(0), posGeo(1), posGeo(2)); |
|
|
|
"{\"latitude\": %.15f, \"longitude\": %.15f, \"altitude\": %.15f}", posGeo(0), posGeo(1), posGeo(2)); |
|
|
|
|
|
|
|
|
|
|
|
std::thread([¶ms] (const std::string gpsjson) { |
|
|
|
std::thread([] (const std::string gpsjson) { |
|
|
|
params.put("LastGPSPosition", gpsjson); |
|
|
|
Params().put("LastGPSPosition", gpsjson); |
|
|
|
}, lastGPSPosJSON).detach(); |
|
|
|
}, lastGPSPosJSON).detach(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|