SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   MoBo - Electronic Maneuvering Board (https://www.subsim.com/radioroom/forumdisplay.php?f=225)
-   -   TMA by least square method (https://www.subsim.com/radioroom/showthread.php?t=124723)

Dr.Sid 11-08-07 09:32 AM

Quote:

Originally Posted by aaronblood
Well, if you like I would be happy to add your formula as a MoBo tool...

It looks like something I was wanting to work toward anyway and this would save me probably a month of research.

If you decide that you'd like to contribute your code to the MoBo project, you would be acknowledged as a member of the MoBo Dev Team and given appropriate credit in the application.

In addition to updating the 1.1 Beta, I'm also working on developing a new retained-mode vector graphics interface (MoBo 2.0, or "MoPro"). I may rename the MoBo app in version 2 cuz I'm tired of searching for "MoBo" and finding a bunch of junk related to PC motherboards... hindsight is always 20/20.

Ok .. check your private messages for contact.

XLjedi 11-08-07 09:41 AM

Quote:

Originally Posted by Dr.Sid
Btw. yesterday I have found great good reason why you need a leg. It never occured to me before. Well if you go straight at constant speed, there is always one incorrect solution. That is your own motion ! It lies and all LOBs, no matter how the LOBs goes.

No... in the case where you're moving in a single direction, you would use the maneuvering board approach. You plot all bearing observations from a central point, to determine relative motion (RM) and then you add your own motion vector to the RM vector to determine target true course.

The only issue in that case has to do with estimating target speed/distance. ...and that's where I begin talking about either a) making an educated guess about speed, or b) predicting future bearings and taking a new observation on a different leg to triangulate the target location.

Dr.Sid 11-08-07 09:52 AM

Quote:

Originally Posted by aaronblood
Quote:

Originally Posted by Dr.Sid
Btw. yesterday I have found great good reason why you need a leg. It never occured to me before. Well if you go straight at constant speed, there is always one incorrect solution. That is your own motion ! It lies and all LOBs, no matter how the LOBs goes.

No... in the case where you're moving in a single direction, you would use the maneuvering board approach. You plot all bearing observations from a central point, to determine relative motion (RM) and then you add your own motion vector to the RM vector to determine target true course.

The only issue in that case has to do with estimating target speed/distance. ...and that's where I begin talking about either a) making an educated guess about speed, or b) predicting future bearings and taking a new observation on a different leg to triangulate the target location.

Yes .. you need leg or guess. That's exactly what I mean.

XLjedi 11-08-07 10:03 AM

Quote:

Originally Posted by Dr.Sid
Well I just looked at that MoBo of yours .. and it's quite cool.
It seems you concentrate on solutions where you know some of the solution parts. There is no magic word 'LEG' anywhere in the manual, and you only touch full TMA in the last paragraph. But as it is oriented toward WW2 it's quite ok.
On the other hand you could track ownship even with your tool. You have the icon of ownship on the map don't you ? That's it. Or you could plot course and speed and compute where your ship is at each moment. Then you would change course to make the leg, grab OS position after heading stabilizes and then you can plot new course again.

Yeah, but it's not meant to be a WW2 oriented tool.

Plotting position of Ownship is certainly no problem. I've been thinking about adding a new feature called "waypoints" that would allow plotted positions to be specifically associated with OwnShip or a Contact. I can see how a group of waypoints would be useful as inputs for your formula.

I think adding a TMA feature for DRT position/bearing plots would make a great addition! I'm excited about the possibilities here...

Dr.Sid 11-08-07 10:36 AM

Now I'm thinking about
1) detecting when the solution is bad. Now this can be easily done after the solution by detection how it fits the LOBs. In some rare cases it can also be detected from inputs (Ownship course with no legs) and in one very very race case it can be detected inside the formula (determinant=0).

2) Adding more limits, especially speed or distance. That would allow to get solution even when you don't have leg. But at the first glance it means to combine this matrix with quadratic solution .. currently I have no idea how to do it. To set Vx and Vy to certain values would be simple, but to add vx*vx+vy*vy=certain value is a problem.
Anyway this could be easily solved numerically, by simply trying more possible courses and returning solution with best error. It's similar with distance.

XLjedi 11-08-07 11:19 AM

I could probably add some post-processing error checks to invalidate obviously wrong solutions, or maybe even plot a different color or color range for solution confidence, perhaps based on the r^2 result from your line fit? I could blend red and green for instance...

If it were me, I probably wouldn't want to muddle up a nice clean math engine with any sort of AI error detection.

XLjedi 11-08-07 11:28 AM

Is it true then to say that this method works with any of the following:

a) two legs

b) one leg and a speed input

c) one leg and a distance input


...and are we making an assumption that the position/bearing plots have to be at equal time intervals? Or did you say that obs time could be variable but would need to be input for each position/bearing plot?

Dr.Sid 11-08-07 11:34 AM

In my implementation any times. It can even be more LOBs from same time. Hm .. I should better try this :rotfl:

Edit: tried .. and it works like charm. At each time there are 2 LOBs now. Now this can be used to limit target distance. You simply add 1 fake LOB to cross the actual LOB at the point of correct distance. Speed does not seem to be so easy anyway.

http://roger.questions.cz/other/AutoTMA2.png

XLjedi 11-08-07 11:40 AM

...and I guess we're assuming Ownship maintains a constant speed while collecting the LOBs.

Does the code accept "n" LOB inputs or is it presently hardcoded to accept a specific size matrix?

Dr.Sid 11-08-07 11:57 AM

Ownship maintain same speed in this demo only. It does not have to. It does not have to go straight. It can do anything. Well in fact moving straight at constant speed is the only situation when this does not work :|\\

It can go in circles. It can use other platform's LOB to limit the solution, there are many many uses. Only the solution is limited to constant speed and bearing. Or let's better say, it finds constant speed and heading which matches the LOBs best.

There can be ANY number of LOBs. Well more than two. Matrix is always 4x4. You only have to sum more data while creating the matrix, so the time of the computation depends in linear way on count of the LOBs, which is great. Most least square method applications results in this time requirements.

XLjedi 11-08-07 12:29 PM

What are you using as your programming platform? That window icon suggest maybe an older edition of VB or C...

I use the latest Visual Studio suite and favor VB 2005 (aka VB.net) Express edition
(WooHOO! FREE Download! :up:)

XLjedi 11-08-07 12:34 PM

Quote:

Originally Posted by Dr.Sid
There can be ANY number of LOBs. Well more than two. Matrix is always 4x4. You only have to sum more data while creating the matrix, so the time of the computation depends in linear way on count of the LOBs, which is great.

Ah, got it. Yeah, that does make it easy.:yep:
So it's position/bearing input only.


Now the only question is... Should I continue bothering with this 1.1 beta or just focus my attention on jumping ahead to 2.0? :hmm:

Dr.Sid 11-08-07 12:39 PM

Well that's yours to decide. I'll guess I'll improve the formulas a bit and I offer any support to put them into your software.

I use old VB beacuse I use at my job, I know it well and it works well in these simple cases. It also has magically small executables and it's runtime is included in all windows installation for few years now.

Anyway in most languages the code should work with more or less copying it as it is, it's really that simple.

Molon Labe 11-08-07 12:59 PM

This is pretty cool. Now, if you can only convince SCS to use it to replace their Truth-based method of aTMA...

Dr.Sid 11-08-07 01:07 PM

Well convince them to make any new game in the first place :rotfl:


All times are GMT -5. The time now is 02:43 AM.

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