Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explanation if autosched is not scheduling until specified end #1

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CODE/VIE_SCHED/SAT_SCHED/auto_sched.m
Original file line number Diff line number Diff line change
@@ -293,6 +293,7 @@

else % Not enough stations left!
flag_next_scan_con = true;
fprintf('WARNING: not enough stations left due to slew-time condition\n');
break;
end % if length(start_jd_list_temp) >= max(2, PARA.MIN_STANUM)

@@ -306,6 +307,7 @@

else % Not enough stations left!
flag_next_scan_con = true;
fprintf('WARNING: not enough stations left due to arrive-time condition. Consider increasing PARA.MAX_WAIT\n');
break;
end % if length(start_jd_list_temp) >= max(2, PARA.MIN_STANUM)

19 changes: 10 additions & 9 deletions CODE/VIE_SCHED/SAT_SCHED/create_elevation_plot.m
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@
% - 2016-12-02: A. Hellerschmied: - Adaptive x-tick labels
% - optionial input arguments to set x-tick units and according interval
% - 2017-01-23: A. Hellerschmied: Fixed small bug in defining x-tick separation
% - 2018-12-20: A. Corbin : unnecessary entries in legend removed
%
%
% inputs :
@@ -265,7 +266,7 @@

% Add Title to Plot
title(['Station: ', stat_data.stat(i_stat).name]);
ylabel('El []');
ylabel('El [deg]');
% xlabel('Duration [hours]');


@@ -283,25 +284,25 @@
for i_sat = 1 : stat_data.number_of_sat
% El. Rate
if (PARA.PLOT_EL_RATE)
sched_handles.el_plot.stat(i_stat).sat(i_sat).h_exceed_max_axis2_rate = plot(t, exceed_max_axis2_rate(i_sat, :), 'Color', current_color(i_sat,:));
sched_handles.el_plot.stat(i_stat).sat(i_sat).h_exceed_max_axis2_rate = plot(t, exceed_max_axis2_rate(i_sat, :), 'Color', current_color(i_sat,:), 'HandleVisibility','off');
set(sched_handles.el_plot.stat(i_stat).sat(i_sat).h_exceed_max_axis2_rate, 'Marker', 'd');
end

% Az. Rate
if (PARA.PLOT_AZ_RATE)
sched_handles.el_plot.stat(i_stat).sat(i_sat).h_exceed_max_axis1_rate = plot(t, exceed_max_axis1_rate(i_sat, :), 'Color', current_color(i_sat,:));
sched_handles.el_plot.stat(i_stat).sat(i_sat).h_exceed_max_axis1_rate = plot(t, exceed_max_axis1_rate(i_sat, :), 'Color', current_color(i_sat,:), 'HandleVisibility','off');
set(sched_handles.el_plot.stat(i_stat).sat(i_sat).h_exceed_max_axis1_rate, 'Marker', 's');
end

% Sun dist.
if (PARA.PLOT_SUN_DIST)
sched_handles.el_plot.stat(i_stat).sat(i_sat).h_exceed_min_sun_dist = plot(t, exceed_min_sun_dist(i_sat, :), 'Color', current_color(i_sat,:));
sched_handles.el_plot.stat(i_stat).sat(i_sat).h_exceed_min_sun_dist = plot(t, exceed_min_sun_dist(i_sat, :), 'Color', current_color(i_sat,:), 'HandleVisibility','off');
set(sched_handles.el_plot.stat(i_stat).sat(i_sat).h_exceed_min_sun_dist, 'Marker', '*');
end

% Axis limits
if (PARA.PLOT_AXIS_LIMITS)
sched_handles.el_plot.stat(i_stat).sat(i_sat).h_exceed_axis_limits = plot(t, exceed_axis_limits(i_sat, :), 'Color', current_color(i_sat,:));
sched_handles.el_plot.stat(i_stat).sat(i_sat).h_exceed_axis_limits = plot(t, exceed_axis_limits(i_sat, :), 'Color', current_color(i_sat,:), 'HandleVisibility','off');
set(sched_handles.el_plot.stat(i_stat).sat(i_sat).h_exceed_axis_limits, 'Marker', 'o');
end

@@ -335,17 +336,17 @@

% Rise
if ~(isempty(stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).rise.year))
sched_handles.el_plot.stat(i_stat).sat(i_sat).overpass(i_overp).h_rise = scatter(stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).rise.jd, stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).rise.el, 'CData', current_color(i_sat,:));
sched_handles.el_plot.stat(i_stat).sat(i_sat).overpass(i_overp).h_rise = scatter(stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).rise.jd, stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).rise.el, 'CData', current_color(i_sat,:), 'HandleVisibility','off');
end

% Peak
for i_peak = 1 : stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).number_of_peaks
sched_handles.el_plot.stat(i_stat).sat(i_sat).overpass(i_overp).h_peak = scatter(stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).peak(i_peak).jd, stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).peak(i_peak).el, 'CData', current_color(i_sat,:));
sched_handles.el_plot.stat(i_stat).sat(i_sat).overpass(i_overp).h_peak = scatter(stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).peak(i_peak).jd, stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).peak(i_peak).el, 'CData', current_color(i_sat,:), 'HandleVisibility','off');
end

% Set
if ~(isempty(stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).set.year))
sched_handles.el_plot.stat(i_stat).sat(i_sat).overpass(i_overp).h_set = scatter(stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).set.jd, stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).set.el, 'CData', current_color(i_sat,:));
sched_handles.el_plot.stat(i_stat).sat(i_sat).overpass(i_overp).h_set = scatter(stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).set.jd, stat_data.stat(i_stat).sat(i_sat).overpass(i_overp).set.el, 'CData', current_color(i_sat,:), 'HandleVisibility','off');
end

end
@@ -411,7 +412,7 @@

% Add Title an Axes Labels to Plot
title('Potential observation periods from station network');
ylabel('El []');
ylabel('El [deg]');

% Plot vertical lines and print time tags:

11 changes: 6 additions & 5 deletions CODE/VIE_SCHED/SAT_SCHED/create_skyplot.m
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
% - 2014-08.28: A. Hellerschmied: plot markers as "timescale" in skyplot.
% - 2015-07-29: A. Hellerschmied: Horizintal mask is plotted additionally to the cut-off elevation
% - 2016-12-22, A. Hellerschmied: - PARA.INIT_PROP_INTERVAL in [sec] instead of [min]
% - 2018-12-20: A. Corbin : unnecessary entries in legend removed
%
%
% inputs :
@@ -143,9 +144,9 @@
% Timescale markers:
if mod(marker_int_min / prop_int_min, 1) == 0 % plot markers
marker_int = marker_int_min / prop_int_min;
[h_plot, h_axis, plotted_sats] = skyplot(az_data, el_data, prn, marker_int, line_style);
[h_plot, h_axis, plotted_sats] = skyplot(az_data, el_data, prn, marker_int, line_style);
else % do not plot time markers
[h_plot, h_axis, plotted_sats] = skyplot(az_data, el_data, prn);
[h_plot, h_axis, plotted_sats] = skyplot(az_data, el_data, prn);
end

% Save handles to structure:
@@ -222,7 +223,7 @@
end % if flag_plot_h_mask

% Plot:
sched_handles.sky_plots(i_stat).h_cut_off_el_marker = line(xx_mask, yy_mask, 'Linestyle', '-.', 'Color', 'red', 'LineWidth', 0.1);
sched_handles.sky_plots(i_stat).h_cut_off_el_marker = line(xx_mask, yy_mask, 'Linestyle', '-.', 'Color', 'red', 'LineWidth', 0.1, 'HandleVisibility','off');


% ##### Get observation type of the antenna #####
@@ -340,7 +341,7 @@
xx_pointer_2 = elSpherical_2 .* sin(pointer_az_rad);

% Plot pointer
sched_handles.sky_plots(i_stat).h_az_end_of_last_obs_pointer = line([xx_pointer_1, xx_pointer_2], [yy_pointer_1, yy_pointer_2], 'color', color_last_scan_end);
sched_handles.sky_plots(i_stat).h_az_end_of_last_obs_pointer = line([xx_pointer_1, xx_pointer_2], [yy_pointer_1, yy_pointer_2], 'color', color_last_scan_end, 'HandleVisibility','off');



@@ -358,7 +359,7 @@
xx_pointer_3 = elSpherical_3 .* sin(pointer_az_rad);

% Plot pointer
sched_handles.sky_plots(i_stat).h_el_end_of_last_obs_pointer = plot(xx_pointer_3, yy_pointer_3, 'x', 'color', color_last_scan_end);
sched_handles.sky_plots(i_stat).h_el_end_of_last_obs_pointer = plot(xx_pointer_3, yy_pointer_3, 'x', 'color', color_last_scan_end, 'HandleVisibility','off');

end

169 changes: 144 additions & 25 deletions CODE/VIE_SCHED/SAT_SCHED/scheduler_interface.m

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions CODE/VIE_SCHED/SAT_SCHED/update_elevation_plot_pointer.m
Original file line number Diff line number Diff line change
@@ -31,6 +31,7 @@
% - error_msg : Error Message (empty, if no errors occured)
%
% CHANGES:
% - 2018-12-20: A. Corbin : unnecessary entries in legend removed
%

function [sched_handles, error_code, error_msg] = update_elevation_plot_pointer(sched_handles, obs_data, plot_opt, t_epoch_jd, PARA, current_station_id_list)
@@ -221,7 +222,7 @@
temp = get(gca, 'YLim');
y_min = temp(1);
y_max = temp(2);
sched_handles.el_plot.stat(i_stat).h_epoch_marker_end_of_last_obs = line([antenna_pos_time_eolo, antenna_pos_time_eolo], [y_min, y_max], 'color', sched_handles.color_markers_end_of_last_scan);
sched_handles.el_plot.stat(i_stat).h_epoch_marker_end_of_last_obs = line([antenna_pos_time_eolo, antenna_pos_time_eolo], [y_min, y_max], 'color', sched_handles.color_markers_end_of_last_scan, 'DisplayName', 'end epoch last scan');
end


@@ -230,7 +231,7 @@
temp = get(gca, 'YLim');
y_min = temp(1);
y_max = temp(2);
sched_handles.el_plot.stat(i_stat).h_epoch_marker_start = line([antenna_pos_time_start, antenna_pos_time_start], [y_min, y_max], 'color', sched_handles.color_markers_scan_start); % error: Vectors must be the same length.
sched_handles.el_plot.stat(i_stat).h_epoch_marker_start = line([antenna_pos_time_start, antenna_pos_time_start], [y_min, y_max], 'color', sched_handles.color_markers_scan_start, 'DisplayName', 'start epoch new scan'); % error: Vectors must be the same length.
end


@@ -240,15 +241,15 @@
temp = get(gca, 'YLim');
y_min = temp(1);
y_max = temp(2);
sched_handles.el_plot.stat(i_stat).h_epoch_marker_end = line([antenna_pos_time_end, antenna_pos_time_end], [y_min, y_max], 'color', sched_handles.color_markers_scan_end);
sched_handles.el_plot.stat(i_stat).h_epoch_marker_end = line([antenna_pos_time_end, antenna_pos_time_end], [y_min, y_max], 'color', sched_handles.color_markers_scan_end, 'DisplayName', 'end epoch new scan');
end

if flag_update_current_epoch_marker
% Draw epoch marker (vertical line)
temp = get(gca, 'YLim');
y_min = temp(1);
y_max = temp(2);
sched_handles.el_plot.stat(i_stat).h_current_epoch_marker = line([t_epoch_jd, t_epoch_jd], [y_min, y_max], 'color', sched_handles.color_current_epoch_marker);
sched_handles.el_plot.stat(i_stat).h_current_epoch_marker = line([t_epoch_jd, t_epoch_jd], [y_min, y_max], 'color', sched_handles.color_current_epoch_marker, 'DisplayName','current epoch');
end


@@ -456,4 +457,4 @@



return
return
5 changes: 3 additions & 2 deletions CODE/VIE_SCHED/SAT_SCHED/update_sky_plots.m
Original file line number Diff line number Diff line change
@@ -36,6 +36,7 @@
% - error_msg : Error Message (empty, if no errors occured)
%
% CHANGES:
% - 2018-12-20: A. Corbin : unnecessary entries in legend removed
%

function [sched_handles, error_code, error_msg] = update_sky_plots(sched_handles, stat_data, station_id_list, source, PARA, obs_data, flag_plot_sources, jd_current_epoch_marker, flag_observable_quasars_list)
@@ -131,7 +132,7 @@
xx = elSpherical .* sin(az * pi/180);

% ### Plot marker ###
sched_handles.sky_plots(station_id).sat(i_sat).h_current_epoch_marker = plot(xx', yy', '*', 'color', temp_color, 'MarkerSize', 20);
sched_handles.sky_plots(station_id).sat(i_sat).h_current_epoch_marker = plot(xx', yy', '*', 'color', temp_color, 'MarkerSize', 20, 'HandleVisibility','off');

else % Satellite is below the cut-off elevation

@@ -208,4 +209,4 @@



return;
return;
21 changes: 14 additions & 7 deletions CODE/VIE_SCHED/SAT_SCHED/update_sky_plots_pointer.m
Original file line number Diff line number Diff line change
@@ -41,6 +41,7 @@
% - error_msg : Error Message (empty, if no errors occured)
%
% CHANGES:
% - 2018-12-20: A. Corbin : unnecessary entries in legend removed
%

function [sched_handles, error_code, error_msg] = update_sky_plots_pointer(sched_handles, station_id_list, obs_data, plot_opt, PARA)
@@ -243,7 +244,9 @@
xx_pointer_2 = elSpherical_2 .* sin(pointer_az_rad_eolo);

% Plot pointer
sched_handles.sky_plots(station_id).h_az_end_of_last_obs_pointer = line([xx_pointer_1, xx_pointer_2], [yy_pointer_1, yy_pointer_2], 'color', sched_handles.color_markers_end_of_last_scan);
sched_handles.sky_plots(station_id).h_az_end_of_last_obs_pointer = line([xx_pointer_1, xx_pointer_2], [yy_pointer_1, yy_pointer_2], ...
'color', sched_handles.color_markers_end_of_last_scan, ...
'DisplayName','end epoch last scan');

% Update displayed azimuth value:
text_antenna_un_az_str_start = sprintf('%5.1f', pointer_az_rad_eolo * 180/pi);
@@ -260,7 +263,7 @@
xx_pointer_3 = elSpherical_3 .* sin(pointer_az_rad_eolo);

% Plot pointer
sched_handles.sky_plots(station_id).h_el_end_of_last_obs_pointer = plot(xx_pointer_3, yy_pointer_3, 'x', 'color', sched_handles.color_markers_end_of_last_scan);
sched_handles.sky_plots(station_id).h_el_end_of_last_obs_pointer = plot(xx_pointer_3, yy_pointer_3, 'x', 'color', sched_handles.color_markers_end_of_last_scan, 'HandleVisibility','off');

% Update displayed elevation value:
text_antenna_el_str_eolo = sprintf('%5.1f', pointer_el_rad_eolo * 180/pi);
@@ -300,7 +303,9 @@
xx_pointer_2 = elSpherical_2 .* sin(pointer_az_rad_start);

% Plot pointer
sched_handles.sky_plots(station_id).h_azimuth_start_pointer = line([xx_pointer_1, xx_pointer_2], [yy_pointer_1, yy_pointer_2], 'color', sched_handles.color_markers_scan_start);
sched_handles.sky_plots(station_id).h_azimuth_start_pointer = line([xx_pointer_1, xx_pointer_2], [yy_pointer_1, yy_pointer_2], ...
'color', sched_handles.color_markers_scan_start, ...
'DisplayName', 'start epoch new scan');

% Update displayed azimuth value:
text_antenna_un_az_str_start = sprintf('%5.1f', pointer_az_rad_start * 180/pi);
@@ -317,7 +322,7 @@
xx_pointer_3 = elSpherical_3 .* sin(pointer_az_rad_start);

% Plot pointer
sched_handles.sky_plots(station_id).h_elevation_start_pointer = plot(xx_pointer_3, yy_pointer_3, 'x', 'color', sched_handles.color_markers_scan_start);
sched_handles.sky_plots(station_id).h_elevation_start_pointer = plot(xx_pointer_3, yy_pointer_3, 'x', 'color', sched_handles.color_markers_scan_start, 'HandleVisibility','off');

% Update displayed elevation value:
text_antenna_el_str_start = sprintf('%5.1f', pointer_el_rad_start * 180/pi);
@@ -355,7 +360,9 @@
xx_pointer_2 = elSpherical_2 .* sin(pointer_az_rad_end);

% Plot pointer
sched_handles.sky_plots(station_id).h_azimuth_end_pointer = line([xx_pointer_1, xx_pointer_2], [yy_pointer_1, yy_pointer_2], 'color', sched_handles.color_markers_scan_end);
sched_handles.sky_plots(station_id).h_azimuth_end_pointer = line([xx_pointer_1, xx_pointer_2], [yy_pointer_1, yy_pointer_2], ...
'color', sched_handles.color_markers_scan_end, ...
'DisplayName', 'end epoch new scan');

% Update displayed azimuth value:
text_antenna_un_az_str_end = sprintf('%5.1f', pointer_az_rad_end * 180/pi);
@@ -372,7 +379,7 @@
xx_pointer_3 = elSpherical_3 .* sin(pointer_az_rad_end);

% Plot pointer
sched_handles.sky_plots(station_id).h_elevation_end_pointer = plot(xx_pointer_3, yy_pointer_3, 'x', 'color', sched_handles.color_markers_scan_end);
sched_handles.sky_plots(station_id).h_elevation_end_pointer = plot(xx_pointer_3, yy_pointer_3, 'x', 'color', sched_handles.color_markers_scan_end, 'HandleVisibility','off');

% Update displayed elevation value:
text_antenna_el_str_end = sprintf('%5.1f', pointer_el_rad_end * 180/pi);
@@ -399,4 +406,4 @@
end % station loop


return;
return;