help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Target Motion Analysis


From: Thomas D. Dean
Subject: Re: Target Motion Analysis
Date: Sat, 7 May 2016 13:11:37 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0

I have a graphical solution, so it is possible to solve the problem using the geometry package.

The solution, below, is messy. I need to draw lines from some point to the edge of the graph. For example, I want to draw the bearing lines from the origin to the edge.

Other that that, the solution is close to the one given in the Manuvering Board Manual. I believe the difference is pencil line width and graphing errors in the manual.

Tom Dean

## Own ship is on course 090 , speed 15 knots. The true bearings of
## another ship are observed as follows:

## Time  Bearing
## 1300  010
## 1430  358
## 1600  341

## At 1600 own ship changes course to 050  and increases speed to 22
## knots. The following bearings of ship M are then observed:

## Time Bearing
## 1630 330
## 1730 302
## 1830 274.5
##
## Required:
## (1) Course and speed of ship M.
## (2) Distance of M at time of last bearing.

## (1) Draw own ships vector er 1 .

## (2) Plot first three bearings and label in order observed, B 1 , B 2
## , and B 3 .

## (3) At any point on B 1 , construct perpendicular which intersects B
## 2 and B 3 . Label these points P 1 , P 2 , and P 3 .

## (4) Measure the distance P 1 to P 2 and plot point X at the same
## distance from P 2 towards P 3 .

## (5) From X draw a line parallel to B 1 until it intersects B 3 .
## Label this intersec- tion Y.

## (6) From Y draw a line through P 2 until it intersects B 1 at Z.

## (7) From head of own ships vector er 1 , draw a line parallel to YZ.
## This estab- lishes the DRM on the original course and speed. The head
## of the em vector of ship M lies on the line drawn parallel to YZ. It
## is now necessary to find the DRM following a course and/or speed
## change by own ship. The intersection of the two lines drawn in the
## direction of relative movement from the heads of own ships vector
## establishes the head of vector em.

## (8) Following course and speed change made to produce a good bearing
## drift, three more bearings are plotted; the new direction of relative
## movement is ob- tained following the procedure given in steps (3)
## through (7). The lines drawn in the directions of relative movement
## from the heads of vector er 1 and er 2 in- tersect at the head of the
## vector em. Ship M is on course 170  at 10 knots.

## (9) From relative vector r 2 m, the SRM is found as 28.4 knots during
## the second set of observations.

## (10) Compute the relative distance traveled during the second set of
## observations (MRM 56.8 mi.).
##

## (11) On the line ZY for the second set of observations, lay off the
## relative distance ZA. From A draw a line parallel to B 4 until it
## intersects B 6 . Label this point B. This is the position of M at the
## time of the last bearing.

##
##########################################################################
## Answer:
## (1) Course 170 , speed 10 knots.
## (2) Position of M at 1830: 274 .5 at 61 miles.
## ##
## #############################################################
## Note:
## These procedures are based on bearings observed at equal intervals. For un-
## equal intervals, use the following proportion:
##
## td1 = Time difference between B 2 and B 3
## td2 = Time difference between B 1 and B 2
## and
## dst1 = Distance from P 2 to X
## dst2 = Distance from P 1 to P 2
## then
## td1/dst1 = td2/dst2

1; ## not a function file

##
########################################################################
## Sensor Motion
t = [13, 14.5, 16, 16.5,17.5,18.5];
Cse = deg2rad([90, 50]');
Spd = [15, 22]';
Leg = createLine(Cse);
R = pointOnLine(Leg, Spd);
##
## target bearing lines
Brg = deg2rad([10,358,341,330,302,274.5]');
BrgLines = createLine(Brg);
##
## Solution part 1
P1 = pointOnLine(BrgLines(1,:),10);
P1P3 = orthogonalLine(BrgLines(1,:),P1);
P2 = intersectLines(P1P3,BrgLines(2,:));
P3 = intersectLines(P1P3,BrgLines(3,:));
P1P3 = createLine(P1,P3); ## make sure it goes the right way
X1 = pointOnLine(P1P3,2*distancePoints(P1,P2));
X1Y1 = orthogonalLine(P1P3,X1);
Y1 = intersectLines(X1Y1,BrgLines(3,:));
Y1Z1 = createLine(P2,Y1);
Z1 = intersectLines(Y1Z1,BrgLines(1,:));
R1M = [R(1,:),Y1Z1(3:4)];
##
## Solution part 2
P4 = pointOnLine(BrgLines(4,:),10);
P4P6 = orthogonalLine(BrgLines(4,:),P4);
P5 = intersectLines(P4P6,BrgLines(5,:));
P6 = intersectLines(P4P6,BrgLines(6,:));
P4P6 = createLine(P4,P6); ## make sure it goes the right way
X2 = pointOnLine(P4P6,2*distancePoints(P4,P5));
X2Y2 = orthogonalLine(P4P6,X2);
Y2 = intersectLines(X2Y2,BrgLines(6,:));
Y2Z2 = createLine(P5,Y2);
Z2 = intersectLines(Y2Z2,BrgLines(4,:));
R2M = [R(2,:),Y2Z2(3:4)];
##
## target course and speed
M = intersectLines(R1M,R2M);
tgtSpd = distancePoints([0,0],M);
tgtCse = lineAngle(createLine([0,0],M));
## relative motion
RM = [parallelLine(Y1Z1,R(1,:)); parallelLine(Y2Z2,R(2,:))];
MRM = [t(3)-t(1);t(6)-t(4)] .* distancePoints(R,M);
tgtLoc = [pointOnLine(BrgLines(3,:),MRM(1));pointOnLine(BrgLines(6,:),MRM(2))];
tgtRange=distancePoints([0,0],tgtLoc);
##
## output
printf("The target is on course %.0f, speed %.0f knots\n",
       rad2deg(tgtCse),tgtSpd);
printf("At time %d%d, the target is at %.1f degrees, %.0f miles\n",
       floor(t(6)),(t(6)-floor(t(6)))*60, rad2deg(Brg(6)),tgtRange(2));
##
## plot
figure; hold on; axis([-20 20 -20 20]);
drawLine(BrgLines,'color','b');
drawPoint([P1;P2;P3;P4;P5;P6],'marker','+','color','b');
drawLine([P1P3;P4P6],'color','g');
drawLine(Leg,'color','r');
drawPoint([R;X1;Y1;Z1;X2;Y2;Z2],'marker','+','color','g');
drawLine([Y1Z1;Y2Z2],'color','g');
drawLine(RM,'color','c');
drawPoint(M,'marker','o','color','c');
text(M(1),M(2),'M');
##drawPoint(tgtLoc,'marker','o','color','m')
title('Manuvering Board Example 25');
xlabel('Nautical Miles +North');
ylabel('Nautical Miles +East');
grid;
hold off;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]