0.1.0-alpha.1 • Published 3 years ago

@openhps/trigonometry v0.1.0-alpha.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 years ago

Getting Started

If you have npm installed, start using @openhps/trigonometry with the following command.

npm install @openhps/trigonometry --save

Usage

Set-up

Both triangulation or multilateration requires the set up of landmarks with a known position. These landmarks can be included in the data frame or previously stored in a set-up phase.

Multilateration

Multilateration uses multiple landmarks to determine the position. Depending on the amount of landmarks, this uses trilateration or non linear least squares.

import { ModelBuilder } from '@openhps/core';

ModelBuilder.create()
    .from(/* ... */)
    .via(new MultilaterationNode({
        // Increment step for three point trilateration
        iterationStep: 0.1,
        // Maximum iterations for both trilateration and nonlinear least squares (> 3 references)
        maxIterations: 1000,
    }))
    .to(/* ... */)
    .build(model => {
        // Store the positions of all landmarks
        // ...
    });

Triangulation

Relative positions for triangulation is similar as multilateration.

const object = new DataObject('phone');
object.addRelativePosition(new RelativeAnglePosition(beacon1, 270, AngleUnit.DEGREE));
object.addRelativePosition(new RelativeAnglePosition(beacon2, 90, AngleUnit.DEGREE));
object.addRelativePosition(new RelativeAnglePosition(beacon3, 330, AngleUnit.DEGREE));

Contributors

The framework is open source and is mainly developed by PhD Student Maxim Van de Wynckel as part of his research towards Hybrid Positioning and Implicit Human-Computer Interaction under the supervision of Prof. Dr. Beat Signer.

Contributing

Use of OpenHPS, contributions and feedback is highly appreciated. Please read our contributing guidelines for more information.

License

Copyright (C) 2019-2021 Maxim Van de Wynckel & Vrije Universiteit Brussel

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

0.1.0-alpha.1

3 years ago