by Hooray » Mon Jun 27, 2016 7:45 pm
the position of each AI/MP aircraft is known, can be obtained via the property tree - you can get a bearing/distance and altitude, see aircraft.nas and geo.nas in $FG_ROOT/Nasal for details. IIRC, there also is some line-of-sight helper somewhere that checks if the the line of sight is occluded or not.
So, if you can live with these workarounds, it can be done using a custom Nasal/Canvas HUD, but you will obviously need a bit of math to project the 3D view onto the 2D HUD
If you want this to work for non-cockpit views, you will have to use a different approach ...
Anyway, you will need some trig to come up with a mapping that works well enough - i.e. any aircraft at your 12'o clock (relative bearing=0) would be at the center of your HUD, as long as it has the same altitude - you'd scale based on range to the target, and then use the width/2 to compute a relative offset to the right and to the left of the HUD's center, and do the same for altitude (height of the HUD). Depending on what you have in mind, could get much more fancy obviously, but that should do for starters.