Hi @Sven Larsen ,
To address the issues you are facing with your Navisys GR-401 GPS receiver in MATLAB as posted in your comments listed below, I will suggest the following steps to resolve these issues mentioned below.
Timeout Error: The error message indicates that obtaining the required NMEA sentences (RMC, GGA, and GSA) is taking longer than expected. This could be due to the GPS receiver not receiving a valid GPS fix, or Incorrect settings or configurations in the GPS receiver, or Physical connection issues between the GPS receiver and your computer.
Buffer Read Warning: The warning about unsuccessful reads suggests that the input buffer filled before the terminator was reached. This can occur if the GPS device is not sending data in the expected format or the read command is being issued too quickly for the device to respond.
Possible steps to resolve the above mentioned issues
First, review the mathworks documentation listed below.
Physical Connection: Verify that the GPS receiver is physically connected to the correct COM port and ensure that the wiring is done correctly. Check that the RX and TX lines are properly connected (i.e., RX on the GPS should connect to TX on the serial adapter and vice versa).
Baud Rate Configuration: Confirm that the GPS device is configured to operate at the correct baud rate (9600 bps). If the device is set to a different baud rate, MATLAB will not be able to interpret the data correctly.
NMEA Sentence Availability: The most common reason for the error messages is that the GPS receiver does not have a satellite lock, which is necessary to produce the required NMEA sentences. In order to resolve this issue, make sure that the GPS antenna is placed in an open area with a clear view of the sky to obtain a satellite fix. The LED indicator on the GPS module can provide information about the satellite fix status.
Additional suggestions
Use a serial terminal program to connect to the COM port and manually check if the GPS is outputting NMEA sentences. This can help isolate whether the issue is with MATLAB or the GPS device itself.
Mathworks documentation: It is beneficial to review the MathWorks documentation for the gpsdev and serialport functions to make sure that all parameters are set correctly. Specific attention should be paid to the expected output formats and any additional configuration that might be necessary for your GPS receiver. Please see attached links below.
https://www.mathworks.com/help/nav/ref/gpsdev.read.html
https://www.mathworks.com/help/nav/ref/gpsdev-system-object.html
Testing with Other Software: If possible, test the GPS receiver with another software (like a GPS application on a mobile device) to make sure that it functions correctly outside of MATLAB.
If problems persist, it may be worthwhile to consult the manufacturer's documentation or seek support from MATLAB forums.