HOW TO: define Device in mobility, Mobile IOT Devices, Sensor Mobile

×

Warning message

You can't delete this newsletter because it has not been sent to all its subscribers.

In this page, the ations to set up an IOT Device which may change the GPS position over time is described. According to the Snap4City notations, this refer to Device in mobility, Mobile IOT Devices, and to Sensor Mobile. The data of those devices arrive into the Snap4City solution via some IOT Brokers and the data may be shown as trajectories on the maps with associated measures, or as a collection of points in which the measures have been performed  or the events occurred without the meaning of trajectory. In any case, the presence or not of a trajectory is a matter of presentation and not of the IOT device model as the concept that the IOT Device may have GPS coordinates that change over time. Please note that also MyKPI may be used to record values which may change their GPS position over time. 

To register a Device in mobility (that has an Initial Position, that change in time) please register an IOT Device in the IOT Directory specifing the TICK  "Device in Mobility" in the Static Attributes TAB as in the image below

 

It's possible to specify the same property "Device in Mobility" also in the IOT Model, but take in mind that the EXPORT functionality on IOT Model maps this property with the following static attributes ["http://www.disit.org/km4city/schema#isMobile","true"]

 

In case of a Device in mobility, the GPS latitude and longitude specified in Position Tab of the IOT Directory has to be intented as Initial Position. To see the Current Position of the IOT Device please refer to ServiceMap.

 

Please consider that a Device in mobility in composed by Sensor Mobile, in contrast of normal IOT Device (Still Device) that are composed by Sensors and Actuators

 

In case the developer choose to update the Current Position via NGSI Orion Context Broker, the payload of the message has to be formatted in the following way (please note that the presence of the attribute dateObserved means that the GPS coordintes are changing over time, and the dateObserved marks the time in which those have been registered and eventually other measures as well):

{
    "id": "<your_device_identifier_here>",
    "type": "<your_device_type_here>",
    "latitude": {
        "type": "float",
        "value": "43.77711"
    },
    "longitude": {
        "type": "float",
        "value": "11.27777"
    },

    "dateObserved": {
        "type": "time",
        "value": "2020-04-06T17:00:00.000Z"
    },

// other measures......
    ....
}