CroatianMeteorNetwork / RMS

RPi Meteor Station
https://globalmeteornetwork.org/
GNU General Public License v3.0
169 stars 47 forks source link

Add support for microseconds in FS filenames and FF headers #277

Closed Cybis320 closed 3 months ago

Cybis320 commented 3 months ago

This PR is related to PR #257. Because PR #257 improves frame timestamping and makes microseconds significant, this PR preserves the microseconds information instead of rounding to milliseconds. Due to compatibility concerns with downstream processes, the FF filename structure remains unchanged, still displaying only milliseconds. To retain microseconds, a new EXPSTART header field is added to store the datetime string with microseconds:

SIMPLE  =                    T / conforms to FITS standard                      
BITPIX  =                    8 / array data type                                
NAXIS   =                    0 / number of array dimensions                     
EXTEND  =                    T                                                  
NROWS   =                 1080                                                  
NCOLS   =                 1920                                                  
NBITS   =                    8                                                  
NFRAMES =                  256                                                  
FIRST   =               704768                                                  
CAMNO   = 'US9999  '                                                            
FPS     =            24.981216                                                  
EXPSTART= '20240319_095911_310820'                                             
END                                                                             

FS files cannot store microseconds in their header. However, since there doesn't seem to be compatibility issues downstream, microseconds are included in the filename: FS_US9999_20240318_011711_371924_1054208_fieldsum.bin

dvida commented 3 months ago

Perfect - I see that this PR has been set as "draft", are you planning to do some more work on it or is it good to merge?

Cybis320 commented 3 months ago

Only a draft because I'm afraid of commitments :)