WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
GPSUpdate.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: GPS Measurement Update Header File
18
19Author: James Tabony
20*/
21
22#ifndef APPS_GNC_INERTIAL_NAV_GPS_UPDATE_APP_H
23#define APPS_GNC_INERTIAL_NAV_GPS_UPDATE_APP_H
24
25#include "core/mathmacros.h"
26
27#include "flight/App.h"
29
32
35
37namespace warpos{
38
60 class GPSUpdate : public App {
61 public:
71 SIGNAL(GPS_meas_noise, clockwerk::CartesianVector<3>, clockwerk::CartesianVector<3>({0.0, 0.0, 0.0}))
81
83 // ***** STATE INPUT DEFINITIONS ***** //
84
115
116 // ***** GPS MEASUREMENT INPUT DEFINITIONS ***** //
117
118
120 SIGNAL(GPS_meas_vec__ECEF, clockwerk::CartesianVector<3>, clockwerk::CartesianVector<3>({0.0, 0.0, 0.0}))
129
130 // ***** ADDITIONAL INPUT DEFINITIONS ***** //
131
134 SIGNAL(quat_pI_REF, clockwerk::Quaternion, clockwerk::Quaternion({1.0, 0.0, 0.0, 0.0}))
136
169 SIGNAL(pre_residual, clockwerk::CartesianVector<3>, clockwerk::CartesianVector<3>({0.0, 0.0, 0.0}))
172
174
175 GPSUpdate(FlightExecutive &executive);
176
177 virtual ~GPSUpdate() {};
178
181 int16 activate() override;
182
185 int16 deactivate() override;
186
192 int16 command(uint16 apid, uint8* buffer, uint16 size) override;
193
197
198 protected:
199 int16 start() override;
200 int16 execute() override;
201
207
209 std::array<floating_point, 3> _dummy3;
210 std::array<floating_point, 4> _dummy4;
212
219
222
225
228
232 };
233}
234
235
236#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
Generic, templated EKF measurement update class.
Definition EkfMeasurementUpdate.hpp:49
Executive derivation specifically to run flight systems.
Definition FlightExecutive.h:46
Definition GPSMeasurements.hpp:72
int16 execute() override
Definition GPSUpdate.cpp:49
virtual ~GPSUpdate()
Definition GPSUpdate.h:177
inertial_nav::MagMeasVector getResidual()
Getter function to grab the internal residual.
Definition GPSUpdate.h:196
inertial_nav::GpsMeasVector _residual
Definition GPSUpdate.h:218
clockwerk::Quaternion _unit_quat
Temporary variable for unitizing a quaternion.
Definition GPSUpdate.h:224
GPSUpdate(FlightExecutive &executive)
Definition GPSUpdate.cpp:26
EkfMeasurementUpdate< inertial_nav::STATE_SIZE, GPS_MEASUREMENT_VECTOR_ELEMENTS, GPS_MEASUREMENT_OBSERVER_VECTOR_ELEMENTS > _measUpdate
Reference variable to the internal EkfMeasurementsUpdate.
Definition GPSUpdate.h:206
clockwerk::CartesianVector< 3 > _repeat_check_meas
Definition GPSUpdate.h:231
std::array< floating_point, 3 > _dummy3
Dummy temporary array for swapping between std::array and clockwerk::CartesianVector.
Definition GPSUpdate.h:209
std::array< floating_point, 4 > _dummy4
Definition GPSUpdate.h:210
GPSMeasurements< inertial_nav::STATE_SIZE > _measurements
Reference variable to the internal Measurements.
Definition GPSUpdate.h:203
int16 command(uint16 apid, uint8 *buffer, uint16 size) override
Process commands issued to the app.
Definition GPSUpdate.cpp:192
int16 deactivate() override
Deactivate the app. The app will not step when deactivated.
Definition GPSUpdate.cpp:177
inertial_nav::MagObsVector _dummyObs
Definition GPSUpdate.h:211
inertial_nav::StateVector _state_input_array
Temporary variables for the array input/outputs passed into the EkfMeasurementUpdate object.
Definition GPSUpdate.h:214
inertial_nav::GpsObsVector _state_observer_array
Temporary variables for the array input/outputs passed into the EkfMeasurementUpdate object.
Definition GPSUpdate.h:216
int16 start() override
Definition GPSUpdate.cpp:38
int16 activate() override
Activate the app. The app will step when active.
Definition GPSUpdate.cpp:170
inertial_nav::GpsMeasVector _measurement_array
Temporary variables for the array input/outputs passed into the EkfMeasurementUpdate object.
Definition GPSUpdate.h:218
tlm_gnc_gps_update_state _tlm_a_posteriori_state
Packet to hold state after measurement incorporation.
Definition GPSUpdate.h:227
inertial_nav::StateVector _state_output_array
Definition GPSUpdate.h:214
clockwerk::CartesianVector< 3 > _gps_meas_vec_B_pI__pI
Internal variables for the transformed measurements.
Definition GPSUpdate.h:221
clockwerk::Time _repeat_check_time
Variables to verify we are not processing stale measurements.
Definition GPSUpdate.h:230
#define CartesianVector3
Definition mathmacros.h:43
#define Matrix16
Definition mathmacros.h:32
Definition CircularBuffer.hpp:28
std::array< floating_point, MAG_MEAS_SIZE > MagMeasVector
Definition InertialNavigationDefinition.hpp:304
std::array< floating_point, STATE_SIZE > StateVector
Definition InertialNavigationDefinition.hpp:298
std::array< floating_point, MAG_OBSERVER_SIZE > MagObsVector
Definition InertialNavigationDefinition.hpp:303
std::array< floating_point, GPS_MEAS_SIZE > GpsMeasVector
Definition InertialNavigationDefinition.hpp:306
constexpr uint32 STATE_SIZE
Definition InertialNavigationDefinition.hpp:98
std::array< floating_point, GPS_OBSERVER_SIZE > GpsObsVector
Definition InertialNavigationDefinition.hpp:305
Definition DeadReckon.cpp:20
const uint32 GPS_MEASUREMENT_OBSERVER_VECTOR_ELEMENTS(4)
const uint32 GPS_MEASUREMENT_VECTOR_ELEMENTS(3)
Definition tlm_InertialNavigationGPSMeasurementUpdate.h:52
clockwerk::DataIO< clockwerk::Time > GPS_meas_time_stamp
Definition GPSUpdate.h:124
clockwerk::DataIO< clockwerk::Quaternion > quat_pI_REF
Definition GPSUpdate.h:134
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > gyroBias_B_pI__pI
Definition GPSUpdate.h:101
clockwerk::DataIO< bool > GPS_meas_validity_flag
Definition GPSUpdate.h:128
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > pos_B_pI__pI
Definition GPSUpdate.h:88
clockwerk::DataIO< clockwerk::Time > state_input_time_stamp
Definition GPSUpdate.h:114
clockwerk::DataIO< clockwerk::Quaternion > quat_B_pI
Definition GPSUpdate.h:96
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > vel_B_pI__pI
Definition GPSUpdate.h:92
clockwerk::DataIO< clockwerk::Matrix< 16, 16 > > state_cov
Definition GPSUpdate.h:110
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > GPS_meas_vec__ECEF
Definition GPSUpdate.h:120
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > accelBias_B_pI__pI
Definition GPSUpdate.h:106
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > pos_B_pI__pI
Definition GPSUpdate.h:141
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > accelBias_B_pI__pI
Definition GPSUpdate.h:159
clockwerk::DataIO< clockwerk::Matrix< 16, 16 > > state_cov
Definition GPSUpdate.h:163
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > gyroBias_B_pI__pI
Definition GPSUpdate.h:154
clockwerk::DataIO< clockwerk::Time > state_output_time_stamp
Definition GPSUpdate.h:167
clockwerk::DataIO< clockwerk::Quaternion > quat_B_pI
Definition GPSUpdate.h:149
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > pre_residual
Definition GPSUpdate.h:169
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > post_residual
Definition GPSUpdate.h:171
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > vel_B_pI__pI
Definition GPSUpdate.h:145
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > GPS_meas_noise
Definition GPSUpdate.h:71
clockwerk::DataIO< clockwerk::Time > time_diff_stale_bound
Definition GPSUpdate.h:66
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > pos_pI_tI__pI
Definition GPSUpdate.h:76
clockwerk::DataIO< clockwerk::CartesianVector< 3 > > pos_GPS_B__B
Definition GPSUpdate.h:79