-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New functions added to the live_scripts folder
- Loading branch information
Showing
7 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
function Lbh = Lbh(heading_deg, pitch_deg, phi) | ||
% Rotation matrix from NED axis to Aircraft's body axis | ||
sps = sind(heading_deg); | ||
cps = cosd(heading_deg); | ||
sth = sind(pitch_deg); | ||
cth = cosd(pitch_deg); | ||
sph = sind(phi); | ||
cph = cosd(phi); | ||
Lb1 = [... | ||
1 0 0 | ||
0 cph sph | ||
0 -sph cph]; | ||
L12 = [... | ||
cth 0 -sth | ||
0 1 0 | ||
sth 0 cth]; | ||
L2h = [... | ||
cps sps 0 | ||
-sps cps 0 | ||
0 0 1]; | ||
Lbh = Lb1 * L12 * L2h; | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
function Lbw = Lbw(angle_of_attack, angle_of_sideslip) | ||
% Rotation matrix from Wind-axis to Aircraft's body axis | ||
sa = sind(angle_of_attack); | ||
ca = cosd(angle_of_attack); | ||
sb = sind(angle_of_sideslip); | ||
cb = cosd(angle_of_sideslip); | ||
Lbw = [... | ||
ca*cb -ca*sb -sa | ||
sb cb 0 | ||
sa*cb -sa*sb ca]; | ||
end |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.