# factorVelocity3Prior

Prior factor for 3-D velocity

Since R2022a

## Description

The `factorVelocity3Prior` object is a factor that has information for a prior velocity in 3-D for a `factorGraph` object.

## Creation

### Syntax

``F = factorVelocity3Prior(nodeID)``
``F = factorVelocity3Prior(nodeID,Name=Value)``

### Description

example

````F = factorVelocity3Prior(nodeID)` creates a `factorVelocity3Prior` object, `F`, with the node identification numbers property `NodeID` set to `nodeID`.```
````F = factorVelocity3Prior(nodeID,Name=Value)` specifies properties using one or more name-value arguments. For example, `factorVelocity3Prior(1,Measurement=[1 5 7])` sets the `Measurement` property of the `factorVelocity3Prior` object to `[1 5 7]`.```

## Properties

expand all

Node ID numbers, specified as an N-element vector of nonnegative integers, where N is the total number of desired factors. Each element represents a factor that connects to a node of type `VEL3` in the factor graph using the specified node ID.

If a factor in the `factorVelocity3Prior` object specifies ID that does not correspond to a node in the factor graph, the factor graph automatically creates an `VEL3` type node with that ID and adds it to the factor graph when adding the factor to the factor graph.

You must specify this property at object creation.

Measured prior velocity, specified as an N-by-3 matrix, where each row is of the form [xz yz vz]. N is the total number of factors. xz, yz, and vz are the velocity of the x, y, and z positions, respectively.

Information matrix associated with the measurement, specified as a 3-by-3 matrix or a 3-by-3-N matrix. N is the total number of factors specified by this `factorVelocity3Prior` object. Each information matrix corresponds to the measurements of the specified nodes in `NodeIDs`.

If you specify this property as a 3-by-3 matrix when `NodeID` contains more than one element, the information matrix corresponds to all measurements in `Measurement`.

## Object Functions

 `nodeType` Get node type of node in factor graph

## Examples

collapse all

Create a velocity prior factor with a node ID of 1.

`f = factorVelocity3Prior(1);`

Create a default factor graph and add the factor to the graph using the `addFactor` function.

```g = factorGraph; addFactor(g,f);```

## Version History

Introduced in R2022a

expand all