WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
InertialNavigationDynamics.h
Go to the documentation of this file.
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 GNCUTILS_EKF_INERTIAL_NAVIGATION_DYNAMICS_HPP
18#define GNCUTILS_EKF_INERTIAL_NAVIGATION_DYNAMICS_HPP
19
21#include "dynamics/Quaternion.h"
24#include "core/mathmacros.h"
25
26namespace warpos {
27
28 // ***** Define the number of state vector elements, observer vector elements, and process noise elements ***** //
29
30 // Postion of body wrt inertial resolved in inertial, Velocity of body wrt inertial resolved in inertial, Orientation quaternion of body wrt inertial,
31 // gyroscope bias of the body angular velocity wrt inertial angular velocity resolved in the body frame, and
32 // accelerometer bias of the body acceleration (minus gravity) wrt inertial acceleration (minus gravity) resolved in the body frame
34
35 const uint32 INERTIAL_NAV_RATES_VECTOR_SIZE = 16 + 16*16;
36
71 class InertialNavigationDynamics : public Rates<INERTIAL_NAV_RATES_VECTOR_SIZE>{
72 public:
73
74 int16 calculateRates(floating_point time,
75 const std::array<floating_point, INERTIAL_NAV_RATES_VECTOR_SIZE> &state,
76 std::array<floating_point, INERTIAL_NAV_RATES_VECTOR_SIZE> &out_rates) override;
77
81
84 private:
85 // Intermediate calculation variables
86 clockwerk::Quaternion _quat_body_pI;
87 CartesianVector3 _v_dot;
88 CartesianVector3 _unbiased_body_accel__body;
89 CartesianVector4 _q_dot;
90 CartesianVector3 _unbiased_body_ang_vel__body;
91 Matrix16 _dynamics_jacobian = Matrix16();
95 };
96
97}
98
99#endif
Matrix math implementation.
Definition Matrix.hpp:55
Quaternion class for attitude representation.
Definition Quaternion.h:68
Definition InertialNavigationDynamics.h:71
int16 calculateRates(floating_point time, const std::array< floating_point, INERTIAL_NAV_RATES_VECTOR_SIZE > &state, std::array< floating_point, INERTIAL_NAV_RATES_VECTOR_SIZE > &out_rates) override
Definition InertialNavigationDynamics.cpp:22
clockwerk::CartesianVector< 3 > imu_meas_ang_vel__body
Definition InertialNavigationDynamics.h:80
clockwerk::CartesianVector< 3 > imu_meas_accel__body
IMU Input States. These intput states should already be rotated into body/CG.
Definition InertialNavigationDynamics.h:79
clockwerk::CartesianVector< 3 > gravity__pI
Gravity State. This is the average gravitational acceleration over the integrated time window.
Definition InertialNavigationDynamics.h:83
Definition Rates.hpp:28
#define CartesianVector3
Definition mathmacros.h:43
#define Matrix16
Definition mathmacros.h:32
#define CartesianVector4
Definition mathmacros.h:44
Definition DeadReckon.cpp:20
const uint32 INERTIAL_NAV_RATES_VECTOR_SIZE
Definition InertialNavigationDynamics.h:35
const uint32 INERTIAL_NAVIGATION_STATE_VECTOR_ELEMENTS
Definition InertialNavigationDynamics.h:33