Update the initialization functions
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
% Nano Hexapod
|
||||
% :PROPERTIES:
|
||||
% :header-args:matlab+: :tangle src/initializeNanoHexapod.m
|
||||
% :header-args:matlab+: :tangle ../src/initializeNanoHexapod.m
|
||||
% :header-args:matlab+: :comments org :mkdirp yes
|
||||
% :header-args:matlab+: :eval no :results none
|
||||
% :END:
|
||||
% <<sec:initializeNanoHexapod>>
|
||||
|
||||
% This Matlab function is accessible [[file:src/initializeNanoHexapod.m][here]].
|
||||
% This Matlab function is accessible [[file:../src/initializeNanoHexapod.m][here]].
|
||||
|
||||
|
||||
function [nano_hexapod] = initializeNanoHexapod(opts_param)
|
||||
@@ -85,7 +85,7 @@ function [nano_hexapod] = initializeNanoHexapod(opts_param)
|
||||
SP.color.bottom = [0.7 0.7 0.7]; % [rgb]
|
||||
SP.color.top = [0.7 0.7 0.7]; % [rgb]
|
||||
SP.k.ax = 0; % [N*m/deg]
|
||||
SP.ksi.ax = 3;
|
||||
SP.ksi.ax = 0;
|
||||
|
||||
SP.thickness.bottom = SP.height.bottom-Leg.sphere.bottom; % [mm]
|
||||
SP.thickness.top = SP.height.top-Leg.sphere.top; % [mm]
|
||||
@@ -115,7 +115,11 @@ function [nano_hexapod] = initializeNanoHexapod(opts_param)
|
||||
function [element] = updateDamping(element)
|
||||
field = fieldnames(element.k);
|
||||
for i = 1:length(field)
|
||||
element.c.(field{i}) = 1/element.ksi.(field{i})*sqrt(element.k.(field{i})/element.m);
|
||||
if element.ksi.(field{i}) > 0
|
||||
element.c.(field{i}) = 1/element.ksi.(field{i})*sqrt(element.k.(field{i})/element.m);
|
||||
else
|
||||
element.c.(field{i}) = 0;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user