pub struct Gnss {}
Expand description
A GNSS objects that controls the GPS of the modem.
There can only be one instance at a time.
Implementations§
source§impl Gnss
impl Gnss
sourcepub fn start_single_fix(
self,
config: GnssConfig,
timeout_seconds: u16
) -> Result<GnssStream, Error>
pub fn start_single_fix( self, config: GnssConfig, timeout_seconds: u16 ) -> Result<GnssStream, Error>
Do a single GPS fix until a valid Position Velocity Time (PVT) is found.
The timeout_seconds
parameter controls the maximum time the GNSS receiver is allowed to run while trying to produce a valid PVT estimate.
If the value is non-zero, the GNSS receiver is turned off after the time is up regardless of whether a valid PVT estimate was produced or not.
If the value is set to zero, the GNSS receiver is allowed to run indefinitely until a valid PVT estimate is produced.
A sane default value: 60s.
pub fn start_continuous_fix( self, config: GnssConfig ) -> Result<GnssStream, Error>
pub fn start_periodic_fix( self, config: GnssConfig, period_seconds: u16 ) -> Result<GnssStream, Error>
pub async fn deactivate(self) -> Result<(), Error>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Gnss
impl Send for Gnss
impl Sync for Gnss
impl Unpin for Gnss
impl UnwindSafe for Gnss
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more