Yup,
I *create* the AI aircraft with some suitable init position - sound like you've got this bit ok
I send the 'SLEW ON' event to the AI object (and never send the SLEW OFF)
I RequestDataOnSimObject for time/lat/long/alt/pitch/bank/heading of the AI object once-per-second
Each time I get this data packet back for the AI object, I calculate where I want the AI aircraft to be four seconds later than the time (zulu time) returned in the data packet.
How you calculate this 'predict point' can vary, depending on your application - maybe it'll help if you explain what you're doing. E.g. you could have an AI object follow the user aircraft - the predict point would at its simplest be a lat/long/alt projection forwards from the user aircraft using its current position, heading, and speed. Or you could do something similar with the position of a user aircraft in multi-player. In *my* application I actually have a GPS-trace file showing the tracklog of a real aircraft, and it's easy for me to walk forwards through the file and pick out the "T+4 seconds" position of the aircraft. This 'predictive' algorithm is very similar to simply continously aiming at the user aircraft (e.g. if you wanted to follow that) but for various stability reasons it's actually a bit smoother if you actually aim to stay four seconds behind a point you're predicting the user aircraft will be in four seconds, if you can get you're head around that concept....
Given the *current* position and orientation of the AI aircraft (returned in the RequestDataOnSimObject data packet) and the *predict point* I want the AI aircraft to reach in 4 seconds, I can compute the SLEW_AXIS.. event values to send to the AI aircraft to have it arrive at that point at the right time. The AI aircraft doesn't necessarily ever arrive exactly at *that* point because I'll be sending more SLEW_AXIS events a second later aiming at a slightly updated predict point, so the AI aircraft behaves as expected, slewing around the sky in a fairly sensible way, with the 'predict point' always being dangled 4 seconds in front of it to aim at...
You can test the SLEW_AXIS.. events using Traffic Tool on the user aircraft (thanks Manuel). If you do this it helps if you update the shift-Z display values to get vertical climb rate and true heading etc.
Then you can hit kind of a milestone having a SLEW_AXIS_ALT_SET(1000) event cause the AI object to descend at a steady 63 feet-per-minute... and have the RequestDataOnSimObject pick up the AI object altitude once-per-second and display it in a console window or something. At this point you have just about everything you need to create a working navigating AI object that you can move around at will.
But as I mentioned in an earlier post, even though the principle is this simple (once you get it), there is still a lot of quality programming to do just to make sure the process actually works in practice. E.g. I had to calibrate the SLEW_AXIS.. values, and the 'turn-and-move-forward' algorithm of moving an object takes a while to get correct - it's certainly harder than the basic 'warping' of the AI object directly to the point in space that you want it. The good news is that each 'degree of freedom' is actually pretty independent, so you can get the code working for moving the aircraft in lat/long at a fixed altitude (this is the only tricky 'aiming' algorithm) and add in altitude changes afterwards. Pitch and bank don't alter the direction of motion of the aircraft so they're easy to program and are cosmetic really.
My particular requirement has location 'samples' that really can be quite a long way apart (eg 10 seconds), so it's necessary for me to smoothly interpolate between them - today I've been working out how to move the aircraft in a smooth 24-second turn when my lat/long/alt fixes might be at 10-second intervals (try it on a piece of paper....). So I'm dealing with some pretty detailed issues as the basic method is working very smoothly...
Another subtlety (as mentioned by Manuel earlier but I forgot about it) is that my source data (real GPS traces) sometimes have an altitude offset such that for an aircraft on the ground I am trying to tell FSX to move it *lower* to the height my GPS trace says (wrongly) it should be at. FSX works well in placing the AI aircraft on the ground (and not below it), and no lower, but my AI 'following' algorithm was going a bit nuts twisting the aircraft to try and reach the lower position. It was an easyish fix to detect SIM ON GROUND from the AI object and tweak the movement algorithm in that case (i.e. force pitch and bank to zero).
Also today I downloaded the tracklogs of 39 real aircraft from a gliding competition in the UK, and replayed them on my PC substituting 747's for the gliders, and had a cloud of 747's circling smoothly over Cambridge... ZERO framerate hit.
B21