mirror of
https://github.com/acamarata/moon-sighting.git
synced 2026-07-01 03:14:24 +00:00
921 B
921 B
moon-sighting / initKernels
Function: initKernels()
initKernels(
config?):Promise<void>
Defined in: api/index.ts:121
Initialize the kernel engine from an already-downloaded kernel. Must be called before getMoonSightingReport() or getSunMoonEvents().
Supports three source modes:
- File path (Node.js): initKernels({ planetary: { type: 'file', path: '/path/to/de442s.bsp' } })
- ArrayBuffer (browser): initKernels({ planetary: { type: 'buffer', data: buf, name: 'de442s.bsp' } })
- Auto (Node.js): initKernels() — downloads and caches automatically
Parameters
config?
Kernel source configuration. Defaults to auto-download.
Returns
Promise<void>