Dear Community
I want to post process received GPS data with the relatively new MATLAB functions. MATLAB loads RINEX files, processes them and plots the positions.
RINEX Data I use a Septentrio X5 receiver with a navXperience 3G+C maritime antenna to log raw data into a SBF-file. The file contains observations from one hour. Then I use RTKCONV from RTKLIB to convert the SBF-File into RINEX Navigation and Observation files, see attached. The Antenna position is:
ECEF: 4267425.180, 655030.289, 4679698.745
WGS84: 47.4976660732, 8.7265311946, 510.424 N
MATLAB Inside MATLAB I run the following code (also attached):
navfile = "20220912-225553_log.nav";
navdata = rinexread(navfile);
obsfile = "20220912-225553_log.obs";
obsdata = rinexread(obsfile);
t = unique(obsdata.GPS.Time);
pos = zeros(length(t),3);
obs = obsdata.GPS(find(and(obsdata.GPS.Time==t(i), ~isnan(obsdata.GPS.C1W))),:);
pr = timetable2table(obs(:,["SatelliteID","C1W"]),"ConvertRowTimes",false);
nav = navdata.GPS(ismember(navdata.GPS.SatelliteID,obs.SatelliteID),:);
[navPos,~,navIDs] = gnssconstellation(t(i),RINEXData=nav);
satPos = [navIDs,navPos];
satPos = array2table(satPos,"VariableNames",["SatelliteID", "x", "y", "z"]);
pos(i,:) = receiverposition(table2array(tab(:,"C1W")),table2array(tab(:,["x","y","z"])));
geoplot(pos(:,1),pos(:,2),'.')
Solution The solution from the MATLAB script is far away from the correct antenna position, see the attached plot. If I use RTKPOST from RTKLIB to load the same exact RINEX files, the solution is plausible, see the attached KML-File. Therefore I assume that the problem is within my MATLAB code.
Does anybody have an idea what I'm doing wrong?
Thanks for your help!
Best wishes,
Simon