Fix GPS nav-solve phase seeding for cold PVT

This commit is contained in:
Codex
2026-08-04 15:52:36 +03:00
parent 28b55fdfb6
commit dce1dd5ea9
7 changed files with 164 additions and 37 deletions
@@ -0,0 +1,22 @@
#ifndef GPS_NAV_PHASE_H
#define GPS_NAV_PHASE_H
#include <stdbool.h>
#include <stdint.h>
#include "gps/gps_ip_defines.h"
static inline bool gps_nav_phase_control_armed(uint32_t control)
{
return ((control & (1u << GPS_TRCK_NAV_SOLVE_INTR_EN_POS)) != 0u) &&
((control & (1u << GPS_TRCK_NAV_SOLVE_FLAG_EN_POS)) != 0u);
}
static inline bool gps_nav_phase_preserve_seed_after_how(
bool previously_seeded,
uint32_t control)
{
return previously_seeded && gps_nav_phase_control_armed(control);
}
#endif