ELI5: How would a military vehicle know when they are being "locked on" by weapons?

They don't - at leas not like how you see in video games/movies.

The only missiles that can be "detected" are radar missiles - which are missiles that are guided to the target by a radar beam projected from an external source (usually from a combination of the firing plane/ground site and the missile's own internal radar).

But you can't actually detect the missile. What is being detected is the targeting radar. Targeting radar typically operates in two modes - a broad sweep mode for identifying targets, and a focused mode for painting targets so that missiles can track them.

A countermeasure system can detect when a plane is being hit by the targeting radar, and can determine which of those two modes the radar is in. If the radar is in the search mode, you can be fairly sure that it sees you but hasn't "locked on" yet. If the radar is in its focused mode, you can guess that the reason for that is because a missile has been launched and is using that focused beam to track you. But you don't know for sure that either of those two things is the case.

The only way to know for sure that a missile is tracking you is to visually see the launch or the smoke trail that it leaves. There are a bunch of pilot recordings on youtube from Vietnam and Gulf War era battles - like (this one)[https://www.youtube.com/watch?v=2uh4yMAx2UA] in which you can hear the pilots calling out missiles launches to each other because the best way to know about an incoming missile is to have a lot of planes flying in close proximity to each visually scanning for missiles and calling them out as they see them.

/r/explainlikeimfive Thread