Python tool for aircraft Doppler audio geolocation using historical ADS-B flight data (Source-available)
Python acoustic-geolocationads-baircraft-trackingairplaneaudio-forensicsdoppler-effectdoppler-shiftgeolocationosintsignal-processing
Show progress and activity ages in job watcher (#233)
Cinna Davised24959cea10
diff --git a/README.md b/README.mdindex cb22f6f..bc66d91 100644--- a/README.md+++ b/README.md@@ -46,8 +46,8 @@ This scans the complete recording and saves an inspectable job. To permit historInitial data acquisition can take hours and tens of gigabytes; [the workflow guide](docs/PRODUCT.md) covers caching, runtime limits and resuming stopped jobs.The command prints a job ID when queued. In another terminal, run-`.venv/bin/dopplergeist job JOB_ID --jobs jobs --watch` to follow local-checkpoint pieces and their recent rate.+`.venv/bin/dopplergeist job JOB_ID --jobs jobs --watch` to follow reported+progress, checkpoint rate, and the age of the latest tile and job status update.### Discover events in a recordingdiff --git a/docs/PRODUCT.md b/docs/PRODUCT.mdindex 11a9c2c..7d60d37 100644--- a/docs/PRODUCT.md+++ b/docs/PRODUCT.md@@ -59,11 +59,12 @@ dopplergeist resume JOB_ID --jobs jobs````analyze` prints the job ID and a monitor command to standard error as soon as-the upload is queued. `job --watch` reports the number and recent rate of local-checkpoint pieces on standard error, then writes the final job JSON to standard-output. Pieces can have different sizes and costs, so their rate is not an ETA;-remotely staged work appears after it is imported. Pressing Ctrl-C stops the-watcher without cancelling the analysis.+the upload is queued. `job --watch` reports overall progress, the number and+recent rate of local checkpoint pieces, the age of the newest tile checkpoint,+and the age of the job status file on standard error. It then writes the final+job JSON to standard output. Pieces can have different sizes and costs, so their+rate is not an ETA; remotely staged work appears after it is imported. Pressing+Ctrl-C stops the watcher without cancelling the analysis.The UTC window bounds the recording start, not the event occurrence or upload.Missing time is a required-input result. Scores are ranking statistics, notdiff --git a/src/dopplergeist/cli.py b/src/dopplergeist/cli.pyindex ad46a76..18f2a5d 100644--- a/src/dopplergeist/cli.py+++ b/src/dopplergeist/cli.py@@ -131,13 +131,23 @@ def main():parser.error(f"Could not read job {args.job_id}: {exc}")if not args.watch:break- count=sum(1 for path in (directory/"search").glob("tile-*.json") if not path.name.endswith(".error.json"))+ tiles=[path for path in (directory/"search").glob("tile-*.json") if not path.name.endswith(".error.json")]+ count=len(tiles)+ wall_now=time.time()+ progress=value.get("progress")+ progress_text=(f", {progress:.1%}" if isinstance(progress,(int,float)) and math.isfinite(progress) else "")+ result_age=max(0.0,wall_now-(directory/"result.json").stat().st_mtime)+ age_text=lambda seconds: f"{seconds:.0f}s" if seconds<60 else f"{seconds/60:.1f}m"now=time.monotonic()rate=""if previous_count is not None and count >= previous_count and now > previous_time:rate=f", {(count-previous_count)*60/(now-previous_time):.1f} pieces/min since last check"- print(f"{value['status']} ({value.get('stage', 'no stage')}): "- f"{count} local checkpoint pieces{rate}",file=sys.stderr,flush=True)+ latest=max(tiles,key=lambda path:path.stat().st_mtime,default=None)+ tile_age=(f", newest tile {age_text(max(0.0,wall_now-latest.stat().st_mtime))} ago"+ if latest else "")+ print(f"{value['status']} ({value.get('stage', 'no stage')}{progress_text}): "+ f"{count} local checkpoint pieces{rate}{tile_age}, "+ f"status updated {age_text(result_age)} ago",file=sys.stderr,flush=True)if value["status"] in {"needs_input", "succeeded", "inconclusive", "failed", "cancelled"}:breakprevious_count,previous_time=count,now