我用的模块是Ublox的从设置软件上可以看到每一种设置的十六进制的命令格式:
具体可以上网查,网上有相关文章。
设置波特率为19200:
B5 62 06 00 14 00 01 00 00 00 D0 08 00 00 00 4B 00 00 07 00 03 00 00 00 00 00 48 57
B5 62 06 08 06 00 64 00 01 00 01 00 7A 12
其他输出格式设置:
unsigned char engga[]={ 0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x00,0x00,0x01,0x00,0x00,0xFE,0x18// 使能GGA }; unsigned char disgga[]={ 0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0xFD,0x15// 取消GGA }; unsigned char engll[]={ 0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x01,0x00,0x01,0x00,0x00,0xFF,0x1D// 使能GLL }; unsigned char disgll[]={ 0xB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x01,0x00,0x00,0x00,0x00,0xFE,0x1A//,0x取消GLL }; unsigned char engsa[]={ 0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x02,0x00,0x01,0x00,0x00,0x00,0x22// 使能GSA }; unsigned char disgsa[]={ 0xB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x02,0x00,0x00,0x00,0x00,0xFF,0x1F// 取消GSA }; unsigned char engsv[]={ 0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x03,0x00,0x01,0x00,0x00,0x01,0x27//使能GSV }; unsigned char disgsv[]={ 0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x03,0x00,0x00,0x00,0x00,0x00,0x24// 取消GSV }; unsigned char enrmc[]={ 0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x04,0x00,0x01,0x00,0x00,0x02,0x2C// 使能RMC }; unsigned char disrmc[]={ 0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x04,0x00,0x00,0x00,0x00,0x01,0x29// 取消RMC }; unsigned char envtg[]={ 0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x05,0x00,0x01,0x00,0x00,0x03,0x31// 使能VTG }; unsigned char disvtg[]={ 0xB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x05,0x00,0x00,0x00,0x00,0x02,0x2E// 取消VTG }; unsigned char engrs[]={ 0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x06,0x00,0x01,0x00,0x00,0x04,0x36/// 使能GRS / }; unsigned char disgrs[]={ 0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x06,0x00,0x00,0x00,0x00,0x03,0x33// 取消GRS }; unsigned char engst[]={ 0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x07,0x00,0x01,0x00,0x00,0x05,0x3B/// 使能GST / }; unsigned char disgst[]={ 0xB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x07,0x00,0x00,0x00,0x00,0x04,0x38// 取消GST }; unsigned char enzda[]={ 0xB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x08,0x00,0x01,0x00,0x00,0x06,0x40// 使能ZDA / }; unsigned char diszda[]={ 0XB5,0x62,0x06,0x01,0x06,0x00,0xF0,0x08,0x00,0x00,0x00,0x00,0x05,0x3D// 取消ZDA };
原文地址:http://blog.csdn.net/b5w2p0/article/details/40504303