Browse Source

由于基础模块卫星定位接口函数发生变化,优化微服务模块gnss.service,本地服务接口定位时也同步返回使用的卫星数和总卫星数

niujiuru 3 days ago
parent
commit
82606c1778
1 changed files with 5 additions and 3 deletions
  1. 5 3
      gnss.service/rpc_handler.go

+ 5 - 3
gnss.service/rpc_handler.go

@@ -8,11 +8,13 @@ import (
 )
 
 func getPositionInfo(ctx context.Context, req *jsonrpc2.Request) *jsonrpc2.Response {
-	lat, lon, _ := gnss.Get2DPosition()
+	lat, lon, inuse, inview, _ := gnss.Get2DPosition()
 
 	result := map[string]string{
-		"lat": lat,
-		"lon": lon,
+		"lat":    lat,
+		"lon":    lon,
+		"inuse":  inuse,
+		"inview": inview,
 	}
 
 	return jsonrpc2.BuildResponse(req, result, nil)