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

Properties
| alt Property to get and set altitude above earth in `meter`.
| altitude Property to get and set altitude above earth in `meter`.
| 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 Property to get and set roll/bank in `degrees180`, positive to the right and down.
| bank Property to get and set roll/bank in `degrees180`, positive to the right and down.
| tilt Property to get and set tilt/pitch/elevation from horizontal in `degrees180`, negative down.
| pitch Property to get and set tilt/pitch/elevation from horizontal in `degrees180`, negative down.
| elevation Property to get and set tilt/pitch/elevation from horizontal in `degrees180`, negative down.
| tyr3d Get this attitude's (3-D) directional vector (Vector3d).
| yaw Property to get and set yaw/bearing/heading in compass `degrees360`, clockwise from North.
| heading Property to get and set yaw/bearing/heading in compass `degrees360`, clockwise from North.
| bearing Property to get and set yaw/bearing/heading in compass `degrees360`, clockwise from North.
Inherited from `named._Named`: `classname`, `classnaming`, `name`, `named`, `named2`, `named3`, `named4` 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`. 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` - Optional separator to join (`str`). Returns: This attitude (`str`). Overrides: named._Named.toStr

Property Details

### alt Property to get and set altitude above earth in `meter`. Get method: alt(self) Set method: alt(self, alt)

### altitude Property to get and set altitude above earth in `meter`. 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 Property to get and set roll/bank in `degrees180`, positive to the right and down. Get method: roll(self) Set method: roll(self, roll)

### bank Property to get and set roll/bank in `degrees180`, positive to the right and down. Get method: roll(self) Set method: roll(self, roll)

### tilt Property to get and set tilt/pitch/elevation from horizontal in `degrees180`, negative down. Get method: tilt(self) Set method: tilt(self, tilt)

### pitch Property to get and set tilt/pitch/elevation from horizontal in `degrees180`, negative down. Get method: tilt(self) Set method: tilt(self, tilt)

### elevation Property to get and set tilt/pitch/elevation from horizontal in `degrees180`, negative down. 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 Property to get and set yaw/bearing/heading in compass `degrees360`, clockwise from North. Get method: yaw(self) Set method: yaw(self, yaw)

### heading Property to get and set yaw/bearing/heading in compass `degrees360`, clockwise from North. Get method: yaw(self) Set method: yaw(self, yaw)

### bearing Property to get and set yaw/bearing/heading in compass `degrees360`, clockwise from North. Get method: yaw(self) Set method: yaw(self, yaw)