Jump to content
The simFlight Network Forums

Recommended Posts

Posted

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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.