{"id":20277420,"url":"https://github.com/ekspla/pitot_gps_sensor_logger","last_synced_at":"2026-04-28T15:43:02.584Z","repository":{"id":198114315,"uuid":"700108308","full_name":"ekspla/Pitot_GPS_Sensor_Logger","owner":"ekspla","description":"Visualizing the effect of drafting in cycling -- an application example of differential pressure sensor, D6F-PH.","archived":false,"fork":false,"pushed_at":"2025-02-04T07:22:54.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-20T03:04:36.238Z","etag":null,"topics":["aerodynamics","air-speed","airspeed","anemometer","bicycle","cycling","differential-pressure-sensor","drafting","micropython","pitot","pitot-tube","python","speedometer"],"latest_commit_sha":null,"homepage":"","language":null,"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/ekspla.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,"zenodo":null}},"created_at":"2023-10-04T00:47:02.000Z","updated_at":"2025-02-04T07:22:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"5dbe110b-a109-43f6-b5ee-0a259de65c50","html_url":"https://github.com/ekspla/Pitot_GPS_Sensor_Logger","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"3c4578af3fd6e920540574b2bd708f361a243a75"},"previous_names":["ekspla/pitot_gps_sensor_logger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ekspla/Pitot_GPS_Sensor_Logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekspla%2FPitot_GPS_Sensor_Logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekspla%2FPitot_GPS_Sensor_Logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekspla%2FPitot_GPS_Sensor_Logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekspla%2FPitot_GPS_Sensor_Logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ekspla","download_url":"https://codeload.github.com/ekspla/Pitot_GPS_Sensor_Logger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ekspla%2FPitot_GPS_Sensor_Logger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32387923,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T14:34:11.604Z","status":"ssl_error","status_checked_at":"2026-04-28T14:32:37.009Z","response_time":56,"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":["aerodynamics","air-speed","airspeed","anemometer","bicycle","cycling","differential-pressure-sensor","drafting","micropython","pitot","pitot-tube","python","speedometer"],"created_at":"2024-11-14T13:18:24.940Z","updated_at":"2026-04-28T15:42:57.841Z","avatar_url":"https://github.com/ekspla.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# An Air/Ground Speed Sensor (Logger) Using Pitot Tube and GPS\n\n(C) 2023 [ekspla](https://github.com/ekspla/Pitot_GPS_Sensor_Logger/)\n\n## Abstract\n\n\nAn air/ground speed measurement system with logging functionality was easily built \nwith a Pitot tube [\u003csup\u003e1\u003c/sup\u003e](https://en.wikipedia.org/wiki/Pitot_tube) and a GPS receiver using MicroPython [\u003csup\u003e2\u003c/sup\u003e](https://micropython.org/).  The system allows us \nto measure the air and the ground speeds almost simultaneously at 5 Hz and more in various \noutdoor activities.  As a demonstration of this system, a correlation map of the air \nand the ground speeds of drafting in cycling [\u003csup\u003e3\u003c/sup\u003e](https://en.wikipedia.org/wiki/Drafting_(aerodynamics)) is shown.\n\n\n## Materials\n\n\n- SoC:\nBlackPill (ARM Cortex-M4F, STM32F411CEU6, 8 MB SPI flash), WeAct Studio [\u003csup\u003e4\u003c/sup\u003e](https://github.com/WeActStudio).\n\nRTC clock (LSE) adjusted to 32.768 kHz using a pair of additional ~5 pF C0G capacitors, \npin headers of PC14/15 removed, a coin-cell (CR2032) attatched to VBAT.\n\nA universal counter and [this code \u003csup\u003e5\u003c/sup\u003e](https://jhalfmoon.com/dbc/2023/03/28/micropython%e7%9a%84%e5%8d%88%e7%9d%a198-stm32%e7%89%88%e3%80%81nucleo%e3%81%ae%e3%82%af%e3%83%ad%e3%83%83%e3%82%af%e8%a8%ad%e5%ae%9a%e3%82%92%e8%a6%8b%e7%9b%b4%e3%81%99/) were used to measure/adjust the LSE frequency.\n\nMicroPython 1.20.0 [\u003csup\u003e2\u003c/sup\u003e](https://micropython.org/) installed via ST-LINK [\u003csup\u003e6\u003c/sup\u003e](https://www.st.com/en/development-tools/st-link-v2.html).\nThe port (board definitions) to build the micropython firmware was obtained from github [\u003csup\u003e7\u003c/sup\u003e](https://github.com/WeActStudio/WeAct_F411CE-MicroPython)\n\u003csup\u003e, \u003c/sup\u003e[\u003csup\u003e8\u003c/sup\u003e](https://github.com/mcauser/WEACT_F411CEU6).\n\n- Pitot tube:\nA cheap pitot tube for UAVs (drones), Aliexpress [\u003csup\u003e9\u003c/sup\u003e](https://www.aliexpress.com/w/wholesale-pitot-tube.html).\n\nA home built GoPro (GP) [\u003csup\u003e10\u003c/sup\u003e](https://gopro.com/) compatible mount for the tube and the differential pressure sensor (see below).\n\n\n- Differential pressure sensor:\nD6F-PH5050, OMRON [\u003csup\u003e11\u003c/sup\u003e](https://www.omron.com/), +/- 500 Pa, I2C.\n\n`d6f_ph.py` [\u003csup\u003e12\u003c/sup\u003e](https://github.com/ekspla/D6F-PH)\n\nSimilar sensors such as MS5525 (TE Connectivity) and SDP810 (Sensirion) may be used with their appropriate drivers.\n\n\n- GPS receiver:\nu-blox NEO-M8N [\u003csup\u003e13\u003c/sup\u003e](https://www.u-blox.com/en/product/neo-m8-series), UART, 115200 bps.\n\n  Update rates were set at 0.5, 5, and 5 Hz for GNRMC, GNVTG and GNGGA sentences, respectively.\n  \n`micropyGPS.py` [\u003csup\u003e14\u003c/sup\u003e](https://github.com/ekspla/micropyGPS), a forked/modified version of inmcm/micropyGPS [\u003csup\u003e15\u003c/sup\u003e](https://github.com/inmcm/micropyGPS)\n\n\n- A display to show the air/ground speed in real time (optional):\nA cheap HD44780 (16x2 character) type LCD, I2C.\n\n`lcd_api.py`, dhylands [\u003csup\u003e16\u003c/sup\u003e](https://github.com/dhylands/python_lcd)\n\n\n- SD Card (optional, SPI):\nUsed for logging data, FAT format.\n\n`sdcard.py`, micropython-lib [\u003csup\u003e17\u003c/sup\u003e](https://github.com/micropython/micropython-lib)\n\n\n- Environmental sensor, BMP280 from BOSH Sensortec [\u003csup\u003e18\u003c/sup\u003e](https://www.bosch-sensortec.com/products/environmental-sensors/pressure-sensors/bmp280/), (optional, I2C):\nUsed for air density calibration, as well as for calculating altitudes.\n\nA modified version of Adafruit [\u003csup\u003e19\u003c/sup\u003e](https://github.com/adafruit) driver; normal mode, oversampling (Px16, Tx2), and w/o IIR filter.\n\nNote that this sensor should be protected against direct sunlight and air stream.  A tiny piece of black open-cell foam (sponge) may suffice.\n\n\n## Assembling\n\nMost part of the MicroPython codes were precompiled using mpy-cross [\u003csup\u003e20\u003c/sup\u003e](https://github.com/micropython/micropython/tree/master/mpy-cross) before installation.\nThe assembled units of SoC/GPS/display and air speed sensor are shown in the photos (see below).\nThe procedure to calculate air speed from differential pressure of Pitot tube is shown in \nelesewhere. [A link to Wikipedia \u003csup\u003e1\u003c/sup\u003e](https://en.wikipedia.org/wiki/Pitot_tube)\n\n![PHOTO_DISPLAY_UNIT](https://github.com/ekspla/Pitot_GPS_Sensor_Logger/assets/23088524/597a1803-d24d-48b3-8af5-0211344b13ab \"Display_Unit\")![PHOTO_SENSOR_AND_PITOT](https://github.com/ekspla/Pitot_GPS_Sensor_Logger/assets/23088524/bd19487f-eebe-436c-b4d1-b03a5846598e \"Sensor_Unit\")![PHOTO_SENSOR_UNIT](https://github.com/ekspla/Pitot_GPS_Sensor_Logger/assets/23088524/8a9c0e06-09cd-4d3d-8f98-5ab75494a01e \"Sensor_Unit\")\n\nIn the following experiments, the air speed sensor unit shown in the 3rd photo (GP mount, \nconsisting of the Pitot tube and the differential pressure sensor) was mounted in front of \na bicycle.  Update and logging rates were set at 5 Hz (200 ms interval), though the system \ncan handle \u003e 10 Hz.\n\n\n## Calibration\n\nAir speed was calibrated by using Pitot coefficient and an offset of differential pressure.\nIts accuracy was tested in a foggy morning around dawn (no wind / no sunlight).\nSee almost perfect fit in the correlation map below.  The tiny deviation from the diagonal \nline in 10-20 km/h range may be caused by headwinds of oncoming cars.\n\n![FIG1](https://github.com/ekspla/Pitot_GPS_Sensor_Logger/assets/23088524/f7df4ba7-1bcd-483e-b431-faf6cff3856e \"Fig1_Test_Calibration\")\n\n\n## A Demonstrative Result -- Visualizing the Effect of Drafting in Cycling --\n\nA pair of bicycles were used for this experiment in a day of almost no wind outdoor.  \nThe air speed sensor was attached in front of the trailer's bicycle after the leader's \nbicycle following in line.  The distances between them were kept 1.0-1.5 m at ground speeds \nbelow 40 km/h, while a bit longer distances at above these speeds for safety reasons.  \n**The effect of drafting is easily seen in the figure**; the measurement points in the correlation \nmap start to deviate from the diagonal line by increasing the ground speed at above 10 km/h.\n\n![FIG2](https://github.com/ekspla/Pitot_GPS_Sensor_Logger/assets/23088524/567399aa-fdd2-4cee-abe9-0b21babf997b \"Fig2_Drafting_in_Cycling\")\n\nIt should be noted that **this data was easily taken by a single experiment** of 16 min, while \nmost of the data in literatures consists of at least a couple of experiment,\ni.e. one with and the other without the leader's bicycle. [Ref.](https:// \"REF_TO_BE_INCLUDED\")\n\n\n## Concluding Remarks\n\nAn affordable priced (for the hobbiest) system to simultaneously measure the air and the ground speeds \noutdoor was easily built.  As a demostrative example, a mesurement of drafting effect [\u003csup\u003e3\u003c/sup\u003e](https://en.wikipedia.org/wiki/Drafting_(aerodynamics)) in cycling outdoor \nis shown.\n\nThis system can be modified to show the effect of wind direction outdoor as well, by using \nmultiple air speed sensors (possibly three, each at an angle of 120 deg.) and vectorial math.\n\n\n## References\n\n[Pitot Tube](https://en.wikipedia.org/wiki/Pitot_tube)\n\n[Drafting (Aerodynamics)](https://en.wikipedia.org/wiki/Drafting_(aerodynamics))\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekspla%2Fpitot_gps_sensor_logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fekspla%2Fpitot_gps_sensor_logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fekspla%2Fpitot_gps_sensor_logger/lists"}