Objects
Objects are the core building block within Hivekit. An object usually represents an entity in the physical world, such as a person with a smartphone, a vehicle like a car, truck, plane, scooter or delivery rider, or a stationary structure such as a machine in a production hall or a bridge across a street. But objects can also represent abstract entities, such as data sources or ways to keep state.
Each object has a geolocation, including latitude and longitude, but also other aspects like speed, heading, altitude, and accuracy. In addition, an object can have any kind of freeform data - such as the battery charge of an electric scooter, the id of its current rider, the next point on a route or its security clearance for entry in restricted zones.
Objects can also have an online status, depending on a connected data provider that actively updates the object.
Object IDs
Each object is identified by an ID. Object ids are simple strings that must be unique within a realm. They can also include dashes to specify categories, e.g. cars/mycar-123
. This is useful for category based permissions or to sort objects within the Hivekit app. You can learn more about this here.
Location
A location in Hivekit must have a longitude
and latitude
and can have a number of optional properties.
How precise should my location be?
If your location tracking is GPS based, use five or six decimal places. Officialy, GPS is accurate up to 4.9 meters (16 ft.) - though modern smartphones might increase this precision by using additional techniques. Using five decimal places gives you a precision of 1.11m, whereas six places give you a location down to 0.111 m.
If you use some other means of location tracking, such as "indoor GPS", Bluetooth beacons, WiFi triangulation, laser targeting, etc., your precision might be higher than that.
Hivekit can support values up to a maximum of 16 decimal places.
To find out how many meters at the equator a certain number of decimal places describes, use the formula 40075000 / (360 * 10 ^ decimalPlaces).
{
// specifies the east-west position on the surface of the earth in degrees. Values range from -180 to 180 degrees.
longitude:13.3889455,
// specifies the north - south position on the surface of the earth in degrees. Values range from -90 to 90 degrees
latitude: 52.5282712,
// position accuracy in degrees
accuracy: 0.000044,
// speed in m/s
speed: 16.66
// heading in degrees from 0 (north) to 360
heading: 32.3453
// altitude in meter above NN
altitude: 34,
// altitude accuracy in m
altitudeAccuracy: 1.5,
// time is the timestamp of the update in milliseconds since 1.1.1970 00:00:00
time: 1666796803158
}