WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
DeadReckon.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright (c) ATTX INC 2025. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, INC. 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, INC.
15******************************************************************************/
16/*
17Inertial Navigation EKF Dead Reckoning Propagation Step Header File
18
19Author: James Tabony
20*/
21#ifndef APPS_INERTIAL_NAVIGATION_DEAD_RECKON_H
22#define APPS_INERTIAL_NAVIGATION_DEAD_RECKON_H
23
24#include "core/mathmacros.h"
25
26#include "flight/App.h"
28
31
35
37
38namespace warpos {
39
51 class DeadReckon : public App {
52 public:
65
66 // ***** PROCESS NOISE PARAMS ***** //
67
88
89 // ***** IMU LOCATION PARAMS ***** //
90
99
101 // ***** STATE INPUT DEFINITIONS ***** //
102
133
134 // ***** IMU MEASUREMENT INPUT DEFINITIONS ***** //
135
136
139 SIGNAL(gyroMeas_IMU_tI__IMU, clockwerk::CartesianVector<3>, clockwerk::CartesianVector<3>({0.0, 0.0, 0.0}))
153
154 // ***** ADDITIONAL INPUT DEFINITIONS ***** //
155
156
158 SIGNAL(accelGrav_body__pI, clockwerk::CartesianVector<3>, clockwerk::CartesianVector<3>({0.0, 0.0, 0.0}))
159
160 // ***** OUTPUT DEFINING INPUTS DEFINITIONS ***** //
161
166
168
197
198 DeadReckon(FlightExecutive &executive);
199
200 virtual ~DeadReckon() {};
201
204 int16 activate() override;
205
208 int16 deactivate() override;
209
215 int16 command(uint16 apid, uint8* buffer, uint16 size) override;
216
222 int16 getLastValidMeasurement(clockwerk::CartesianVector<3> &gyroMeas_IMU_tI__IMU, clockwerk::CartesianVector<3> &accelMeas_IMU_tI__IMU, floating_point &time_stamp);
223
224 protected:
225 int16 start() override;
226 int16 execute() override;
227
234
236 std::array<floating_point, 3> _dummy3;
237 std::array<floating_point, 4> _dummy4;
239
243
246
250
253
256
259
262 };
263}
264
265#endif
#define SIGNAL(NAME, TYPE, INITIAL_VALUE)
Definition appmacros.h:27
#define START_PARAMS
Definition appmacros.h:42
#define END_OUTPUTS
Definition appmacros.h:33
#define END_PARAMS
Definition appmacros.h:47
#define START_OUTPUTS
Definition appmacros.h:28
#define END_INPUTS
Definition appmacros.h:40
#define START_INPUTS
Definition appmacros.h:35
Standard vector class derived from Matrix.
Definition CartesianVector.hpp:39
Quaternion class for attitude representation.
Definition Quaternion.h:68
Wrapper to manage and convert time as timespce.
Definition Time.h:53
App(FlightExecutive &executive, const char *name, uint16 apid, uint8 instance=0)
Executive-based constructor for the task.
Definition App.cpp:21
uint16 apid()
Get the apid for this app.
Definition App.h:105
clockwerk::CartesianVector< 3 > _last_valid_gyro_meas
Internally stored last valid measurement.
Definition DeadReckon.h:241
bool _valid_measurement_saved
Boolean value to track if a valid measurement has been internally saved yet.
Definition DeadReckon.h:245
clockwerk::CartesianVector< 3 > _last_valid_accel_meas
Definition DeadReckon.h:241
virtual ~DeadReckon()
Definition DeadReckon.h:200
std::array< floating_point, 3 > _dummy3
Dummy temporary array for swapping between std::array and clockwerk::CartesianVector.
Definition DeadReckon.h:236
InertialNavigationDynamics _dynamics
Reference variable to the internal Dynamics.
Definition DeadReckon.h:229
clockwerk::Quaternion _unit_quat
Temporary variable for unitizing a quaternion.
Definition DeadReckon.h:258
int16 deactivate() override
Deactivate the app. The app will not step when deactivated.
Definition DeadReckon.cpp:185
int16 getLastValidMeasurement(clockwerk::CartesianVector< 3 > &gyroMeas_IMU_tI__IMU, clockwerk::CartesianVector< 3 > &accelMeas_IMU_tI__IMU, floating_point &time_stamp)
Getter function to see the internally stored last valid measurement.
Definition DeadReckon.cpp:36
tlm_gnc_inert_prop_state _tlm_a_priori_state
Packet to hold state after propagation.
Definition DeadReckon.h:261
int16 execute() override
Definition DeadReckon.cpp:69
inertial_nav::PropagateObsVector _state_observer_array
Definition DeadReckon.h:249
EkfTimeUpdate< INERTIAL_NAVIGATION_STATE_VECTOR_ELEMENTS > _time_update
Reference variable to the internal EkfTimeUpdate.
Definition DeadReckon.h:233
int16 command(uint16 apid, uint8 *buffer, uint16 size) override
Process commands issued to the app.
Definition DeadReckon.cpp:200
inertial_nav::PropagateObsVector _dummyObs
Definition DeadReckon.h:238
inertial_nav::StateVector _state_output_array
Definition DeadReckon.h:248
int16 activate() override
Activate the app. The app will step when active.
Definition DeadReckon.cpp:170
std::array< floating_point, 4 > _dummy4
Definition DeadReckon.h:237
clockwerk::CartesianVector< 3 > _accelMeas_B_pI__B
Definition DeadReckon.h:252
int16 start() override
Definition DeadReckon.cpp:47
floating_point _last_valid_meas_time_stamp
Definition DeadReckon.h:242
ForwardEulerIntegrator< INERTIAL_NAVIGATION_STATE_VECTOR_ELEMENTS+INERTIAL_NAVIGATION_STATE_VECTOR_ELEMENTS *INERTIAL_NAVIGATION_STATE_VECTOR_ELEMENTS > _integrator
Reference variable to the internal Integrator.
Definition DeadReckon.h:231
clockwerk::CartesianVector< 3 > _approximate_ang_accel
Internally saved approximated angular acceleration.
Definition DeadReckon.h:255
DeadReckon(FlightExecutive &executive)
Definition DeadReckon.cpp:25
inertial_nav::StateVector _state_input_array
Temporary variables for the array input/outputs passed into the EkfTimeUpdate object.
Definition DeadReckon.h:248
clockwerk::CartesianVector< 3 > _gyroMeas_B_pI__B
Internal variables for the transformed measurements.
Definition DeadReckon.h:252
Class to perform EKF time update step.
Definition EkfTimeUpdate.hpp:33
Executive derivation specifically to run flight systems.
Definition FlightExecutive.h:46
Definition ForwardEulerIntegrator.hpp:34
Definition InertialNavigationDynamics.h:71
#define Matrix16
Definition mathmacros.h:32
Definition CircularBuffer.hpp:28
std::array< floating_point, STATE_SIZE > StateVector
Definition InertialNavigationDefinition.hpp:298
std::array< floating_point, PROPAGATE_OBSERVER_SIZE > PropagateObsVector
Definition InertialNavigationDefinition.hpp:300
Definition DeadReckon.cpp:20
Definition tlm_InertialNavigationDeadReckon.h:52
clockwerk::DataIO< clockwerk::Time > IMU_meas_time_stamp
Definition DeadReckon.h:147
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > accelGrav_body__pI
Definition DeadReckon.h:158
clockwerk::DataIO< bool > IMU_meas_validity_flag
Definition DeadReckon.h:152
clockwerk::DataIO< clockwerk::Quaternion > quat_B_pI
Definition DeadReckon.h:114
clockwerk::DataIO< clockwerk::Time > state_output_time_stamp
Definition DeadReckon.h:165
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > accelMeas_IMU_tI__IMU
Definition DeadReckon.h:143
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > gyroBias_B_pI__pI
Definition DeadReckon.h:119
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > gyroMeas_IMU_tI__IMU
Definition DeadReckon.h:139
clockwerk::DataIO< clockwerk::Matrix< 16, 16 > > state_cov
Definition DeadReckon.h:128
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > pos_B_pI__pI
Definition DeadReckon.h:106
clockwerk::DataIO< clockwerk::Time > state_input_time_stamp
Definition DeadReckon.h:132
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > vel_B_pI__pI
Definition DeadReckon.h:110
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > accelBias_B_pI__pI
Definition DeadReckon.h:124
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > gyroBias_B_pI__pI
Definition DeadReckon.h:186
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > accelBias_B_pI__pI
Definition DeadReckon.h:191
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > pos_B_pI__pI
Definition DeadReckon.h:173
clockwerk::DataIO< clockwerk::Quaternion > quat_B_pI
Definition DeadReckon.h:181
clockwerk::DataIO< clockwerk::Matrix< 16, 16 > > state_cov
Definition DeadReckon.h:195
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > vel_B_pI__pI
Definition DeadReckon.h:177
clockwerk::DataIO< clockwerk::Quaternion > quat_IMU_B
Definition DeadReckon.h:97
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > pos_pI_tI__pI
Definition DeadReckon.h:58
clockwerk::DataIO< clockwerk::CartesianVector< 4 > > attitude_standard_deviation
Definition DeadReckon.h:77
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > pos_IMU_B__B
Definition DeadReckon.h:94
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > gyroBias_standard_deviation
Definition DeadReckon.h:82
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > velocity_standard_deviation
Definition DeadReckon.h:72
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > accelBias_standard_deviation
Definition DeadReckon.h:87
clockwerk::DataIO< clockwerk::Time > time_diff_warning_bound
Definition DeadReckon.h:64