Crabwise

Crabwise · Library

How do you check the order of points in a user-entered loading envelope?

List envelope corners around the perimeter: the point (40, 900) is inside a 35–45 by 800–1200 rectangle but falls outside if two corners swap.

How the envelope test reads your points

The weight-and-balance screen accepts optional envelope rows, each a CG value and a weight, and runs the check only when there are at least three. It walks the points in the order you list them and joins the last back to the first. A point lying exactly on an edge counts as inside; otherwise a ray-casting test counts how many edges a horizontal line from the point crosses.

Because the order defines the edges, the same four corners can describe a rectangle or a crossed bow-tie. The Library worksheet refuses a polygon whose edges cross; in the app, the order you type is the shape that is tested.

Worked example

The example point (40, 1000) lies on the left edge of this invented rectangular teaching polygon. The true result describes only that supplied polygon, which is not an aircraft limit source.

Example CG arm
40
Example total weight
1000
Inside or on the supplied polygon
Yes

Enter a polygon safely

  1. Copy the corners from the aircraft's source with CG on one axis and weight on the other.
  2. Order them around the outline, clockwise or anticlockwise, without jumping across.
  3. Mentally join each point to the next and the last to the first.
  4. Test a point you know is inside, such as the middle, before trusting the result for a real loading.

The same corners in two orders

In perimeter order, (35, 800), (45, 800), (45, 1200), (35, 1200) form a rectangle, and the test point (40, 900) is inside. Swapping the second and third corners gives (35, 800), (45, 1200), (45, 800), (35, 1200). Those edges cross at (40, 1000), and the test now reports (40, 900) as outside, because it lies between the two diagonals.

(40, 900) with perimeter order
Inside
(40, 900) with swapped corners
Outside
(40, 1000) with swapped corners
Inside, on the crossing edges

Common mistakes

What the check means

Inside and outside describe only the polygon you typed. The app does not know the aircraft's approved envelope. The FAA weight-and-balance chapter below explains how envelopes are read; the aircraft's documents define them.

Educational calculation only. Check current aircraft limits, weather, performance and reserve requirements with approved information.

Primary sources and related work