Public Access
M2 step 5: GNSS App, with the Position and Sky views
Position: the Fix line (or how long it has been searching), latitude and longitude in decimal degrees or degrees-minutes-seconds (Settings -> Coordinates), the Maidenhead locator, altitude, speed and course, HDOP and UTC. Sky: the satellites by azimuth and elevation, coloured by constellation, filled when used in the Fix, with used/in-view counts. Tab switches. lib/gnss/geo_format holds the formatting, the locator and the sky projection, host-tested (6 tests; locators checked against FN31pr and JN58td). Verified on the device by a window: 3D Fix from GPS, GLONASS, Galileo and BeiDou. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "app.h"
|
||||
#include "services/gnss_service.h"
|
||||
#include "settings.h"
|
||||
|
||||
namespace roro {
|
||||
|
||||
// GNSS (see docs/milestones/M2.md, Q59): the Position view, and the Sky view with every satellite
|
||||
// in view placed by direction and elevation. Tab switches between them.
|
||||
class GnssApp : public App {
|
||||
public:
|
||||
GnssApp(GnssService& gnss, const Settings& settings) : gnss_(gnss), settings_(settings) {}
|
||||
void onEnter() override { requestRedraw(); }
|
||||
bool onKey(const KeyEvent& e) override;
|
||||
void update(uint32_t nowMs) override;
|
||||
void draw(Canvas& c) override;
|
||||
|
||||
private:
|
||||
void drawPosition(Canvas& c);
|
||||
void drawSky(Canvas& c);
|
||||
|
||||
GnssService& gnss_;
|
||||
const Settings& settings_;
|
||||
bool sky_ = false;
|
||||
uint32_t lastDrawMs_ = 0;
|
||||
};
|
||||
|
||||
} // namespace roro
|
||||
Reference in New Issue
Block a user