Timestamp issue w/QHY174GPS

User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Timestamp issue w/QHY174GPS

#21

Post by admin »

Hi,

Ah, okay. SharpCap does not try to set frame timestamps in AVI files accurately. Instead it tries to set up the AVI file to play at a reasonable rate (30 FPS from memory). If you want accurate frame timestamps in a video file then you really need to use the SER format.

To be honest, I'm surprised if any timestamps in the AVI file are anywhere close to accurate after the first one – as far as I can see all AVI timestamps are relative to the first frame in the file and that's the only one that is likely to be accurate.

The trick here would be to either extract the GPS data from the beginning of each frame or two read the 64 bit timestamp that SharpCap inserts at the beginning of the frame image data if the 'timestamp frames' option is on.

Cheers, Robin
watan_rockhand
Posts: 17
Joined: Sat Jun 27, 2020 11:20 am

Re: Timestamp issue w/QHY174GPS

#22

Post by watan_rockhand »

Hello, Christian, Robin

Thank you for your comment. I'm glad that Christian could reproduce the avi file.
I want SharpCap to have a machine readable timestamp in the avi file that is the same as the GPS time.
It can be at the beginning or end of the frame.

Regards,

Hiroyuki Watanabe
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Timestamp issue w/QHY174GPS

#23

Post by admin »

Hi,

I think this should work…

Turn on the 'Timestamp Frames' option (see https://docs.sharpcap.co.uk/3.2/#!2!Image%20Controls). This not only puts a timestamp that is human readable into each frame, it also injects the timestamp of the frame into the first eight bytes of the image data.

These eight bytes contain a long integer value that represents the date time of the frame as

"The number of 100-nanosecond intervals that have elapsed since 12:00:00 midnight, January 1, 0001 in the Gregorian calendar"

(see https://docs.microsoft.com/en-us/dotnet ... time.ticks)

If the GPS is locked then the timestamp stored here will be the GPS timestamp for the start of the frame.

Cheers, Robin
watan_rockhand
Posts: 17
Joined: Sat Jun 27, 2020 11:20 am

Re: Timestamp issue w/QHY174GPS

#24

Post by watan_rockhand »

Hello, Robin,

Thank you for your advice.
However, I was recording in avi format with the timestamp frame option turned on and GPS turned on.
As a result, the machine-readable time values were random.
Similarly, when the time stamp frame option was turned on and GPS was also turned on and recorded in SER format, the machine-readable time was correct.
So I checked all the combinations. I hope you can use this result to investigate the cause.
GPS_Timestamp_Matrix.png
GPS_Timestamp_Matrix.png (59.33 KiB) Viewed 1671 times
The attached files are SER and AVI files of GPS_on, Timestamp_on, camera conditions and reading results.
20_25_23.avi.zip
(161.85 KiB) Downloaded 88 times
20_15_28.SER.zip
(84.98 KiB) Downloaded 101 times
Regards,

Hiroyuki Watanabe
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Timestamp issue w/QHY174GPS

#25

Post by admin »

Hi,

I think I have remembered the missing fact that should unlock the jigsaw. When you use the display frame timestamp option with the GPS camera data enabled, SharpCap deliberately moves the display text and the eight byte machine-readable timestamp down one image row to avoid overwriting the GPS data which occupies the first few bites of the frame. You can see this in the screenshot below
Capture.PNG
Capture.PNG (51.23 KiB) Viewed 1664 times
So, if you are running at full resolution you to look at the data at position 1920 in the frame data to find the eight byte machine-readable timestamp.

Finally, if the display of the timestamp within the frame is turned off then no eight byte machine-readable timestamp is written into the frame data.

Cheers, Robin
watan_rockhand
Posts: 17
Joined: Sat Jun 27, 2020 11:20 am

Re: Timestamp issue w/QHY174GPS

#26

Post by watan_rockhand »

Hello Robin,

Thank you for the important information.
Please let me know if there is a document that defines "QHY174GPS" specific data embedded in the image frame and the location of the SharpCap time stamp.
I would like to inform the author of the analysis software of that information and improve the time stamp reading function.

Regards,

Hiroyuki Watanabe
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Timestamp issue w/QHY174GPS

#27

Post by admin »

Hi,

actually, the SharpCap manual doesn't mention this – it was probably something that I added when we were improving the GPS camera support for the new Horizons occultation mission. I think the best documentation so far as the above forums post :-)

Cheers, Robin
Post Reply