NV5 GEOSPATIAL SOFTWARE
>  Docs Center  >  Libraries  >  Markwardt  >  GTIENLARGE

GTIENLARGE

GTIENLARGE

## Author

Craig B. Markwardt, NASA/GSFC Code 662, Greenbelt, MD 20770
craigm@lheamail.gsfc.nasa.gov

## Purpose

Enlarge (or shrink) each Good Time Interval (GTI) by fixed amounts

## Calling Sequence

NEWGTI = GTIENLARGE(GTI, COUNT=COUNT, PRE=PRE, POST=POST)

## Description

The function GTIENLARGE accepts an existing valid Good Time
Interval (GTI) array and creates a new GTI array in which the
intervals have been enlarged (or shrunken) by a fixed amount.
The keywords PRE and POST are used to specify the enlargement.
Given an existing good interval such as this one:
100 200 GTI=[[100,200]]
<------------|===================|------------->
a positive value of PRE will enlarge the lead edge of the interval
and a positive value of POST will enlarge the trailing edge of the
interval. Thus PRE=10 and POST=20 will create a new interval from
the above example:
90<-- --->220 NEWGTI=[[ 90,220]]
<---------|==.===================.====|-------->
PRE=10 POST=20
Negative values of PRE and POST are allowed, which will shrink the
interval from the leading and trailing edges respectively.
Users should be aware that the number of intervals may shrink
under this operation, since it is possible either for two
intervals to be merged if they are enlarged and overlap, or if
they are shrunken to a size of zero.
It should be noted that this function is not constrained to
operation only on time arrays. It should work on any
one-dimensional quantity with intervals.

## Inputs

GTI - a 2xNINTERVAL array where NINTERVAL is the number of
intervals. GTI(*,i) represents the start and stop times of
interval number i. The intervals must be non-overlapping
and time-ordered (use GTITRIM to achieve this).
A scalar value of zero indicates that the GTI is empty, ie,
there are no good intervals.

## Keywords

PRE - the amount each interval should be enlarged from its leading
edge. A negative value indicates the interval should
shrink.
Default: 0
POST - the amount each interval should be enlarged from its
trailing edge. A negative value indicates the interval
should shrink.
Default: 0
COUNT - upon return, the number of resulting intervals. A value
of zero indicates no good time intervals.

## Returns

A new GTI array containing the enlarged or shrunken intervals.
The array is 2xCOUNT where COUNT is the number of resulting
intervals. GTI(*,i) represents the start and stop times of
interval number i. The intervals are non-overlapping and
time-ordered.
If COUNT is zero then the returned array is a scalar value of
zero, indicating no good intervals were found.

GTITRIM, GTIENLARGE

## Modification History

Written, CM, 1997-2001
Documented, CM, Apr 2001

© 2024 NV5 Geospatial Solutions, Inc. |  Legal