Source of FITS Header DATE-OBS

I do astrometry of NEOs and have been seeing large residuals on my observations most noticeably on fast moving objects where timing is most critical. I have included a section of a logfile showing what I believe is contributing to my errors. I am using a QHY16200a camera with SGP V3.2.0.613 and ASCOM 6.5. With an object moving at 25"/min this timing difference is huge.

Here is an example:

ASCOM camera start exposure 01:51:44
ASCOM exposure complete 01:51:49 (5 sec exposure)
ASCOM reports last image start time 01:51:53 ???

The last image start time is then inserted into the FITS header as DATE-LOC and DATE-OBS generating an offset from the camera stop time of 4 seconds. Why not use the ASCOM provided exposure start and stop times?

[03/28/23 01:51:44.697][DEBUG][Sequence Thread][SQ;] PHD2 GetPhdStatus - Post-Wait: Guiding
[03/28/23 01:51:44.697][DEBUG][Sequence Thread][SQ;] PHD2: Requested unpause, but PHD2 reports it is not in a paused state
[03/28/23 01:51:44.697][DEBUG][Sequence Thread][SQ;] EventMarker(171) - t:2023EK2 (0); e:0; f:10; o:
[03/28/23 01:51:44.697][DEBUG][Sequence Thread][SQ;] PHD2 distance request…
[03/28/23 01:51:44.697][DEBUG][Sequence Thread][SQ;] PHD2 distance request returned 0.7…
[03/28/23 01:51:44.724][DEBUG][Sequence Thread][SQ;] EventMarker(8) - t:2023EK2 (0); e:0; f:10; o:
[03/28/23 01:51:44.746][DEBUG][Sequence Thread][SQ;] BlockUntilFocuserMovementDone: Focuser reports it is done moving, continuing…
[03/28/23 01:51:44.748][DEBUG][Sequence Thread][SQ;] Set start frame data → Pos: 7828; Temp: 20.971875 …
[03/28/23 01:51:44.749][DEBUG][Sequence Thread][SQ;] Created base name for frame capture: 2023EK2_5sec_2x2_None__0011
[03/28/23 01:51:44.749][DEBUG][Sequence Thread][SQ;] Created directory for frame capture: C:\Users\jjhai\Documents\Observatory Share\2023\3-27-23
[03/28/23 01:51:44.753][DEBUG][Sequence Thread][SQ;] EventMarker(9) - t:2023EK2 (0); e:0; f:10; o:
[03/28/23 01:51:44.753][DEBUG][Sequence Thread][SQ;] EventMarker(10) - t:2023EK2 (0); e:0; f:10; o:
[03/28/23 01:51:44.753][DEBUG][Sequence Thread][SQ;] Finished sending frame capture. Entering wait mode…
[03/28/23 01:51:44.753][DEBUG][Sequence Thread][SQ;] EventMarker(11) - t:2023EK2 (0); e:0; f:10; o:
[03/28/23 01:51:44.753][DEBUG][Sequence Thread][SQ;] EventMarker(12) - t:2023EK2 (0); e:0; f:10; o:
[03/28/23 01:51:44.756][DEBUG][Camera Thread][SQ;] SGM_CAMERA_CAPTURE message received…
[03/28/23 01:51:44.757][DEBUG][Camera Thread][SQ;CC;] SetAscomNormalSpeed…
[03/28/23 01:51:44.758][DEBUG][Camera Thread][SQ;CC;] Readout speed set to NORMAL…
[03/28/23 01:51:44.765][DEBUG][Camera Thread][SQ;CC;] ASCOM Camera: exposure started, waiting…
[03/28/23 01:51:44.795][DEBUG][Sequence Thread][SQ;CC;] EventMarker(13) - t:2023EK2 (0); e:0; f:10; o:
[03/28/23 01:51:44.809][DEBUG][Unknown][SQ;CC;] Star detection using min star size of 2px…
[03/28/23 01:51:44.809][DEBUG][Unknown][SQ;CC;] Star detection using max star size of 40px…
[03/28/23 01:51:44.833][DEBUG][Unknown][SQ;CC;] Find stars took: 904 ms…
[03/28/23 01:51:44.833][DEBUG][Unknown][SQ;CC;] Star list contains 55 stars…
[03/28/23 01:51:44.833][DEBUG][Unknown][SQ;CC;] Calculating HFR with sample size: 3
[03/28/23 01:51:44.911][DEBUG][Unknown][SQ;CC;] Star overlay (async) END
[03/28/23 01:51:49.777][DEBUG][Camera Thread][SQ;CC;] ASCOM Camera: exposure complete, waiting for camera to report image ready…
[03/28/23 01:51:49.939][DEBUG][Sequence Thread][SQ;CC;] EventMarker(15) - t:2023EK2 (0); e:0; f:10; o:
[03/28/23 01:51:49.941][DEBUG][Sequence Thread][SQ;CC;] Waking from exposure time sleep period…
[03/28/23 01:51:49.941][DEBUG][Sequence Thread][SQ;CC;] Checking to see if the CCD has a temp…
[03/28/23 01:51:49.941][DEBUG][Sequence Thread][SQ;CC;] Saving the CCD temp…
[03/28/23 01:51:49.947][DEBUG][Sequence Thread][SQ;CC;] Entering super dangerous loop to await image completion…
[03/28/23 01:51:49.950][DEBUG][Sequence Thread][SQ;CC;] EventMarker(16) - t:2023EK2 (0); e:0; f:10; o:
[03/28/23 01:51:53.870][DEBUG][Camera Thread][SQ;CC;] ASCOM Camera: Data type → System.Int32[,]
[03/28/23 01:51:53.870][INFO][Camera Thread][SQ;CC;] ASCOM Camera read image data took .09 seconds
[03/28/23 01:51:53.870][DEBUG][Camera Thread][SQ;] SGM_CAMERA_CAPTURE complete…
[03/28/23 01:51:53.870][DEBUG][Camera Thread][SQ;] Camera thread is IDLE…
[03/28/23 01:51:53.966][DEBUG][Sequence Thread][SQ;] EventMarker(17) - t:2023EK2 (0); e:0; f:10; o:
[03/28/23 01:51:53.966][DEBUG][Sequence Thread][SQ;] Image reported as complete. Continuing…
[03/28/23 01:51:53.994][DEBUG][Sequence Thread][SQ;] Collecting FITs headers…
[03/28/23 01:51:53.994][DEBUG][Sequence Thread][SQ;] ASCOM Camera - Camera reports last image start time as: 2023-03-28T01:51:53 UTC
[03/28/23 01:51:53.994][DEBUG][Sequence Thread][SQ;] DATE-LOC time provided by camera…
[03/28/23 01:51:54.083][DEBUG][Sequence Thread][SQ;] GatherFitsHeaders: Writing header info for last solve…
[03/28/23 01:51:54.083][DEBUG][Sequence Thread][SQ;] GatherFitsHeaders: Writing header info from UI…
[03/28/23 01:51:54.083][DEBUG][Sequence Thread][SQ;] Clearing timed monitoring events…
[03/28/23 01:51:54.084][DEBUG][Sequence Thread][SQ;] Created full file name: C:\Users\jjhai\Documents\Observatory Share\2023\3-27-23\2023EK2_5sec_2x2_None__0011-1.fit
[03/28/23 01:51:54.084][DEBUG][Sequence Thread][SQ;] SaveFileAscom: Start…
[03/28/23 01:51:54.084][DEBUG][Sequence Thread][SQ;] SaveFileAscom: Checking image data…
[03/28/23 01:51:54.084][DEBUG][Sequence Thread][SQ;] SaveFileAscom: Create normal preview bitmap…
[03/28/23 01:51:54.087][DEBUG][Sequence Thread][SQ;] SaveFileAscom: Locking preview bits…
[03/28/23 01:51:54.087][DEBUG][Sequence Thread][SQ;] SaveFileAscom: Validating file name…
[03/28/23 01:51:54.087][DEBUG][Sequence Thread][SQ;] SaveFileAscom: Starting byte traversal…
[03/28/23 01:51:54.087][TRACE][Sequence Thread][SQ;] SaveFileAscom: Row padding → 0
[03/28/23 01:51:54.110][DEBUG][Sequence Thread][SQ;] SaveFileAscom: Unlocking preview bits…
[03/28/23 01:51:54.110][DEBUG][Sequence Thread][SQ;] SaveFileAscom: Saving preview bitmap to disk…
[03/28/23 01:51:54.110][DEBUG][Sequence Thread][SQ;] SaveFileBmp16: Locking bitmap for disk write…
[03/28/23 01:51:54.110][DEBUG][Sequence Thread][SQ;] SaveFileBmp16: Opening file stream…
[03/28/23 01:51:54.111][DEBUG][Sequence Thread][SQ;] SaveFileBmp16: Writing FITS headers…
[03/28/23 01:51:54.111][DEBUG][Sequence Thread][SQ;] SaveFileBmp16: Traversing and persisting bitmap data…
[03/28/23 01:51:54.153][DEBUG][Sequence Thread][SQ;] SaveFileBmp16: FITS block fill…
[03/28/23 01:51:54.153][DEBUG][Sequence Thread][SQ;] SaveFileBmp16: Unlocking bitmap…
[03/28/23 01:51:54.153][DEBUG][Sequence Thread][SQ;] SaveFileBmp16: Closing file stream
[03/28/23 01:51:54.153][DEBUG][Sequence Thread][SQ;] SaveFileAscom: Displaying image preview in UI…
[03/28/23 01:51:54.153][DEBUG][Sequence Thread][SQ;] Internal Interface: Set Preview…
[03/28/23 01:51:54.153][DEBUG][Sequence Thread][SQ;] Display image preview using asynch task…
[03/28/23 01:51:54.241][DEBUG][Unknown][SQ;] Star overlay (async) START
[03/28/23 01:51:54.241][DEBUG][Unknown][SQ;] → Find stars (normal)
[03/28/23 01:51:54.261][DEBUG][Unknown][SQ;] AF frame was too large… downsample = 0.75…
[03/28/23 01:51:54.448][DEBUG][Sequence Thread][SQ;] SaveFileAscom: Done
[03/28/23 01:51:54.448][DEBUG][Sequence Thread][SQ;] =========== Save file took 365 ms
[03/28/23 01:51:54.502][DEBUG][Image History Worker][SQ;] Image analysis (async) START

I am using different ZWO cameras. The ZWO camera driver does NOT provide a “last image start time”, so SGP uses the time of “ASCOM camera: exposure started”:

The FITS header of frame “20220501_0060.fit” contains DATE-LOC = ‘2022-05-02T00:14:54.9693695’.

So I conclude that the QHY camera driver provides the current local time instead of “last image start time”. This seems to be a bug in the QHY camera driver.

Bernd