Previous Page | Next Page

Calculating Chain Rank

RANK Value Equation

RANK is the sorting key used to sort multiple chains that have a common node by their angle, starting from 0 at due east and proceeding counterclockwise. A node can be either of the two end-points of a chain.

RANK values have the form ffffff.tttttt, where the ffffff value is used to sort the chain around its from-node and the tttttt component is used to sort the chain around its to-node. The ffffff and tttttt components are calculated using the following formula:

[equation]

R

is the calculated ranking factor.

Q

is the quadrant number (1 to 4, Quadrant Numbers) that contains the angle [alpha] for the chain. For the ffffff component, [alpha] is defined by the vector F[rarr]D0, where F is the from-node and D0 is the first detail point. For chains that have no detail points, D0 is the to-node. For the tttttt component, [alpha] is defined by the vector T[rarr]DL, where T is the to-node and DL is the last detail point. For chains that have no detail points, DL is the from-node.

A

is the angle from the chain clockwise to the nearest X or Y axis, and is determined with

[equation]

where [alpha] is the clockwise angle from the chain to the positive x-axis (due east).

The tangent term is called the half-angle tangent. Since the angle A/2 can never exceed [pi]/4 (45 degrees), the half-angle tangent has values from 0 to 1. The (Q-1) multiplier adjusts the range of values to 0 to 4. The values 0, 1, 2, 3, and 4 represent angles of 0, 90, 180, 270, and just under 360 degrees, respectively.

The 1E5 multiplier is used to transform decimal rank values to integers. Thus the rank values for a chain have six significant digits.

Note:   The trigonometric functions are in radians.  [cautionend]


Calculating the Value of A in a Quadrant

The following figure illustrates the relationship of the quadrants to each other. Note that their numerical order is counterclockwise.

Quadrant Numbers

[Quadrant Numbers]

The following figures illustrate how to calculate the value of A in each quadrant.

The following calculations were used to determine the rank in Calculating Rank in Quadrant 1:

given

[equation]

since

[equation]

then

[equation]

Calculating Rank in Quadrant 1

[Calculating Rank in Quadrant 1]

The following calculations were used to determine the rank in Calculating Rank in Quadrant 2:

given

[equation]

since

[equation]

then

[equation]

Calculating Rank in Quadrant 2

[Calculating Rank in Quadrant 2]

The following calculations were used to determine the rank in Calculating Rank in Quadrant 3:

given

[equation]

since

[equation]

then

[equation]

Calculating Rank in Quadrant 3

[Calculating Rank in Quadrant 3]

The following calculations were used to determine the rank in Calculating Rank in Quadrant 4:

given

[equation]

since

[equation]

then

[equation]

Calculating Rank in Quadrant 4

[Calculating Rank in Quadrant 4]

Previous Page | Next Page | Top of Page