{"id":49718505,"url":"https://github.com/kvsankar/moon-mission","last_synced_at":"2026-05-08T22:10:39.893Z","repository":{"id":333743045,"uuid":"1132780094","full_name":"kvsankar/moon-mission","owner":"kvsankar","description":"Moon mission orbit animation","archived":false,"fork":false,"pushed_at":"2026-05-03T14:06:27.000Z","size":494224,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-03T15:06:35.558Z","etag":null,"topics":["apollo","artemis","astronomy","chandrayaan","isro","lunar-missions","nasa","space"],"latest_commit_sha":null,"homepage":"https://sankara.net/astro/lunar-missions/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kvsankar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-12T12:48:58.000Z","updated_at":"2026-05-03T14:06:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/kvsankar/moon-mission","commit_stats":null,"previous_names":["kvsankar/moon-mission","kvsankar-astro/moon-mission"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kvsankar/moon-mission","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvsankar%2Fmoon-mission","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvsankar%2Fmoon-mission/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvsankar%2Fmoon-mission/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvsankar%2Fmoon-mission/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kvsankar","download_url":"https://codeload.github.com/kvsankar/moon-mission/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvsankar%2Fmoon-mission/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32799325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apollo","artemis","astronomy","chandrayaan","isro","lunar-missions","nasa","space"],"created_at":"2026-05-08T22:10:39.333Z","updated_at":"2026-05-08T22:10:39.885Z","avatar_url":"https://github.com/kvsankar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## Moon Mission Orbit Animations\n\n[![Live Site](https://img.shields.io/website?url=https%3A%2F%2Fsankara.net%2Fastro%2Flunar-missions%2F\u0026label=live%20site)](https://sankara.net/astro/lunar-missions/)\n[![CI](https://github.com/kvsankar/moon-mission/actions/workflows/ci.yml/badge.svg)](https://github.com/kvsankar/moon-mission/actions/workflows/ci.yml)\n[![Deploy to Hetzner VPS](https://github.com/kvsankar/moon-mission/actions/workflows/deploy-hetzner.yml/badge.svg)](https://github.com/kvsankar/moon-mission/actions/workflows/deploy-hetzner.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.txt)\n\nInteractive 2D/3D lunar mission visualizations powered by NASA JPL HORIZONS data and curated runtime ephemeris artifacts.\n\nLive pages:\n\n- Landing/index: \u003chttps://sankara.net/astro/lunar-missions/\u003e\n- Mission pages: \u003chttps://sankara.net/astro/lunar-missions/chandrayaan3/\u003e\n- Orbit data status: \u003chttps://sankara.net/astro/lunar-missions/orbit-data.html\u003e\n- Assets status: \u003chttps://sankara.net/astro/lunar-missions/assets-status.html\u003e\n\nThe full mission list is in the `Mission Catalog` section later in this README.\n\n![Mission Preview](images/social/chandrayaan3-landscape.png)\n\n## Features\n\nI created this animation for educational purposes. It has the following features:\n\n* Real-world orbit data and predictions based on information available from JPL/NASA HORIZONS interface\n* Rendering of the orbit in 2D and 3D\n* Rendering with Earth-centered, Moon-centered, and Earth-Moon relative-frame origins\n* Header pill strip for fast mission controls (origin, follow/view presets, plane, dimension, and visibility toggles), with synchronized Settings panel controls as fallback\n* Multi-craft missions with per-craft styling, visibility pills, and per-craft timeline spans\n* Camera from/to controls for mounted viewpoints (spacecraft, Earth, Moon)\n* Optional auxiliary camera panels (desktop) for simultaneous craft-\u003eEarth and craft-\u003eMoon views\n* Views aligned with J2000 reference axes\n* Information on all earth bound and moon bound maneuvers (engine burns)\n* Realistic textures for Earth and Moon in 3D mode\n* Astronomically correct rendering of sunlight on Earth and Moon, poles, and polar axes\n* Various animation controls for education - camera controls (pan, zoom, rotate), timeline controls, visibility controls\n* A Joy Ride feature which lets you fly along with the spacecraft\n* Relative-frame mode (`mode=relative`) to view Earth-Moon transfer geometry with Earth-\u003eMoon axis fixed\n* Mission comparison mode (`mode=compare`) to overlay two missions in a single animation with a shared comparison clock and normalized Earth-Moon distance — see [Orbit Comparison Mode](docs/design/architecture/orbit-comparison-mode.md)\n* Selectable orbit styles (`Trail` and `Classic`) with background-loaded style sidecars for authored missions such as CH3\n* On startup, if current wall-clock time is within mission data span, runtime can auto-seek to `Now`, switch to realtime speed, and start playback\n* Mission brief panels with authored Mission and HORIZONS Data text, programmatic timeline bars, a pilot orbit preview, and curated CC BY-SA image carousels\n\n## Run locally\n\nPrerequisites: Node.js (for the Vite dev server). Python is only needed for orbit-data tooling.\n\n```bash\nnpm install\nnpm run dev\n```\n\nOpen:\n\n- `http://localhost:7274/`\n- `http://localhost:7274/index.html`\n- `http://localhost:7274/chandrayaan3/`\n- `http://localhost:7274/artemis2/?mode=relative`\n- `http://localhost:7274/orbit-data.html`\n- `http://localhost:7274/assets-status.html`\n- `http://localhost:7274/moon-render-tuner.html`\n- `http://localhost:7274/sky-render-demo.html`\n\n## Multi-Mission Support\n\nURL parameters:\n\n- `index.html` - Landing page\n- `\u003cmission\u003e/` - Open a mission directly using its folder slug from `assets/mission-catalog.json`\n- `\u003cmission\u003e/?mode=relative` - Relative-frame mode\n- `\u003cmission\u003e/?mode=compare\u0026compareMission=\u003cother\u003e` - Mission comparison mode (see [Orbit Comparison Mode](docs/design/architecture/orbit-comparison-mode.md) for the full URL contract)\n- `\u003cmission\u003e/?testMode=true` - Test harness mode for deterministic test behavior\n- `mission.html?mission=\u003cfolder-slug\u003e` - Legacy shared link form; redirects to the matching clean mission URL\n\n### Mission Controls UI\n\n- Primary quick controls live in the header pill strip (`#header-pill-strip`) in the mission page shell (`mission.html` source template).\n- The Settings panel (`#settings-panel`) remains available for the full control set and advanced options.\n- Both surfaces are kept in sync through shared underlying inputs/event wiring (`src/platform/js/ui/event-handlers.js`), so changing one updates the other.\n\n### Debugging with NPZ ephemeris\n\nRuntime supports `chebyshev`, `npz`, and `astronomy` body sources, configured per mission via `ephemeris_source` / `ephemeris_sources` in `config.json`.\n\nCurrent mission configs in this repo are set to `chebyshev` for `SC`, `MOON`, `EARTH`, and `SUN` by default.\n\nFor NPZ debugging, set `\"ephemeris_source\": \"npz\"` (or per-body overrides), and stage matching `.npz` files (for example `geo-\u003cSC\u003e.npz`, `lunar-\u003cSC\u003e.npz`, and `landing-\u003cSC\u003e-geo.npz` / `landing-\u003cSC\u003e-lunar.npz` when used).\n\nDocumentation hub: [docs/README.md](docs/README.md)  \nDeveloper workflow/build/CI guide: [docs/developer.md](docs/developer.md)  \nSystem design index: [docs/design/design.md](docs/design/design.md)\n\nShared authored mission panel content lives in:\n\n- `assets/mission-briefs.json`\n- `assets/mission-images.json`\n\nMission config authoring workflow:\n- edit `assets/*/data/config.json5` (maintainer source with comments)\n- compile runtime JSON with `npm run configs:compile` (writes `assets/*/data/config.json`)\n- verify sync with `npm run configs:check`\n- run `npm run configs:lint` before push when mission config timing or phase/event structure changed; current CI uses this stricter check\n\n## Data Repository Boundary\n\nThis repository contains runtime app code, mission config, and UI assets.\n\nGenerated orbit/ephemeris artifacts are maintained in the sibling data repository (`moon-mission-data`), including:\n\n- `*-cheb.json`\n- `*-cheb.json.gz`\n- `*.npz`\n- `*-meta.json`\n- authored style sidecars such as `geo-style.json` / `lunar-style.json`\n\nApp-managed tracked exceptions that stay in this repo include the current Moon runtime profile images under `images/moon/` and social/share images under `images/social/`.\n\nCI/deploy workflows stage those artifacts into this app during build/deploy.\n\nUseful audit commands:\n\n```bash\nmake data-audit\n# or\nnpm run audit:data-boundary\n```\n\nRepo-boundary process details:\n- [docs/operations/repo-sync-playbook.md](docs/operations/repo-sync-playbook.md)\n- [docs/operations/mission-data-current-state.md](docs/operations/mission-data-current-state.md)\n\n## Design\n\nThe animation has 2D and 3D rendering modes. \n\nThe 2D mode uses SVG and D3 JS. Planetary orbits are rendered as ellipses\nbased on orbital elements. Spacecraft orbits are rendered using line segments\nusing position data.\n\nThe 3D mode uses THREE JS.\n\njQuery is used in parts of the UI, with a lightweight compatibility dialog shim (`src/platform/js/ui/jquery-ui-dialog-stub.js`) instead of full jQuery UI.\n\nOrbit data is fetched offline from JPL/NASA HORIZONS.\nThis data is processed and converted into Chebyshev polynomial format for efficient interpolation.\nThe runtime supports Chebyshev/NPZ/Astronomy body providers, and current mission configs default to Chebyshev for all major bodies.\n\n**Time Systems:** Runtime ephemeris sampling currently uses UTC-based Julian date helpers for\nChebyshev/NPZ lookups, while TDB-based helpers are used for astronomical orientation math\n(for example lunar pole calculations). UTC is used for user-facing event times and display.\nSee [docs/design/design.md](docs/design/design.md) for detailed technical/design notes.\n\n## Testing\n\nThe project includes automated testing with Vitest + Playwright.\n\n```bash\nmake test\n```\n\n`make test` runs the primary UI + visual regression suite (`test/ui.test.js`) on `http://localhost:8111`.\n\nCurrent CI gate:\n- `npm run configs:lint`\n- `npm run test:unit`\n\nFor strategy and full-suite commands (`ui`, `mission-smoke`, `chebyshev-accuracy`), see:\n- [docs/guides/testing.md](docs/guides/testing.md)\n\n### Hosting\n\nAt present the page can be hosted statically. There are no server components needed.\nHowever, you need to serve it over HTTP (not `file://`) to avoid module/fetch/CORS issues.\n\n### Deployment Data Repository\n\nCI workflows stage runtime mission assets from a separate data repository before publishing. Staged assets include orbit artifacts (`*-cheb.json`, `*-cheb.json.gz`, manifests, optional `.npz` / `*-meta.json`, and orbit-style sidecars such as `geo-style.json` / `lunar-style.json`), mission screenshots (`assets/*/images/`), additional shared runtime media, and optional vendored runtime libraries (`third-party/`).\n\nTracked app-managed exceptions such as the Moon profile textures under `images/moon/` and share images under `images/social/` are copied from this repo during deploy rather than staged from `moon-mission-data`.\n\nBy default workflows use:\n\n- `MISSION_DATA_REPO = kvsankar/moon-mission-data`\n- `MISSION_DATA_REF = main`\n\nYou can override these via GitHub repository variables with the same names. No extra token is needed when the data repo is public.\n\nCurrent workflow behavior:\n\n- `.github/workflows/ci.yml` runs on push, pull request, and manual trigger.\n- `.github/workflows/deploy-hetzner.yml` is manual-only (`workflow_dispatch`) for sankara.net deploys.\n\nThe Hetzner workflow stages mission data and publishes the full app plus runtime asset set to `sankara.net`. Use it when shipping app-shell changes, new missions, new manifests, or updated runtime assets.\n\nProduction note:\n- `sankara.net` is served by nginx, not Apache. The live legacy redirect from `mission.html?mission=\u003cslug\u003e` to `/\u003cslug\u003e/` is implemented in nginx config on the VPS, not in this repo's `.htaccess`.\n- The repo's `mission.html` remains a `noindex,follow` compatibility shell so legacy shared links still work even if a host ignores server-side rewrites.\n- `.htaccess` is kept only for cache-header behavior on Apache-like hosts; it is inert on production.\n\nFor development, you can use the Vite dev server:\n```bash\nnpm run dev\n```\n\nOr Python's built-in server:\n```bash\npython -m http.server 7274\n```\n\nOr Node.js http-server:\n```bash\nnpx http-server\n``` \n\n### Deployed Version and Audit Artifacts\n\nEach deployment now publishes machine-readable metadata:\n\n- `/deployment/version.json` - deployed app/data repository commits, CI run metadata, and artifact summary\n- `/deployment/runtime-asset-manifest.json` - required runtime assets and SHA-256 values from `moon-mission-data`\n- `/deployment/file-manifest.json` - file list + SHA-256 for the deployed static tree\n\nFor the production site this is available at:\n\n- `https://sankara.net/astro/lunar-missions/deployment/version.json`\n\nThe Hetzner deploy workflow also runs a post-deploy parity audit (`rsync --dry-run --checksum --delete`) and fails if the remote tree differs from the staged deployment output.\n\nQuick CLI check:\n\n```bash\npython scripts/show-deployed-version.py\n```\n\n## Mission Catalog\n\nCurrent catalog missions are grouped below using the same broad families as the landing page.\n\n### Chandrayaan\n\n- **[Chandrayaan 1](https://sankara.net/astro/lunar-missions/chandrayaan1/)** (India - 2008)\n- **[Chandrayaan 2](https://sankara.net/astro/lunar-missions/chandrayaan2/)** (India - 2019)\n- **[Chandrayaan 3](https://sankara.net/astro/lunar-missions/chandrayaan3/)** (India - 2023)\n\n### Artemis \u0026 Orion\n\n- **[Artemis 1](https://sankara.net/astro/lunar-missions/artemis1/)** (United States - 2022)\n- **[Artemis 2](https://sankara.net/astro/lunar-missions/artemis2/)** (United States - 2026)\n\n### Apollo Trailblazers\n\n- **[Apollo 8 S-IVB](https://sankara.net/astro/lunar-missions/apollo8-sivb/)** (United States - 1968)\n- **[Apollo 9 S-IVB](https://sankara.net/astro/lunar-missions/apollo9-sivb/)** (United States - 1969)\n- **[Apollo 10 LM Snoopy](https://sankara.net/astro/lunar-missions/apollo10-lm/)** (United States - 1969)\n- **[Apollo 10 S-IVB](https://sankara.net/astro/lunar-missions/apollo10-sivb/)** (United States - 1969)\n- **[Apollo 11 S-IVB](https://sankara.net/astro/lunar-missions/apollo11-sivb/)** (United States - 1969)\n- **[Apollo 12 S-IVB](https://sankara.net/astro/lunar-missions/apollo12-sivb/)** (United States - 1969)\n\n### Moon Mapping \u0026 Science\n\n- **[Lunar Orbiter 1](https://sankara.net/astro/lunar-missions/lunarorbiter1/)** (United States - 1966)\n- **[Clementine](https://sankara.net/astro/lunar-missions/clementine/)** (United States - 1994)\n- **[Lunar Prospector](https://sankara.net/astro/lunar-missions/lunar-prospector/)** (United States - 1998)\n- **[LRO](https://sankara.net/astro/lunar-missions/lro/)** (United States - 2009)\n- **[LADEE](https://sankara.net/astro/lunar-missions/ladee/)** (United States - 2014)\n- **[Lunar Trailblazer](https://sankara.net/astro/lunar-missions/lunar-trailblazer/)** (United States - 2025)\n\n### New Cislunar Paths\n\n- **[CAPSTONE](https://sankara.net/astro/lunar-missions/capstone/)** (United States - 2022)\n- **[THEMIS-ARTEMIS](https://sankara.net/astro/lunar-missions/artemis/)** (United States - 2007-2011)\n- **[THEMIS-ARTEMIS Overview](https://sankara.net/astro/lunar-missions/artemis-overview/)** (United States - 2007-2011)\n- **[THEMIS-ARTEMIS Lagrange Transfer](https://sankara.net/astro/lunar-missions/artemis-lagrange/)** (United States - 2010)\n- **[THEMIS-ARTEMIS Lunar Capture](https://sankara.net/astro/lunar-missions/artemis-lunar-capture/)** (United States - 2011)\n- **[Lunar Flashlight](https://sankara.net/astro/lunar-missions/lunar-flashlight/)** (United States - 2022)\n- **[SLIM](https://sankara.net/astro/lunar-missions/slim/)** (Japan - 2023)\n\n### Global Lunar Ambitions\n\n- **[SMART-1](https://sankara.net/astro/lunar-missions/smart1/)** (ESA - 2003)\n- **[SELENE / Kaguya](https://sankara.net/astro/lunar-missions/selene/)** (Japan - 2007)\n- **[KPLO Danuri](https://sankara.net/astro/lunar-missions/kplo-danuri/)** (South Korea - 2022)\n- **[Nozomi](https://sankara.net/astro/lunar-missions/nozomi/)** (Japan - 1998)\n- **[JUICE](https://sankara.net/astro/lunar-missions/juice/)** (ESA - 2023)\n\n### Swingbys \u0026 Observatories\n\n- **[ISEE-3 / ICE](https://sankara.net/astro/lunar-missions/isee3/)** (United States - 1978)\n- **[Wind](https://sankara.net/astro/lunar-missions/wind/)** (United States - 1994)\n- **[WMAP](https://sankara.net/astro/lunar-missions/wmap/)** (United States - 2001)\n- **[STEREO](https://sankara.net/astro/lunar-missions/stereo/)** (United States - 2006)\n- **[TESS](https://sankara.net/astro/lunar-missions/tess/)** (United States - 2018)\n\n### Impact Paths \u0026 Companion Craft\n\n- **[GRAIL](https://sankara.net/astro/lunar-missions/grail/)** (United States - 2012)\n- **[GRAIL SS Stage](https://sankara.net/astro/lunar-missions/grail-ss-stage/)** (United States - 2011)\n- **[LCROSS Shepherd](https://sankara.net/astro/lunar-missions/lcross-shepherd/)** (United States - 2009)\n- **[LCROSS Centaur](https://sankara.net/astro/lunar-missions/lcross-centaur/)** (United States - 2009)\n\n### More Missions\n\n- **[HGS-1](https://sankara.net/astro/lunar-missions/hgs1/)** (United States - 1997)\n\n## Credits\n\n* Jon D. Giorgini for helping with the JPL/HORIZONS interface and data. \n  He was very responsive whenever I mailed him my queries.\n  He has been of great help since 2013 for the Mars Orbiter Mission until now\n  for the Chandrayaan 3 mission.\n  \n* Members of the Bangalore Astronomy Society (http://bas.org.in/) for their valuable feedback\n\n* Members of the Reddit r/isro (https://www.reddit.com/r/ISRO/) community for their valuable feedback\n  \n## Planning Notes\n\nCurrent planning/docs split:\n\n- Runtime architecture and the completed refactor record: [docs/design/architecture/target-architecture.md](docs/design/architecture/target-architecture.md)\n- Active product/backlog planning: [docs/design/roadmap/orbit-ux-and-refactor-roadmap.md](docs/design/roadmap/orbit-ux-and-refactor-roadmap.md)\n- Historical modernization/refactor plan: [docs/archived/modernization-plan-2026.md](docs/archived/modernization-plan-2026.md)\n\nThe broad runtime rearchitecture is effectively complete, so the archived modernization plan is kept for history rather than as the current source of direction.\n\n## AI assistance\n\nSee [docs/guides/ai-tools.md](docs/guides/ai-tools.md) for how AI tools are used in this repo (and where tool-specific notes live).\n\n## Inspirations\n\n* https://mgvez.github.io/jsorrery/ \n* https://github.com/Flowm/satvis\n* https://github.com/CoryG89/MoonDemo \n* http://stuffin.space/ \n* https://theskylive.com/3dsolarsystem \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkvsankar%2Fmoon-mission","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkvsankar%2Fmoon-mission","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkvsankar%2Fmoon-mission/lists"}