Last blog: Use Mapviz and zhongketuxin to draw the satellite map of the robot's GPS trajectory
Mapviz for GPS odometer visualization
Main reference Blogs:
Dai Kaige's Zhihu blog:
1.Inertial navigation system INS570D test
2.Mapviz for GPS + odometer + LiDAR visualization
1.mapviz installation
reference resources: Use Mapviz and zhongketuxin to draw the satellite map of the robot's GPS trajectory
2.mapviz calls the sky map api
Because the map loaded by mapviz by default is Stamen's map, which is a foreign website, the loading is very slow Dr. Dai Kai Under the guidance of, select WMTs API using day map to display slice map and display track on it
2.1 apply for personal key of tianmap API keyNeed first Application day map API KEY Note that when applying, the selected application type is the server. After submitting, you can generate your own tk key.
2.2 map tile acquisition formataccording to Map API Write your key in the format of
Format:
http://t0.tianditu.gov.cn/img_ W / WMTs? Service = WMTs & request = gettile & version = 1.0.0 & layer = img & style = Default & tilematrixset = W & format = tiles & tilematrix = & tilerow = & tilecol = & TK = your key
Note: as shown in the following figure, in mapviz, in tile_ In the map, the format of the added Base URL is
http://Tile. Stamen. COM / Terrain / / / . Png # level x y respectively represents high longitude and latitude
Therefore, mapviz needs to change the z variable in the sky map api retrieval format to the level variable to recognize that the modified sky map api retrieval format is
http://t0.tianditu.gov.cn/img_ W / WMTs? Service = WMTs & request = gettile & version = 1.0.0 & layer = img & style = Default & tilematrixset = W & format = tiles & tilematrix = & tilerow = & tilecol = & TK = your key
Note: the unexpected account key is my own account key. Do not transmit it outside. The specific format can be viewed Map API
Vector basemapLongitude and latitude projection
http://t0.tianditu.gov.cn/vec_ C / WMTs? Service = WMTs & request = gettile & version = 1.0.0 & layer = img & style = Default & tilematrixset = W & format = tiles & tilematrix = & tilerow = & tilecol = & TK = your key
Spherical Mercator projection
http://t0.tianditu.gov.cn/vec_w/wmts? SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=&TILEROW=&TILECOL=&tk=Your keyVector annotation
Longitude and latitude projection
http://t0.tianditu.gov.cn/cva_ C / WMTs? Service = WMTs & request = gettile & version = 1.0.0 & layer = img & style = Default & tilematrixset = W & format = tiles & tilematrix = & tilerow = & tilecol = & TK = your key
Spherical Mercator projection
http://t0.tianditu.gov.cn/cva_w/wmts? SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=&TILEROW=&TILECOL=&tk=Your keyImage base map
Longitude and latitude projection
http://t0.tianditu.gov.cn/img_c/wmts? SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=&TILEROW=&TILECOL=&tk=Your key
Spherical Mercator projection
http://t0.tianditu.gov.cn/img_w/wmts? SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=&TILEROW=&TILECOL=&tk=Your keyTopographic shading
Longitude and latitude projection
http://t0.tianditu.gov.cn/ter_c/wmts? SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=&TILEROW=&TILECOL=&tk=Your key
Spherical Mercator projection
http://t0.tianditu.gov.cn/ter_w/wmts? SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=&TILEROW=&TILECOL=&tk=Your key3D topographic image base map
https://[ t0-t7 ].tianditu.gov.cn/mapservice/swdx? SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=&TILEROW=&TILECOL=&tk=Your key
3. Use
3.1 add Custom WMTS SourceFor example, using the image base map spherical Mercator projection, add the sky map URL + key to the Base URL, and select 99 for Max zoom to increase the resolution
http://t0.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX=&TILEROW=&TILECOL=&tk=1cfe06711bc22d31762c8884d41d68f03.2 add navsat path display
Select the / navsat/fix topic and the appropriate color to draw the path on the satellite map
Note that tile should be added in mapviz first_ Add navsat(new display) to the map
3.3 playing data sets 3.4 final effectAs shown in the figure below, the red track is the track route map in the square