Accelerating the pace of engineering and science

Calculate Range

Calculate range between two crafts given their respective positions

GNC/Guidance

Description

The Calculate Range block computes the range between two crafts. The equation used for the range calculation is

$Range=\sqrt{{\left({x}_{1}-{x}_{2}\right)}^{2}+{\left({y}_{1}-{y}_{2}\right)}^{2}+{\left({z}_{1}-{z}_{2}\right)}^{2}}$

Inputs and Outputs

InputDimension TypeDescription
First Contains the (x, y and z) position of craft 1.
Second Contains the (x, y and z) position of craft 2.

OutputDimension TypeDescription
First Contains the range from craft 2 and craft 1.

Limitation

The calculated range is the magnitude of the distance, but not the direction. Therefore it is always positive or zero.

Craft positions are real values.