Main Content

eclipsePercentage

Calculate percentage of time when solar occultation occurs

Since R2023b

    Description

    example

    eclPercent = eclipsePercentage(eclipse_objects) calculates the percentage of time when solar occultation occurs. Each element represents the percentage of time when solar occultation occurs as observed from the parent asset of each eclipse object in the eclipse_objects vector.

    When the AutoSimulate property of the satellite scenario is true, the percentage corresponds to the duration from StartTime to StopTime. When it is false, the percentage corresponds to the duration from StartTime to SimulationTime.

    Examples

    collapse all

    Add an eclipse analysis object to a satellite, sc, and calculate percentage of time, eclPercent, when solar occultation occurs.

    Create a satellite scenario object, sat.

    startTime = datetime(2023,4,20);
    stopTime = startTime + days(1);
    sampleTime = 10; % seconds
    sc = satelliteScenario(startTime,stopTime,sampleTime);

    Add a satellite, sat, to the scenario sc. Set the orbit propagator as a two-body-keplerian.

    sat = satellite(sc, ...
        10000000, ... % semimajor axis, meters
        0, ...        % eccentricity
        0, ...        % inclination, degrees
        0, ...        % right ascension of ascending node, degrees
        0, ...        % argument of periapsis, degrees
        0, ...        % true anomaly, degrees
        OrbitPropagator="two-body-keplerian");

    Add the eclipse analysis object to the satellite, sat. Include the lunar eclipse in the analysis. By default, the eclipse model is for a dual-cone.

    eclSat = eclipse(sat,IncludeLunarEclipse=true)
    eclSat = 
      Eclipse with properties:
    
               EclipseModel: "dual-cone"
        IncludeLunarEclipse: 1
    
    

    Calculate the eclipse percentage for the eclipse object, eclSat.

    eclPercent = eclipsePercentage(eclSat) 
    eclPercent = 26.8403
    

    Input Arguments

    collapse all

    Vector of eclipse objects, specified as a vector of Eclipse objects.

    Example: eclSat, where eclSat is a vector eclipse objects added to satellites.

    Output Arguments

    collapse all

    Percentage of time when solar occultation occurs, returned as a scalar or vector.

    Version History

    Introduced in R2023b