stable-flight 0.3.0

no_std autopilot core for Stable Flight: copter, plane, tailsitter, and quadplane guidance and stabilizers, waypoint navigation, failsafe, autotune, mixers, and the per-tick flight loop
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
//! [`LiftTransition`]: the copter ⇄ plane transition of a lift+cruise VTOL (quadplane), which
//! stays level and flies its lift rotors and its wing at once, trading lift between them.

use crate::controllers::{InvalidConfig, check, check_limit, check_positive};
use crate::math::{DEG, assert_dt};
use crate::{
    Configurable, FlightMode, FlightModeReport, FlightRegime, ModeRefusal, Vec3, VehicleState,
};
use core::f32::consts::FRAC_PI_2;

use super::ForwardGate;

mod params;
#[cfg(test)]
mod tests;

/// Default [`LiftTransitionConfig::forward_pitch_max_rad`], in rad: ArduPilot's
/// `Q_TRAN_PIT_MAX` default.
pub const DEFAULT_FORWARD_PITCH_MAX_RAD: f32 = 3.0 * DEG;

/// [`LiftTransition`] settings, and the pusher, handoff, pitch, and roll limits a quadplane
/// guidance flies the transitions with ([`QuadPlaneGuidance`](super::QuadPlaneGuidance)).
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct LiftTransitionConfig {
    /// The airspeed that starts the forward lift ramp, in m/s.
    pub min_airspeed_mps: f32,
    /// How long the forward ramp takes the lift share from 1 to 0, in seconds.
    pub lift_ramp_s: f32,
    /// The longest a forward transition waits on airspeed before it falls back to copter, in
    /// seconds. A started lift ramp always runs to its end.
    pub timeout_s: f32,
    /// The height above the arming altitude a forward transition needs to start, in meters.
    pub min_height_m: f32,
    /// The height above the arming altitude plane flight falls back to copter below, in
    /// meters; a forward transition also needs it to start. Higher: falls back sooner, with
    /// more height to lose in the back transition (0.7 m at a 3.5 m/s sink on the sim
    /// quadplane, 2.4 m at 6.2 m/s and 53 m/s on the sim Alia). `0` turns it off.
    pub plane_min_height_m: f32,
    /// How long the back ramp takes the lift share from 0 to 1, in seconds; a fallback skips it.
    pub back_ramp_s: f32,
    /// The forward speed below which the back transition completes, in m/s.
    pub back_speed_mps: f32,
    /// The longest a back transition runs before it completes, in seconds.
    pub back_timeout_s: f32,
    /// The deceleration along the ground track a quadplane's back transition pitches the nose
    /// up to hold, in m/s². Higher: slows sooner, the wing climbing more on the way. Finite,
    /// non-negative.
    pub back_decel_mps2: f32,
    /// How fast the back transition's nose-up grows while it slows short of
    /// `back_decel_mps2`, in rad/s per m/s² (rad·s/m); `0` turns the nose-up off, leaving
    /// drag alone to slow it. Higher: reaches the pitch sooner, overshoots it more. Finite,
    /// non-negative.
    pub back_decel_i: f32,
    /// The most linear thrust the pusher gets through the forward transition, `[0, 1]`.
    pub forward_thrust: f32,
    /// How fast the pusher's thrust may rise through the forward transition, in thrust per
    /// second. Positive.
    pub pusher_slew_per_s: f32,
    /// Most pitch, up or down, in rad, in `(0, π/2)`, while the forward transition waits on
    /// airspeed at 3 m/s of ground speed or more (0 below); twice it plus 2° on the lift ramp,
    /// as ArduPilot's `Q_TRAN_PIT_MAX` (`SLT_Transition::set_FW_roll_pitch`); always within
    /// the plane guidance's own pitch limits. Higher: the wing's altitude and airspeed loops
    /// get more pitch to work with while the lift rotors still carry it.
    pub forward_pitch_max_rad: f32,
    /// How long the pusher's thrust blends to the plane guidance's at the handoff into plane
    /// flight, in seconds ([`ThrustHandoff`](super::ThrustHandoff)); 0 switches at once.
    pub handoff_s: f32,
    /// Bank past which a transition is cut short, in radians, in `(0, π]`: forward aborts to
    /// copter, back completes ([`LiftTransition::cut_short`]).
    pub roll_limit_rad: f32,
}

impl LiftTransitionConfig {
    /// `Ok` when every field is in range: times, ramps, and the slew positive, airspeed, speed,
    /// height, deceleration and its gain, and handoff non-negative, all finite; the thrust in
    /// `[0, 1]`, the forward pitch limit in `(0, π/2)`, and the roll limit in `(0, π]`.
    ///
    /// # Errors
    ///
    /// [`InvalidConfig`] naming the first field out of range.
    pub fn validate(&self) -> Result<(), InvalidConfig> {
        check_limit("min_airspeed_mps", self.min_airspeed_mps)?;
        check_positive("lift_ramp_s", self.lift_ramp_s)?;
        check_positive("timeout_s", self.timeout_s)?;
        check_limit("min_height_m", self.min_height_m)?;
        check_limit("plane_min_height_m", self.plane_min_height_m)?;
        check_positive("back_ramp_s", self.back_ramp_s)?;
        check_limit("back_speed_mps", self.back_speed_mps)?;
        check_positive("back_timeout_s", self.back_timeout_s)?;
        check_limit("back_decel_mps2", self.back_decel_mps2)?;
        check_limit("back_decel_i", self.back_decel_i)?;
        check(
            "forward_thrust",
            (0.0..=1.0).contains(&self.forward_thrust),
            "in [0, 1]",
        )?;
        check_positive("pusher_slew_per_s", self.pusher_slew_per_s)?;
        check(
            "forward_pitch_max_rad",
            self.forward_pitch_max_rad > 0.0 && self.forward_pitch_max_rad < FRAC_PI_2,
            "in (0, π/2) rad",
        )?;
        check_limit("handoff_s", self.handoff_s)?;
        check(
            "roll_limit_rad",
            self.roll_limit_rad > 0.0 && self.roll_limit_rad <= core::f32::consts::PI,
            "in (0, π] rad",
        )
    }
}

impl Default for LiftTransitionConfig {
    /// ArduPilot's 9 m/s airspeed gate and 5 s lift ramp, PX4's 15 s forward timeout, 3 s back
    /// ramp, 5 m/s back speed, 10 s back timeout, 2 m/s² back deceleration at gain 0.1, and
    /// pusher thrust up to full rising at 0.33/s, and 5 m of height, no plane minimum height
    /// (PX4's `VT_FW_MIN_ALT`), a 0.5 s handoff, ArduPilot's 3° forward pitch limit, and a 45°
    /// roll limit (as
    /// [`TransitionConfig`](super::TransitionConfig)); see [`LiftTransition`]'s
    /// [sources](LiftTransition#sources).
    fn default() -> Self {
        LiftTransitionConfig {
            min_airspeed_mps: 9.0,
            lift_ramp_s: 5.0,
            timeout_s: 15.0,
            min_height_m: 5.0,
            plane_min_height_m: 0.0,
            back_ramp_s: 3.0,
            back_speed_mps: 5.0,
            back_timeout_s: 10.0,
            back_decel_mps2: 2.0,
            back_decel_i: 0.1,
            forward_thrust: 1.0,
            pusher_slew_per_s: 0.33,
            forward_pitch_max_rad: DEFAULT_FORWARD_PITCH_MAX_RAD,
            handoff_s: 0.5,
            roll_limit_rad: 45.0_f32.to_radians(),
        }
    }
}

/// What [`LiftTransition::update`] decided this tick.
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct LiftTransitionStep {
    /// The mode to fly this tick.
    pub mode: FlightMode,
    /// The share of hover lift the lift rotors carry, in `[0, 1]`: 1 in `Copter`, 0 in `Plane`,
    /// ramping between them in the transitions (see [`LiftTransition`]).
    pub lift_share: f32,
    /// Control passed between hover and plane flight this tick (`ToPlane` → `Plane`,
    /// `ToCopter` → `Copter`): prime the guidance taking over.
    pub handoff: bool,
}

/// The copter ⇄ plane transition state machine of a lift+cruise VTOL: owns the
/// [`FlightMode`] and the lift rotors' share of the lift, by the rows under [Modes](#modes).
///
/// Call [`prime`](Self::prime) when the vehicle arms, then [`update`](Self::update) every
/// armed tick. Allocation-free and trig-free per tick.
///
/// # Modes
///
/// The request is a level, as for [`Transition`](super::Transition). First matching row wins:
///
/// | Mode | Condition | Next | Lift share | Handoff | Refusal reported |
/// |---|---|---|---|---|---|
/// | `Copter` | `Copter` requested | `Copter` | 1 | | none; clears a timeout |
/// | `Copter` | `Plane` requested after a fallback | `Copter` | 1 | | why: `TransitionTimeout`, `RollError`, `BelowPlaneMinAltitude` |
/// | `Copter` | `Plane` requested below `min_height_m` or `plane_min_height_m` (or NaN altitude) | `Copter` | 1 | | `BelowMinAltitude` |
/// | `Copter` | `Plane` requested | `ToPlane`, waiting on airspeed | 1 | | |
/// | `ToPlane` | `Copter` requested | `Copter` | 1 | | |
/// | `ToPlane` | the lift ramp has run `lift_ramp_s` | `Plane` | 0 | yes | |
/// | `ToPlane` | waiting longer than `timeout_s` | `Copter` | 1 | | `TransitionTimeout` |
/// | `ToPlane` | waiting, and a valid airspeed ≥ `min_airspeed_mps` | `ToPlane`, the lift ramp starts | 1 | | |
/// | `ToPlane` | otherwise | `ToPlane` | 1 waiting, then `1 − t / lift_ramp_s` | | |
/// | `Plane` | `Copter` requested | `ToCopter` | 0 | | |
/// | `Plane` | below `plane_min_height_m` | `ToCopter`, a fallback | 1 | | `BelowPlaneMinAltitude` |
/// | `ToCopter` | `Plane` requested, and no fallback | `Plane` | 0 | | |
/// | `ToCopter` | forward speed below `back_speed_mps`, or longer than `back_timeout_s` | `Copter` | 1 | yes | |
/// | `ToCopter` | otherwise | `ToCopter` | 1 after a fallback, else `t / back_ramp_s`, at most 1 | | |
///
/// The lift share is the share of hover lift the lift rotors carry: the guidance flying this
/// weights the lift rotors' thrust and moments by it. Without a valid airspeed the forward
/// transition never starts its lift ramp and times out to `Copter`: the wing's speed is unknown,
/// so handing it the weight could stall it. Once started, the ramp isn't timed out: the wing
/// has its speed, and abandoning mid-ramp would throw the weight back onto the rotors at once.
/// The forward speed is the ground velocity along the body `x` axis; when it isn't known (NaN
/// velocity or attitude), a valid airspeed stands in, and without either the back transition
/// completes on its timeout.
///
/// [`cut_short`](Self::cut_short) ends a transition early as
/// [`Transition::cut_short`](super::Transition::cut_short) does. Height and abandonment follow
/// [`Transition`](super::Transition): above the altitude at [`prime`](Self::prime),
/// refused until then, and after a fallback (a forward transition abandoned, or plane flight
/// below `plane_min_height_m`) `Plane` held refused until `Copter` is requested: `ToCopter`
/// completes as if `Copter` were requested, reporting the fallback. A fallback's back
/// transition gives the lift rotors all the lift from its first tick: the sink that set it off
/// keeps going while they ramp in (10 m below the floor at 50 m/s on the X-Plane Alia's 10 s
/// ramp, #493).
///
/// # Sources
///
/// ArduPilot (`368dc0c428`) and PX4 (`c4e4ef98e9`), described, not copied:
///
/// - Forward: ArduPilot holds hover on the lift rotors until airspeed passes `AIRSPEED_MIN`
///   (9 m/s, `config.h`'s `AIRSPEED_FBW_MIN`), then ramps their throttle down linearly over
///   `Q_TRANSITION_MS` (5 s, `SLT_Transition::update`); it needs an airspeed sensor
///   to leave the wait. Its optional timeout (`Q_TRANS_FAIL`, off by default) covers only the
///   wait (`SLT_Transition::update`); the 15 s is PX4's `VT_TRANS_TIMEOUT`
///   (`VtolType::isFrontTransitionTimeout`), which also covers the ramp.
/// - Back: PX4 ramps the lift rotors' weight up over `VT_B_TRANS_RAMP` (3 s,
///   `Standard::update_transition_state`) and completes once the body-`x` ground speed
///   is below `MPC_XY_CRUISE` (5 m/s; airspeed without a ground velocity) or after
///   `VT_B_TRANS_DUR` (10 s, `Standard::update_vtol_state`).
/// - Fallback: PX4's quad-chute switches to the lift rotors at once and cuts the pusher
///   (`Standard::update_vtol_state`); ArduPilot entering a VTOL mode from forward flight runs
///   its vertical controller with the throttle unlimited at once (`QuadPlane::hold_hover`,
///   `QuadPlane::run_z_controller`).
/// - Pusher: PX4 slews it to `VT_F_TRANS_THR` (1.0) at `VT_PSHER_SLEW` (0.33/s) going forward
///   and cuts it going back (`Standard::update_transition_state`); ArduPilot flies it on the
///   plane controller's throttle going forward, at least `TKOFF_THR_MIN` (cruise throttle when
///   0) and at most `TKOFF_THR_MAX` (`Plane::apply_throttle_limits`).
///
/// # Examples
///
/// ```
/// use stable_flight::guidance::vtol::{LiftTransition, LiftTransitionConfig};
/// use stable_flight::{FlightMode, FlightRegime, Vec3, VehicleState};
///
/// let mut transition = LiftTransition::new(LiftTransitionConfig::default());
/// transition.prime(&VehicleState::default());
///
/// // 10 m up and still slow: the lift rotors hold it while the pusher builds speed.
/// let slow = VehicleState { position_m: Vec3::new(0.0, 0.0, 10.0), airspeed_mps: Some(4.0), ..Default::default() };
/// let step = transition.update(0.01, FlightRegime::Plane, &slow);
/// assert_eq!((step.mode, step.lift_share), (FlightMode::ToPlane, 1.0));
///
/// // Past the airspeed gate the lift ramps down.
/// let fast = VehicleState { airspeed_mps: Some(10.0), ..slow };
/// transition.update(0.01, FlightRegime::Plane, &fast);
/// assert!(transition.update(0.01, FlightRegime::Plane, &fast).lift_share < 1.0);
/// ```
#[derive(Debug, Clone, PartialEq)]
pub struct LiftTransition {
    config: LiftTransitionConfig,
    gate: ForwardGate,
    mode: FlightMode,
    refusal: Option<ModeRefusal>,
    /// Time in the current transition, in seconds.
    elapsed_s: f32,
    /// When the forward lift ramp started, as `elapsed_s`; `None` while waiting on airspeed.
    ramp_start_s: Option<f32>,
}

impl LiftTransition {
    /// A transition in `Copter` with `config`. Until [`prime`](Self::prime) sets the arming
    /// altitude it has no height reference, so it refuses `Plane` as `BelowMinAltitude`.
    ///
    /// # Panics
    ///
    /// If `config` is invalid ([`LiftTransitionConfig::validate`]).
    pub fn new(config: LiftTransitionConfig) -> Self {
        if let Err(error) = config.validate() {
            panic!("invalid LiftTransitionConfig: {error}");
        }
        LiftTransition {
            config,
            gate: ForwardGate::new(),
            mode: FlightMode::Copter,
            refusal: None,
            elapsed_s: 0.0,
            ramp_start_s: None,
        }
    }

    /// Back to `Copter` with no refusal or timeout, and `state`'s altitude as the height
    /// reference. Call when the vehicle arms.
    pub fn prime(&mut self, state: &VehicleState) {
        self.mode = FlightMode::Copter;
        self.refusal = None;
        self.elapsed_s = 0.0;
        self.ramp_start_s = None;
        self.gate.prime(state);
    }

    /// Moves toward `requested` and returns this tick's mode and lift share.
    ///
    /// # Panics
    ///
    /// If `dt` isn't positive and finite.
    pub fn update(
        &mut self,
        dt: f32,
        requested: FlightRegime,
        state: &VehicleState,
    ) -> LiftTransitionStep {
        assert_dt(dt);
        self.refusal = None;
        let mut handoff = false;

        match self.mode {
            FlightMode::Copter => match requested {
                FlightRegime::Plane => {
                    let needed_m = self.config.min_height_m.max(self.config.plane_min_height_m);
                    self.refusal = self.gate.refusal(state, needed_m);
                    if self.refusal.is_none() {
                        self.start(FlightMode::ToPlane);
                    }
                }
                FlightRegime::Copter => self.gate.clear(),
            },
            FlightMode::ToPlane => {
                self.elapsed_s += dt;
                if requested != FlightRegime::Plane {
                    self.mode = FlightMode::Copter;
                } else if self.lift_ramp_done() {
                    self.mode = FlightMode::Plane;
                    handoff = true;
                } else if self.ramp_start_s.is_none() {
                    if self.elapsed_s > self.config.timeout_s {
                        self.abandon(ModeRefusal::TransitionTimeout);
                    } else if self.fast_enough(state) {
                        self.ramp_start_s = Some(self.elapsed_s);
                    }
                }
            }
            FlightMode::Plane => {
                if requested != FlightRegime::Plane {
                    self.start(FlightMode::ToCopter);
                } else if self.gate.below(state, self.config.plane_min_height_m) {
                    self.start(FlightMode::ToCopter);
                    self.gate.abandon(ModeRefusal::BelowPlaneMinAltitude);
                    self.refusal = Some(ModeRefusal::BelowPlaneMinAltitude);
                }
            }
            FlightMode::ToCopter => {
                self.elapsed_s += dt;
                let plane_requested = requested == FlightRegime::Plane;
                if plane_requested && !self.gate.fallen_back() {
                    self.mode = FlightMode::Plane;
                } else if self.slowed(state) || self.elapsed_s > self.config.back_timeout_s {
                    self.mode = FlightMode::Copter;
                    handoff = true;
                }
                if plane_requested {
                    self.refusal = self.gate.fallback();
                }
            }
        }

        LiftTransitionStep {
            mode: self.mode,
            lift_share: self.lift_share(),
            handoff,
        }
    }

    /// Cuts a transition short for `refusal` (e.g. [`ModeRefusal::RollError`], from a check the
    /// caller makes), returning the step to fly this tick instead of the one
    /// [`update`](Self::update) gave: a forward transition is abandoned to `Copter`, held
    /// refused until `Copter` is requested; a back transition completes to `Copter` with a
    /// handoff. Outside a transition it returns the current mode, unchanged.
    pub fn cut_short(&mut self, refusal: ModeRefusal) -> LiftTransitionStep {
        let handoff = match self.mode {
            FlightMode::ToPlane => {
                self.abandon(refusal);
                false
            }
            FlightMode::ToCopter => {
                self.mode = FlightMode::Copter;
                true
            }
            _ => false,
        };
        LiftTransitionStep {
            mode: self.mode,
            lift_share: self.lift_share(),
            handoff,
        }
    }

    /// The mode the last [`update`](Self::update) flew, and why it isn't the requested regime
    /// when it can't be: what a VTOL guidance reports as its
    /// [`flight_mode`](crate::Guidance::flight_mode).
    pub fn report(&self) -> FlightModeReport {
        FlightModeReport {
            mode: self.mode,
            refusal: self.refusal,
        }
    }

    /// Whether a fallback holds `Plane` refused until `Copter` is requested.
    pub(super) fn fallen_back(&self) -> bool {
        self.gate.fallen_back()
    }

    /// Enters a transition `mode` from its start.
    fn start(&mut self, mode: FlightMode) {
        self.mode = mode;
        self.elapsed_s = 0.0;
        self.ramp_start_s = None;
    }

    /// Gives up a forward transition: back to `Copter`, refused for `refusal` until `Copter`
    /// is requested.
    fn abandon(&mut self, refusal: ModeRefusal) {
        self.mode = FlightMode::Copter;
        self.gate.abandon(refusal);
        self.refusal = Some(refusal);
    }

    /// Whether the forward lift ramp has run its full time.
    fn lift_ramp_done(&self) -> bool {
        self.ramp_start_s
            .is_some_and(|start_s| self.elapsed_s - start_s >= self.config.lift_ramp_s)
    }

    /// Whether a valid airspeed has reached the forward gate.
    fn fast_enough(&self, state: &VehicleState) -> bool {
        state
            .valid_airspeed_mps()
            .is_some_and(|airspeed_mps| airspeed_mps >= self.config.min_airspeed_mps)
    }

    /// Whether the back transition has slowed below its speed, by forward ground speed or,
    /// without it, a valid airspeed. Unknown speed never has.
    fn slowed(&self, state: &VehicleState) -> bool {
        let speed_mps = Some(forward_speed_mps(state))
            .filter(|speed_mps| speed_mps.is_finite())
            .or_else(|| state.valid_airspeed_mps());
        speed_mps.is_some_and(|speed_mps| speed_mps < self.config.back_speed_mps)
    }

    /// The lift rotors' share of the lift this tick.
    fn lift_share(&self) -> f32 {
        match self.mode {
            FlightMode::Plane => 0.0,
            FlightMode::ToPlane => self.ramp_start_s.map_or(1.0, |start_s| {
                (1.0 - (self.elapsed_s - start_s) / self.config.lift_ramp_s).clamp(0.0, 1.0)
            }),
            FlightMode::ToCopter if self.gate.fallen_back() => 1.0,
            FlightMode::ToCopter => (self.elapsed_s / self.config.back_ramp_s).min(1.0),
            _ => 1.0,
        }
    }
}

impl Configurable for LiftTransition {
    type Config = LiftTransitionConfig;

    fn config(&self) -> &LiftTransitionConfig {
        &self.config
    }

    /// Validates with [`LiftTransitionConfig::validate`]. A running transition keeps its mode
    /// and times, and follows the new ramps, gates, and timeouts from the next tick.
    fn set_config(&mut self, config: LiftTransitionConfig) -> Result<(), InvalidConfig> {
        config.validate()?;
        self.config = config;
        Ok(())
    }
}

/// The ground velocity along the body `x` axis, in m/s; NaN when the velocity or attitude is.
fn forward_speed_mps(state: &VehicleState) -> f32 {
    let nose = state.attitude * Vec3::x();
    let velocity_mps = state.velocity_mps;
    // `nose` is NED, the velocity `z` up: the `z` term flips.
    nose.x * velocity_mps.x + nose.y * velocity_mps.y - nose.z * velocity_mps.z
}