Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library

Comment by sgentle

4 months ago

It's a bit tricky because velocity and altitude are floored every step, and you can only burn on whole timesteps so you can't necessarily hit the target velocity and altitude in a single burn.

I'm not sure if it's optimal, but this is a 2-burn solution that does 1 burn to hit x=20 and another to hit v>=-14 right afterwards: https://gist.github.com/sgentle/d88dd6fe37e76f9167db24379dc7...

0 comments

sgentle

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities