Generic Location models

The Generic Location models allow remote monitoring of the location status of a mesh device.

The Generic Location models also feature their own common types, listed below. For types common to all models, see Bluetooth Mesh models.

Common types

This section lists the types common to the Generic Location mesh models.

Header file: include/bluetooth/mesh/gen_loc.h

Defines

BT_MESH_LOC_ALTITUDE_MAX

Highest altitude that can be represented

BT_MESH_LOC_ALTITUDE_UNKNOWN

Altitude is unknown or not configured.

BT_MESH_LOC_ALTITUDE_TOO_LARGE

Altitude is out of bounds.

BT_MESH_LOC_FLOOR_NUMBER_MIN

Lowest floor number that can be represented.

BT_MESH_LOC_FLOOR_NUMBER_MAX

Highest floor number that can be represented.

BT_MESH_LOC_FLOOR_NUMBER_GROUND_FLOOR_0

Ground floor (where the ground floor is referred to as floor 0)

BT_MESH_LOC_FLOOR_NUMBER_GROUND_FLOOR_1

Ground floor (where the ground floor is referred to as floor 1)

BT_MESH_LOC_FLOOR_NUMBER_UNKNOWN

Unknown or unconfigured floor number.

struct bt_mesh_loc_global
#include <gen_loc.h>

Global location parameters.

Public Members

double latitude

Global WGS84 North coordinate in degrees.

double longitude

Global WGS84 East coordinate in degrees.

int16_t altitude

Global altitude above the WGS84 datum in meters.

See

Defines for altitude.

struct bt_mesh_loc_local
#include <gen_loc.h>

Local location parameters.

Public Members

int16_t north

Local north position in decimeters.

int16_t east

Local east position in decimeters.

int16_t altitude

Local altitude in decimeters.

See

Defines for altitude.

int16_t floor_number

Floor number.

See

Defines for floor number.

bool is_mobile

Whether the device is movable.

int32_t time_delta

Time since the previous position update in milliseconds, or SYS_FOREVER_MS.

uint32_t precision_mm

Precision of the location in millimeters.