20,741
edits
| Line 38: | Line 38: | ||
=== Milestone 4: Continue using extrapolation when no new data is available {{Pending }}=== | === Milestone 4: Continue using extrapolation when no new data is available {{Pending }}=== | ||
=== Milestone: Use FGExternalMotionData properly {{Pending}} === | === Milestone: Use FGExternalMotionData properly {{Pending}} === | ||
Thus now, how to simulate it for our AI ? I think that we can simply do the same but instead of considering "when FG client has started" we can consider "when this AI has appears in our m-AircraftList". What do you think about that ? | |||
Of course we need to update it before send his position to FG client. In fact this motionInfo.time is only here to say "I'm born XX.XXX seconds ago" | |||
add an SGTimeStamp field to the AI_Item class and initialize it in addAIAircraft() - i.e. when the aircraft is first "seen" by FGAIS, and in updateAIAircraft() always update the timestamp - in recompute_aircraft() we could then use the actual timestamp + offset | |||
* "orientation" is where the nose of the aircraft is pointing | * "orientation" is where the nose of the aircraft is pointing | ||
* "linearVel" is it's velocity vector (whereto it's flying) | * "linearVel" is it's velocity vector (whereto it's flying) | ||