pyfa-org / Pyfa

Python fitting assistant, cross-platform fitting tool for EVE Online
GNU General Public License v3.0
1.61k stars 406 forks source link

Add drone orbit modeling to `getDroneMult` #2568

Open dambrisco opened 9 months ago

dambrisco commented 9 months ago

Drone damage application is especially important in contexts like ratting where tracking frequently comes into play in fitting decisions. As-is, the Pyfa engine always assumes drones hits, but this, of course, isn't accurate.

This proposed change uses approximations of drone behavior to provide a more realistic (but still admittedly lacking) calculation based on the drone's orbit speed, the target's speed, and (very) broad generalizations about dynamic orbit planes. The result is more accurate tracking-based damage numbers relative to the in-game experience.

The biggest downside to this change is that the calculation is unintuitive for small, fast-moving ships. In-game, these ships are generally in some sort of orbit around you, but the calculation used here will result in an extremely low angular velocity to the drones which doesn't take into account orbit ranges or curvature of the flight path and which, in turn, results in better application for slow-moving drones than you'd see in an in-game scenario. Given that the existing chance-to-hit value is simply 1, I feel this is still a net improvement.

Example calculations

An Ishkur with an Ogre II attacking the same Ishkur

Current

These numbers might look weird, but they're a result of the way orbits work and the included approximation of distortions to the orbit plane caused by a moving target - drones orbit stationary targets at a perpendicular, but spend more time approaching targets that are moving at velocities closer to their own cruise speeds.

DarkFenX commented 7 months ago

This is rather complex subject. The solution given seems strange to me and doesn't include the fact that drones lag behind fast target before resuming MWD cycle. I think I had a dude on reddit who gave me an approximate solution to this, but I never got to testing / implementing it. Here is a reference to oNordak's comment with formulas.

The solution you are giving is partial and probably needs extra controls on UI (like drone mode "drones orbit target") rather than replacing existing modes.

I might look into it later (probably before next release), but I really really don't have much time because of irl stuff.

dambrisco commented 4 months ago

@DarkFenX Appreciate the consideration. If you don't feel this PR is a sufficient improvement over the existing implementation, I'll suggest that we go ahead and close this. I stand by it as a net improvement (in general but especially for PvE), but I'm content to keep this patched to my personal fork pending an improved upstream impl.

I'll note that oNordak's suggestions don't account for orbital angular velocity, so if you do decide to pursue that you may want to account for those using either the approach I have here (using relative non-MWD velocities and orbit range to calculate average angular velocity parallel to the target's trajectory) or a more robust approach (which would need to account for variable orbital plane offsets from the target's trajectory).