Made a GeoPos widget for lon/lat/alt entry and display (APRS...)

Cleaned up the GeoMap view, can be used as input
This commit is contained in:
furrtek 2017-08-03 19:06:59 +01:00
parent a5f0f72ea1
commit fba5b507ad
10 changed files with 285 additions and 165 deletions

View file

@ -20,6 +20,7 @@
*/
#include "ui.hpp"
#include "sine_table.hpp"
#include <algorithm>
@ -69,4 +70,8 @@ Rect& Rect::operator-=(const Point& p) {
return *this;
}
Point polar_to_point(float angle, uint32_t distance) {
return Point(sin_f32(DEG_TO_RAD(angle) + (pi / 2)) * distance, -sin_f32(DEG_TO_RAD(angle)) * distance);
}
} /* namespace ui */