banzaii Posted March 12, 2004 Report Posted March 12, 2004 when i set new pos to msfs every (msfs) frame (this is only simple example code how my code works) while(1){ strPos POS; // 36bytes long struct contains long,lat,HPR and ALT POS.SetHead(POS.Head+1.f); // just rotate in headin WriteAndProcess(0x560, sizeof(strPos), &POS); } this make rotation but visually it not seems smooth and more worst is when i copy actual data thru ethernet to set them on another computer&simulator what you can advice me to improve this state? thanks a lot for answer banzaii
Pete Dowson Posted March 12, 2004 Report Posted March 12, 2004 Sorry for the delay in replying -- I've been on holiday with no Internet access. I'm just trying to catch up with an enormous backlog now! when i set new pos to msfs every (msfs) frame(this is only simple example code how my code works) while(1){ strPos POS; // 36bytes long struct contains long,lat,HPR and ALT POS.SetHead(POS.Head+1.f); // just rotate in headin WriteAndProcess(0x560, sizeof(strPos), &POS); } this make rotation but visually it not seems smooth and more worst is when i copy actual data thru ethernet to set them on another computer&simulator This is not really my field, but how are you synchronising this to ensure "every (msfs) frame"? I think you would need at least to "sleep" a little in your loop, to allow MSFS to do some processing. Your best bet would be to limit the FS frame rate to something easily achievable (like 20 fps, say), then make sure your loop take 50 mSecs (say) -- leaving plently of process time for FS. If you run on a P4 PC with hyperthreading, you may be able to force your program onto one "processor" whilst FS is on the other, for better results. Otherwise, what might be happening is that FS isn't getting time to do its thing and meanwhile several of your changes accumulate and get executed at once, visually. This would be jerky for both reasons. The same can happen over a Network, or even worse unless you limit FS frame rates. Regards, Pete
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now