RcdMathLib_doc
Open Source Library for Linear and Non-linear Algebra
magnetic_based_position.c File Reference

Functions of of DC-pulsed, magnetic localization system. More...

#include <math.h>
#include <complex.h>
#include <magnetic_based_position.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "matrix.h"
#include "vector.h"
#include "trilateration.h"

Go to the source code of this file.

Functions

void magnetic_based_get_absolute_error (matrix_t value_arr[], matrix_t approx_value_arr[], matrix_t absolute_error_arr[], uint8_t length)
 Computes the absolute error of a position of magnet-based localization system. More...
 
matrix_t magnetic_based_get_distances_to_anchors (matrix_t ref_point[3], matrix_t point[3])
 Computes the distance between a mobile station and a reference station of magnetic-based localization system. More...
 
matrix_t magnetic_based_get_magnetic_field (matrix_t ref_point[3], matrix_t target_point[3], matrix_t k)
 Computes the magnetic field strength from a mobile station to a reference station. More...
 
void magnetic_based_get_magnetic_field_vec (uint8_t m, matrix_t ref_point_matrix[m][3], matrix_t target_point[], matrix_t k, matrix_t magn_field_vec[])
 Computes the magnetic field strengths from a mobile station to various reference stations. More...
 
void magnetic_based_get_distances (matrix_t magnetic_field_strength_arr[], matrix_t angular_theta_arr[], matrix_t distance_arr[], uint8_t length, matrix_t k)
 Computes the distances between a mobile station and the reference stations of a magnet-based localization system. More...
 
matrix_t magnetic_based_get_r (matrix_t B, matrix_t theta, matrix_t k)
 Computes the distance between a mobile station and a reference stations of a magnet-based localization system. More...
 
void magnetic_based_preprocessing_get_position (uint8_t anchor_num, matrix_t anchor_pos_matrix[anchor_num][3], matrix_t pseudo_inv_matrix[4][anchor_num], matrix_t homog_sol_arr[], matrix_t solution_x1[], matrix_t solution_x2[])
 Computes the position of a mobile station by a magnetic-based localization system. More...
 

Detailed Description

Functions of of DC-pulsed, magnetic localization system.

Author
Zakaria Kasmi zkasm.nosp@m.i@in.nosp@m.f.fu-.nosp@m.berl.nosp@m.in.de
Abdelmoumen Norrdine a.nor.nosp@m.rdin.nosp@m.e@goo.nosp@m.glem.nosp@m.ail.c.nosp@m.om

Definition in file magnetic_based_position.c.

Function Documentation

◆ magnetic_based_get_absolute_error()

void magnetic_based_get_absolute_error ( matrix_t  value_arr[],
matrix_t  approx_value_arr[],
matrix_t  absolute_error_arr[],
uint8_t  length 
)

Computes the absolute error of a position of magnet-based localization system.

Parameters
[in]value_arrtrue position.
[in]approx_value_arrapproximate position of the mobile device.
[in,out]absolute_error_arrincludes the absolute error.
[in]lengtharrays length.

Definition at line 34 of file magnetic_based_position.c.

◆ magnetic_based_get_distances()

void magnetic_based_get_distances ( matrix_t  magnetic_field_strength_arr[],
matrix_t  angular_theta_arr[],
matrix_t  distance_arr[],
uint8_t  length,
matrix_t  k 
)

Computes the distances between a mobile station and the reference stations of a magnet-based localization system.

Parameters
[in]magnetic_field_strength_arr[]includes the magnetic field strengths.
[in]angular_theta_arr[]elevation angles.
[in,out]distance_arr[]distance array.
[in]lengthlength of the arrays.
[in]kmagnetic constant.

Definition at line 125 of file magnetic_based_position.c.

References matrix_t, and MILPS_MAX_DIST.

◆ magnetic_based_get_distances_to_anchors()

matrix_t magnetic_based_get_distances_to_anchors ( matrix_t  ref_point[3],
matrix_t  point[3] 
)

Computes the distance between a mobile station and a reference station of magnetic-based localization system.

Parameters
[in]ref_point[]three-dimensional coordinates of the reference stations.
[in]point[]three-dimensional coordinates of the mobile device.
Returns
the distance between the mobile station and the reference station.

Definition at line 50 of file magnetic_based_position.c.

References matrix_t, vector_get_norm2(), and vector_sub().

◆ magnetic_based_get_magnetic_field()

matrix_t magnetic_based_get_magnetic_field ( matrix_t  ref_point[3],
matrix_t  target_point[3],
matrix_t  k 
)

Computes the magnetic field strength from a mobile station to a reference station.

Parameters
[in]ref_point[]three-dimensional coordinates of a reference station.
[in]target_point[]three-dimensional coordinates of the mobile device.
[in]kmagnetic constant.
Returns
the magnetic field strength.

Definition at line 62 of file magnetic_based_position.c.

References matrix_t, and vector_flex_print().

◆ magnetic_based_get_magnetic_field_vec()

void magnetic_based_get_magnetic_field_vec ( uint8_t  m,
matrix_t  ref_point_matrix[m][3],
matrix_t  target_point[],
matrix_t  k,
matrix_t  magn_field_vec[] 
)

Computes the magnetic field strengths from a mobile station to various reference stations.

Parameters
[in]mnumber of the reference stations.
[in]ref_point_matrix[][]three-dimensional coordinates of the reference stations.
[in]target_point[]three-dimensional coordinates of the mobile device.
[in]kmagnetic constant.
[in,out]magn_field_vec[]includes the magnetic field strengths.

Definition at line 91 of file magnetic_based_position.c.

References matrix_t.

◆ magnetic_based_get_r()

matrix_t magnetic_based_get_r ( matrix_t  B,
matrix_t  theta,
matrix_t  k 
)

Computes the distance between a mobile station and a reference stations of a magnet-based localization system.

Parameters
[in]Bmagnetic field strength.
[in]thetaelevation angle.
[in]kmagnetic constant.
Returns
the distance between the mobile station and the reference station.

Definition at line 166 of file magnetic_based_position.c.

References matrix_t, and MILPS_MAX_DIST.

Referenced by magnetic_based_test().

◆ magnetic_based_preprocessing_get_position()

void magnetic_based_preprocessing_get_position ( uint8_t  anchor_num,
matrix_t  anchor_pos_matrix[anchor_num][3],
matrix_t  pseudo_inv_matrix[4][anchor_num],
matrix_t  homog_sol_arr[],
matrix_t  solution_x1[],
matrix_t  solution_x2[] 
)

Computes the position of a mobile station by a magnetic-based localization system.

The position is computed based on a pre-processed pseudo-inverse matrix and the homogeneous solution in the case of three reference stations.

Parameters
[in]anchor_numnumber of the reference stations.
[in]anchor_pos_matrix[][]coordinates of the reference stations.
[in]pseudo_inv_matrix[][[]pointer to the pre-processed pseudo-inverse matrix.
[in]homog_sol_arr[]pointer to the homogeneous solution.
[in,out]solution_x1[]includes the first solution.
[in,out]solution_x2[]includes the second solution.

Definition at line 188 of file magnetic_based_position.c.

References matrix_t, and trilateration1().