![]() |
ModelSpace
Documentation for ModelSpace models and classes.
|
Model to implement 6-DOF dynamics. More...
#include <SixDOFDynamicsModel.h>

Classes | |
| struct | Inputs |
| struct | Outputs |
| struct | Params |
Public Member Functions | |
| SixDOFDynamicsModel (cfspp::FlightExecutive &executive) | |
| virtual | ~SixDOFDynamicsModel () |
| void | reset () |
| Function to reset our integrator for next step. More... | |
Public Member Functions inherited from cfspp::App | |
| App (FlightExecutive &executive, const char *name, uint16 apid, uint8 instance=0) | |
| Executive-based constructor for the task. More... | |
| virtual | ~App () |
| Destructor. Doesn't really do anything. More... | |
| int16 | startup () |
| Initialize the app. Should be called once before step. More... | |
| int16 | step () |
| Step the app by a single step. Maps params, inputs, etc. to outputs. More... | |
| virtual int16 | activate () |
| Activate the app. The app will step when active. More... | |
| virtual int16 | deactivate () |
| Deactivate the app. The app will not step when deactivated. More... | |
| virtual int16 | command (uint16 apid, uint8 *buffer, uint16 size) |
| Process commands issued to the app. More... | |
| log_level_e | logLevel () |
| Get the log level set for the executive. More... | |
| void | logLevel (log_level_e log_level) |
| Set the executive log level. More... | |
| bool | isStarted () |
| Return whether task startup has been run. More... | |
| uint16 | apid () |
| Get the apid for this app. More... | |
| uint8 & | instance () |
| Get the instance of this app (used to differentiate between multiple instances of the same app) More... | |
Public Member Functions inherited from clockwerk::GraphTreeObject | |
| GraphTreeObject (const char *gt_nme="", GraphTreeObject **storage_array=nullptr, uint32 storage_size=0) | |
| Name-based constructor for GraphTreeObject which will have no children by default. More... | |
| virtual | ~GraphTreeObject () |
| Destructor. More... | |
| GraphTreeObject * | parent () |
| Functions to get object's parent/children. More... | |
| GraphTreeObject ** | children () |
| GraphTreeObject * | childAtIndex (uint8 i) const |
| int16 | parent (GraphTreeObject *new_parent) |
| Function to assign the node's parent via pointer. More... | |
| int16 | parent (GraphTreeObject &new_parent) |
| Function to assign the node's parent via reference. More... | |
| uint8 | nChildren () const |
| Getters for number of children and descendants. More... | |
| uint16 | nDescendants () const |
| uint8 | capacity () const |
| const char * | name () const |
| Getter and setter for object name. More... | |
| int16 | name (const char *new_name) |
| uint8 | rank () |
| Getter for the object rank. More... | |
| int8 | type () |
| Function to indicate type – -1 by default unless implemented downstream. More... | |
| bool | loggable () |
| Getter for object logability flag – note no setter because should only be set by this or a derived class in its definition. More... | |
| GraphTreeObject * | getRootDataPointer () |
| Get the pointer to the highest object in the graph tree. More... | |
| virtual int16 | str (char *output, size_t size) const |
| Get object represented as string. More... | |
| virtual int16 | fromStr (const char *val) |
| Set value of graphtreeobject from string. More... | |
Public Attributes | |
| Params | params = Params(this, "params") |
| Inputs | inputs = Inputs(this, "inputs") |
| Outputs | outputs = Outputs(this, "outputs") |
Public Attributes inherited from cfspp::App | |
| clockwerk::DataIO< bool > | active = clockwerk::DataIO<bool>(this, "active", true) |
| The active flag for the task – set to true by default. More... | |
Protected Member Functions | |
| int16 | start () override |
| int16 | execute () override |
| int | _integrateRecursiveForwardEuler (Frame *frame_ptr) |
| Function to recursively integrate the frame tree via forward euler. More... | |
| int | _integrateRecursiveRk4 (Frame *frame_ptr) |
| Function to recursively integrate the frame tree via RK4. More... | |
| int | _recurseRefreshFrameIntegratorSet (Frame *frame_ptr) |
| Function to recursively loop through frames and set their integrators. More... | |
Protected Member Functions inherited from clockwerk::GraphTreeObject | |
| int16 | _setStorage (GraphTreeObject **storage_array, uint8 storage_size) |
| Getter for object's string address. More... | |
| void | _recalculateDescendants () |
| Function to recursively re-calculate the number of descendants of a given node on the tree. More... | |
| void | _recalculateRank () |
| Function to recursively re-calculate the rank of a given node on the tree. More... | |
| int16 | _addChild (GraphTreeObject *child) |
| Function to decompose a string into a series of substrings via indexing. More... | |
| int16 | _removeChild (GraphTreeObject *child) |
| Function to remove a child from the graph node's children. More... | |
Protected Attributes | |
| unsigned int | _integrator_step_num = 0 |
| Variables to track integrator type and steps. More... | |
| unsigned int | _integrator_steps_per_step = 0 |
| std::list< cfspp::ForwardEulerIntegrator< NUM_INTEGRATED_STATES > > | _fe_integrators |
| Vectors of integrators – allows for dynamic integrator numbers. More... | |
| std::list< cfspp::RK4Integrator< NUM_INTEGRATED_STATES > > | _rk4_integrators |
| cfspp::RK4Integrator< NUM_INTEGRATED_STATES > * | _rk4_ptr |
| cfspp::ForwardEulerIntegrator< NUM_INTEGRATED_STATES > * | _fe_ptr |
| FrameDynamics | _frame_dynamics |
| Our dynamics model for frames. More... | |
| std::array< double, NUM_INTEGRATED_STATES > | _tmp_state |
| std::vector< GraphTreeObject * > | _frame_children |
| clockwerk::Time | _half_step_size |
| Temporary variable for time calculation in RK4. More... | |
Protected Attributes inherited from cfspp::App | |
| FlightExecutive & | exc |
| Override our executive to include the FlightExecutive instead. More... | |
| int16 | _error = 0 |
| Internal variable to track and return error on app step through. More... | |
| uint16 | _apid = 0 |
| Internal variable to hold the APID for this app. More... | |
| bool | _is_started = false |
| Flag indicating whether app has been started or not. More... | |
| log_level_e | _local_log_level = log_level_e::LOG_WARNING |
| The log level for this particular app. More... | |
| GraphTreeObject * | _app_children [MAXIMUM_APP_CHILDREN] |
| Local storage for App children so it can live on the graph tree. More... | |
| uint8 | _instance |
| Instance number of this app. Used to differentiate between multiple instances of the same app. More... | |
Protected Attributes inherited from clockwerk::GraphTreeObject | |
| GraphTreeObject * | _parent = nullptr |
| GraphTreeObject ** | _children_ptr = nullptr |
| uint32 | _max_num_children = 0 |
| uint16 | _num_descendants = 0 |
| char | _name [MAXIMUM_NAME_CHARS] = "" |
| String name for object. More... | |
| uint8 | _num_children = 0 |
| Number of direct children of the tree (not including the tree itself) More... | |
| uint8 | _rank = 0 |
| int8 | _graph_tree_type = BASE_GRAPH_TREE |
| Variable to store graph tree object type. More... | |
| bool | _loggable = false |
| Variable to indicate whether the selected object is loggable. Set to false by default. More... | |
| uint32 | _index = 0 |
| Index pointing to the next write location for the graph tree children. More... | |
Model to implement 6-DOF dynamics.
This file defines the dynamics used for 6-DOF simulation.
It inherits from the classical model architecture, but is designed to execute in a manner that propagates dynamics forward in time.
Tasks executed and order of operations: Start step: Nothing Derivative:
Key restrictions
| modelspace::SixDOFDynamicsModel::SixDOFDynamicsModel | ( | cfspp::FlightExecutive & | executive | ) |
Model-specific implementations of startup and derivative Must be scheduled manually to derivative
|
inlinevirtual |
|
protected |
Function to recursively integrate the frame tree via forward euler.
| frame_ptr | Pointer to the root frame |
|
protected |
Function to recursively integrate the frame tree via RK4.
| frame_ptr | Pointer to the root frame |
|
protected |
Function to recursively loop through frames and set their integrators.
|
overrideprotectedvirtual |
Reimplemented from cfspp::App.
|
inline |
Function to reset our integrator for next step.
|
overrideprotectedvirtual |
Reimplemented from cfspp::App.
|
protected |
Vectors of integrators – allows for dynamic integrator numbers.
|
protected |
|
protected |
|
protected |
Our dynamics model for frames.
|
protected |
Temporary variable for time calculation in RK4.
|
protected |
Variables to track integrator type and steps.
|
protected |
|
protected |
|
protected |
|
protected |
Temporary variables to hold state output from integrator and frame children for recursion