Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Gemini Flight Logs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Skyward
Flight Logs
Gemini Flight Logs
Commits
0f21977e
Commit
0f21977e
authored
1 year ago
by
Marco Marchesi
Browse files
Options
Downloads
Patches
Plain Diff
MEA working on different NAS output now
parent
afa6caf3
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
RoccarasoFlight/postprocessing/GNC/postProcess.m
+16
-6
16 additions, 6 deletions
RoccarasoFlight/postprocessing/GNC/postProcess.m
RoccarasoFlight/postprocessing/commonFunctions/Kalman/run_MEA.m
+5
-5
5 additions, 5 deletions
...asoFlight/postprocessing/commonFunctions/Kalman/run_MEA.m
with
21 additions
and
11 deletions
RoccarasoFlight/postprocessing/GNC/postProcess.m
+
16
−
6
View file @
0f21977e
...
...
@@ -109,7 +109,7 @@ title('Mass finite difference 1HZ vs venting valve')
%% NAS obsw vs NAS risimulato
% build sensors
sensorTot
.
nas
.
time
=
main
.
NASData
(:,
1
);
sensorTot
.
nas
.
states
=
[
main
.
NASData
(
1
,
2
:
end
-
4
),
0
,
0.6428
,
0
,
0.7660
];
sensorTot
.
nas
.
states
=
[
main
.
NASData
(
1
,
2
:
end
)
];
sensorTot
.
nas
.
n_old
=
2
;
sensorTot
.
nas
.
P
=
eye
(
12
);
sensorTot
.
nas
.
P
(
3
,
3
)
=
10
;
...
...
@@ -177,6 +177,8 @@ nas.flagPitotCorrection = false;
nas
.
flagPitotCorrection
=
true
;
[
sensorTot_WithPitot
]
=
run_NAS
(
XYZ0
*
0.01
,
sensorTot
,
nas
);
sensorTot_OBSW
.
nas
.
time
=
main
.
NASData
(:,
1
);
sensorTot_OBSW
.
nas
.
states
=
main
.
NASData
(:,
2
:
end
);
Nr
=
3
;
Nc
=
2
;
...
...
@@ -383,7 +385,7 @@ ada.v_thr = 2.5;
ada
.
count_thr
=
5
;
[
sensorTot
,
ada
]
=
run_ADA
(
sensorTot
,
ada
);
%%
Nr
=
2
;
Nc
=
2
;
...
...
@@ -455,7 +457,9 @@ mea.engine_model_A1 = [mea.model.F_11,mea.model.F_12,mea.model.F_13;mea.model.F_
mea
.
engine_model_B1
=
[
mea
.
model
.
B_1
;
mea
.
model
.
B_2
;
mea
.
model
.
B_3
];
mea
.
engine_model_C1
=
[
mea
.
model
.
C_1
,
mea
.
model
.
C_2
,
mea
.
model
.
C_3
];
[
sensorTot
]
=
run_MEA
(
sensorTot
,
sensorTot_NoPitot
,
mea
);
[
sensorTot_OBSW
]
=
run_MEA
(
sensorTot
,
sensorTot_OBSW
,
mea
);
[
sensorTot_NoPitot
]
=
run_MEA
(
sensorTot
,
sensorTot_NoPitot
,
mea
);
[
sensorTot_WithPitot
]
=
run_MEA
(
sensorTot
,
sensorTot_WithPitot
,
mea
);
figure
sgtitle
(
'MEA Comparison'
)
...
...
@@ -463,15 +467,19 @@ sgtitle('MEA Comparison')
subplot
(
3
,
1
,
1
)
plot
(
main
.
MEAControllerStatus
(
main
.
MEAControllerStatus
(:,
1
)
<
t_end
,
1
),
main
.
MEAControllerStatus
(
main
.
MEAControllerStatus
(:,
1
)
<
t_end
,
2
),
'DisplayName'
,
'OBSW'
)
hold
on
;
plot
(
sensorTot
.
mea
.
time
,
sensorTot
.
mea
.
estimatedMass
,
'DisplayName'
,
'Simulator'
)
plot
(
sensorTot_OBSW
.
mea
.
time
,
sensorTot_OBSW
.
mea
.
estimatedMass
,
'DisplayName'
,
'Simulator OBSW'
)
plot
(
sensorTot_NoPitot
.
mea
.
time
,
sensorTot_NoPitot
.
mea
.
estimatedMass
,
'DisplayName'
,
'Simulator NoPitot'
)
plot
(
sensorTot_WithPitot
.
mea
.
time
,
sensorTot_WithPitot
.
mea
.
estimatedMass
,
'DisplayName'
,
'Simulator WithPitot'
)
legend
title
(
'Estimated Mass'
)
xlabel
(
'Time [s]'
)
ylabel
(
'Mass [kg]'
)
% pressure
subplot
(
3
,
1
,
2
)
plot
(
sensorTot
.
mea
.
time
,
sensorTot
.
mea
.
estimatedPressure
,
'DisplayName'
,
'Simulator'
)
plot
(
sensorTot
_OBSW
.
mea
.
time
,
sensorTot
_OBSW
.
mea
.
estimatedPressure
,
'DisplayName'
,
'Simulator
OBSW
'
)
hold
on
;
plot
(
sensorTot_NoPitot
.
mea
.
time
,
sensorTot_NoPitot
.
mea
.
estimatedPressure
,
'DisplayName'
,
'Simulator NoPitot'
)
plot
(
sensorTot_WithPitot
.
mea
.
time
,
sensorTot_WithPitot
.
mea
.
estimatedPressure
,
'DisplayName'
,
'Simulator WithPitot'
)
plot
(
motor
.
CC_PRESSURE
(
motor
.
CC_PRESSURE
(:,
1
)
<
t_end
,
1
)
,
motor
.
CC_PRESSURE
(
motor
.
CC_PRESSURE
(:,
1
)
<
t_end
,
2
),
'DisplayName'
,
'Pressure sensor'
)
title
(
'Pressure'
)
legend
...
...
@@ -481,7 +489,9 @@ ylabel('Pressure [Pa]')
subplot
(
3
,
1
,
3
)
plot
(
main
.
MEAControllerStatus
(
main
.
MEAControllerStatus
(:,
1
)
<
t_end
,
1
),
main
.
MEAControllerStatus
(
main
.
MEAControllerStatus
(:,
1
)
<
t_end
,
3
),
'DisplayName'
,
'OBSW'
)
hold
on
;
plot
(
sensorTot
.
mea
.
time
,
sensorTot
.
mea
.
predictedApogee
,
'DisplayName'
,
'Simulator'
);
plot
(
sensorTot_OBSW
.
mea
.
time
,
sensorTot_OBSW
.
mea
.
predictedApogee
,
'DisplayName'
,
'Simulator OBSW'
);
plot
(
sensorTot_NoPitot
.
mea
.
time
,
sensorTot_NoPitot
.
mea
.
predictedApogee
,
'DisplayName'
,
'Simulator NoPitot'
)
plot
(
sensorTot_WithPitot
.
mea
.
time
,
sensorTot_WithPitot
.
mea
.
predictedApogee
,
'DisplayName'
,
'Simulator WithPitot'
)
plot
(
main
.
NASData
(
main
.
NASData
(:,
1
)
<
t_end
,
1
),
-
main
.
NASData
(
main
.
NASData
(:,
1
)
<
t_end
,
4
),
'DisplayName'
,
'NAS Altitude'
)
yline
(
main
.
MEATarget
,
'--'
,
'SHUTDOWN TARGET'
,
'HandleVisibility'
,
'off'
)
legend
...
...
This diff is collapsed.
Click to expand it.
RoccarasoFlight/postprocessing/commonFunctions/Kalman/run_MEA.m
+
5
−
5
View file @
0f21977e
function
[
sensorTot
]
=
run_MEA
(
sensorTot
,
sensorTotNAS
,
mea
)
function
[
sensorTot
NAS
]
=
run_MEA
(
sensorTot
,
sensorTotNAS
,
mea
)
% mass estimation
...
...
@@ -71,10 +71,10 @@ predictedApogee = -z_nas + 1./(2.*( 0.5.*rho .* CD .* Surf ./ estimatedMass))...
.*
log
(
1
+
(
vz_nas
.^
2
.*
(
0.5
.*
rho
.*
CD
.*
Surf
)
.
/
estimatedMass
)
.
/
9.81
);
% update total state
sensorTot
.
mea
.
estimatedPressure
=
estimatedPressure
;
sensorTot
.
mea
.
estimatedMass
=
estimatedMass
;
sensorTot
.
mea
.
predictedApogee
=
predictedApogee
;
sensorTot
.
mea
.
time
=
t_mea
;
sensorTot
NAS
.
mea
.
estimatedPressure
=
estimatedPressure
;
sensorTot
NAS
.
mea
.
estimatedMass
=
estimatedMass
;
sensorTot
NAS
.
mea
.
predictedApogee
=
predictedApogee
;
sensorTot
NAS
.
mea
.
time
=
t_mea
;
end
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment