/** * This software was developed and / or modified by Raytheon Company, * pursuant to Contract DG133W-05-CQ-1067 with the US Government. * * U.S. EXPORT CONTROLLED TECHNICAL DATA * This software product contains export-restricted data whose * export/transfer/disclosure is restricted by U.S. law. Dissemination * to non-U.S. persons whether in the United States or abroad requires * an export license or other authorization. * * Contractor Name: Raytheon Company * Contractor Address: 6825 Pine Street, Suite 340 * Mail Stop B8 * Omaha, NE 68106 * 402.291.0100 * * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ package com.raytheon.viz.lightning; import java.util.ArrayList; import java.util.Date; import java.util.List; import com.raytheon.uf.common.time.BinOffset; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.TimeRange; /** *
* When using a bin offset, display each bin in multiple frames. For example a * bin offset can be used to group data into 1 minute intervals and if the * repeat count is 5 then each bin will be displayed in 5 frames and each frame * would last 5 minutes. For example the first diagram below shows how 10 one * minute bins get grouped into 6 five minute frames. Also, the 12:04 and 12:05 * are repeated in 5 different frames, if the time line was extended infinitely * then all other bins would be repeated. *
* ** Bin times: |-12:00-|-12:01-|-12:02-|-12:03-|-12:04-|-12:05-|-12:06-|-12:07-|-12:08-|-12:09-| * Frame 1: |-------+-------+-------+-------+-------| * Frame 2: |-------+-------+-------+-------+-------| * Frame 3: |-------+-------+-------+-------+-------| * Frame 4: |-------+-------+-------+-------+-------| * Frame 5: |-------+-------+-------+-------+-------| * Frame 6: |-------+-------+-------+-------+-------| ** *
* For comparison here is a chart showing a normal BinOffset of 5 minutes and 1 * minutes. *
* ** Bin times: |-12:00---------------------------12:04-|-12:05---------------------------12:09-| * Frame 1: |---------------------------------------| * Frame 2: |---------------------------------------| ** *
* Bin times: |-12:00-|-12:01-|-12:02-|-12:03-|-12:04-|-12:05-|-12:06-|-12:07-|-12:08-|-12:09-| * Frame 1: |-------| * Frame 2: |-------| * Frame 3: |-------| * Frame 4: |-------| * Frame 5: |-------| * Frame 6: |-------| * Frame 7: |-------| * Frame 8: |-------| * Frame 9: |-------| * Frame 10: |-------| ** *
* * SOFTWARE HISTORY * * Date Ticket# Engineer Description * ------------- -------- --------- -------------------------- * Sep 25, 2015 4605 bsteffen Initial Creation * ** * @author bsteffen * @version 1.0 */ public class RepeatingBinOffset { private final BinOffset binOffset; private final int repeatCount; public RepeatingBinOffset(BinOffset binOffset, int repeatCount) { this.binOffset = binOffset; this.repeatCount = repeatCount; } /** * For a given data time this will return the times of all the normalized * frames which should contain this data. */ public List