From c7e620ea901c83410cd4ab4269a8123f092f4dc4 Mon Sep 17 00:00:00 2001 From: Harrison Dowding Date: Mon, 10 Apr 2023 20:55:45 +0100 Subject: [PATCH] altitude mode: add seafloor altitude mode extensions --- src/types/altitude_mode.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/types/altitude_mode.rs b/src/types/altitude_mode.rs index f8e98c0..b8f581d 100644 --- a/src/types/altitude_mode.rs +++ b/src/types/altitude_mode.rs @@ -9,6 +9,8 @@ use crate::errors::Error; pub enum AltitudeMode { ClampToGround, RelativeToGround, + ClampToSeaFloor, + RelativeToSeaFloor, Absolute, } @@ -25,6 +27,8 @@ impl FromStr for AltitudeMode { match s { "clampToGround" => Ok(Self::ClampToGround), "relativeToGround" => Ok(Self::RelativeToGround), + "clampToSeaFloor" => Ok(Self::ClampToSeaFloor), + "relativeToSeaFloor" => Ok(Self::RelativeToSeaFloor), "absolute" => Ok(Self::Absolute), v => Err(Error::InvalidAltitudeMode(v.to_string())), } @@ -39,6 +43,8 @@ impl fmt::Display for AltitudeMode { match self { Self::ClampToGround => "clampToGround", Self::RelativeToGround => "relativeToGround", + Self::ClampToSeaFloor => "clampToSeaFloor", + Self::RelativeToSeaFloor => "relativeToSeaFloor", Self::Absolute => "absolute", } )