Stormworks: Build and Rescue

Stormworks: Build and Rescue

33 ratings
V2 Enhanced TWS Radar
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
586.264 KB
21 Dec, 2024 @ 9:20am
18 Jan @ 9:46pm
14 Change Notes ( view )

Subscribe to download
V2 Enhanced TWS Radar

Description
Enhanced Mult-Target Tracking



Specifications
Scanning at a full 360-degrees with a default of 7km range, this TWS radar is a massive improvement over my last both technically and practically. It's also computationally expensive, but it's early days though so there's a lot of improvements to be made.

Wherein my V1 TWS radar used the Hungarian algorithm, this implementation uses the Joint Probabilistic Data Association Filter (JPDAF) for multi-target tracking instead. To understand the JPDAF, it's probably easiest to explain the single-target-tracking probabilistic data association filter (PDAF) first. Most conventional trackers work by updating the track using the radar return nearest to the anticipated position. This approach works well in simple scenarios but struggles when measurements are ambiguous due to noise or clutter.

Instead of making a hard one-to-one assignment, the PDAF calculates a weighted average of all plausible measurement associations based on their probability of association. At it's core, it's essentially just a modified Kalman filter, it's able to keep track of the variance of the estimate and use this in determining if a radar return is likely to have originated from the track. A radar return that is 7 standard deviations away is given more importance than a return that is 14. The standard deviation distance is then used to find the normalized likelihood of association between each return and that track.

Extending this concept to multiple targets, the JPDAF differs from the PDAF only in how the probability of association is calculated. Instead of using the likelihood of association between a specific track and measurement in the weighted average, the JPDAF considers the possibility of a combination as a whole. Imagine you have 2 tracks and 2 measurements, if you were to assign each track to either a measurement or clutter (where only one track can be associated to one measurement at a time) there is a total of 7 different feasible combinations:

T1, T2
0, 0 --both assigned to clutter
0, 1 --track 2 assigned to return 1
0, 2
1, 0
1, 2
2, 0
2, 1

The probability of event (1, 2) can be calculated similarly to PDAF using the likelihood of association between a specific track and measurement. In this event it'd be calculated like so, (likelihood between track 1 and return 1) multiplied by (likelihood between track 2 and return 2). Now from the event probabilities, the probability of association between a track and a measurement can be calculated. If you wanted to find the probability that track 1 is assigned to measurement 2 then you'd add all events containing this combination (i.e. P(2, 0) + P(2, 1)). The search for all possible combinations can be exponential though, so it's very possible that it'll go over runtime for complex situations. I have tried to optimise this using validation gates which will limit which returns a track can be associated with.

To Do
This is still a massively WIP creation, here's a current list of what needs adding:
--Optimisation:
--clustering optimisation, might be able to do separate searches for clusters of tracks distant from each other

--Revise track initiation and deletion:
--handle cases where tracks coalesce

--Time-since-detection filter

--UI
--Selected Target Info

Operation
To launch on a specific target, focus on the track through the monitor and then press the space-bar to launch a missile.

Customisation
Please do not use the select tool on the radar
I've added a few different options to change radar parameters in the MC, it's not obvious what each of these do so I'll explain them here.

If you want to change monitor sizes you'll have to do that manually by adjusting the "X" and "Y" property sliders to match the width and height of your monitor. For small monitors, you mat also want to consider offsetting the map forwards.

Please don't change the radar unless you know how to xml edit it's speed, but if you do, change the radar settings there's a few things that need to be adjusted in the properties. "Max Range" is obvious, but "Sweep Period (Ticks)" should be set to the time it takes for your radar to complete a full sweep (you can find this value by hovering over the MC while it's spawned).

"Initial Variance", "Process Noise", and "Gate Size" are all sort of related. If you turn on the "Draw Gates" property it's easy to get a good idea what each of these do (anything outside these gates are rejected by the track).

A high Initial variance will spawn the track in with a much larger validation gate, it'll also be more sensitive for the first few sweeps before settling. Changing this to a higher value can be useful for tracking fast moving targets, but it'll also make it take longer before other independent returns adjacent to the track to have a track initiated on them.

A high process noise will permanently raise the size of the validation gate, compared to something with a low process noise. It'll also make the estimates more sensitive to changes.

Gate size is measured in standard deviations, setting the gate to 40 will reject any targets more than 40 standard deviations away from the prediction.




Permissions
Feel free to re-upload this missile and radar system on your own vehicles, so long as you provide the link to this WS page. Do not, however, re-upload the truck.
73 Comments
SMITHY  [author] 20 Jun @ 3:54pm 
yeah, that should be very possible. Sadly I probably won't be able to add it atm. The code is online if you wanted to change it to everything, but keep in mind the code is extremely messy
Bluu 19 Jun @ 11:16am 
Would it be possible to have the radar output XYZ target locations of all the current targets tracked or make it have a filter to identify targets closing the distance above a specific speed and feed all the XYZ targeting information in order from most recent to least recent?
SMITHY  [author] 3 May @ 8:26pm 
Not with its current setup
Gangster Poopland 30 Apr @ 9:14am 
Is it possible to give it more radars? that way it tracks faster like an AESA radar
SMITHY  [author] 27 Apr @ 5:41pm 
Probably won’t be able to find the time for a while, but the code’s on GitHub if you want to take a crack at it
Palkia 27 Apr @ 10:40am 
Would you be able to add a B scope mode?
SMITHY  [author] 11 Apr @ 5:39pm 
I probably won’t be able to add more functionality for a while
SMITHY  [author] 11 Apr @ 5:38pm 
Should be a property option in the MC called like TSD or something
50°02'05.1"N 19°10'33.0"E 22 Mar @ 5:35pm 
also how do you change the time since detection is it the timeout option?
50°02'05.1"N 19°10'33.0"E 22 Mar @ 5:26pm 
when you have time could you add a option or something like that in the MC soo that instead of full-360 on the monitor its forward looking 180 degrees