Yes; but the "one" on the tracks is now the passenger in the car. Does the car divert from hitting a bunch of people on the road ahead if it means killing its passenger? With autonomous cars, suddenly a lot of hypotheticals get really real.
The trolley problem as bystander is a different thing and generally not acting is the legally safer option though in both cases the likely sentence would be minor through various means.
edit/additional note: while you can't shoot down the plane legally and no soldier will be obligated to follow such an order, they would likely also fall under the "Übergesetzlicher Notstand". It's not a legal basis but simply a defense.