SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Special Projects > MoBo - Electronic Maneuvering Board
Forget password? Reset here

 
 
Thread Tools Display Modes
Old 11-07-07, 02:34 PM   #1
Dr.Sid
The Old Man
 
Join Date: May 2005
Location: Czech Republic
Posts: 1,458
Downloads: 6
Uploads: 0
Default

I don't mean to use it with DW. As you said .. you don't know your position. I take it just as interesting problem at the moment.
For me, LOB is position, direction and time. You give set of these and you get position and vector of the target, whose length indicates speed.
Dr.Sid is offline  
Old 11-07-07, 04:41 PM   #2
XLjedi
Ace of the Deep
 
Join Date: Jun 2005
Location: Palm Beach, Florida
Posts: 1,243
Downloads: 53
Uploads: 8
Default

Not exactly sure what your goal is then.

Sounds like you have a least-squares TMA solution that maybe works, provided you can load it with position data that you don't presently have.

If it works as you say, I could possibly incorporate it into MoBo... maybe. I'd have to look at it.

MoBo functions nicely as a DRT, so you could plot your position/bearing/time inputs and I could have MoBo generate a contact with position and vector based on your formula.
__________________
XLjedi is offline  
Old 11-07-07, 06:51 PM   #3
Dr.Sid
The Old Man
 
Join Date: May 2005
Location: Czech Republic
Posts: 1,458
Downloads: 6
Uploads: 0
Default

Bah .. I implemented it .. and there is some error in it I can't find. Well I found many of the errors .. but not.

Just for your info:

Inputs is array of LOBs:
Px,Py - position of listener at the time of observation
Sx,Sy - vector of sight - in my implementation I assume it's length is 1 - this represents the bearing
t - time of observation - in my implementation I use t=0 for the first LOB

if you have 5 lobs, you have 5 these. 5 positons, 5 vectors, 5 times.

I'm looking for these variables:
Ax,Ay - position of the contact at t=0
Vx,Vy - vector of speed of the contact, length is speed

Now my actual formulas look like this:

We must solve this matrix, column represents Ax,Ay,Vx,Vy

+sy.sy -sy.sx +t.sy.sy -t.sy.sx +px.sy.sy-py.sx.sy
-sy.sx +sx.sx -t.sx.sy +t.sx.sx +py.sx.sx-px.sx.sy
+t.sy.sy -t.sx.sy +t.t.sy.sy -t.t.sy.sx +px.t.sy.sy-py.t.sx.sy
-t.sy.sx +t.sx.sx -t.t.sy.sx +t.t.sx.sx +py.t.sx.sx-px.t.sx.sy

All elements must be summed for all the LOBs first, then the matrix is solved. But as I said, there is mistake somewhere.

I used the method like this:

First there is formula for distance of point (B) from line (A+V.u)
dist=(ax.vy-ay.vx-bx.vy+by.vx)/(vx.vx+vy.vy)
The part (vx.vx+vy.vy) is 1 in my case (LOBs vector's length =1 ) so I can omit it.

Now I need to specify the 'wrongness' of my theoretical solution. That is here (using variable names mention on top):

delta = px.sy-py.sx-(ax+vx.t).sy+(ay+vy.t).sx

this is error for particular LOB.

Now I need to sum squares of these errors for each LOB, and look for minimum such sum. That is the trick in the least square method.
The error square looks pretty nasty.

+2.ax.py.sx.sy+2.ax.vx.t.sy.sy+2.ay.px.sx.sy+2.ay. vy.t.sx.sx-2.ay.vx.t.sx.sy+2.vx.t.py.sx.sy+2.vy.t.px.sx.sy
-2.ax.ay.sx.sy-2.ax.px.sy.sy-2.ax.vy.t.sx.sy-2.ay.py.sx.sx-2.px.py.sx.sy-2.vx.t.px.sy.sy-2.vy.t.py.sx.sx
-2.vx.vy.t.t.sx.sy+px.px.sy.sy+py.py.sx.sx+ax.ax.sy .sy+ay.ay.sx.sx+vx.vx.t.t.sy.sy+vy.vy.t.t.sx.sx

But I really went thru this part like 10 times and I think it is correct now.

Then you derivate this by each of variables you are interested in. ax,ay,vx,vy in our case. Why we do the derivation ? We look for minimal error, that's where derivation of the error is equal 0. If we have the derivations, we must solve when they are zero and that is our solution.

Derivates looks like this:

ax:
+2.py.sx.sy
+2.vx.t.sy.sy
-2.ay.sx.sy
-2.px.sy.sy
-2.vy.t.sx.sy
+2.ax.sy.sy

ay:
+2.px.sx.sy
+2.vy.t.sx.sx
-2.vx.t.sx.sy
-2.ax.sx.sy
-2.py.sx.sx
+2.ay.sx.sx

vx:
+2.ax.t.sy.sy
-2.ay.t.sx.sy
+2.t.py.sx.sy
-2.t.px.sy.sy
-2.vy.t.t.sx.sy
+2.vx.t.t.sy.sy

vy:
-2.ax.t.sx.sy
+2.ay.t.sx.sx
+2.t.px.sx.sy
-2.t.py.sx.sx
-2.vx.t.t.sx.sy
+2.vy.t.t.sx.sx

And then you simply put these into the matrix, solve it and that's all. I'm almost sure I have not missed any sign anywhere. I feel like I forget to make some step or something. So I need help from somebody who used least square method to solve problems. Somebody who understands what I'm talking about. If you don't, don't worry, one can easily live without it, but I'm afraid you can't help me.

I have this programmed and it almost works .. in same rare cases it even gives correct data. I'm quite sure I don't have it ALL wrong.

Last edited by Dr.Sid; 11-07-07 at 07:11 PM.
Dr.Sid is offline  
Old 11-07-07, 07:36 PM   #4
Dr.Sid
The Old Man
 
Join Date: May 2005
Location: Czech Republic
Posts: 1,458
Downloads: 6
Uploads: 0
Default

Hm .. if you are really going to recheck these formulas, please wait a bit .. maybe the problem is in the matrix solution. I've tried some online matrix solvers and they give quite different results (while not correct too).

Edit: Oh yes ! My matrix solver is wrong and the online solvers are correct and the matrix IS correct. So I only fix the solver, that should be much easier.

So I don't need any more help I hope. I only need some little time till I release that utility of mine so you could get a grasp what it can do. Of course I offer this to your tool if it could is it somehow, I guess it could. For example in DW you have TMA screen where you see the LOBs in absolute coordinates. Each LOB starts at different point, as your sub moves. You would have to know the times of the LOBs. Now you would have to rely on AUTO sonar crew which marks each 2 minutes. Then you would have to transfer the LOBs into the other tool .. then input your speed (to get the scale of the 'map'). And then you would have the solution.

This methos should also cover special cases like more listeners (sonobuoys or hull and towed array), LOBs can start at very different places and times, this just finds the best line to match them.

Last edited by Dr.Sid; 11-07-07 at 07:49 PM.
Dr.Sid is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.