From 6c83fe04d0009413e7447a1c6c355a78eef29762 Mon Sep 17 00:00:00 2001 From: "Claudio (xjobb Martina)" <claudio@neumann.control.lth.se> Date: Tue, 11 Sep 2018 14:43:46 +0200 Subject: [PATCH] inizio scrittura model --- GPS_pw_modeling.mo | 10 +++++----- matlab/GPSaidedINS.m | 2 +- paper/main.tex | 1 + paper/sections/03-model.tex | 1 + 4 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 paper/sections/03-model.tex diff --git a/GPS_pw_modeling.mo b/GPS_pw_modeling.mo index f89b014..7447a49 100644 --- a/GPS_pw_modeling.mo +++ b/GPS_pw_modeling.mo @@ -272,9 +272,9 @@ package GPS_pw_modeling //Inputs and outputs // /////////////////////// Modelica.Blocks.Interfaces.IntegerInput visible_satellites annotation( - Placement(visible = true, transformation(origin = {-101, 101}, extent = {{-11, -11}, {11, 11}}, rotation = 0), iconTransformation(origin = {-94, 2}, extent = {{-26, -26}, {26, 26}}, rotation = 0))); + Placement(visible = true, transformation(origin = {-101, 101}, extent = {{-11, -11}, {11, 11}}, rotation = 0), iconTransformation(origin = {-2, 102}, extent = {{-26, -26}, {26, 26}}, rotation = -90))); Modelica.Blocks.Interfaces.BooleanInput on_signal annotation( - Placement(visible = true, transformation(origin = {-158, 92}, extent = {{-12, -12}, {12, 12}}, rotation = 0), iconTransformation(origin = {-40, 100}, extent = {{-20, -20}, {20, 20}}, rotation = -90))); + Placement(visible = true, transformation(origin = {-158, 92}, extent = {{-12, -12}, {12, 12}}, rotation = 0), iconTransformation(origin = {-100, 0}, extent = {{-20, -20}, {20, 20}}, rotation = 0))); Modelica.Blocks.Interfaces.RealOutput power annotation( Placement(visible = true, transformation(origin = {54, 104}, extent = {{8, -8}, {-8, 8}}, rotation = 0), iconTransformation(origin = {95, 43}, extent = {{-25, -25}, {25, 25}}, rotation = 180))); //not really an input signal but just the negation of the on signal, still used as an input @@ -338,7 +338,7 @@ package GPS_pw_modeling Modelica.StateGraph.Transition lose_visibility2(condition = sv_freq_phase < required_satellites) annotation( Placement(visible = true, transformation(origin = {110, -6}, extent = {{10, -10}, {-10, 10}}, rotation = 90))); Modelica.Blocks.Interfaces.BooleanOutput position annotation( - Placement(visible = true, transformation(origin = {162, 30}, extent = {{10, -10}, {-10, 10}}, rotation = 0), iconTransformation(origin = {95, -43}, extent = {{25, -25}, {-25, 25}}, rotation = 0))); + Placement(visible = true, transformation(origin = {162, 30}, extent = {{10, -10}, {-10, 10}}, rotation = 0), iconTransformation(origin = {95, -27}, extent = {{25, -25}, {-25, 25}}, rotation = 0))); equation connect(lose_visibility2.outPort, warm_start.inPort[2]) annotation( Line(points = {{110, -8}, {110, -8}, {110, -58}, {50, -58}, {50, -48}, {50, -48}})); @@ -438,11 +438,11 @@ package GPS_pw_modeling sv_ephemeris := 0; end when; annotation( - Icon(graphics = {Rectangle(fillColor = {115, 210, 22}, fillPattern = FillPattern.Solid, extent = {{-96, 96}, {96, -96}}), Text(origin = {-40, 70}, extent = {{-20, 8}, {20, -8}}, textString = "turn_on"), Text(origin = {-51, 7}, extent = {{-17, 9}, {91, -15}}, textString = "visible_satellites"), Text(origin = {50, 41}, extent = {{-72, 15}, {22, -9}}, textString = "power_consumption"), Text(origin = {22, -41}, extent = {{-50, 11}, {50, -11}}, textString = "position_avaialble")}), + Icon(graphics = {Rectangle(fillColor = {115, 210, 22}, fillPattern = FillPattern.Solid, extent = {{-96, 96}, {96, -96}}), Text(origin = {-54, 2}, extent = {{-20, 8}, {20, -8}}, textString = "turn_on"), Text(origin = {-45, 73}, extent = {{-17, 9}, {91, -15}}, textString = "visible_satellites"), Text(origin = {44, 41}, extent = {{-72, 15}, {22, -9}}, textString = "power_consumption"), Text(origin = {20, -27}, extent = {{-50, 11}, {50, -11}}, textString = "position_avaialble"), Text(origin = {11, -80}, extent = {{-97, 32}, {79, -24}}, textString = "GPS device")}, coordinateSystem(initialScale = 0.1)), experiment(StartTime = 0, StopTime = 400, Tolerance = 1e-6, Interval = 0.0008)); end GPS_pw_simulator; annotation( uses(Modelica(version = "3.2.1"))); -end GPS_pw_modeling; +end GPS_pw_modeling; \ No newline at end of file diff --git a/matlab/GPSaidedINS.m b/matlab/GPSaidedINS.m index 6d7a347..db8a4ce 100644 --- a/matlab/GPSaidedINS.m +++ b/matlab/GPSaidedINS.m @@ -81,7 +81,7 @@ for k=2:N sv=5; %control action a=[a,sum(sqrt(out_data.diag_P(1:3,k-1)))]; - if sum(sqrt(out_data.diag_P(1:3,k-1)))<1.0 + if sum(sqrt(out_data.diag_P(1:3,k-1)))<15.0 turn=false; else turn=true; diff --git a/paper/main.tex b/paper/main.tex index 95fe760..e6d8513 100644 --- a/paper/main.tex +++ b/paper/main.tex @@ -61,6 +61,7 @@ Politecnico di Milano, Italy% \section{GPS receiver model} \label{sec:gps} +\input{sections/03-model} \section{Sensor fusion} \label{sec:fusion} diff --git a/paper/sections/03-model.tex b/paper/sections/03-model.tex new file mode 100644 index 0000000..72943a1 --- /dev/null +++ b/paper/sections/03-model.tex @@ -0,0 +1 @@ +aaa -- GitLab