This is my missile detection system that detects linear based missiles based on how close their velocity could potentially take them to the chip.
The contest is to make a chip that can detect more than just linear missiles. Arbitrary quadratics are not much of a bonus, but if I can see someone beat an arbitrary Bezier curve then I'll be impressed.Code:@name Missile Classification System v2 by Xixo12e @inputs Target:entity ScanPos:vector @outputs TMDist TAng Alert interval(30) if(Target) { TPos=Target:pos() TVel=Target:vel():normalized() TDir=(ScanPos-TPos):normalized() TDst=TPos:distance(ScanPos) #Ang between TVel and TDir TAng=acos(TVel:dot(TDir)) #The closest the threat could end up to the target if #it followed it's current linear path TMDist=tan(TAng)*TDst Alert=(TMDist<200) }
THE RULES:
-The chip must be able to, at the minimum, classify if a given entity is a missile that could potentially threaten a given position
-You must be willing to post the code in it's entirety
-It must not detect things that are gross false positives (e.x. something that is more than 1-2 degrees off the path to the target)
-The chip must not exceed 200 op/s when checking if a target is a missile every 10 ms (the one above does 60)
Last edited by xixo12e; 08-29-2010 at 02:07 PM.
I don't think this idea is great enough for a wiremod challenge, we'll have to see.
Originally Posted by xixo12e
Done. I changed exactly onenumber from your code.Code:@name Missile Classification System v2 by Xixo12e @inputs Target:entity ScanPos:vector @outputs TMDist TAng Alert interval(30) if(Target) { TPos=Target:pos() TVel=Target:vel():normalized() TDir=(ScanPos-TPos):normalized() TDst=TPos:distance(ScanPos) #Ang between TVel and TDir TAng=acos(TVel:dot(TDir)) #The closest the threat could end up to the target if #it followed it's current linear path TMDist=tan(TAng)*TDst Alert=(TMDist<50) }
0a3c696d6d696269733e092e2e2e7774662c20776879206973 20746865726520612068696464656e20666f72756d2063616c 6c6564206469783f200a3c4a6174476f6f6477696e3e093e2e 3e200a3c4a6174476f6f6477696e3e093c2e3c200a3c49616d 4d634c6f76696e3e094e4f200a3c49616d4d634c6f76696e3e 094e4f204e4f204e4f204e4f204e4f
I didn't ask if you could mod it, I asked if you could come up with a more viable algorithm. =|
Well you could use a loop to estimate its final position assuming it maintains the same velocity and acceleration.
I wouldn't recommend it though.
Last edited by Dav1d; 08-29-2010 at 12:03 PM.
That doesn't add up very well...acceleration is the delta of velocity. If acceleration = 0, then velocity is constant. That is the only case where an object can maintain both the same velocity and acceleration (if velocity never changes).
And yes, tracking points through a sphere is a valid yet incredibly laborious way to do it. That's why I used a little trig wizardry.
OK, bit of a change in direction:
The task is to classify if a given target following an arbitrary Bezier curve will hit a given point.
I'm not thick, I know that Acceleration = ΔVelocity / Time. You misunderstood me.
Predicting where an object will land based on velocity alone would not work for objects that are moving in an arc.
For example if you wanted to detect if a prop would collide with you, and said prop was just orbiting a point, taking into account only its velocity would lead the 'propkill detector' to believe the prop is going to hit you (as it approaches a certain point in its orbit its velocity may equal the direction from it to you) if you rely on dot product alone. Taking into account the change in velocity would solve this issue and stop your 'anti' - mingebag shield or RPG detector from smashing peoples' centrifuges into the ground / bombing them into oblivion as you walk past them.
Hmmm, it's just an idea but would it be possible to find the linear nth derivative of the vector components and use that to create a linear projection that oyu can then revese the derivation on to return a projected course assming it follows some formula? I can't be bothered doping diagrams, sorry and you would have to record it's known arc for the last 50 ticks or something to make it most accurate. It still wouldn't work against a simple one on a fly-by that then changes direction, but you could easily integrate a instantaneous vector system to account for that.
The main problem is this requires you to work out a formula for the vector component paths, ah well.
To get past the issue of not flagging for more than 2 degrees off, you could just require it to flag only if the linear derivative vector AND the projected flight are within 2 degrees of target.
Might be a stupid idea, i'm not really sure what's wanted. Sorry for lack of diagrams, contact me if you REALLY want this explained further.
Actually i'm working on a whole SYSTEM that will do this. It will be my re-creation of SAGE aka the AN/FSQ-7/8 COMBAT DIRECTION CENTRAL
http://ed-thelen.org/SageIntro.html
SAGE
YouTube - Cold War Computing - The SAGE System
Yeah, it's the biggest and most complicated computer ever built, made to protect north America from a mass soviet nuclear bomber attack. But it was large because digital computers of the day where extremely large and inefficient, using vacuum tubes. Transistors where still lab stuff. Today, technology has advanced so much i can cook this up in a video game. Think about that for a second.
Right now it's built against airplanes, it can direct missiles OR uav interceptors, and one day manned interceptors. No top-gun stuff here, the pilot's job will be a typical ground-directed intercept in a straight round trip; take off, let the airplane fly to the target and shoot it down, ajusting this and that, and land the interceptor. That's how it really was.
Here it is in detail
Full Inertial D-1G Drone + Automatic Interceptor Network
Since i can use it to shoot Surface to Air Missiles; it could pretty well make it good enough to shoot something as fast and elusive as a ballistic missile. Let's see the rules
-The chip must be able to, at the minimum, classify if a given entity is a missile that could potentially threaten a given position
Right, this is the main point. Right now, there is a man in the loop that checks out the radar scopes and determines each target's threat level according to their course. I need to make this automatic. Maybe it's quite simple in fact! But it's my secret for now.
-It must not detect things that are gross false positives (e.x. something that is more than 1-2 degrees off the path to the target)
Right now, the accuracy of my wonder-"path prediction unit" is, err, to be proven. I works... but i think results are, err, inconsistent. Maybe i need to test it out more.
-The chip must not exceed 200 op/s when checking if a target is a missile every 10 ms (the one above does 60)
Okay... The whole system uses like 5 E2 chips, not including interceptors LOL. I can probably condense some stuff... Here's the list
Radar Scope Processor
Target Tracking System (Grabs XYZ Position and Velocities, for now)
Multi-Target Tracking Environment (stores data (XYZ, velocities) of all targets)
Path Prediction Unit (computes path of target being tracked)
Interceptor Control (grabs data from PPU and sends it by radio to interceptor, controls launch and abort)
Hmm
Last edited by wasserfall; 01-27-2011 at 09:21 PM.
Bookmarks