This project provides a web-based Porkchop Plot generator designed for interplanetary mission planning.
The service utilizes WebAssembly (WASM) compiled from C++ to efficiently solve Lambert's problem in the browser.
It is supported by a Node.js backend that retrieves ephemeris data from NASA JPL Horizons and delivers it to the frontend.

- WebAssembly Solver: High-performance C++ Lambert solver optimized with WASM SIMD.
- Backend Integration: Node.js server for fetching accurate celestial body data from the JPL Horizons system.
- Accurate Computation: Implements the Battin-Vaughan Lambert algorithm for trajectory calculation.
- R. H. Battin and R. M. Vaughan, "An elegant lambert algorithm," Journal of Guidance, Control, and Dynamics, vol. 7, no. 6, pp. 662–670, 1984.
- Portions of the implementation are adapted with reference to jorgepiloto/lamberthub.
The frontend allows users to select departure and arrival windows, and generates the corresponding Porkchop Plot by solving Lambert’s problem for various launch and arrival date pairs.
The solution space is visualized, enabling optimal trajectory selection based on mission constraints such as delta-v.

To run the Porkchop Plot Generator locally using Docker:
- Download the following files
curl -O https://raw.githubusercontent.com/hydrogendeuteride/lambert/main/Dockerfile
curl -O https://raw.githubusercontent.com/hydrogendeuteride/lambert/main/docker-compose.yml
curl -O https://raw.githubusercontent.com/hydrogendeuteride/lambert/main/env.example- Create a
.envfile based onenv.exampleand adjust the environment variables as needed.
mv .env.example .env- Build and start containers:
docker compose up --build- The application will be available at
http://localhost:[PORT], where[PORT]is specified in your .env file.
Dependencies are automatically built using Github Actions.
If you want to build your own, make external folder at project root and download from here. Unzip it inside the external folder and rename it to eigen3.
- Eigen3 for vector and Linear algebra calculation
- Node JS and Its dependencies(see package.json)
- Plotly for visualization
- Bootstrap for design
This project is licensed under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for details.
This project is based in part on jorgepiloto/lamberthub, licensed under GPLv3.