mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-09 15:12:35 -04: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:
parent
a5f0f72ea1
commit
fba5b507ad
10 changed files with 285 additions and 165 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue