Flying planes in Microsoft Flight Simulator with a JavaScript autopilot (2023)
A (lengthy!) tutorial on how to write your own JS-based autopilot code to fly planes in Microsoft Flight Simulator with a web page to both visualize the flight and control the AP. Note that this is a complete do-over of a previous page that used a combination of Python and JavaScript, and only covered basic autopilot functionality. This rewrite threw all of that out, and goes much, much further: you just want to have the plane take off without having to do anything? Check, this tutorial covers auto-takeoff. Flying with waypoint-based navigation, not by "programming airports and radio beacons one letter at a time with a jog-dial" but by just placing markers on a map and dragging those around as you please, mid-flight, Google Maps style? Check. After all, why would we not, putting a map on a webpage is super easy (barely an inconvenience). In fact, let's throw in flight plan saving and loading, so others can fly the same route! And maybe you want the plane to fly a fixed d
DeepCamp AI