pub struct GpsSensor { /* private fields */ }Expand description
A physical GPS sensor plugged into a port.
Implementations§
Source§impl GpsSensor
impl GpsSensor
Sourcepub fn new(port: SmartPort) -> Result<Self, GpsError>
pub fn new(port: SmartPort) -> Result<Self, GpsError>
Creates a new GPS sensor on the given port.
Sourcepub fn set_offset(&mut self, x: f64, y: f64) -> Result<(), GpsError>
pub fn set_offset(&mut self, x: f64, y: f64) -> Result<(), GpsError>
Sets the offset of the GPS sensor, relative to the sensor of turning, in meters.
Sourcepub fn rms_error(&self) -> Result<f64, GpsError>
pub fn rms_error(&self) -> Result<f64, GpsError>
Gets the possible error of the GPS sensor, in meters.
Sourcepub fn zero_rotation(&mut self) -> Result<(), GpsError>
pub fn zero_rotation(&mut self) -> Result<(), GpsError>
Zeroes the rotation of the GPS sensor.
Trait Implementations§
Source§impl SmartDevice for GpsSensor
impl SmartDevice for GpsSensor
Source§fn port_index(&self) -> u8
fn port_index(&self) -> u8
Source§fn device_type(&self) -> SmartDeviceType
fn device_type(&self) -> SmartDeviceType
Get the variant of
SmartDeviceType that this device is associated with. Read moreimpl Eq for GpsSensor
impl StructuralPartialEq for GpsSensor
Auto Trait Implementations§
impl Freeze for GpsSensor
impl RefUnwindSafe for GpsSensor
impl Send for GpsSensor
impl Sync for GpsSensor
impl Unpin for GpsSensor
impl UnwindSafe for GpsSensor
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