Reference Space
Reference spaces are data objects that represent spaces which are used for absolute positions. Using these reference spaces, absolute positions created in a different space can easily be identified and transformed to the global reference space created when building a model.
ts
import {ReferenceSpace ,LengthUnit ,AngleUnit } from '@openhps/core';constrefSpace = newReferenceSpace (model .referenceSpace ).referenceUnit (LengthUnit .CENTIMETER ).translation (10, 10, 0).scale (1, 1, 0).rotation ({x : 0,y : 0,z : 0,unit :AngleUnit .RADIAN });
Geospatial Places
Geospatial places are supported using the @openhps/geospatial module. This module provides the concept of SymbolicSpace
s that extend on reference spaces.
ts
import {Absolute2DPosition ,GeographicalPosition } from '@openhps/core';import {Building ,Floor ,Room } from '@openhps/geospatial';constbuilding = newBuilding ("Pleinlaan 9").setBounds ({topLeft : newGeographicalPosition (50.8203726927966, 4.392241309019189),width : 46.275,length : 37.27,rotation : -34.04});constfloor = newFloor ("3").setBuilding (building ).setFloorNumber (3);constoffice = newRoom ("3.58").setFloor (floor ).setBounds ([newAbsolute2DPosition (4.75, 31.25),newAbsolute2DPosition (8.35, 37.02),]);constlab = newRoom ("3.58").setFloor (floor ).setBounds ([newAbsolute2DPosition (13.15, 31.25),newAbsolute2DPosition (25.15, 37.02),]);