Keeping track of download times for more reliable time estimates.
ClosedPublic

Authored by lancaster on Mon, Nov 4, 5:08 AM.

Details

Summary

This revision adds a download timer to keep track of how long image downloads take, a method to estimate the download time of images based upon calculations of the previous download times during this session, and updates to the code to use the estimated download time. It achieves the following:

  1. Download times are now included in the countdown timer below the round progress dial on the Summary screen, but not in the round progress dial exposure time.
  2. Download times are now included in the total estimated time on the summary screen, so that it is a more realistic time estimate for the completion of the sequence.
  3. The download time remaining is now shown in the Capture module in place of the exposure time during a download.
  4. Download times and the average download time are printed to the log at the bottom of the capture module for the user's reference (this may be changed in the future).
Test Plan

Take an exposure, it should tell you how long it took to download. If you take a few, the average should be updated each time to include the new times.

After the first image, the estimated download time has a value so that the next time an image is taken, in the Capture module it should display the amount of time remaining in the download after the exposure is complete. That time should decrease in 100 ms intervals until the image has downloaded.

Start a sequence. On the summary screen, the estimated download time should be included in the countdown clock underneath the image time progress dial. The progress dial however should show only the exposure time left. The estimated download time should also be included in the time for the sequence and the overall time to completion for more accurate timing.

Please verify that the changes to the estimated download time help the Scheduler and don't cause any problems for it. I would expect that a more realistic time estimate would help the scheduler, but I don't use it that often and I have not worked with that code so I don't know.

Diff Detail

Repository
R321 KStars
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
lancaster created this revision.Mon, Nov 4, 5:08 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptMon, Nov 4, 5:08 AM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
lancaster requested review of this revision.Mon, Nov 4, 5:08 AM
lancaster edited the summary of this revision. (Show Details)Mon, Nov 4, 5:19 AM
lancaster edited the test plan for this revision. (Show Details)
lancaster added reviewers: mutlaqja, wreissenberger.

I'm not sure if this should replace the exposure left variable. IMO, it should remain as is and should not be merged with the variable download time which may depend on a number of factors. Then for cases when it is necessary to to show the users the average "download" time _after_ exposure is complete, then we can show this number. Exposure left could be used by any other API and it should remain reliable as is.

That makes sense, because they may want just the exposure time, not the exposure time plus download

lancaster updated this revision to Diff 69250.Mon, Nov 4, 7:18 AM
lancaster edited the summary of this revision. (Show Details)

Resorting getExposeLeft, and updating the summary screen timer

lancaster edited the summary of this revision. (Show Details)Mon, Nov 4, 7:21 AM
lancaster edited the test plan for this revision. (Show Details)
mutlaqja accepted this revision.Mon, Nov 4, 7:33 AM
This revision is now accepted and ready to land.Mon, Nov 4, 7:33 AM
lancaster updated this revision to Diff 69251.Mon, Nov 4, 7:47 AM

commas not args

wreissenberger accepted this revision.Mon, Nov 4, 11:23 AM

Looks good! I suggested a minor change, but we can survive without.

kstars/ekos/capture/capture.cpp
4471–4472

Could be shortened to

int remaining = (job->getExposure() + getEstimatedDownloadTime() + job->getDelay() / 1000) * (job->getCount() - job->getCompleted());

if (job->getStatus() == SequenceJob::JOB_BUSY)
remaining += job->getExposeLeft() + getEstimatedDownloadTime();
lancaster updated this revision to Diff 69291.Mon, Nov 4, 7:44 PM

simplification

wreissenberger accepted this revision.Mon, Nov 4, 8:22 PM

Well done!

mutlaqja accepted this revision.Tue, Nov 5, 6:20 AM
This revision was automatically updated to reflect the committed changes.