ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
SimpleDiscreteProcessNoise.h
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/*
17Simple discrete process noise header file
18
19Author: Alex Reynolds
20*/
21
22#ifndef GNC_NAVIGATION_EKF_SIMPLE_DISCRETE_PROCESS_NOISE_H
23#define GNC_NAVIGATION_EKF_SIMPLE_DISCRETE_PROCESS_NOISE_H
24
25#include "core/macros.h"
26#include "architecture/Tasks.h"
27#include "architecture/Time.h"
28#include "core/CartesianVector.hpp"
29
30namespace clockwerk {
31 /**
32 * @brief Simplified state noise compensation model
33 *
34 *
35 *
36 * Author: Alex Reynolds <alex.reynolds@attx.tech>
37 */
38 class SimpleDiscreteProcessNoise : public clockwerk::Task {
39 public:
40 // Model params
41 // NAME TYPE DEFAULT VALUE
43 /** The covariance in the range measurement which will be used to construct the R matrix*/
44 SIGNAL(Qc, Matrix3D, Matrix3D({{1.0,0.0,0.0},{0.0,1.0,0.0},{0.0,0.0,1.0}}))
45 /** The covariance in the range measurement which will be used to construct the R matrix*/
46 SIGNAL(B, Matrix63D, Matrix63D({{0.0,0.0,0.0},
47 {0.0,0.0,0.0},
48 {0.0,0.0,0.0},
49 {1.0,0.0,0.0},
50 {0.0,1.0,0.0},
51 {0.0,0.0,1.0}}))
53
54 // Model inputs
55 // NAME TYPE DEFAULT VALUE
57 /** The input time stamp representing the start of process noise integration.
58 * Can be configured to loopback to outputs/time_state */
59 SIGNAL(time_prev, clockwerk::Time, clockwerk::Time(0))
60 /** The input time stamp representing the end of process noise integration.
61 * Will be written to time_state */
62 SIGNAL(time_update, clockwerk::Time, clockwerk::Time(0))
63 /** The covariance matrix prior to SNC Update */
65 /** The state transition matrix to be applied in a linear propagation of process noise.
66 * Default is an identity matrix, which is effectively not using this parameter. */
67 SIGNAL(phi, Matrix6D, Matrix6D({{1.0,0.0,0.0,0.0,0.0,0.0},
68 {0.0,1.0,0.0,0.0,0.0,0.0},
69 {0.0,0.0,1.0,0.0,0.0,0.0},
70 {0.0,0.0,0.0,1.0,0.0,0.0},
71 {0.0,0.0,0.0,0.0,1.0,0.0},
72 {0.0,0.0,0.0,0.0,0.0,1.0}}))
74
75 // Model outputs
76 // NAME TYPE DEFAULT VALUE
78 /** The time stamp associated with the post snc covariance matrix */
79 SIGNAL(time_state, clockwerk::Time, clockwerk::Time(0))
80 /** The covariance matrix after SNC Update */
83
84 // Model-specific implementations of startup and derivative
85 SimpleDiscreteProcessNoise();
86 SimpleDiscreteProcessNoise(clockwerk::Task &pnt, int schedule_slot=0, const std::string &m_name="simple_snc");
87 SimpleDiscreteProcessNoise(clockwerk::Executive &e, int schedule_slot=0, const std::string &m_name="simple_snc");
88 virtual ~SimpleDiscreteProcessNoise() {}
89 protected:
90 int execute();
91
92 // Internal variable to hold our discrete time process noise matrix
93 Matrix6D _Qd;
94 };
95}
96
97#endif
DataIO(GraphTreeObject *data_parent, std::string data_name, T initial_value)
Constructor for the DataIO object.
Definition DataIO.hpp:134
Central control mechanism to run simulations and software.
Definition Executive.h:43
Simplified state noise compensation model.
Definition SimpleDiscreteProcessNoise.h:38
int execute()
Function to execute the task. All math and calculations should be here.
Definition SimpleDiscreteProcessNoise.cpp:29
This is the base implementation of the task class.
Definition Tasks.h:68
Wrapper to manage and convert time as timespce.
Definition Time.h:45
#define Matrix3D
Definition macros.h:33
#define SIGNAL(NAME, TYPE, INITIAL_VALUE)
Definition macros.h:87
#define Matrix6D
Definition macros.h:37
#define Matrix63D
Definition macros.h:46
#define START_PARAMS
Definition macros.h:96
#define END_OUTPUTS
Definition macros.h:90
#define END_PARAMS
Definition macros.h:98
#define START_OUTPUTS
Definition macros.h:88
#define END_INPUTS
Definition macros.h:94
#define START_INPUTS
Definition macros.h:92
clockwerk::DataIO< clockwerk::Matrix< double, 6, 6 > > cov_pre_snc
Definition SimpleDiscreteProcessNoise.h:64
clockwerk::DataIO< clockwerk::Time > time_prev
Definition SimpleDiscreteProcessNoise.h:59
clockwerk::DataIO< clockwerk::Time > time_update
Definition SimpleDiscreteProcessNoise.h:62
clockwerk::DataIO< clockwerk::Matrix< double, 6, 6 > > cov_post_snc
Definition SimpleDiscreteProcessNoise.h:81
clockwerk::DataIO< clockwerk::Time > time_state
Definition SimpleDiscreteProcessNoise.h:79
clockwerk::DataIO< clockwerk::Matrix< double, 3, 3 > > Qc
Definition SimpleDiscreteProcessNoise.h:44