From 1791e8ffd0b55d3d59bf67024540b1d84b8c81d9 Mon Sep 17 00:00:00 2001 From: Ashiv Dhondea Date: Wed, 7 Feb 2018 13:59:14 +0400 Subject: [PATCH] Delete LinearDynamicsFunctions.py --- .../LinearDynamicsFunctions.py | 37 ------------------- 1 file changed, 37 deletions(-) delete mode 100644 examples/spring_mass_problem/LinearDynamicsFunctions.py diff --git a/examples/spring_mass_problem/LinearDynamicsFunctions.py b/examples/spring_mass_problem/LinearDynamicsFunctions.py deleted file mode 100644 index 8e06fd5..0000000 --- a/examples/spring_mass_problem/LinearDynamicsFunctions.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Created on 13 October 2017 - -Library for dynamics functions for deterministic and stochastic linear dynamics. - -@author: Ashiv Dhondea -""" -import numpy as np -import math -import MathsFunctions as MathsFn -# ------------------------------------------------------------------------- # -def fn_Generate_STM_polynom(zeta,nStates): - """ - fn_Generate_STM_polynom creates the state transition matrix for polynomial models - of degree (nStates-1) over a span of transition of zeta [s]. - Polynomial models are a subset of the class of constant-coefficient linear DEs. - Refer to: Tracking Filter Engineering, Norman Morrison. - """ - stm = np.eye(nStates,dtype=np.float64); - for yindex in range (0,nStates): - for xindex in range (yindex,nStates): # STM is upper triangular - stm[yindex,xindex] = np.power(zeta,xindex-yindex)/float(math.factorial(xindex-yindex)); - return stm; - -def fn_Generate_STM_polynom_3D(zeta,nStates,dimensionality): - """ - fn_Generate_STM_polynom_3D generates the full state transition matrix for - the required dimensionality. - - if dimensionality == 3, the problem is 3-dimensional. - The state vector is thus defined as - [x,xdot,xddot,y,ydot,yddot,z,zdot,zddot] - """ - stm = fn_Generate_STM_polynom(zeta,nStates); - stm3 = MathsFn.fn_Create_Concatenated_Block_Diag_Matrix(stm,dimensionality-1); - return stm3;