Main Content

insGPS

Model GPS readings for sensor fusion

Since R2022a

Description

The insGPS object models GPS readings for sensor fusion. Passing an insGPS object to an insEKF object enables the insEKF object to fuse position and optional velocity data. For details on the GPS model, see Algorithms.

Creation

Description

example

sensor = insGPS creates an insGPS object. Passing the created sensor to an insEKF object enables the insEKF object to fuse position and optional velocity data. When fusing data with the fuse object function of insEKF, pass sensor as the second argument to identify the data as obtained from a GPS.

To enable position and velocity estimation in insEKF, use a motion model that models position and velocity states, such as the insMotionPose object.

Properties

expand all

Origin of the local navigation reference frame, specified as a three 3-element row vector in geodetic coordinates [latitude longitude altitude]. Altitude is the height above the reference ellipsoid model, WGS84, in meters. Latitude and longitude are in degrees.

The reference frame is a north-east-down (NED) or east-north-up (ENU) frame, based on the ReferenceFrame property of the insEKF object.

Data Types: single | double

Examples

collapse all

Create an insGPS object and pass it to an insEKF object.

sensor = insGPS;
filter = insEKF(sensor)
filter = 
  insEKF with properties:

                   State: [16x1 double]
         StateCovariance: [16x16 double]
    AdditiveProcessNoise: [16x16 double]
             MotionModel: [1x1 insMotionPose]
                 Sensors: {[1x1 insGPS]}
             SensorNames: {'GPS'}
          ReferenceFrame: 'NED'

Show the state information of the filter. Since the GPS sensor reports position measurements, the filter by default models both rotational and translational motion.

stateinfo(filter)
ans = struct with fields:
        Orientation: [1 2 3 4]
    AngularVelocity: [5 6 7]
           Position: [8 9 10]
           Velocity: [11 12 13]
       Acceleration: [14 15 16]

Assume a GPS position measurement of 10 degrees in latitude, 10 degrees in longitude, and 10 meters in altitude. The velocity measurement of the GPS is [5 5 0] in m/s.

lla = [10 10 10];
vel = [5 5 0];
llaNoise = eye(3);
velNoise = 0.1*eye(3);

Fuse the GPS position measurement.

state = fuse(filter,sensor,lla,llaNoise)
state = 16×1
105 ×

    0.0000
         0
         0
         0
         0
         0
         0
    5.5013
    5.4542
    0.9585
      ⋮

Fuse the GPS position measurement along with the velocity measurement.

measure = [lla vel];
measureNoise = blkdiag(llaNoise,velNoise);
state2 = fuse(filter,sensor,measure,measureNoise)
state2 = 16×1
105 ×

    0.0000
         0
         0
         0
         0
         0
         0
    7.3350
    7.2722
    1.2779
      ⋮

Algorithms

The insGPS object models the GPS reading as the longitude, latitude, and altitude (LLA) position, and optional velocity data in the navigation frame.

Depending on whether you include the velocity data when using the fuse object function of insEKF, the measurement equation takes one of two forms:

  • If you do not fuse velocity data, the measurement is the latitude in meters, longitude in degrees, and altitude in meters (LLA).

  • If you fuse velocity data, the measurement is the LLA measurement, and the velocity of the platform in m/s, expressed in the reference frame defined by the ReferenceLoation property of the insGPS object and the ReferenceFrame property of the insEKF object.

Version History

Introduced in R2022a

See Also

|