How to send commands to gps via usb and defined as a serial port?

조회 수: 2 (최근 30일)
Philip Nahmias
Philip Nahmias 2018년 12월 14일
댓글: ZICHENG 2020년 3월 4일
Hello,
I am reading data from the BU-353S4 gps unit and have defined the connection as a serial/com. It receives commands in the NMEA system in order to define what outputs to give. This commands have the following format:
Enable WAAS/EGNOS - $PSRF151,01*0F
Disable WAAS/EGNOS - $PSRF151,00*0E
Enable GGA Output 1sec - $PSRF103,0,0,1,1*25
Disable GGA Output - $PSRF103,0,0,0,1*24
Enable GLL Output 1sec - $PSRF103,1,0,1,1*24
Disable GLL Output - $PSRF103,1,0,0,1*25
Enable GSA Output 5sec - $PSRF103,2,0,5,1*23
Disable GSA Output - $PSRF103,2,0,0,1*26
Enable GSV Output 10sec - $PSRF103,3,0,10,1*16
Disable GSV Output - $PSRF103,3,0,0,1*27
Enable RMC Output 1sec - $PSRF103,4,0,1,1*21
Disable RMC Output - $PSRF103,4,0,0,1*20
Enable VTG Output 1sec - $PSRF103,5,0,1,1*20
Disable VTG Output - $PSRF103,5,0,0,1*21
Enable ZDA Output 1sec - $PSRF103,8,0,1,1*2D
Disable ZDA Output - $PSRF103,8,0,0,1*2C
The commands start with the $ sign. How can I send any of these to the gps through MATLAB?
  댓글 수: 1
ZICHENG
ZICHENG 2020년 3월 4일
  • Hello, do you have Matlab program to evaluate the performance of WAAS?

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2018년 12월 14일
serial(). set properties. fopen(). fprintf() to send data. fclose when done.
  댓글 수: 2
Philip Nahmias
Philip Nahmias 2018년 12월 14일
Hey Walter,
first of all thank you for your response. I have tried both fprintf() and fwritef() and neither have worked. One possible reason I think may be because I cant enter a return (enter) character in the sent string and as a result the gps just ignores the sent command. Any suggestions on how I can correct that?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Automotive에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by