Skip to content

Commit

Permalink
Finished restructuring the configuration files. Flight and Sim models…
Browse files Browse the repository at this point in the history
… match except for navigation. Ready to start testing the new navigation in HIL
  • Loading branch information
malife committed Apr 23, 2010
1 parent ded0926 commit 9b43793
Show file tree
Hide file tree
Showing 13 changed files with 12,577 additions and 13,809 deletions.
1,790 changes: 0 additions & 1,790 deletions DevBoard.mdl

This file was deleted.

File renamed without changes.
72 changes: 12 additions & 60 deletions HILSim/hilInit.m
@@ -1,70 +1,22 @@
%% Set up the values for the HIL Simulation
HIL_K = 3;


%% Run the standard setup files
run ../InnerOuterLoop/Rascal_Var.m
run ../InnerOuterLoop/innerOuterInit.m
run ../InnerOuterLoop/failuresInit.m

%% Set up the reverse lookup values for PWM to radians
% Rudder
% The Values are as follows:
% -20 -> 2700
% -10 -> 3250
% -5 -> 3475
% 0 -> 3750
% +5 -> 3950
% +10 -> 4200
% +20 -> 4725
% Do not change this variable unless you understand what you are doing.
% This sets the sampling ratio for UDP send/receive data.

rad = [-20 -10 -5 0 5 10 20]*pi/180;
pwm = [2700 3250 3475 3750 3950 4200 4725];
P = polyfit(pwm,rad,1);
mPWMdr = P(1);
bPWMdr = P(2);

% Aileron
% The Values are as follows:
% -20 -> 2450
% -10 -> 3150
% -5 -> 3420
% 0 -> 3700
% +5 -> 3975
% +10 -> 4250
% +20 -> 4900

rad = [-20 -10 -5 0 5 10 20]*pi/180;
pwm = [2450 3150 3420 3700 3975 4250 4900];
P = polyfit(pwm, rad,1);
mPWMda = P(1);
bPWMda = P(2);
HIL_K = 3;

% Elevator
% The Values are as follows:
% -15 -> 2750
% -10 -> 3135
% -5 -> 3425
% 0 -> 3700
% +5 -> 4125
% +10 -> 4450
% +15 -> 4850

rad = [-15 -10 -5 0 5 10 15]*pi/180;
pwm = [2750 3135 3425 3700 4125 4450 4850];
P = polyfit(pwm,rad,1);
mPWMde = P(1);
bPWMde = P(2);
%% Run the standard setup files
run ..\apConfiguration\Rascal_Var.m

% Throttle
% 0 -> 6352/2
% 1 -> 8900/2
% ===== Replace this one with your location file ====
run ..\apConfiguration\gsLocation.m
% ===================================================

rad = [0 1];
pwm = [3176 4450];
P = polyfit(pwm,rad,1);
mPWMdt = P(1);
bPWMdt = P(2);
run ..\apConfiguration\failuresInit.m
run ..\apConfiguration\limits.m
run ..\apConfiguration\pwmConversions.m
run ..\apConfiguration\baroInit.m

%% Override RascalVar values
Pos_0 = [200; 350; 350]'; % Initial position vector (m)
Expand Down

0 comments on commit 9b43793

Please sign in to comment.