Synopsis

PDX_MSGT mth_SweepAnglesMerge(long option, int num_ranges, double *ranges, int *num_new_ranges, double **new_ranges)

Purpose

Merge sweeping angles

Description

This function is to merge the sweeping angles from different sweeping areas according to the option chosen. As the input angle array needs to be sorted during processing, the data might be in different order after it has been processed.

The starting angles of all areas must be within [0, MTH_2_PI).

Input

option

MTH_TOUCH_MERGE

Any two touched areas are considered as overlapped and will be merged. When the default option is chosen, two touched areas will not be merged.

num_ranges

The number of ranges

ranges

The angles array [2*num_ranges]

Output

num_new_ranges

The number of merged ranges

new_ranges

The merged ranges [2*num_new_ranges]

Return

      MTH_NOERR
      MTH_ORIGIN_POINT
      Low level error return
      .fi