ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
Measurements.hpp
1/******************************************************************************
2* Copyright (c) ATTX LLC 2024. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, LLC. The Software is
6* furnished under a license agreement between ATTX and the user organization
7* and may be used or copied only in accordance with the terms of the agreement.
8* Refer to 'license/attx_license.adoc' for standard license terms.
9*
10* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
11* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
12* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
13* transmitted in any form or by any means, for any purpose, without the express
14* written permission of ATTX, LLC.
15******************************************************************************/
16
17#ifndef MEASUREMENTS_HPP
18#define MEASUREMENTS_HPP
19
20#include <array>
21
22#include "core/clockwerkerrors.h"
23
24namespace clockwerk {
25
26 /**
27 * The measurements class defines a generic, templated base class which
28 * may be used generically as a measurement update in the EKF measurement
29 * update class. The values N, M, and O should be assigned and are defined
30 * as follows:
31 * N - The number of states in the target state vector. i.e. 3 for [x, y, z]
32 * M - The number of measurements produced by the function. i.e. 2 for [range, rangerate]
33 * O - The number of observer states. May be unused but could be i.e. another [x, y, z] for range
34 *
35 * This class should be inherited from and applied via implementation of the
36 * calcMeasurements function.
37 */
38 template <typename T, unsigned int N, unsigned int M, unsigned int O>
39 class Measurements {
40 public:
41 /// @brief Function to calculate range and range rate from current state of system
42 /// @param time The reference time
43 /// @param tar_state The target reference state
44 /// @param obs_state The observer reference state
45 /// @param out_measurements Implicit return of measurements based on time, state
46 virtual int calculateMeasurements(T time, const std::array<T, N> &tar_state, const std::array<T, O> &obs_state,
47 std::array<T, M> &out_measurements) {return NO_ERROR;}
48 private:
49
50 };
51
52}
53
54#endif
Definition Measurements.hpp:39
virtual int calculateMeasurements(T time, const std::array< T, N > &tar_state, const std::array< T, O > &obs_state, std::array< T, M > &out_measurements)
Function to calculate range and range rate from current state of system.
Definition Measurements.hpp:46
#define NO_ERROR
Definition clockwerkerrors.h:31