mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-14 10:27:45 +00:00
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:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user