Package pygeodesy :: Module ltp :: Class Attitude |
[frames] | no frames]

# Class Attitude

      object --+
               |
    named._Named --+
                   |
    named._NamedBase --+
                       |
                      Attitude

The pose of a plane or camera in space.

Instance Methods
__init__(self, alt_attitude=0, tilt=0, yaw=0, roll=0, **name) New Attitude. |
rotate(self, x_xyz, y=None, z=None, Vector=None, **name_Vector_kwds) Transform a (local) cartesian by this attitude's matrix. |
toStr(self, prec=6, sep=', ', **unused) Format this attitude as string. |
Inherited from `named._NamedBase`: `__repr__`, `__str__`, `others`, `toRepr` Inherited from `named._Named`: `__format__`, `__imatmul__`, `__matmul__`, `__rmatmul__`, `attrs`, `classof`, `copy`, `dup`, `methodname`, `rename`, `renamed`, `toStr2` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| alt Class `property` with a `.name` attribute.
| altitude Class `property` with a `.name` attribute.
| atyr Return this attitude's alt[itude], tilt, yaw and roll as an Attitude4Tuple.
| matrix Get the 3x3 rotation matrix `R(yaw)·R(tilt)·R(roll)`, aka ZYX (`float`, row-order).
| roll Class `property` with a `.name` attribute.
| bank Class `property` with a `.name` attribute.
| tilt Class `property` with a `.name` attribute.
| pitch Class `property` with a `.name` attribute.
| elevation Class `property` with a `.name` attribute.
| tyr3d Get this attitude's (3-D) directional vector (Vector3d).
| yaw Class `property` with a `.name` attribute.
| heading Class `property` with a `.name` attribute.
| bearing Class `property` with a `.name` attribute.
Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `name`, `named`, `named2`, `named3`, `named4`, `sizeof`, `typename` Inherited from `object`: `__class__`

Method Details

### __init__ (self, alt_attitude=0, tilt=0, yaw=0, roll=0, **name) (Constructor) |
New Attitude. Arguments: `alt_attitude` - Altitude (`meter`) above earth or a previous attitude (Attitude or Attitude4Tuple) with the `altitude`, `tilt`, `yaw` and `roll`. `tilt` - Pitch, elevation from horizontal (`degrees180`), negative down (clockwise rotation along and around the x- or East axis), iff `alt_attitude` is `meter`, ignored otherwise. `yaw` - Bearing, heading (compass `degrees360`), clockwise from North (counter-clockwise rotation along and around the z- or Up axis) iff `alt_attitude` is `meter`, ignored otherwise. `roll` - Roll, bank (`degrees180`), positive to the right and down (clockwise rotation along and around the y- or North axis), iff `alt_attitude` is `meter`, ignored otherwise. `name` - Optional `name=NN` `str`). Raises: `AttitudeError` - Invalid `alt_attitude`, `tilt`, `yaw` or `roll`. Overrides: object.__init__ See Also: Principal axes and Yaw, pitch, and roll rotations.

### rotate (self, x_xyz, y=None, z=None, Vector=None, **name_Vector_kwds) |
Transform a (local) cartesian by this attitude's matrix. Arguments: `x_xyz` - X component of vector (`scalar`) or (3-D) vector (`Cartesian`, Vector3d or Vector3Tuple). `y` - Y component of vector (`scalar`), same units as `scalar` `x`, ignored otherwise. `z` - Z component of vector (`scalar`), same units as `sclar` `x`, ignored otherwise. `Vector` - Class to return transformed point (`Cartesian`, Vector3d or `Vector3Tuple`) or `None`. `name_Vector_kwds` - Optional `name=NN` (`str`) and optionally, additional `Vector` keyword arguments, ignored if `Vector is None`. Returns: A named `Vector` instance or if `Vector is None`, a named Vector3Tuple`(x, y, z)`. Raises: `AttitudeError` - Invalid `x_xyz`, `y` or `z`. `TypeError` - Invalid `Vector` or `name_Vector_kwds` item. See Also: Yaw, pitch, and roll rotations.

### toStr (self, prec=6, sep=', ', **unused) |
Format this attitude as string. Arguments: `prec` - The `float` precision, number of decimal digits (0..9). Trailing zero decimals are stripped for `prec` values of 1 and above, but kept for negative `prec` values. `sep` - Separator to join (`str`). Returns: This attitude (`str`). Overrides: named._Named.toStr

Property Details

### alt Class `property` with a `.name` attribute. Get method: alt(self) Set method: alt(self, alt)

### altitude Class `property` with a `.name` attribute. Get method: alt(self) Set method: alt(self, alt)

### atyr Return this attitude's alt[itude], tilt, yaw and roll as an Attitude4Tuple. Get method: atyr(self) - Return this attitude's alt[itude], tilt, yaw and roll as an Attitude4Tuple. Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value.

### matrix Get the 3x3 rotation matrix `R(yaw)·R(tilt)·R(roll)`, aka ZYX (`float`, row-order). Get method: matrix(self) - Get the 3x3 rotation matrix `R(yaw)·R(tilt)·R(roll)`, aka ZYX (`float`, row-order). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value. See Also: Matrix M of case 10 in Appendix A.

### roll Class `property` with a `.name` attribute. Get method: roll(self) Set method: roll(self, roll)

### bank Class `property` with a `.name` attribute. Get method: roll(self) Set method: roll(self, roll)

### tilt Class `property` with a `.name` attribute. Get method: tilt(self) Set method: tilt(self, tilt)

### pitch Class `property` with a `.name` attribute. Get method: tilt(self) Set method: tilt(self, tilt)

### elevation Class `property` with a `.name` attribute. Get method: tilt(self) Set method: tilt(self, tilt)

### tyr3d Get this attitude's (3-D) directional vector (Vector3d). Get method: tyr3d(self) - Get this attitude's (3-D) directional vector (Vector3d). Set method: _fset_error(inst, val) - Throws an `AttributeError`, always. Delete Method: _fdel(inst) - Zap the cached/memoized `property` value. See Also: Yaw, pitch, and roll rotations.

### yaw Class `property` with a `.name` attribute. Get method: yaw(self) Set method: yaw(self, yaw)

### heading Class `property` with a `.name` attribute. Get method: yaw(self) Set method: yaw(self, yaw)

### bearing Class `property` with a `.name` attribute. Get method: yaw(self) Set method: yaw(self, yaw)