Main Content

factorGPS

Factor for GPS measurement

Description

The factorGPS object adds a constraint to a node in a factorGraph by using a GPS position measurement.

Creation

Description

F = factorGPS(NodeID) returns a factorGPS object, F, with the node identification number set to NodeID. The GPS factor adds a constraint to the corresponding factor graph node by using a GPS position measurement.

example

F = factorGPS(NodeID,Name=Value) specifies properties using one or more name-value arguments. For example, factorGPS(1,VDOP=1) sets the VDOP property of the factorGPS object to 1.

Properties

expand all

This property is read-only.

Node ID number, specified as a nonnegative integer. The GPS factor connects to this node in the factor graph.

You must specify this property at object creation.

Geodetic position measurement, specified as a three-element row vector of geodetic coordinates in the form (latitude longitude altitude). Latitude and longitude are in degrees and altitude is in meters.

Horizontal dilution of precision, specified as a positive scalar.

Vertical dilution of precision, specified as a positive scalar.

Origin of the local coordinate system, specified as a three-element row vector of geodetic coordinates in the form (latitude longitude altitude). Latitude and longitude are in degrees and altitude is in meters.

Altitude is the height above the reference ellipsoid mode, WGS84.

Reference frame for the local coordinate system as "ENU" (east-north-up) or "NED" (north-east-down)

Object Functions

nodeTypeGet node type of node in factor graph

Examples

collapse all

Set up parameters such as the connected node ID, and reference location. Then create a GPS factor with these parameters as arguments, and set the reference frame to "NED".

id = 1;
loc = [5 5 1000];
hdop = 1.5;
vdop = 2.4;
refloc = [0 0 100];
f = factorGPS(id,Location=loc,HDOP=hdop,VDOP=vdop,ReferenceLocation=refloc,ReferenceFrame="NED");

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