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

# Class Attitude

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

The orientation 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, **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`: `__imatmul__`, `__matmul__`, `__rmatmul__`, `attrs`, `classof`, `copy`, `dup`, `methodname`, `rename`, `toStr2` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| alt Class `property` with retrievable name.
| altitude Class `property` with retrievable name.
| 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 retrievable name.
| bank Class `property` with retrievable name.
| tilt Class `property` with retrievable name.
| pitch Class `property` with retrievable name.
| elevation Class `property` with retrievable name.
| tyr3d Get this attitude's (3-D) directional vector (Vector3d).
| yaw Class `property` with retrievable name.
| heading Class `property` with retrievable name.
| bearing Class `property` with retrievable name.
Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `name`, `named`, `named2`, `named3`, `named4`, `sizeof` Inherited from `object`: `__class__`

Method Details

### __init__ (self, alt_attitude=0, tilt=0, yaw=0, roll=0, name='') (Constructor) |
New Attitude. Arguments: `alt_attitude` - An altitude (`meter`) above earth or an 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). `yaw` - Bearing, heading (compass `degrees360`), clockwise from North (counter-clockwise rotation along and around the z- or Up axis). `roll` - Roll, bank (`degrees180`), positive to the right and down (clockwise rotation along and around the y- or North axis). `name` - Optional name `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, **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 `x`. `z` - Z component of vector (`scalar`), same units as `x`. `Vector` - Class to return transformed point (`Cartesian`, Vector3d or `Vector3Tuple`) or `None`. `Vector_kwds` - Optional, additional `Vector` keyword arguments, ignored if `Vector is None`. Returns: A `Vector` instance or a Vector3Tuple`(x, y, z)` if `Vector=None`. Raises: `AttitudeError` - Invalid `x_xyz`, `y` or `z`. 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 retrievable name. Get method: alt(self) Set method: alt(self, alt)

### altitude Class `property` with retrievable name. 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: The matrix M of case 10 in Appendix A.

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

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

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

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

### elevation Class `property` with retrievable name. 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 retrievable name. Get method: yaw(self) Set method: yaw(self, yaw)

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

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