daheise / simrate_control

A 'set it and forget it' utility to increase and decrease sim rate while following a flight plan. Provides time compression while in stable flight.
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

No AP active detected with WT CJ4 #17

Closed ghost closed 2 years ago

ghost commented 3 years ago

Unfortunately this great tool does not work with the WT CJ4, it does not detect that the AP is active. It's probably the same issue as with the A320, WT have implemented their own custom autopilot.

Could you disable the NAV mode check for the CJ4 as well? I tried to modify / build it myself but failed miserably (Python is not my language 😉)

ghost commented 3 years ago

Never mind, I finally got the build working. By adding

elif ("CJ4" in str(sc_title) and sc_autopilot_active)

the tool now also works with the WT CJ4. You might still want to add this to the official build.

daheise commented 3 years ago

Thanks for the report. Did you happen to try with the default CJ4 as well?

dflachbart commented 3 years ago

Sorry nope, haven't touched the default CJ4 forever 😉, but I'm fairly certain that this problem doesn't exist there, as it seems to be related to WT's custom handling of NAV in their autopilot.

I get where you are going with this, you don't want to disable the check unnecessarily for the default aircraft if it's not broken there... I have to check if the title, or anything else, would indicate that it's the mod version

dflachbart commented 3 years ago

Yeah, I printed out sc_title and it does not indicate whether it's the WT CJ4 or not. I guess you could check whether one of the WT-specific LVARs or HVARs exist, but don't know if this is easily doable with the Python SimConnect lib.

No big deal, as I can just continue to use my custom-built executable.

daheise commented 3 years ago

Thanks for doing the research. I'll keep this issue open in case some solution comes to mind, or if some elegant solution presents itself if I rewrite to make the code less spaghetti.

daheise commented 3 years ago

I have been revisiting this problem. The difficulties with the CJ4 go beyond just not seeing the the AP active. Waypoint synchronization between the FMS and the simvars is not quite right, even with FP Sync turned on in the mod.

daheise commented 3 years ago

I spoke too soon on this. I needed to restart my flight with the CJ4 FP Sync On, and it seemed to work well enough that I'm going to push the configuration setting to turn off the LNAV check and include it in the next release.

ghost commented 3 years ago

Great to see you are working on this again! I have to admit that I'm not using the CJ4 any more, since I got the PMDG DC-6 I'm not flying anything else 🙃. But I'm still using your tool whenever I need acceleration, and encountered that exact same issue with the DC-6 as well (and have been modifying the script in the same way), so hopefully the new nav_mode_guarded option will work here too. Will give that a try later today.

daheise commented 3 years ago

You probably want to be aware of the workaround in #22 for the Working Title mods. This will work on the most recent pull to master. I'll make a release sometime today.

Don't even ask about the FBW A320NX though; they have a completely custom ecosystem of simvars and it would just be a nightmare of one-offs to get that to work.

daheise commented 3 years ago

Just released v0.7.1; closing this issue.

daheise commented 2 years ago

I think this issue has been resolved on my mobiflight branch. Had to introduce two new dependencies; only one requires user installation.