In order to log and extract observations from a receiver supported by goGPS the GUI mode can be used, by "Real-time --> Rover monitor". goGPS should then allow you to select the u-blox COM port, and start the logging. After finishing the logging, you can convert the binary data file to RINEX by using the "Tools --> Decode binary streams" GUI. The binary data file is generally saved as "*_rover_00.bin" (see the code example below).
Note that to run goGPS real-time functions you need the Instrument Control Toolbox installed in MATLAB.
If you have the Instrument Control Toolbox installed, but you don't see the u-blox COM port, please start MATLAB after connecting the u-blox to the USB port.
If you don't have the Instrument Control Toolbox installed, you can log the binary stream using the u-blox "u-center" software, then decode it using goGPS functions. An example of decoding a u-blox UBX stream (in this case the "yamatogawa" dataset provided with goGPS) is as follows:
cd ../data/data_goGPS/
fid = fopen('yamatogawa_rover_00.bin');
data_rover = fread(fid);
data_rover = dec2bin(data_rover,8); %conversion to binary (N x 8bit matrix)
data_rover = data_rover'; %transpose (8bit x N matrix)
data_rover = data_rover(:)'; %conversion to string (8N bit vector)
[cell_rover, nmea_sentences] = decode_ublox(data_rover);
fclose(fid);
You can then extract the decoded data as follows (in this case, the first RXM-RAW message is at index 33 of cell_rover):
time_R = cell_rover{2,33}(1); %TOW
week_R = cell_rover{2,33}(2); %GPS week
ph_R = cell_rover{3,33}(:,1); %carrier phase
pr_R = cell_rover{3,33}(:,2); %pseudorange
dop_R = cell_rover{3,33}(:,3); %Doppler shift
snr_R = cell_rover{3,33}(:,6); %signal-to-noise ratio