Skip to content

Instantly share code, notes, and snippets.

View speters's full-sized avatar

Sönke J. Peters speters

View GitHub Profile
@speters
speters / pramod.ranade.c
Last active December 31, 2021 02:44 — forked from tmpvar/pramod.ranade.c
See "Linear motion control without the math" by Pramod Ranade in http://www.nxtbook.com/nxtbooks/cmp/esd0409/index.php?startid=23 (Embedded System Design Vol 22, #4, April 2009) and http://picprog.strongedge.net/step_prof/step-profile.html
/*
step.c
Program to verify new algorithm for linear acceleration.
Author: Pramod Ranade <pramod.ranade@spjsystems.com>
*/
#include <stdio.h>
#if defined(_WIN32) || defined(_WIN64)
#include <io.h>
#endif
@speters
speters / db_to_gpx.py
Created June 8, 2023 12:15 — forked from endolith/db_to_gpx.py
Maprika sqlite database to GPX track converter
"""
Written by GPT3 from this English prompt (with one tweak to the prompt, to get
the timestamp parameter to not error out, and PEP8 fixes):
----
1. Open a sqlite database with a name like `2022-07-17 17.48.19.db` or
`2021-04-11 08.44.16.db`
2. Inside is a table called `locations`, with headers [LOCTYPE INTEGER,
TIMESTAMP BIGINT, LATITUDE REAL, LONGITUDE REAL,ALTITUDE REAL, ACCURACY