fix lat lon
This commit is contained in:
parent
3687f7a012
commit
a4520f75a3
@ -206,7 +206,7 @@ void MapRenderer::publish(const double render_time, const bool loaded) {
|
|||||||
QImage cap = fbo->toImage().convertToFormat(QImage::Format_RGB888, Qt::AutoColor);
|
QImage cap = fbo->toImage().convertToFormat(QImage::Format_RGB888, Qt::AutoColor);
|
||||||
|
|
||||||
auto carrotMan = (*sm)["carrotMan"].getCarrotMan();
|
auto carrotMan = (*sm)["carrotMan"].getCarrotMan();
|
||||||
bool valid = loaded && (carrotMan.getXPosLat() > 0.0);
|
bool valid = loaded && (carrotMan.getXPosLat() != 0.0 && carrotMan.getXPosLon() != 0.0);
|
||||||
ever_loaded = ever_loaded || loaded;
|
ever_loaded = ever_loaded || loaded;
|
||||||
uint64_t ts = nanos_since_boot();
|
uint64_t ts = nanos_since_boot();
|
||||||
VisionBuf* buf = vipc_server->get_buffer(VisionStreamType::VISION_STREAM_MAP);
|
VisionBuf* buf = vipc_server->get_buffer(VisionStreamType::VISION_STREAM_MAP);
|
||||||
|
@ -96,7 +96,7 @@ class RouteEngine:
|
|||||||
def update_location(self):
|
def update_location(self):
|
||||||
|
|
||||||
carrot_man = self.sm['carrotMan']
|
carrot_man = self.sm['carrotMan']
|
||||||
if carrot_man.xPosLat > 0.0:
|
if carrot_man.xPosLat != 0.0 and carrot_man.xPosLon != 0.0:
|
||||||
self.last_bearing = carrot_man.xPosAngle;
|
self.last_bearing = carrot_man.xPosAngle;
|
||||||
self.last_position = Coordinate(carrot_man.xPosLat, carrot_man.xPosLon)
|
self.last_position = Coordinate(carrot_man.xPosLat, carrot_man.xPosLon)
|
||||||
self.localizer_valid = self.gps_ok = True
|
self.localizer_valid = self.gps_ok = True
|
||||||
|
@ -185,7 +185,7 @@ void MapWindow::updateState(const UIState &s) {
|
|||||||
//bool active_carrot_man = carrotMan.getActiveCarrot() > 1;
|
//bool active_carrot_man = carrotMan.getActiveCarrot() > 1;
|
||||||
|
|
||||||
//printf("CarrotMan: %f %f %f %f\n", carrotMan.getXPosLat(), carrotMan.getXPosLon(), carrotMan.getXPosAngle(), carrotMan.getXPosSpeed());
|
//printf("CarrotMan: %f %f %f %f\n", carrotMan.getXPosLat(), carrotMan.getXPosLon(), carrotMan.getXPosAngle(), carrotMan.getXPosSpeed());
|
||||||
if (carrotMan.getXPosLat() > 0.0) {
|
if (carrotMan.getXPosLat() != 0.0 && carrotMan.getXPosLon() != 0.0) {
|
||||||
lat = carrotMan.getXPosLat();
|
lat = carrotMan.getXPosLat();
|
||||||
lon = carrotMan.getXPosLon();
|
lon = carrotMan.getXPosLon();
|
||||||
bearing = carrotMan.getXPosAngle();
|
bearing = carrotMan.getXPosAngle();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user