Open vamshichittaluri opened 2 years ago
If you send them within the same render cycle there should be no jitter?
Hi,
Not sure if I am having the same issue, but here it goes.
Lets say I want to read two SimVars, one after the other, during the same deltaTime (or render cycle as @fyyyyy suggests):
simvar_cn1 = aq.get("TURB_ENG_CORRECTED_N1:1")
simvar_fn = aq.get("TURB_ENG_JET_THRUST:1")
Somehow, if I do this, these two variables are read at different cycles (I can tell since I can relate one to the other due to configuration files). I have tested these with SimVar Watcher in MSFS2020, and as expected they are read at the same cycle; but not with SimConnect through Python.
Any ideas how to solve this issue? @fyyyyy, how do you suggest to send them during the same render cycle?
Thank you.
PS: @vamshichittaluri did you solve it?
This is probably a limitation of SimConnect, not related to python or this library in particular.
This is probably a limitation of SimConnect, not related to python or this library in particular.
Not really, we can do that on C# and C++ by controlling reading and writing SimVars at every deltaTime (every frame); SimVar Watcher, for example, works as expected.
There is probably a way to do in Python-Simconnect, I'm just not sure and did not find any examples.
Thank you in any case @fyyyyy
Have you thought about running Python SimConnect multi-threaded? It could potentially solve your issue. I'm using this trick to make the Mobile Companion App run more smoothly.
Have you thought about running Python SimConnect multi-threaded? It could potentially solve your issue. I'm using this trick to make the Mobile Companion App run more smoothly.
Not sure that would help, honestly. I am testing with very small python scripts and just a couple of simvars, so threading should not be the issue or solution in this case.
There has to be a way to read a number of SimVars at a given frame cycle, like SimVar Watcher does.
probalby configured here, try changing these
class SIMCONNECT_PERIOD(CtypesEnum): #
SIMCONNECT_PERIOD_NEVER = 0
SIMCONNECT_PERIOD_ONCE = 1
SIMCONNECT_PERIOD_VISUAL_FRAME = 2
SIMCONNECT_PERIOD_SIM_FRAME = 3
SIMCONNECT_PERIOD_SECOND = 4
probalby configured here, try changing these
enum def
use:
class SIMCONNECT_PERIOD(CtypesEnum): # SIMCONNECT_PERIOD_NEVER = 0 SIMCONNECT_PERIOD_ONCE = 1 SIMCONNECT_PERIOD_VISUAL_FRAME = 2 SIMCONNECT_PERIOD_SIM_FRAME = 3 SIMCONNECT_PERIOD_SECOND = 4
Good idea. Will look at it ASAP!! Thank you!!
Hey,
when we set data on the aircraft, instead of individually setting variables is it possible to send them at once? i've been seeing some jittering when i send more than one var immediately. Please suggest. I understand that in the simulation variables there are no structs to send them in as a structure, but I need help figuring out how to solve the jitter issue, when we set multiple vars via simconnect.
Kind Regards Vamshi