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

Approach hold issue with DC-6 #27

Closed ghost closed 3 years ago

ghost commented 3 years ago

David,

on two subsequent flights the acceleration wouldn't engage with the DC-6, the tool was displaying

2021-09-06 22_16_47-SimToolkitPro

Does 'Approach hold mode on' refer to the APPR mode enabled for ILS approaches? I checked with the spad.next data monitor, and the AUTOPILOT APPROACH HOLD sim var did indeed have the value 1 - although the approach mode in the DC-6 was NOT active (it was only on NAV). I actually found that the sim var gets set to 1 whenever the NAV mode in the Gyropilot is enabled, and gets set back to 0 when switched to HDG.

Might be something specific to the DC-6 autopilot, and maybe there's nothing you can do about it. Not a big deal as I was able to identify the corresponding code in flight_parameters.py and simply disabled setting approaching to true when the var is 1, and recompiled, it's an ok workaround. Just wanted to pass this on.

Fwiw, I have no idea why the acceleration worked on an earlier DC-6 flight for me (same scenario, GPS was just set to NAV). Maybe there are other factors that will set that sim var in this aircraft.

daheise commented 3 years ago

Yes, "Approach hold on" is meant to refer to having APPR toggled on.

For my purposes, I'd regard this as a bug in the DC-6 and not setting simvars according to my understanding of how they should be set.

ghost commented 3 years ago

I'd regard this as a bug in the DC-6 and not setting simvars according to my understanding of how they should be set.

Might not be a 'bug' per-se and just the way PMDG coded their custom Gyropilot, same way WT implemented their completely custom navigation core functionality in the CJ4. Unfortunately, due to the crappy navigation bugs and limitations in stock MSFS we may see this more and more often, that 3rd party ac developers do their own thing instead of using the standard SimConnect vars. But yeah I understand it's not the tool's fault, it's impossible to cover all these cases. Not sure if this maybe would warrant a 'fallback tweak' similar to nav_mode_guarded. Not essential for me personally, as I can always tweak the source and rebuild.

daheise commented 3 years ago

It might be warranted. I have been considering dropping that check entirely since I think the combination of other checks usually means another constraint is violated before approach hold would be pressed.

daheise commented 3 years ago

Can you test this branch (issue-27) and see if it does what you need with the new configuration option approach_hold_guarded? I'm having trouble reproducing a case with nav mode on with approach mode also on.

This branch should also have p to stop acceleration if you want to give that a try.

ghost commented 3 years ago

Awesome! Sure will try this out (probably won't to get to it before tomorrow evening though). Thanks!!

ghost commented 3 years ago

Do you have a binary for this too? I just wanted to give this a quick try during my lunch break and built the branch, but it terminates immediately with 'No module named 'sc_config' ...

daheise commented 3 years ago

I forgot to commit a file. Will be several hours before I can fix.

ghost commented 3 years ago

No rush, I'm back working for now anyways...

daheise commented 3 years ago

Forgotten file has been pushed.

ghost commented 3 years ago

Thanks! Did a very quick test (will do a longer flight tonight), the approach hold guard setting now allows it to work with the DC-6, and pausing / unpausing works great too. Awesome! One little thing I noticed - when pausing, the LNAV guard state is duplicated in the status output:

2021-09-09 18_19_22-C__Tmp_simrate_control-issue-27_dist_simrate_control_simrate_control exe

No biggie, just thought I'd mention it.
👍

ghost commented 3 years ago

Worked perfectly on my other flight tonight.

daheise commented 3 years ago

Excellent. I see what's causing the duplicated message (it could happen to several others as well) but I'll think about that as a separate issue. Closing this one.