IoT 设备定位服务:GPS,移动基站、WiFi

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


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

IoT 设备定位服务:GPS,移动基站、WiFi

IoT 设备定位服务:GPS,移动基站、WiFi

GPS定位方案

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


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

IoT 设备定位服务:GPS,移动基站、WiFi

设备端上报数据示例

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"
}

IoT 设备定位服务:GPS,移动基站、WiFi

WiFi热点定位方案

物模型-事件说明

IoT 设备定位服务:GPS,移动基站、WiFi

设备通过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"
}


IoT 设备定位服务:GPS,移动基站、WiFi

蜂窝基站定位方案

物模型-事件说明

IoT 设备定位服务:GPS,移动基站、WiFi

非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"
}

IoT 设备定位服务:GPS,移动基站、WiFi

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
}

设备地理发布大盘

IoT 设备定位服务:GPS,移动基站、WiFi

上一篇:打造更适合IoT场景的消息队列实践


下一篇:Consistent Hashing算法及相关技术