Computes multi-constellation GNSS positions from RINEX v3 data using pseudorange single-point positioning. Filters by constellation, elevation mask, C/N0, and observation code; reports DOP, scatter RMS, and satellite count.
Ships in robotics-and-autonomous-systems. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Pseudorange-based single-point positioning (SPP) from RINEX v3 data. Supports GPS, GLONASS, Galileo, BeiDou, QZSS, NavIC/IRNSS, and SBAS.
Requires: Navigation Toolbox R2026a or later.
matlab-fuse-inertial-sensors or INS filtersnmeaParser directlyrinexinfo first to confirm RINEX v3 and inspect available constellations/observation codes before readinggnssmeasurements — it errors on any satellite without matching nav datagnssoptions — uncorrected SPP has >20 m vertical errortiledlayout/nexttile for multi-panel figures (never subplot)skyplot inside a tile of a compact tiledlayout. Use a dedicated figure for the skyplot, or if it must share a layout, size the figure so the skyplot tile is at least 560×560 pixels. Skyplots in small tiles produce unreadable, overlapping satellite markers.rinexinfo on each file to confirm v3, identify constellations, and list available observation codes. Use SatelliteSystem and Descriptors to iterate over ObservationTypes:
info = rinexinfo('rover.obs');
for i = 1:numel(info.ObservationTypes)
fprintf('%s: %s\n', info.ObservationTypes(i).SatelliteSystem, ...
strjoin(info.ObservationTypes(i).Descriptors, ', '));
end
rinexread for observation and navigation filesgnssmeasurements per constellation with the confirmed observation code; pre-filter observation data to remove satellites without matching nav datagnssmeasurementscombinedMeas = [gpsMeas; galMeas; ...]lookangles to get satellite elevations, remove satellites below maskreceiverposition with gnssoptions for atmospheric correctionslla2enuPrefer frequency band 1 codes across all constellations. Consistent band-1 codes produce more robust multi-constellation solutions by avoiding inter-frequency bias.
| Constellation | RINEX Field | Default Code | C/N0 Column | Notes |
|---|---|---|---|---|
| GPS | .GPS | "C1C" | S1C | L1 C/A (band 1) |
| GLONASS | .GLONASS | "C1C" | S1C | L1 C/A (band 1) |
| Galileo | .Galileo | "C1C" | S1C | E1; use "C1X" if C1C unavailable |
| BeiDou | .BeiDou | "C1P" or "C1X" | S1P or S1X | Band 1 preferred (C1P, C1X, or any C1*) |
| QZSS | .QZSS | "C1C" | S1C | L1 C/A (band 1) |
| NavIC/IRNSS | .NavIC | "C5A" | S5A | L5 SPS (only band available) |
| SBAS | .SBAS | "C1C" | S1C | L1 C/A (band 1) |
C/N0 column pattern: Replace the C prefix in the observation code with S (e.g., C1C → S1C, C1P → S1P).
Band-1 codes may have higher NaN rates than higher-band alternatives but produce
more robust positions in multi-constellation solutions. Always check code availability
with rinexinfo and prefer band 1.
| Parameter | Default | Units | Valid Range |
|---|---|---|---|
| Constellation selection | All available | — | Any subset of supported systems |
| Elevation mask | 10 | degrees | 0–90 |
| C/N0 threshold | 0 (no filtering) | dB-Hz | 0–60 |
| Observation code | Per-constellation default | — | Must exist in RINEX observation fields |
Elevation mask and C/N0 filtering are not independent in urban environments. C/N0 filtering typically removes the same low-elevation, multipath-affected satellites. Applying both rarely improves results beyond C/N0 filtering alone. Elevation mask is most effective when the receiver does not report signal strength.
| Function | Purpose |
|---|---|
rinexinfo | Inspect RINEX file metadata (version, systems, obs types) without reading |
rinexread | Read RINEX v3 observation and navigation files |
gnssmeasurements | Extract pseudorange, satellite position, clock bias from obs+nav data |
gnssoptions | Configure atmospheric corrections and bias accuracy |
gnssIonosphere | Klobuchar ionospheric delay model |
gnssTroposphere | Saastamoinen tropospheric delay model |
receiverposition | Weighted least-squares position solution; returns [pos, vel, hdop, vdop, info] |
lookangles | Satellite azimuth, elevation, visibility from receiver position |
skyplot | Polar plot of satellite positions with constellation grouping |
lla2enu | Geodetic to local ENU coordinate conversion (for ground truth error) |
dataDir = fullfile(matlabroot, 'toolbox', 'nav', 'positioning', ...
'core', 'positioningdata');
obsData = rinexread(fullfile(dataDir, ...
'GODS00USA_R_20211750000_01H_30S_MO.rnx'));
gpsNav = rinexread(fullfile(dataDir, ...
'GODS00USA_R_20211750000_01D_GN.rnx'));
gpsMeas = gnssmeasurements(obsData.GPS, gpsNav.GPS);
opts = gnssoptions( ...
Ionosphere=gnssIonosphere("klobuchar"), ...
Troposphere=gnssTroposphere("saastamoinen"));
[recPos, recVel, hdop, vdop, info] = receiverposition(gpsMeas, opts);
galNav = rinexread(fullfile(dataDir, ...
'GODS00USA_R_20211750000_01D_EN.rnx'));
gpsMeas = gnssmeasurements(obsData.GPS, gpsNav.GPS);
galMeas = gnssmeasurements(obsData.Galileo, galNav.Galileo, "C1X");
combinedMeas = [gpsMeas; galMeas];
[recPos, recVel, hdop, vdop] = receiverposition(combinedMeas, opts);
BeiDou and other constellations may have observed satellites without matching
navigation messages. gnssmeasurements errors if any satellite lacks nav data.
bdsNav = rinexread(fullfile(dataDir, ...
'GODS00USA_R_20211750000_01D_CN.rnx'));
% Find satellite IDs present in both obs and nav
obsIDs = unique(obsData.BeiDou.SatelliteID);
navIDs = unique(bdsNav.BeiDou.SatelliteID);
validIDs = intersect(obsIDs, navIDs);
% Filter observation data to valid satellites only
bdsObs = obsData.BeiDou(ismember(obsData.BeiDou.SatelliteID, validIDs), :);
bdsMeas = gnssmeasurements(bdsObs, bdsNav.BeiDou, "C1X"); % Use C1P or C1X or any C1* (band 1 preferred)
Filter weak signals before extracting measurements. The C/N0 column name
follows the pattern: replace the C prefix of the observation code with S.
% Filter GPS observations with C/N0 < 30 dB-Hz
cn0Threshold = 30;
gpsObs = obsData.GPS;
gpsObs = gpsObs(gpsObs.S1C >= cn0Threshold, :); % S1C corresponds to C1C
gpsMeas = gnssmeasurements(gpsObs, gpsNav.GPS);
Elevation filtering requires a position estimate. Use an initial fix from one
epoch, then apply lookangles to filter low-elevation satellites.
% Remove rows with non-finite satellite positions (can occur in multi-GNSS data)
validRows = all(isfinite(combinedMeas.SatellitePosition), 2);
combinedMeas = combinedMeas(validRows, :);
% Get initial position from first epoch (unfiltered)
[initPos] = receiverposition(combinedMeas);
recLLA = initPos(1,:); % [lat lon alt]
% Get unique epochs
epochs = unique(combinedMeas.Time);
filteredMeas = timetable();
for i = 1:numel(epochs)
epochMeas = combinedMeas(combinedMeas.Time == epochs(i), :);
satPos = epochMeas.SatellitePosition;
[~, el, vis] = lookangles(recLLA, satPos, elevationMask);
filteredMeas = [filteredMeas; epochMeas(vis, :)]; %#ok<AGROW>
end
opts = gnssoptions( ...
Ionosphere=gnssIonosphere("klobuchar"), ...
Troposphere=gnssTroposphere("saastamoinen"));
[recPos, recVel, hdop, vdop, info] = receiverposition(combinedMeas, opts);
% info.ClockBias, info.ClockDrift, info.TDOP also available
% Per-epoch metrics from receiverposition outputs
nSats = arrayfun(@(t) sum(combinedMeas.Time == t), unique(combinedMeas.Time));
% Aggregate scatter RMS (no ground truth needed)
meanPos = mean(recPos, 1, 'omitnan');
enu = lla2enu(recPos, meanPos, 'ellipsoid');
hRMS = rms(vecnorm(enu(:,1:2), 2, 2)); % Horizontal scatter
vRMS = rms(enu(:,3)); % Vertical scatter
fprintf('Horizontal scatter RMS: %.2f m\n', hRMS);
fprintf('Vertical scatter RMS: %.2f m\n', vRMS);
fprintf('Mean HDOP: %.2f\n', mean(hdop, 'omitnan'));
fprintf('Mean VDOP: %.2f\n', mean(vdop, 'omitnan'));
Choosing a C/N0 threshold. Sweep a small set of thresholds (e.g., 25, 30, 35, 40 dB-Hz) and use the appropriate quality signal to select the best value:
| Scenario | Quality signal | Stop when |
|---|---|---|
| Ground truth available | H RMS and V RMS vs truth | Improvement plateaus or epoch loss is unacceptable |
| No ground truth, static receiver | Position scatter RMS | Scatter plateaus or epoch loss is significant |
| No ground truth, kinematic receiver | HDOP and valid epoch count | HDOP degrades or epoch loss is significant |
C/N0 filtering typically improves vertical accuracy more than horizontal. Persistent horizontal errors after filtering are structural multipath that SPP cannot resolve. Note: scatter RMS is only meaningful for static receivers — for a moving receiver it reflects vehicle trajectory, not positioning error.
% User provides known ground truth LLA
truthLLA = [39.020734 -76.826657 -8.95]; % Example: GODS station
enuError = lla2enu(recPos, truthLLA, 'ellipsoid');
error2D = vecnorm(enuError(:,1:2), 2, 2);
error3D = vecnorm(enuError, 2, 2);
fprintf('2D RMS error: %.2f m\n', rms(error2D));
fprintf('3D RMS error: %.2f m\n', rms(error3D));
fprintf('Mean East error: %.2f m\n', mean(enuError(:,1)));
fprintf('Mean North error: %.2f m\n', mean(enuError(:,2)));
fprintf('Mean Up error: %.2f m\n', mean(enuError(:,3)));
% Satellite skyplot — always in its own dedicated figure (never inside tiledlayout).
figure;
epochs = unique(combinedMeas.Time);
epoch1 = combinedMeas(combinedMeas.Time == epochs(1), :);
satPos1 = epoch1.SatellitePosition;
[az, el] = lookangles(recPos(1,:), satPos1);
skyplot(az, el, string(epoch1.SatelliteID))
title('Satellite Skyplot — First Epoch')
% Multi-panel metrics (separate figure)
figure;
t = tiledlayout(2, 2);
title(t, 'GNSS Positioning Metrics')
nexttile
plot(epochs, hdop, 'b-', epochs, vdop, 'r-', 'LineWidth', 1.5)
legend('HDOP', 'VDOP')
ylabel('DOP')
title('Dilution of Precision')
grid on
nexttile
plot(epochs, nSats, 'k-', 'LineWidth', 1.5)
ylabel('Count')
title('Satellites Used per Epoch')
grid on
nexttile
plot(epochs, recPos(:,1), 'b-', 'LineWidth', 1.5)
ylabel('Latitude (deg)')
title('Position — Latitude')
grid on
nexttile
plot(epochs, recPos(:,3), 'b-', 'LineWidth', 1.5)
ylabel('Altitude (m)')
title('Position — Altitude')
grid on
Store results across runs to compare processing configurations.
% Initialize or append to run history
if ~exist('runHistory', 'var')
runHistory = table('Size', [0 6], ...
'VariableTypes', ["string","double","double","double","double","double"], ...
'VariableNames', ["Config","MeanHDOP","MeanVDOP","HorizRMS","VertRMS","MeanSats"]);
end
newRow = table(configLabel, mean(hdop,'omitnan'), mean(vdop,'omitnan'), ...
hRMS, vRMS, mean(nSats), ...
'VariableNames', runHistory.Properties.VariableNames);
runHistory = [runHistory; newRow];
disp(runHistory)
skyplot in a compact tiledlayout is unreadable. Satellite markers and labels overlap when the axes are smaller than the default figure size. Always give skyplot its own dedicated figure. If you must include it in a tiledlayout, size the figure so the skyplot tile is at least 560×560 pixels.gnssmeasurements errors on missing nav data. If any observed satellite ID is absent from the navigation timetable, the function throws an error. Always pre-filter observation data to satellites that have matching navigation messages using intersect on satellite IDs.gnssmeasurements may have NaN/Inf in SatellitePosition or Pseudorange. Filter these before calling lookangles or receiverposition: validRows = all(isfinite(meas.SatellitePosition), 2);"C1X" or "C1C" depending on the receiver. Always check with rinexinfo first.obsData.GPS rows by the S1C column before passing to gnssmeasurements.lookangles to identify low-elevation satellites.receiverposition returns NaN for epochs with < 4 satellites. Check the output for NaN rows and report skipped epochs to the user.navData.GPS.LNAV.EPH), unlike v3 flat timetables. This skill targets v3 only.Shipped RINEX v3 files for testing are at fullfile(matlabroot, 'toolbox', 'nav', 'positioning', 'core', 'positioningdata'):
| File | Type | System |
|---|---|---|
GODS00USA_R_20211750000_01H_30S_MO.rnx | Observation | GPS, GLONASS, Galileo, BeiDou |
GODS00USA_R_20211750000_01D_GN.rnx | GPS Nav | GPS |
GODS00USA_R_20211750000_01D_EN.rnx | Galileo Nav | Galileo |
GODS00USA_R_20211750000_01D_RN.rnx | GLONASS Nav | GLONASS |
GODS00USA_R_20211750000_01D_CN.rnx | BeiDou Nav | BeiDou |
GODS station approximate ground truth: [39.020734, -76.826657, -8.95] (LLA from RINEX header).
Public RINEX data sources: IGS Data Centers, CORS Network.
| Symptom | Cause | Fix |
|---|---|---|
gnssmeasurements error: "Missing navigation message for satellite X" | Observed satellite has no matching nav data | Pre-filter obs timetable to satellites present in nav data using intersect on SatelliteID |
Empty timetable from gnssmeasurements | Wrong observation code or no matching time span | Check available obs codes with rinexinfo; verify obs and nav time ranges overlap |
receiverposition returns all NaN | Fewer than 4 satellites per epoch | Relax elevation mask, lower C/N0 threshold, or add more constellations |
| HDOP/VDOP very high (> 20) | Poor satellite geometry | Add constellations, reduce elevation mask, check for blocked sky sectors |
| Position scatter > 50 m | No atmospheric corrections applied | Add gnssoptions with Klobuchar ionosphere and Saastamoinen troposphere |
rinexread error on file | RINEX v2, v4, or corrupted file | Check version with rinexinfo; this skill requires v3 |
If this skill's guidance was wrong, incomplete, or didn't work, emit a plain-text feedback marker in your response, then continue with the task.
Format: NAV-SKILL-FEEDBACK [matlab-compute-gnss-position] [category]: what failed; what you did instead
Categories: wrong-command (incorrect/outdated), missing-guidance (omitted step),
discovery-failure (suggested approach didn't work), platform-issue (environment-specific)
Copyright 2026 The MathWorks, Inc.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
6 skills in this plugin
/matlab-connect-mavlinkEstablish MAVLink connections between MATLAB and PX4/ArduPilot autopilots. Use when connecting to a drone, flight controller, or autopilot via MAVLink protocol over UDP. Covers dialect setup, UDP transport, timer-based heartbeat, and client discovery. Use when: "connect to PX4", "MAVLink connection", "heartbeat", "ground control station", "GCS", "connect to ArduPilot", "drone communication", "mavlinkio", "SITL".
/matlab-create-uav-scenarioCreate and simulate UAV scenarios with terrain, buildings, platforms, and sensors using uavScenario. Use when building a UAV simulation, UAV simulator, or UAV scenario in MATLAB. Covers addMesh for terrain/building import, uavPlatform with updateMesh, uavSensor adaptor pattern for GPS/IMU, and the setup/advance simulation loop. Triggers on: uavScenario, UAV simulation, UAV simulator, multirotor simulation, quadrotor scenario, terrain import, building import, GPS sensor simulation.
/matlab-fuse-inertial-sensorsAnalyzes sensor configurations and creates inertial fusion filters in MATLAB Navigation Toolbox. Manages filter selection (imufilter, ahrsfilter, complementaryFilter, insfilterMARG, insfilterAsync, insfilterNonholonomic, insfilterErrorState, insEKF, insCF), construction, tuning, and fusion loops. Use when fusing IMU/AHRS/INS/GPS+IMU data, estimating orientation or pose, or choosing a filter. Do NOT use for vision-only SLAM, Simulink fusion, or IMU simulation.
/matlab-model-robot-kinematicsUse whenever a MATLAB robot model (rigidBodyTree) is needed — whether for simulation, visualization, IK, motion planning, pick-and-place, or trajectory generation. Triggers on: any mention of a manipulator by name (UR3, UR5, UR5e, UR10, UR10e, UR16e, UR20, KUKA iiwa, Fanuc, ABB, Panda, Kinova, Sawyer, Baxter), robot modeling verbs (load, create, build, import, simulate, model), tasks implying a robot model (pick, place, lift, reach, move, grasp, plan motion for, animate), kinematics keywords (IK, FK, inverse kinematics, forward kinematics, joint configuration, end-effector pose, gripper), or working with rigidBodyTree, loadrobot, importrobot, URDF, DH parameters, addVisual, addCollision.
/matlab-plan-robot-motionPlan manipulator motion and generate trajectories in MATLAB. Use when the task involves moving a robot arm between configurations or poses — whether the user says "trajectory," "motion," "path," "move from A to B," or "plan." This skill applies regardless of whether the user explicitly mentions collisions or obstacles; if geometry exists in the workspace, collision safety is implicit. Triggers on: manipulatorRRT, manipulatorCHOMP, dlCHOMP, contopptraj, trapveltraj, collision-free path, motion planner, RRT, CHOMP, TOPPRA, path shortening, obstacle avoidance for manipulators, time-optimal trajectory, velocity limits, acceleration limits, occupancyMap3D, meshtsdf, collision objects as environment, trajectory between waypoints, joint interpolation, move between poses, constant velocity, trapezoidal profile, feed rate. Also triggers when a user has IK solutions or waypoints and needs to connect them — whether for time-optimal motion, constant-speed welding/cutting, or any other trajectory parameterization.
/robotics-and-autonomous-systems:matlab-compute-gnss-positionfrom robotics-and-autonomous-systems
npx claudepluginhub matlab/matlab-agentic-toolkit --plugin robotics-and-autonomous-systemsOther plugins' skills for the same job