%    Copyright (C) 1995-1998
%    Massachussetts Institute of Technology
%    Sea Grant AUV Laboratory
%    $Id: gr2rb.m,v 1.1 2000/01/10 19:07:57 rob Exp $

function rb = gr2rb( ep, sp )

if nargin < 2, sp = [0 0]; end

ds = ep - sp;

rb(2) = mod360(180/pi*atan2(ds(2),ds(1)));
rb(1) = sqrt(sum(ds.^2));

