{"id":15415891,"url":"https://github.com/davidje13/echolocator","last_synced_at":"2026-05-16T20:35:18.453Z","repository":{"id":151510980,"uuid":"130411888","full_name":"davidje13/Echolocator","owner":"davidje13","description":null,"archived":false,"fork":false,"pushed_at":"2018-04-20T20:41:09.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T13:19:58.044Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidje13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-20T20:40:51.000Z","updated_at":"2020-12-18T19:36:06.000Z","dependencies_parsed_at":"2023-06-03T01:45:45.560Z","dependency_job_id":null,"html_url":"https://github.com/davidje13/Echolocator","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"1a42ccc2a220204547db5f3f2e5d84282152952e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davidje13/Echolocator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidje13%2FEcholocator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidje13%2FEcholocator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidje13%2FEcholocator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidje13%2FEcholocator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidje13","download_url":"https://codeload.github.com/davidje13/Echolocator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidje13%2FEcholocator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33117978,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T17:10:06.037Z","updated_at":"2026-05-16T20:35:18.419Z","avatar_url":"https://github.com/davidje13.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Echolocator\n\nThis project demonstrates using a computer speaker and microphone to\ndetermine distances to objects using echolocation.\n\nNote that the distance found is a crude measure; differences in\ncomputer hardware and speaker placement make accurate distance\ndetection impossible without prior calibration. The true distance to\nan object will be `true_distance = a * measured_distance + b`, where\n`a` is an unknown constant (close to 1) controlled by the distance\nbetween the microphone and the speaker, and `b` is another unknown\nconstant controlled by the time taken between generating a signal and\nthe speaker producing it, plus the delay between the microphone\nreceiving a singal and the program processing it. There will also be\nsmall errors due to slight differences in the speed of sound due to,\nfor example, air pressure.\n\n## Setup\n\nThe makefile will attempt to install dependencies in known\nenvironments:\n\n```shell\nmake environment\n```\n\nAlternatively, you can install the dependencies yourself.\n\n### MacOS with Homebrew\n\n```shell\nbrew install fftw portaudio\n```\n\n### MacOS with MacPorts\n\n```shell\nport install fftw-3 portaudio\n```\n\n### General\n\nThis project will build and run on unix-based systems, and possibly\nWindows too (all dependencies are cross-platform).\n\nThe required libraries are:\n* [the Fastest Fourier Transform in the West](http://www.fftw.org/)\n* [Portaudio](http://www.portaudio.com/)\n* OpenGL and GLUT\n\n## Build and Run\n\n```shell\nmake\nbuild/main\n```\n\nThe main application window will open and the speakers will begin\nproducing rapid clicks. After a few seconds of calibration, the display\nwill show vertical bars representing echos received. This typically\ninvolves one strong bar (for the sound travelling directly from the\nspeaker to the microphone), then a cluster of fuzzy bars (various\nreflections from the computer itself) then an emptier area. You can try\nmoving flat objects (card, a hand, etc.) near the computer to see them\nappear in this area.\n\n## Theory\n\nSadly I can't find the original website which inspired this\nimplementation, but I have found a page which summarises a lot of\ninteresting research on how bats use echolocation to determine\nposition, velocity, approximate shape, and even elevation.\nhttps://www.hscott.net/the-dsp-behind-bat-echolocation/\n\nThe general approach used here is to send out a \"chirp\" sound (a short\ntone with rapidly changing pitch), then use fourier transforms to\ndeconvolve the returned audio. By deconvolving using the original\nchirp, it is possible to detect reflections with high accuracy while\ndismissing background noise. This allows a map of distance to\nreflection intensity to be produced (where time-since-chirp is used\nas a measure of the distance), and this map is displayed to the user.\n\n## Structure\n\nThe vague structure of this project is:\n* `chirps.hpp`: contains signal generators (tone, chirp and repeating\n  chirp)\n* `fourier.hpp`: simple object-based wrapper around FFTW\n* `audio.cpp`: the main logic for the echolocation process\n* `renderer.cpp`: a simple wrapper around OpenGL / GLUT for\n  displaying bitmap data\n* `main.cpp`: main entrypoint for the program and orchastration\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidje13%2Fecholocator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidje13%2Fecholocator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidje13%2Fecholocator/lists"}