4 ms·
The target velocity is a factor of height, and the autopilot has “160” hardcoded as the ceiling, so going above that means it will never decelerate fast enough.
by ricardobeat 4y ago
The target velocity is a factor of height, and the autopilot has “160” hardcoded as the ceiling, so going above that means it will never decelerate fast enough.
https://github.com/szhu/lunar-lander-autopilot/blob/master/autopilot.js#L67 https://github.com/szhu/lunar-lander-autopilot/blob/master/a...
- szhu 4y agoThat's a ceiling for the speed the autopilot is okay with letting the lander descend. There is no ceiling to how much hard it will try to "apply the brakes". I agree that the target velocity calculation is off though. I was excited that I came up with something reasonably theoretically correct for correcting rotation... and for figuring out when to fire the engines I just gave up and eyeballed it :)