pub struct GpsAccess<'a> { /* private fields */ }Expand description
Read-only access to the GPS configuration region.
Provides raw byte access and typed field accessors for the estimated GPS settings region. All offsets are estimates and need verification via differential memory dumps.
§Known settings (from menu analysis, offsets estimated)
- Built-in GPS on/off
- My Position (5 manual slots, each with lat/lon/alt)
- Position ambiguity setting
- GPS operating mode (standalone/SBAS)
- PC output format (NMEA sentences enabled/disabled)
- Track log settings (record method, interval, distance)
- GPS data TX settings (auto TX, interval)
Implementations§
Source§impl<'a> GpsAccess<'a>
impl<'a> GpsAccess<'a>
Sourcepub fn estimated_region(&self) -> Option<&[u8]>
pub fn estimated_region(&self) -> Option<&[u8]>
Get the raw bytes at the estimated GPS region.
Returns the bytes at offset 0x19000 through 0x19FFF. These
boundaries are estimates and may not perfectly align with the
actual GPS configuration data.
Sourcepub fn read_bytes(&self, offset: usize, len: usize) -> Option<&[u8]>
pub fn read_bytes(&self, offset: usize, len: usize) -> Option<&[u8]>
Read an arbitrary byte range from the image.
The offset is an absolute MCP byte address. Returns None if
the range extends past the image.
Sourcepub const fn estimated_region_size(&self) -> usize
pub const fn estimated_region_size(&self) -> usize
Get the estimated size of the GPS region in bytes.
Sourcepub fn gps_enabled(&self) -> bool
pub fn gps_enabled(&self) -> bool
Sourcepub fn operating_mode(&self) -> GpsOperatingMode
pub fn operating_mode(&self) -> GpsOperatingMode
Sourcepub fn battery_saver(&self) -> bool
pub fn battery_saver(&self) -> bool
Sourcepub fn position_ambiguity(&self) -> GpsPositionAmbiguity
pub fn position_ambiguity(&self) -> GpsPositionAmbiguity
Sourcepub fn nmea_sentence_flags(&self) -> u8
pub fn nmea_sentence_flags(&self) -> u8
Sourcepub fn nmea_sentence_enabled(&self, bit: u8) -> bool
pub fn nmea_sentence_enabled(&self, bit: u8) -> bool
Sourcepub fn channel_index_raw(&self) -> Option<&[u8]>
pub fn channel_index_raw(&self) -> Option<&[u8]>
Get the raw GPS channel index (100 bytes at 0x4D000).
Each byte is either 0xFF (unused) or an index into the waypoint
data area.
Returns None if the region extends past the image.
Sourcepub fn channel_index(&self, slot: u8) -> Option<u8>
pub fn channel_index(&self, slot: u8) -> Option<u8>
Get the GPS channel index value for a given slot (0-99).
Returns None if the slot is unused (0xFF) or out of range.
Otherwise returns the waypoint data index.
Sourcepub fn waypoint_count(&self) -> usize
pub fn waypoint_count(&self) -> usize
Count the number of active (non-empty) GPS waypoint slots.
Iterates the 100-entry GPS channel index and counts entries that
are not 0xFF.
Sourcepub fn waypoint_raw(&self, slot: u8) -> Option<&[u8]>
pub fn waypoint_raw(&self, slot: u8) -> Option<&[u8]>
Get the raw waypoint record for a given channel index slot (0-99).
Looks up the waypoint data index from the GPS channel index, then
reads the 32-byte waypoint record at the calculated address:
(index_value + 0x2608) * 0x20.
Returns None if the slot is unused, out of range, or the record
extends past the image.
Sourcepub fn waypoint_name(&self, slot: u8) -> String
pub fn waypoint_name(&self, slot: u8) -> String
Read the name field from a GPS waypoint record (up to 8 characters).
Returns an empty string if the slot is unused or the record cannot
be read. The name is at offset 0x10 within the 32-byte record,
9 bytes (8 characters + null terminator). A first byte of 0xFE
indicates an unused name.