Skip to content
Snippets Groups Projects
Commit 88e9d081 authored by Claudio Mandrioli's avatar Claudio Mandrioli
Browse files

dati immagini

parent 13f09555
Branches
Tags
No related merge requests found
......@@ -37,6 +37,7 @@ t=in_data.IMU.t;
%% Information fusion
start_sim=822799; %start index of time vector of IMU
length_sim=20000;
[is, where]=ismember(in_data.IMU.t(start_sim),in_data.GNSS.t); %find same start on GPS time vector
ctr_gnss_data=where;
GPS_position=true;
......@@ -78,7 +79,7 @@ P_store=0; %store summed valued of the trace of P in time
sv_store=sv; %store number of visible satellites in time
%for k=2:N
for k=start_sim:start_sim+20000
for k=start_sim:start_sim+length_sim
% Sampling period
Ts=0.01;%t(k)-t(k-1);
......@@ -176,14 +177,15 @@ end
%% output for simulation of energy-accuracy tradeoff
out_data.energy=energy;
xest = out_data.x_h(2,:);
yest = out_data.x_h(1,:);
xest = out_data.x_h(2,:);%start_sim:start_sim+length_sim);
yest = out_data.x_h(1,:);%start_sim:start_sim+length_sim);
xgps = interp1(in_data.GNSS.t,in_data.GNSS.pos_ned(2,:),in_data.IMU.t,'linear','extrap')';
ygps = interp1(in_data.GNSS.t,in_data.GNSS.pos_ned(1,:),in_data.IMU.t,'linear','extrap')';
xerr = xest - xgps;
yerr = yest - ygps;
out_data.error = sqrt(mean(xerr.^2+yerr.^2));
out_data.P=P_store;
out_data.P_store=P_store;
out_data.turn=turn_store;
end
......
......@@ -30,8 +30,8 @@ required_sv= 4;
%define how long ephemeris data last
ephDuration=1800.0;
%bounds for time required for fetching freq and phase
fp_lower=0.2;
fp_upper=1.5;
fp_lower=20.2;
fp_upper=500.5;
%% initialize output
sensor = sensor_in;
......
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Main script for pAN_ powe aware navigation with sensor fusion
% Main script for PAN_ powe aware navigation with sensor fusion
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% change input data load and script to be run to switch from car to bike
%% Load data
disp('Loads data')
load('GNSSaidedINS_data.mat');
%load('cycling_input_data');
%load('GNSSaidedINS_data.mat');
load('cycling_input_data');
%% Load filter settings
disp('Loads settings')
settings=get_settings();
%settings=get_settings_cycling();
settings.P_treshold=4.1;
%settings=get_settings();
settings=get_settings_cycling();
settings.P_treshold=2.5;
%% Run the GNSS-aided INS
disp('Runs the GNSS-aided INS')
out_data=GPSaidedINS(in_data,settings);
%out_data=GPSaidedINS_cycling(in_data,settings);
%out_data=GPSaidedINS(in_data,settings);
out_data=GPSaidedINS_cycling(in_data,settings);
%% Plot the data
disp('Plot data')
......
......@@ -13,7 +13,7 @@ color=[[0.7,0.0,0.0];[0.0,0.7,0.0];[0.7,0.0,0.7];[0.0,0.0,0.7];[0.0,0.7,0.7];[0.
%vector of refrences for P
P_treshold=[4.0,5.0,6.0,8.0,10.0,12.0];
%nubmer of runs per each P
n_run=3;
n_run=30;
%allocate memory for output
energy=zeros(n_run,length(P_treshold));
error=zeros(n_run,length(P_treshold));
......
This diff is collapsed.
File added
File added
File added
File added
%% img_control_car
%img_control_car= [out_data_41.turn;out_data_41.P_store;out_data_sat.turn;out_data_sat.P_store];
%load('img_control_car.mat')
%csvwrite('img_control_car.csv',img_control_car)
%% img trace car
%plot gps alone
%plot(img_trace_car.gps(2,:),img_trace_car.gps(1,:))
%plot trace when P ref = 4.1
%plot(trace_P_41(2,:),trace_P_41(1,:))
% load('img_trace_car.mat')
%plot(car_trace.gps(2,:),car_trace.gps(1,:))
%figure
%plot(car_trace.P41(2,:),car_trace.P41(1,:))
%figure
%plot(car_trace.Psat(2,:),car_trace.Psat(1,:))
%% img trace cycling
%inizio coordinate gps di interesse:
% colonna 822799, valori 71371, 56004
%img_cycling_trace.Psat=out_data.x_h(1:2,822799:842799)
%img_cycling_trace.P25=out_data.x_h(1:2,822799:842799)
%colonna inizio valori interesse gps 7864
%colonna fine valori interesse gps 8065
%img_cycling_trace.gps=in_data.GNSS.pos_ned(1:2,7864:8065)
%% img cyccling control
%img_cycling_control.Psat=out_data.P_store;
%img_cycling_control.turnsat=out_data.turn;
%img_cycling_control.P41=out_data.P_store;
%img_cycling_control.turnP41=out_data.turn;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment