Qt-based vehicle GPS monitoring system (6) GPS information
processing AE%9A%E4%BD%8D%E6%BA%90%E7%A0%81%EF%BC%8C%E9%85%8Dtiny6410&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~ default-1-53127256.142^v92^control&spm=1018.2226.3001.4449
Calling Baidu map under the QT development framework to achieve navigation and positioning_Qt map navigation_The blog of the store that got the Golden Image Award for class-CSDN blog
https://blog.csdn.net/weixin_49648103/article/details/119675413?ops_request_misc=% %25 22%257D&request_id=169163400716800182785062&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog ~first_rank_ecpm_v1~rank_v31_ecpm-8-119675413-null-null.268^v1^koosearch&utm_term=Qt%20GPS%E5%AE%9A%E4%BD%8D&spm=1018.2226.3001.4450
Qt/C++ write security video surveillance system 30-GPS motion track_qt gps path tracking algorithm_feiyangqingyun's blog - CSDN blog
https://blog.csdn.net/feiyangqingyun/article/details/107061945?ops_request_misc=&request_id=&biz_id= 102&utm_term=Qt%20GPS%E5%AE%9A%E4%BD%8D&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~sobaiduweb~default-8-107061945.268^v1^koosearch&spm=1018.2226.3001.44 50
GPS positioning navigation and map display_qt gps map_on the road@Amos' blog-CSDN blog
https://blog.csdn.net/qq_33835307/article/details/109856052?ops_request_misc=&request_id=&biz_id=102&utm_term=Qt%20GPS% E5%AE%9A%E4%BD%8D&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~sobaiduweb~default-6-109856052.268^v1^koosearch&spm=1018.2226.3001.4450
Qt load map
Qt develops Beidou positioning system, integrates Baidu map API and Qt program package release
This is more detailed, you can refer to
Qt cross-platform, the same set of code can run on Win, Linux, MacOS
MacOS virtual machine can be installed on Win
【Web】Baidu Tile Map Downloader + Offline Map Use Tools to Download Offline Maps
Refer to the following articles
QT calls Baidu map offline API
Qt writes security video surveillance system 30-GPS motion track
After looking at it, some of the navigation algorithms call Baidu API , which can plan various paths. But it doesn't make much sense, it's better to plan your own research.
You can refer to the following two articles, it seems that GIS can be used to generate a map with more comprehensive information.
GPS navigation (2): electronic map generation
GPS Navigation (8): Shortest Path Algorithm
GPS data analysis
The serial port of Weixue’s GNSS module that I’ve arrived for the time being still gets the original data, and I have to analyze it, which is a bit cumbersome.
GPS module application: There is an analysis program for GPS track record , which is directly written in Qt. From this point of view, you can directly use Qt to receive GPS information and map loading.
GPS data packet format + data analysis
GPS-NMEA analysis code The NMEA sentences of the GPS device are sent one by one , and each sentence ends with 0x0D and 0x0A.
Serial port + GPS positioning software C# upper computer code interpretation (1) How to parse the original data is written in this, which is more detailed. Call nmealib library to parse GPS raw data
GPS two decoding methods Here are the methods of analyzing the protocol in 2 respectively. The first is to write the analysis protocol function by yourself, and the second is to use the GPS analysis protocol library written by others: NMEALIB library
NMEA Library nmealib official website
I feel like I don’t even want to read this library, and there are a lot of them in a search on GitHub. A search found that ros also has a library
After the hardware is connected, throw the antenna outside . Well, it seems that just throw the antenna out.
It seems that GPS is still a low-frequency sensor, and the output frequency for civilian use seems to be around 5Hz.
Recently, I want to use GPS positioning, and I need to call the map to display the location information. When I first started, I was very helpless because I didn't know where to start.
After reading some articles, I gradually got a little understanding of this, and I wanted to record these things so that no one would be so overwhelmed next time.
Let’s talk about the version number first. The version used by Qt is 5.3.1. Compared with the previous Qt4.x, there are indeed some changes. As for the content of the changes, please refer to the instructions given on the official website (http://qt-project.org/wiki /Transition_from_Qt_4.x_to_Qt5).
Next, let’s talk about the APIs of Baidu Maps. In fact, I see that there are still many map APIs, such as Tencent Maps, Gaode Maps, Google Maps, etc. Providers are different, but the idea of answering questions is the same of. There are many calls to google maps on the Internet, you can refer to them.
The content website of Baidu map api has a relatively comprehensive introduction to this. First of all, you can use the map quick generator provided by Baidu to quickly generate a basic map. The generation method is to put the code he gave under the TXT file, and then change the extension to html. Of course, the generated map is the most basic map, and you can also add the controls you need or anything else on this map according to the case provided by Baidu. At this time, you can refer to Google Map API Quick Start and Baidu API Best Practices.
The above gossip is a bit much. Everything is ready, now start GPS positioning. Qt only needs to read out the signal given by GPS and display it directly on the web. Here you need to use Qt's webView for display, and
the format of data interaction can refer to the excuse description given by Baidu. Marker functions can be written.
QUrl map::GPSMark(const QString &GPSCoordinate)
{
QUrl temp;
QString ret;
HttpClient * http = new HttpClient();
QUrl url;
url.setUrl("http://api.map.baidu.com/marker");
QUrlQuery urlQuery;
urlQuery.addQueryItem("location", GPSCoordinate);
urlQuery.addQueryItem("title", tr("my GPS location")); //The title of the punctuation
urlQuery.addQueryItem("content", tr("current location")); //The content of the
punctuation urlQuery. addQueryItem("output", "html");
//urlQuery.addQueryItem("coord_type", "bd09");
urlQuery.addQueryItem("src", "map");
url.setQuery(urlQuery);
//http: //map.baidu.com/?latlng=40.047669,116.313082&title=my gps location
//url = QUrl("http://map.baidu.com/?latlng=40.047669,116.313082&title=my location&content=Baidu Kuike Building&autoOpen=true&l");
//webview->load(url);
//webview->show();
setWindowTitle(url.toString());
return temp;
}
The parameter is the latitude and longitude information obtained by GPS. Of course, the default latitude and longitude here is the latitude and longitude of Baidu, and the latitude and longitude coordinates can be exchanged according to the functions provided by Baidu.
Finally give the test chart
————————————————
Copyright statement: This article is an original article of CSDN blogger "bigPillow", following the CC 4.0 BY-SA copyright agreement, please attach the original source link and this statement for reprinting .
Original link: https://blog.csdn.net/woshidahuaidan2011/article/details/47100685