主要内容

scan

R2026b

Advances the scan position to the desired time

Since R2026b

    Description

    ang = scan(scanner,t) advances the scan controller object scanner to time t and returns the current scan angle ang corresponding to this time. The first call to scan locks the object properties.

    example

    Examples

    collapse all

    Create an electronic raster scan controller object with default values.

    txScnr = radarScanController("Electronic","Raster")
    txScnr = 
      ElectronicRasterScanner with properties:
    
          AzimuthLimits: [-90 90]
        ElevationLimits: [-5 5]
           ScanDuration: 1
              StepAngle: 1
                NumBars: 2
              Alignment: "Azimuth"
        DwellTimeSource: "Auto"
              ScanAngle: [-90 -5]
               ScanTime: 0
    
    

    Advance the scan position to a time of 10 seconds and return the corresponding scan angle.

    txAng = scan(txScnr,10)
    txAng = 1×2
    
       -90    -5
    
    

    Check to see if the current scan frame is complete.

    isDone = isScanDone(txScnr)
    isDone = logical
       0
    
    

    Check to see if the object is locked.

    t_f = isLocked(txScnr)
    t_f = logical
       1
    
    

    Release the scan controller object.

    release(txScnr);

    Update the scan duration to be 1/2 the current duration.

    txScnr.ScanDuration = txScnr.ScanDuration/2
    txScnr = 
      ElectronicRasterScanner with properties:
    
          AzimuthLimits: [-90 90]
        ElevationLimits: [-5 5]
           ScanDuration: 0.5000
              StepAngle: 1
                NumBars: 2
              Alignment: "Azimuth"
        DwellTimeSource: "Auto"
              ScanAngle: [-90 -5]
               ScanTime: 10
    
    

    Input Arguments

    collapse all

    Scan controller object (MechanicalRasterScanner, MechanicalSectorScanner, ElectronicRasterScanner, or ElectronicSectorScanner) generated by radarScanController.

    Time to advance the radar scan controller object to, specified as a nonnegative scalar in units of seconds (s). Time must be greater than or equal to the current scan time ScanTime.

    Data Types: double

    Output Arguments

    collapse all

    Current scan angle after the radar scan controller is advanced to the specified time, returned as a scalar or 2-element row vector in units of degrees (deg). The returned dimensions depend on the type of radar scan controller object.

    • MechanicalSectorScanner or ElectronicSectorScanner – The scan angle azimuth is returned as a scalar.

    • MechanicalRasterScanner or ElectronicRasterScanner – The scan angle is returned as a 2-element row vector, where the first element is the azimuth angle and the second element is the elevation angle.

    Version History

    Introduced in R2026b