I thought it would be fun to make a projectile motion simulator that looks for the possible space of position and exit velocity that is able to launch cargo into the Upper Hub.
This python program generates an interactive matplotlib program that you can play around with, and maybe this could help with determining where/how to shoot cargo given different confidence levels in shoot angle and speed. For example, if you aren’t very confident in your ability to control the speed, find a position on the field where the crescent in the bottom plot is very tall for a particular angle. A more computational approach might be to find a combination of [x position, y position, angle, speed] that maximizes an ellipse (representing your variances in angle and speed) inside the green region. I have no idea how to implement this, but if you have an idea, try it out or let me know!
- This uses simple 2D projectile motion physics (no drag or spin) and assumes cargo does not bounce out.
- The color gradient is calculated with the area of the green region multiplied by how much field of view the rim of the Upper Hub takes up from that distance. There might be a better way to calculate the allowable error in yaw, given that the goal is circular.
- For generating the green region, I’m assuming the cargo has a radius of 0. Whether or not the generated trajectory turns green does take the cargo radius into account though. Whether if that’s an accurate way to do it, idk