[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: |
Sun, 1 May 2016 20:56:10 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
Here is a start at defining the problem and plotting it.
Tom Dean
# tma - target motion analysys using bearings only
#
# Complete Solution Of The Bearings Only Approach Problem
# from the paper by Spiess,
# https://escholarship.org/uc/item/6wm0k4dn
# tgtX[1..4] and tgtY[1..4] are the locations of the target,
# vx and vy are the velocities of the target, assumed constant,
# and
# x[1..4] and y[1..4] are the sensor location,
# m[1..4] is the slope of the line from sensor to target
# and
# t[1..4] are the times of these values.
#
# Known values: sensX[], sensY[], m[]
# Unknown values: tgtX[], tgtY[], tgtVx, tgtVy
#
# equation for the bearing lines
# seq(tgtY[ii] - sensY[ii] = m[ii] * (tgtX[ii] - sensX[ii]), ii=1..4)
# equations for the target Y valuess
# seq(tgtX[ii+1] - tgtX[ii] = tgtVx * (t[ii+1] - t[ii]), ii=1..3)
# equations for the target X values
# seq(tgtY[ii+1] - tgtY[ii] = tgtVy * (t[ii+1] - t[ii]), ii=1..3)
#
# this produces a solution that has a denom(tgtVx) = 0 when the
# example values are entered.
#
###########################################################
# example problem
# speed in knots, true bearings
#
# own ship course 090 speed 15
# time bearing
# 1300 010
# 1430 358
# 1600 341
# own ship change to course 050 speed 22
# time bearing
# 1630 330
# 1730 302
# 1830 274.5
#
# from the maneuvering board problem target course 170 speed 10
# at 1830, target bearing is 274.5 speed 61 miles
#
1; ## not a function file
#
#####################################
# known or measured values
# the own ship motion from t(1) to t(2) is at the cse and spd of A[1,:]
# time, ownCse ownSpd tgtBrg
A=[1300, 090, 15, 10;
1430, 090, 15, 358;
1600, 090, 15, 341;
1630, 050, 22, 330;
1730, 050, 22, 302;
1830, 050, 22, 274.5;
];
#
T = floor(A(:,1)/100) + (A(:,1)-floor(A(:,1)/100)*100)/60;
dT = [0;T(2:size(T,1))-T(1:size(T,1)-1)];
Cse = A(:,2)*pi/180;
Spd = A(:,3);
Brg = A(:,4)*pi/180;
M = tan(Brg);
# initial sensor position is at lat/lon (Silverdale, WA
lat = 47.63955; ## degrees N are positive
lon = -122.71785; ## degrees W are negative
# motion of own ship
X = lat + cumsum((Spd .* cos(Cse) .* dT)/60);
Y = lon + cumsum((Spd .* sin(Cse) .* dT)/60);
posit=[X,Y]; ## points
##plot(X,Y);grid
#
BrgLines = createLine(posit,cos(Brg),sin(Brg));
#
#########################
# values from an example problem with a known solution
# from the maneuvering board book.
# target position at 1830 bearing 274.5 distance 61 miles
tgtX = posit(6,1)+cos(274.5*pi/180)*61/60;
tgtY = posit(6,2)+sin(274.5*pi/180)*61/60;
# target line course 170 speed 10, createLine does not use speed
TgtLine = createLine(tgtX,tgtY,cos(170*pi/180),sin(170*pi/180));
IntSctPoints = intersectLines(BrgLines,TgtLine);
#
# plot the problem
figure; hold on; axis equal;
axis([47.5 49.5 -123 -121]);
plot(posit(:,1),posit(:,2),"r");
for idx = 1:size(BrgLines,1)
drawLine(BrgLines(idx,:),'color','b');
endfor;
drawLine(TgtLine,'color','g');
grid;
title("TMA Bearing Only");
xlabel("Latitude");
ylabel("Longitude");
legend("Sensor","Brg","Brg","Brg","Brg","Brg","Brg","Target");
labels=["B1";"B2";"B3";"B4";"B5";"B6"];
for idx = 1:size(posit,1)
text(posit(idx,1)-.01,posit(idx,2)+.01,labels(idx,:));
endfor;
drawPoint(IntSctPoints,'mo');
text(48.5,-121.75,"Target moves from the intersection of B1 and Target
Line\nto the intersection of B6 and Target Line.\nMarked with magenta
circles.\nCourse 170 speed 10");
hold off;
#
###################################
# Todo Solve for the target motion
# Given the red and blue lines, solve for the red lines
- Target Motion Analysis, Thomas D. Dean, 2016/05/01
- Re: Target Motion Analysis,
Thomas D. Dean <=
- Re: Target Motion Analysis, Thomas D. Dean, 2016/05/02
- Re: Target Motion Analysis - Geometry Pkg, Thomas D. Dean, 2016/05/02
- Re: Target Motion Analysis - Geometry Pkg, Juan Pablo Carbajal, 2016/05/03
- Re: Target Motion Analysis - Geometry Pkg, Thomas D. Dean, 2016/05/03
- Re: Target Motion Analysis - Geometry Pkg, Juan Pablo Carbajal, 2016/05/03
- Re: Target Motion Analysis - Geometry Pkg, Thomas D. Dean, 2016/05/03
- RE: Target Motion Analysis - Geometry Pkg, John Guin, 2016/05/03
- Re: Target Motion Analysis - Geometry Pkg, Thomas D. Dean, 2016/05/03
- Re: Target Motion Analysis, Thomas D. Dean, 2016/05/07
- Re: Target Motion Analysis, Thomas D. Dean, 2016/05/07