Name

CL_gm_visibility — Geometric station visibilities start and end dates.

Calling Sequence

   [visi_dates] = CL_gm_visibility(cjd,mean_kep,stations,stations_masks,simulation_period,[visi_min,prec,propagation_type,er,mu,zonals,obla])
   
   

Description

  • This function computes visibility start and end dates (visi_dates) for one or several stations, between dates defined in simulation_period.

    There is visibility when the elevation over one of the stations is greater than the stations_masks. This means that the result (visi_dates) are the intervals when one or more stations are in visibility, and consecutive visibilities are concatenated

    Any visibility lasting less than visi_min seconds (default is 60) is not returned by this function. Choosing a small visi_min will increase computation time.

    Satellite's keplerian orbital elements(mean_kep) are given at date cjd in Gamma50 (Veis) frame. Extrapolation is done using Lyddane analytic model.

    You can optionally change earth equatorial radius (er) and oblateness (obla). Setting obla to 0 will result in a faster computation.

    See below for detailed examples

  • If you want to manipulate intervals, you might want to use functions CL_intervUnion, CL_intervInters or CL_intervInv
  • Last update : 20/08/2009

Parameters

cjd:

CNES julian date of orbital element (1x1)

mean_kep:

satellite's keplerian mean (depending on propagation_type : Lyddane or Eckstein-Hechler or J2) orbital elements at date cjd in Gamma50 (Veis) frame [sma,ecc,inc,pom,gom,anm] (6x1)

stations:

stations positions in the terrestrial frame, in elliptical(geodetic) coordinates [long,lat,alt] [rad,rad,m] (3xN)

stations_masks:

stations masks There is visibility when the elevation is greater than the stations masks. You can have the same station mask for all stations or a different one for each [rad] (1xN or 1x1)

simulation_period:

CNES julian dates interval of visibility computation [cjd_start ; cjd_end](2x1)

visi_min:

(optional) minimum visibility time (default is 60 seconds) [sec] (1x1)

prec:

(optional) precision of computation in seconds (default is 1 second) [sec] (1x1)

propagation_type:

(optional) 'j2' for secular J2, 'lyd' for lyddane or 'eh' for Eckstein Hechler (default is lyddane) (1x1)

er :

(optional) Earth semi-major axis (default is earth equatorial radius %CL_eqRad) [m] (1x1)

mu:

(optional) geocentric gravitational constant [m^3/s^2] (default value is %CL_mu)

zonals:

(optional) vector of zonals coefficients J1 to Jn (troncated to J5) to be used (default is %CL_j1jn(1:5)) (1 x N)

obla :

(optional) Earth oblateness, setting it to 0 will result in a faster computation (default is earth oblateness %CL_obla) (1x1)

visi_dates:

visibility start and end dates (i.e every time elevation crosses station_mask value) [cjd_visi_start ; cjd_visi_end](2xM)

Authors

CNES - DCT/SB

See also

CL_gm_stationElevation, CL_ex_lyddane, CL_intervUnion, CL_intervInters, CL_intervInv

Examples

cjd = 21915;
mean_kep = [7070 * 1000 ; 0.001 ; CL_deg2rad(98) ; CL_deg2rad(90) ; 0 ; 0];

//stations definition
sta1 = [CL_deg2rad(2);CL_deg2rad(70);200]; // high latitude
sta2 = [CL_deg2rad(20);CL_deg2rad(0);400]; // equator
stations = [sta1,sta2];
stations_masks = [ CL_deg2rad(10) , CL_deg2rad(2) ];

simulation_period = [21915 ; 21918 ];  // 3 days

//visibility computation
[visi_dates] = CL_gm_visibility(cjd,mean_kep,stations,stations_masks,simulation_period);

// visibilities duration in function of time plot :
scf();
dates_plot = 0:1/86400:3;
ind_dates = [];
visi = zeros(dates_plot);
for k=1:size(visi_dates,2)
ind = find( simulation_period(1)+dates_plot > visi_dates(1,k) & simulation_period(1)+dates_plot < visi_dates(2,k));
visi(ind) = (visi_dates(2,k)-visi_dates(1,k))*1440.0;
end
plot2d(dates_plot*24,visi,2)

//histogram of visibilities duration
scf();
histplot(20,(visi_dates(2,:)-visi_dates(1,:))*1440.0,normalization=%f)
a=gca();
a.title.text = "Number of visibilities in function of visibility duration (minutes)";

//stations elevations and visi start and end dates on same plot :
scf();
pas = 60.0/86400.0;
dates = simulation_period(1):pas:simulation_period(2);
[moy,osc] = CL_ex_lyddane(cjd,mean_kep,dates);
[pos_sat_G50,vit_sat_G50] = CL_oe_kep2car(osc);
M = CL_fr_G502terMat(dates);
pos_sat_ter = M*pos_sat_G50;
[elev] = CL_gm_stationElevation(pos_sat_ter,stations);
plot2d((dates-cjd)*24,CL_rad2deg(elev(:,1)),2); //station 1
plot2d((dates-cjd)*24,CL_rad2deg(elev(:,2)),3); //station 2
[visi_dates_1] = CL_gm_visibility(cjd,mean_kep,stations(:,1),stations_masks(1),simulation_period);
[visi_dates_2] = CL_gm_visibility(cjd,mean_kep,stations(:,2),stations_masks(2),simulation_period);
plot((visi_dates_1(1,:)-cjd)*24,CL_rad2deg(stations_masks(1))*ones(visi_dates_1(1,:)),'bs');
plot((visi_dates_1(2,:)-cjd)*24,CL_rad2deg(stations_masks(1))*ones(visi_dates_1(1,:)),'bs');
plot((visi_dates_2(1,:)-cjd)*24,CL_rad2deg(stations_masks(2))*ones(visi_dates_2(1,:)),'gs');
plot((visi_dates_2(2,:)-cjd)*24,CL_rad2deg(stations_masks(2))*ones(visi_dates_2(1,:)),'gs');

// Long extrapolation : make loops
visi_dates = [];
stacksize('max');
for k=0:3 // total = 400 days
simulation_period=[21915+k*100 ; 21925+k*100 ];  // 100 days
[visi_dates] = [visi_dates,CL_gm_visibility(cjd,mean_kep,stations,stations_masks,simulation_period)];
end


// Same computation with obla=0 (faster)
[visi_dates] = CL_gm_visibility(cjd,mean_kep,stations,stations_masks,simulation_period,obla=0);