ITPub博客

首页 > 云计算 > 公有云实践 > IoT 设备定位服务——设备管理类

IoT 设备定位服务——设备管理类

公有云实践 作者:AIoT2688 时间:2022-12-15 09:55:43 0 删除 编辑

传送门: 5个视频讲解,30个场景案例汇总


阿里云IoT企业物联网平台提供基于GPS,移动基站、WiFi热点等信息来进行设备定位的辅助服务,厂商可以根据设备实际情况选择不同定位方案。

image.png

image.png

GPS定位方案

参考文档   https://help.aliyun.com/document_detail/108675.html


设备采用GPS定位时物模型- 地理位置 属性说明

image.png

设备端上报数据示例

Topic:
/sys/{productKey}/{deviceName}/thing/event/property/post
Payload:
{
    "id":"123",
    "version":"1.0",
    "params":{
        "GeoLocation":{
            "value":{
                "Longitude":115.2334,
                "Latitude":39.4563,
                "Altitude":235,
                "CoordinateSystem":2
            }
         }
     },
     "method":"thing.event.property.post"    
}


image.png

WiFi热点定位方案

物模型- 事件说明

image.png

设备通过WiFi定位通信示例:

Topic:
/sys/{productKey}/{deviceName}/thing/event/LocationInfo/post
Payload:
{
    "id":"123",
    "version":"1.0",
    "params":{
      "mmac":"4c:48:da:26:ea:d9,-56,iot",
      "macs":"4c:48:da:26:ea:d8,-56,iot|e6:a4:71:6e:45:83,-58,iot-LV4mshO"
    },
    "method":"thing.event.LocationInfo.post"
}


image.png

蜂窝基站定位方案

物模型- 事件说明

image.png

非CDMA基站,设备上报数据示例:

Topic:
/sys/{productKey}/{deviceName}/thing/event/LocationInfo/post
Payload:
{
    "id":"123",    
    "version":"1.0",    
    "params":{
      "imei":"352315052834187",
      "smac":"E0:DB:55:E4:C7:49",
      "cdma":"0",
      "bts":"460,01,40977,2205409,-65",
      "nearbts":"460,01,40977,2205409,-65|460,01,40 977,2205409,-65|460,01,40977,2205409,-65"
},
"method":"thing.event.LocationInfo.post"}

image.png

CDMA基站,设备上报数据示例:

Topic:
/sys/{productKey}/{deviceName}/thing/event/LocationInfo/post
Payload:
{
    "id":"123",
    "version":"1.0",
    "params":{
      "imei":"0000",
      "smac":"E0:DB:55:E4:C7:49",
      "cdma":"1",
      "bts":"13824,1,1838,1674723,575739,-52"
    },
    "method":"thing.event.LocationInfo.post"
}

云端业务系统获取设备位置API

业务系统调用 QueryDevicePropertyData 查询IoT设备的位置


业务系统通过QueryDevicePropertyData API 查询具体设备的位置信息
CommonRequest request = new CommonRequest();
request.setSysMethod(MethodType.POST);
request.setSysDomain("iot.cn-shanghai.aliyuncs.com");
request.setSysVersion("2018-01-20");
request.setSysAction("QueryDevicePropertyData");
request.putQueryParameter("RegionId", "cn-shanghai");
request.putQueryParameter("StartTime", "1618330349204");
request.putQueryParameter("Identifier", "GeoLocation");
request.putQueryParameter("Asc", "0");
request.putQueryParameter("EndTime", "1629330349204");
request.putQueryParameter("PageSize", "10");
request.putQueryParameter("IotInstanceId", "iot-068a03kg");
request.putQueryParameter("ProductKey", "g7palBDnzmT");
request.putQueryParameter("DeviceName", "dk003");
CommonResponse response = client.getCommonResponse(request);


返回值:

{
  "RequestId": "C56790F8-AC96-492C-BA86-D7F57F090795",
  "Data": {    
    "NextValid": false,    
    "NextTime": 1619330564810,
    "List": {
     "PropertyInfo": [        
       {          
         "Value": "{\"altitude\":0,\"CoordinateSystem\":2,\"latitude\":39.9932251,\"longitude\":116.4727718}",
         "Time": 1619330564811        
        }      
      ]    
    }  
  },  
  "Code": "",  
  "Success": true
}

设备地理发布大盘

image.png


物联网平台产品介绍详情:https://www.aliyun.com/product/iot/iot_instc_public_cn

 

阿里云物联网平台客户交流群

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70017009/viewspace-2928169/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2022-04-22

  • 博文量
    134
  • 访问量
    80949