Main Content

# pose

Current orientation and position estimate for `insfilterMARG`

## Syntax

``[position,orientation,velocity] = pose(FUSE)``
``[position,orientation,velocity] = pose(FUSE,format)``

## Description

example

````[position,orientation,velocity] = pose(FUSE)` returns the current estimate of the pose and velocity.```
````[position,orientation,velocity] = pose(FUSE,format)` returns the current estimate of the pose with orientation in the specified orientation format.```

## Examples

collapse all

Create an `insfilterMARG` object and set its sample rate to 10 Hz.

`filter = insfilterMARG(IMUSampleRate=10);`

Predict the state of the filter based on an accelerometer reading of [1 1 1] $\mathrm{m}/{\mathrm{s}}^{2}$ and a gyroscope reading of [1 1 0] rad/s.

`predict(filter,[1 1 1],[1 1 0]);`

Obtain pose from the filter state.

`[position,orientation,velocity] = pose(filter)`
```position = 1×3 0 0 0 ```
```orientation = quaternion 0.99938 + 0.024995i + 0.024995j + 0k ```
```velocity = 1×3 -0.0500 -0.0500 0.4405 ```

## Input Arguments

collapse all

`insfilterMARG`, specified as an object.

Output orientation format, specified as either `'quaternion'` for a `quaternion` or `'rotmat'` for a rotation matrix.

Data Types: `char` | `string`

## Output Arguments

collapse all

Position estimate expressed in the local coordinate system of the filter in meters, returned as a 3-element row vector.

Data Types: `single` | `double`

Orientation estimate expressed in the local coordinate system of the filter, returned as a scalar quaternion or 3-by-3 rotation matrix. The quaternion or rotation matrix represents a frame rotation from the local reference frame of the filter to the body reference frame.

Data Types: `single` | `double` | `quaternion`

Velocity estimate expressed in the local coordinate system of the filter in m/s, returned as a 3-element row vector.

Data Types: `single` | `double`

## Version History

Introduced in R2018b