Display time with milliseconds - Feature Requests - CHDK Forum supplierdeeply

Display time with milliseconds

  • 19 Replies
  • 5816 Views
*

Offline eteny

  • *
  • 19
Display time with milliseconds
« on: 03 / November / 2010, 00:24:09 »
Advertisements
Current default screen display shows system time in minutes and in seconds. It would be best for timing astronomical events (especially for asteroidal occultations which last only for a few seconds) if the camera could also include millisecond in the system time being displayed. Thanks!
eteny(using S3IS)

Re: Display time with milliseconds
« Reply #1 on: 16 / May / 2012, 10:33:58 »
Anything new about this ? Thanks.

Re: Display time with milliseconds
« Reply #2 on: 16 / May / 2012, 11:27:15 »
As far as I know,  nobody is working on this.  It would not be a difficult code change but not probably not something that anyone would want to add to the main trunk due to the impact it would have on CHDK performance.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Display time with milliseconds
« Reply #3 on: 16 / May / 2012, 12:03:13 »
thanks Waterwingz... maybe a different approach, would it be easier to insert SubSecTime values in EXIF ? Actually not to display the time in milliseconds on the camera display but just insert a more precise timestamp in EXIF ?


Re: Display time with milliseconds
« Reply #4 on: 16 / May / 2012, 13:02:55 »
Possibly you'd like to use the TagMe-like script. There's a LUA module just for your needs - writing EXIF tags by script. You can start reading this thread:

http://chdk.setepontos.com/index.php?topic=8084.new#new

and try to modify the script that msl has posted.

The time in ms can be also simply printed by script. Check this function:

http://chdk.wikia.com/wiki/Script_commands#get_time

You can simply take year, month, day, hour, minute, and second, multiply by appropriate factors, add and you'll get the time. I'm not sure about milliseconds.
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick

Re: Display time with milliseconds
« Reply #5 on: 16 / May / 2012, 13:38:17 »
As far as I know you cannot get the time in msec.

The smallest unit is 10 msec.

Re: Display time with milliseconds
« Reply #6 on: 16 / May / 2012, 14:21:16 »
@outslider nice, thanks for the links i will check them tonight... i already have a script that i use with a Gentled cable for launching an intervalometer and closing the lens based on pulses sent through the USB cable. The script written in basic, i will look up the compatibility.

@Microfunguy 10 msec would be good enough.

Thanks.

Re: Display time with milliseconds
« Reply #7 on: 16 / May / 2012, 16:03:12 »
You could try to do something like:

-check the number of the current second (0-60) and wait in loop until it will change (for example from 23 to 24)
-then set some variable, lets call it 'ms' to 0
-then using get_tick_count() in a loop you could count, how many ms have passed from the starting point - so you could calculate the current time in ms (of course with the >10 ms precision, as waterwings said).
if (2*b || !2*b) {
    cout<<question
}

Compile error: poor Yorick


Re: Display time with milliseconds
« Reply #8 on: 16 / May / 2012, 18:54:48 »
Interesting this get_tick_count function...
Maybe if i could just insert the get_tick_count value into the EXIF when the picture is taken i would be more than happy. I could do later the extraction of EXIF value and with a simple python script convert it to GPS time of the week in milliseconds.

I've look at your links, interesting script... But i have to admit due to its complexity, it's way out of my league.
Correct me if i'm wrong but i think it does only read/write/modify EXIF values from images already taken or does it somewhere write a value into an EXIF of a picture which is being taken ?

*

Offline philmoz

  • *****
  • 3155
    • Photos
Re: Display time with milliseconds
« Reply #9 on: 16 / May / 2012, 19:07:55 »
Interesting this get_tick_count function...
Maybe if i could just insert the get_tick_count value into the EXIF when the picture is taken i would be more than happy. I could do later the extraction of EXIF value and with a simple python script convert it to GPS time of the week in milliseconds.

I've look at your links, interesting script... But i have to admit due to its complexity, it's way out of my league.
Correct me if i'm wrong but i think it does only read/write/modify EXIF values from images already taken or does it somewhere write a value into an EXIF of a picture which is being taken ?

get_tick_count returns the number of milliseconds since the camera was last started.
You would also need a reference time point (i.e. the time the camera was started) in order to convert the get_tick_count value to an actual time.

CHDK does not have the ability to modify the jpeg image or exif data at the time of capture, you could potentially do this if you use the DNG format since the CHDK code could add the SubSecTime tag to the DNG file header.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)

 

Related Topics