Skip to content

Commit

Permalink
Updating updateAndPlotRecList + bug fix getMeanTime
Browse files Browse the repository at this point in the history
  • Loading branch information
clicat committed Nov 20, 2018
1 parent 0994c3f commit 12a9c43
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions goGPS/obj/GUI/GUI_Main.m
Original file line number Diff line number Diff line change
Expand Up @@ -1707,6 +1707,11 @@ function updateAndCheckRecList(this, caller, event)
end

function updateAndPlotRecList(this, caller, event)
% Update file name list and plot daily availability of the files
%
% SYNTAX:
% this.updateAndPlotRecList

% Get file name list
state = Global_Configuration.getCurrentSettings;
state.updateObsFileName;
Expand Down Expand Up @@ -1734,13 +1739,14 @@ function updateAndPlotRecList(this, caller, event)

y_strt = y_strt.getMatlabTime();
y_stop = y_stop.getMatlabTime();
f = figure; f.Name = sprintf('%03d: Rinex File Availability %d', f.Number, year); f.NumberTitle = 'off'; hold on;
f = figure; f.Name = sprintf('%03d: Daily RINEX File Availability %d', f.Number, year); f.NumberTitle = 'off'; hold on;
line([week_time week_time], [0 n_rec+1],'Color',[0.8 0.8 0.8],'LineStyle',':');
for r = 1 : n_rec
central_time = GPS_Time.getMeanTime(fr{r}.first_epoch , fr{r}.last_epoch).getMatlabTime;
central_time = central_time(central_time >= y_strt & central_time <= y_stop);
line([y_strt y_stop], [r r],'Color',[0.4 0.4 0.4],'LineStyle',':');
plot(central_time, r * ones(size(central_time)),'.');
line([y_strt y_stop], [r r],'Color',[0.4 0.4 0.4],'LineStyle',':', 'LineWidth', 1);
plot(central_time, r * ones(size(central_time)),'.', 'MarkerSize', 15, 'Color', Core_UI.getColor(r, n_rec));
plot([fr{r}.first_epoch.getMatlabTime fr{r}.last_epoch.getMatlabTime], r * [1 1], ':', 'Color', Core_UI.getColor(r, n_rec), 'LineWidth', 2);
end

xlim([max(sss_strt.getMatlabTime, y_strt) min(sss_stop.getMatlabTime, y_stop)]);
Expand Down
4 changes: 2 additions & 2 deletions goGPS/obj/utils/GPS_Time.m
Original file line number Diff line number Diff line change
Expand Up @@ -1896,14 +1896,14 @@ function empty(this)
end

function gps_mean = getMeanTime(gps_time1, gps_time2)
% given two gps time with the same number of epochs, retun the
% Given two gps time with the same number of epochs, retun the
% mean time between each epochs
%
% SYNTAX
% gps_mean = GPS_time.getCentralTime(gps_time1, gps_time2)
gps_diff = gps_time2 - gps_time1;
gps_mean = gps_time1.getCopy;
gps_mean = gps_mean.addSeconds(gps_diff);
gps_mean = gps_mean.addSeconds(gps_diff/2);
end
end

Expand Down

0 comments on commit 12a9c43

Please sign in to comment.