Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache speed fix #3315

Merged
merged 18 commits into from
Dec 27, 2023
Merged

Apache speed fix #3315

merged 18 commits into from
Dec 27, 2023

Conversation

zhexu14
Copy link
Collaborator

@zhexu14 zhexu14 commented Dec 22, 2023

This PR 1) introduces a cruise_speed parameter to the AircraftType class and uses it as an override for default TOT/Ground Speed calculations and 2) sets this for the AH64.

The reason for this change is that air starts with the Apache at a speed >130kt seems to completely break the FCR, even if you subsequently slow down. In the development branch, Liberation sets the Apache to travel at 168kt, so any player air starting won't be able to use their FCR and it wouldn't be readily apparent as to why.

In the longer run this parameter may also be useful for other aircraft e.g. to override the cruise speed to the most efficient etc.

Copy link

codecov bot commented Dec 22, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (03caddc) 46.14% compared to head (16b0714) 46.14%.

Files Patch % Lines
game/ato/traveltime.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3315      +/-   ##
===========================================
- Coverage    46.14%   46.14%   -0.01%     
===========================================
  Files          474      474              
  Lines        26088    26091       +3     
  Branches      4546     4547       +1     
===========================================
+ Hits         12039    12040       +1     
- Misses       14026    14028       +2     
  Partials        23       23              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Starfire13
Copy link
Contributor

Starfire13 commented Dec 22, 2023

That's odd. Does this happen every time? I accidentally air-started my Apache last night (forgot to tick the interrupt at start time check box) and was able to use the FCR.

Edit: I just tested twice more with air starts and on both occasions, I had no problems using the FCR.

Screenshot 2023-12-23 003638

@zhexu14
Copy link
Collaborator Author

zhexu14 commented Dec 23, 2023

That's odd. Does this happen every time? I accidentally air-started my Apache last night (forgot to tick the interrupt at start time check box) and was able to use the FCR.

Edit: I just tested twice more with air starts and on both occasions, I had no problems using the FCR.

Yeah, it happens consistently for me. Here's a Liberation save (off the development branch) which shows the issue. Just hit Take Off using the In Flight start type and try to use the FCR -- it will need to run a BIT first, but even after the BIT is complete, the Single/Continuous Scan button doesn't do anything.

apache_fcr.liberation.zip

@Starfire13
Copy link
Contributor

I think this is caused by the generator 1 and 2 failure on entering the mission. It's not just the FCR that wonks out. The TADS has to reset as well. I guess after everything "crashes", the FCR doesn't re-initiliase properly. Reducing the speed helps prevent the generator failure in your mission. But if you try the attached mission on the Falklands map, you'll find that the problem doesn't occur at 168 knots. I wonder if it might be temperature dependent.

I'd test more but I have to head out now.

No man's Land #5721 Turn 2.liberation.zip

@zhexu14
Copy link
Collaborator Author

zhexu14 commented Dec 23, 2023

I think this is caused by the generator 1 and 2 failure on entering the mission. It's not just the FCR that wonks out. The TADS has to reset as well. I guess after everything "crashes", the FCR doesn't re-initiliase properly. Reducing the speed helps prevent the generator failure in your mission. But if you try the attached mission on the Falklands map, you'll find that the problem doesn't occur at 168 knots. I wonder if it might be temperature dependent.

I'd test more but I have to head out now.

No man's Land #5721 Turn 2.liberation.zip

Good call, I did some testing in the ME and it seems to be temperature dependent. I guess there's two ways around this issue, either make the speeds temperature dependent (kinda like #2125 with payloads in some ways) or limit the speed to something conservative that works for all temps. I'm leaning towards the latter (simpler) and 120kt seems to work for temps up to 35 deg.

@Starfire13
Copy link
Contributor

Starfire13 commented Dec 23, 2023

I just finished some testing as well, and it appears the 126 knot speed that you start off with for DEAD/BAI missions on air start (not sure why those start out at a lower speed than CAS does) is fine even in Nevada (2000 feet elevation) at 50 degrees. So, I think you are right that simply limiting the speed (which really has no downsides anyway) across the board will allow us to avoid this problem.

@zhexu14
Copy link
Collaborator Author

zhexu14 commented Dec 23, 2023

I just finished some testing as well, and it appears the 126 knot speed that you start off with for DEAD/BAI missions on air start (not sure why those start out at a lower speed than CAS does) is fine even in Nevada (2000 feet elevation) at 50 degrees. So, I think you are right that simply limiting the speed (which really has no downsides anyway) across the board will allow us to avoid this problem.

Thanks @Starfire13 , I'll have a look at the BAI/DEAD planning and why it's using a different speed.

EDIT: a 0.75 factor is applied to the configured speed for certain waypoint types. 168 * 0.75 = 126. With this PR the new speed would be 90kt.

@Starfire13
Copy link
Contributor

EDIT: a 0.75 factor is applied to the configured speed for certain waypoint types. 168 * 0.75 = 126. With this PR the new speed would be 90kt.

How interesting. So is it just CAS then that's the problem? I wonder whether it might be easier to just add the 0.75 factor to Apache CAS missions rather than having to deal with the potential issues from all CAS flights being 0.25% slower if it's applied globally.

@zhexu14
Copy link
Collaborator Author

zhexu14 commented Dec 23, 2023

EDIT: a 0.75 factor is applied to the configured speed for certain waypoint types. 168 * 0.75 = 126. With this PR the new speed would be 90kt.

How interesting. So is it just CAS then that's the problem? I wonder whether it might be easier to just add the 0.75 factor to Apache CAS missions rather than having to deal with the potential issues from all CAS flights being 0.25% slower if it's applied globally.

Yes, it's due to CAS having a different layout (hold, join, ingress etc) to BAI/DEAD. However it'd be a fair bit of work to adapt the layout to be aircraft specific.

game/ato/traveltime.py Outdated Show resolved Hide resolved
@DanAlbert
Copy link
Member

Yes, it's due to CAS having a different layout (hold, join, ingress etc) to BAI/DEAD. However it'd be a fair bit of work to adapt the layout to be aircraft specific.

Yeah, please don't do that. I'm working on #270 and any sort of changes to flight plan layout is going to make that harder.

@Starfire13
Copy link
Contributor

Surely there must be some sorta data somewhere (perhaps in pydcs?) about what the maximum speed is though? I mean, 168 knots is beyond the AH-64's rated top speed. The AH-64 would never be flying at 168 knots. A clean AH-64D can reach about 145 knots. With a combat load, 120 to 130 knots is the norm.

@DanAlbert
Copy link
Member

That data exists but it's not particularly useful. Max speed and a reasonable cruising speed have little in common.

Copy link
Member

@DanAlbert DanAlbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. Holidays... Over now though :)

@DanAlbert DanAlbert enabled auto-merge (squash) December 27, 2023 22:04
@DanAlbert DanAlbert merged commit 211ec86 into dcs-liberation:develop Dec 27, 2023
8 checks passed
Dragonius pushed a commit to Dragonius/dcs_liberation that referenced this pull request Dec 28, 2023
This PR 1) introduces a cruise_speed parameter to the AircraftType class
and uses it as an override for default TOT/Ground Speed calculations and
2) sets this for the AH64.

The reason for this change is that air starts with the Apache at a speed
>130kt seems to completely break the FCR, even if you subsequently slow
down. In the development branch, Liberation sets the Apache to travel at
168kt, so any player air starting won't be able to use their FCR and it
wouldn't be readily apparent as to why.

In the longer run this parameter may also be useful for other aircraft
e.g. to override the cruise speed to the most efficient etc.

(cherry picked from commit 211ec86)
@zhexu14 zhexu14 deleted the apache_speed_fix branch February 17, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants