Files
dragonpilot/selfdrive/ui/qt/maps/map_helpers.h
T
Willem Melching 86aefbe766 Mapbox widget (#20751)
* squash mapbox stuff

* only hacks for pc

* no hack there

* only update when needed

* get destination from param

* no need for user agent

* add athena method

* change nav path color

* layout cleanups

* margin top

* add build scripts

* rename header file

* set pitch

* fix icon blinking

* keep both options

* draw on top to fix last blinking

* only recomput with gps

* fix include

* put map in onroadwidget

* update mapbox plugin to allow specifying directions url

* cycle through views

* dynamic resize

* only when present

* add map_helpers

* whitespace

* small fixes

* let scons decide

* update setup files

* implicit dependency

* fix alerts

* Update selfdrive/ui/SConscript

* move clearLayout to util.h

* only build when map.cc present

* move maps to own folder

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
2021-05-17 14:57:07 +02:00

24 lines
939 B
C

#pragma once
#include <eigen3/Eigen/Dense>
#include <QMapboxGL>
#include <QGeoCoordinate>
#include "common/transformations/coordinates.hpp"
#include "common/transformations/orientation.hpp"
#include "cereal/messaging/messaging.h"
const float METER_2_MILE = 0.000621371;
const float METER_2_FOOT = 3.28084;
#define RAD2DEG(x) ((x) * 180.0 / M_PI)
QGeoCoordinate to_QGeoCoordinate(const QMapbox::Coordinate &in);
QMapbox::CoordinatesCollections model_to_collection(
const cereal::LiveLocationKalman::Measurement::Reader &calibratedOrientationECEF,
const cereal::LiveLocationKalman::Measurement::Reader &positionECEF,
const cereal::ModelDataV2::XYZTData::Reader &line);
QMapbox::CoordinatesCollections coordinate_to_collection(QMapbox::Coordinate c);
QMapbox::CoordinatesCollections coordinate_list_to_collection(QList<QGeoCoordinate> coordinate_list);
float minimum_distance(QGeoCoordinate a, QGeoCoordinate b, QGeoCoordinate p);