This function creates for writing a new SPK file whose pathname is the string pointed to by filename, and returns an ephemeris descriptor associated to it. If a file with the same name already exists, it is overwritten.
The function writeph_close() must be called to free memory allocated by this function.
The following example creates a new ephemeris file ephemeris.bsp
USE, INTRINSIC :: ISO_C_BINDING
use calceph
TYPE(C_PTR) :: weph
weph = writeph_spk_create("ephemeris.bsp"//C_NULL_CHAR, "asteroid_1"//C_NULL_CHAR)
if (C_ASSOCIATED(weph)) then
! ... compute and write to weph ...
call writeph_close(weph)
endif