k4be

k4be pushed to master at k4be/GPStracker

  • de9e18c1b6 gpx: post-gap settling, lon error scaling, fix spike check and avg timestamp
  • 241b5fb20a autopause: smooth speed for resume, add quarter-window distance check
  • f9adcc3212 gps-test-tool: add GUI with OSM map view and live settings
  • 0646c9ed35 gps-test-tool: add settings options and single-run -o mode
  • e7ae0dcab0 autopause: fix speed-rounding false resume, add heading-consistency check System.speed truncated instantaneous NMEA speed to whole km/h before comparing against auto_pause_speed, so receiver noise straddling the 3km/h default (e.g. 2.57/3.41/3.82/2.72 km/h) could round to three consecutive >=3 samples and trigger a false resume while stationary - confirmed against a field log where this fired with no real departure (erratic heading, position barely moving). Store speed as speed_x10 instead and compare at that precision. Also add a step-to-step bearing consistency check to the resume-by- distance path: a satellite geometry change can drift the computed fix smoothly in one direction for tens of seconds with the receiver not moving at all, satisfying the existing persistence check the same way real walking would. Real walking keeps a fairly stable heading between consecutive fixes; require that before counting a sample as a resume signal, alongside the existing distance-from-anchor persistence.
  • View comparison for these 16 commits »

23 hours ago

k4be pushed to master at k4be/GPStracker

  • 5f47d3146d autopause: fix speed-rounding false resume, add heading-consistency check System.speed truncated instantaneous NMEA speed to whole km/h before comparing against auto_pause_speed, so receiver noise straddling the 3km/h default (e.g. 2.57/3.41/3.82/2.72 km/h) could round to three consecutive >=3 samples and trigger a false resume while stationary - confirmed against a field log where this fired with no real departure (erratic heading, position barely moving). Store speed as speed_x10 instead and compare at that precision. Also add a step-to-step bearing consistency check to the resume-by- distance path: a satellite geometry change can drift the computed fix smoothly in one direction for tens of seconds with the receiver not moving at all, satisfying the existing persistence check the same way real walking would. Real walking keeps a fairly stable heading between consecutive fixes; require that before counting a sample as a resume signal, alongside the existing distance-from-anchor persistence.
  • c3378005c5 nmea: count low-quality-fix rejections toward rejected_count RMC status=V, GGA quality=0, and the sat-count/HDOP/fix-type gate all set location_valid = LOC_INVALID without logging a reject, so a long stretch of gated-out fixes (e.g. weak indoor reception) showed rej=0 in the summary, indistinguishable from a clean run. Add REJECT_REASON_QUALITY and count all three, guarded per-epoch so RMC and GGA rejecting the same epoch isn't double-counted. Also drop syslog.h's duplicate REJECT_REASON_* defines in favor of including common.h, the shared header they were meant to move into.
  • 522095585d fix: keypress bitfield truncated multi-key mask to 1 bit common.h's split (a8bbc3b) merged System.keypress into the bitfield block as a 1-bit field, matching the PC tool's stale copy instead of embedded main.h's original unsigned char. The ISR stores a multi-bit K_* mask (up to 0x1f); truncated to 1 bit, only K_RIGHT ever survived - so menus could be entered/selected but not navigated (up/down) or exited (left).
  • View comparison for these 3 commits »

2 weeks ago

k4be pushed to master at k4be/GPStracker

  • 05050f4e7e ds18b20: re-arm poll timer even with no sensor present gettemp() returned early when _1WireInit() found no presence pulse (no sensor, or a bus short), before reaching the atomic_set_uint(&System.timers.owire, ...) call at the end that re-arms the 4s poll interval. With no sensor ever connected, this timer never gets set at all, so gettemp() (and its ~1ms delay plus a ~960us interrupts-disabled 1-Wire init pulse) runs on every single main loop pass instead of once per 4 seconds. Bad CRC and the power-on-reset scratchpad default (85.0C, still in place if a conversion never completed) were already handled correctly - both fall through to the normal error-counting and timer-rearming path since they only skip the point where temp_ok_out is set to 1, not the whole function.
  • a8bbc3b3f4 add soft/common.h to stop duplicating structs between builds struct system_s/location_s/config_s/auto_pause_s, and the value constants their fields hold, were maintained as separate, hand-synced copies in soft/main.h (embedded) and gps-test-tool/main.h (PC test tool) - every field added to one needed a matching edit to the other, and this session hit that gap repeatedly (missing fields causing build failures, a stale REJECT_REASON_ALTDIFF, etc). Move the shared definitions into a new soft/common.h both sides include. While consolidating, found two real, silent mismatches this had already caused: - CONFFLAG_* meant different things on each side: embedded's get_flag()/set_flag() (settings.c) treat the value as a bit index into System.conf.flags[4], but the PC build's get_flag() treated it as an already-shifted bitmask, with its own separately-numbered constants that didn't include CONFFLAG_LOGGING_AFTER_BOOT - shifting every flag after it out of alignment with embedded's real indices. Rewrote the PC build's get_flag()/set_flag() to index System.conf.flags the same way as embedded, and dropped the redundant config_flags global. - LOC_VALID/LOC_VALID_NEW were swapped (1/2 vs 2/1) between the two copies - harmless only because both sides always compared by name, never by raw value. Also removed gps-test-tool/avr_compat.h, an unused, out-of-date predecessor of the same idea (nothing included it - confirmed via grep - so it had drifted independently and silently for a while).
  • b3ac3670d7 autopause: manual resume didn't clear an active auto-pause auto_pause_process() only forces tracking_auto_paused off while tracking_paused is true (so an active auto-pause is dropped the instant a manual pause starts), but that guard never fires the other way around: manually resuming (tracking_paused -> 0) while auto-pause was also active left tracking_auto_paused set. tracking_is_paused() (tracking_paused || tracking_auto_paused) would then still report paused, and the logger stayed silently paused until the speed/distance-based auto-resume condition was separately satisfied - well after the user asked to resume, with no indication why. Add auto_pause_clear_manual_resume() (no log/beep - the manual resume already has its own), called from tracking_pause() whenever the manual-pause transition to resumed also needs to drop an auto-pause that was riding along with it.
  • 949903cef6 autopause: reset stationary-time counter on a fix gap auto_pause.point_counter (the running count towards auto_pause_time) was never reset when a fix was lost and reacquired - it just kept counting through the gap, with no visibility into how long the gap was or whether the device kept moving during it. Reacquiring a fix that was lost while genuinely moving could then satisfy the stationary-time threshold within moments of regaining signal, using mostly pre-gap progress towards a threshold meant to require persistent, continuous stationary time. Verified against a real ~7.5 minute signal-loss log: point_counter was frozen at a near-complete count going into the gap, and only needed a handful of post-reacquisition points to reach auto_pause_time and trigger a pause. Share fix-gap detection (previously private to gpx.c) via a new fix_gap_detected() in main.c, called once per accepted point before both auto_pause_process() (new auto_pause_reset_gap(): resets point_counter/speed_counter/prev_distance, and re-anchors the resume-by-distance check if already paused) and gpx_process_point() (gpx_reset_gap(), unchanged in behavior, just extracted so both callers share one gap check instead of gpx.c silently owning it).
  • e201aacb8a add paused/skipped/accepted point counters to summaries Points processed only showed the total; there was no visibility into how a session's points broke down (during a pause, dropped by the skip_points warm-up, rejected, sitting in the averaging window, or actually saved), which made diagnosing filter/pause behavior harder than it needed to be. Track System.points_paused/points_skipped/ points_accepted, and print them (plus the existing rejected_count and points_written) in both the test tool's own summary and the firmware's periodic SUMMARY log line.
  • View comparison for these 13 commits »

3 weeks ago

k4be pushed to master at k4be/GPStracker

  • f23a51be3c Document gps-test-tool build/run/test workflow Rewrite gps-test-tool/README.md to match actual current behavior (build, run, settings, input format, regression test) instead of a stale in-progress architecture writeup. Add a short pointer to it from the top-level README.
  • 6b49b6226f Fix off-by-one warm-up sample threshold in malformed-NMEA test The fixture actually produces 64 warm-up speed samples, not 65; the assertion was wrong since it was introduced and unrelated to the recent GGA/pause-tracking changes (verified against the prior commit too).
  • 36f399eae4 Track pause state via tracking_is_paused(), harden GGA/auto-pause edge cases - Add tracking_is_paused() and use it everywhere pause state was re-derived from System.tracking_paused/tracking_auto_paused directly - Move per-epoch GGA/GSA/logged tracking out of System into a static struct local to nmea.c (partial parse state, not global data) - Bail out of gp_gga_parse() early on any missing NMEA field instead of reading past a short/malformed sentence - Split gps_settings_changed() out of gps_initialize() so the SBAS/GNSS settings menu can apply a change immediately instead of re-running the module boot sequence - Cap auto_pause.anchor_sample_count so it can't wrap around and corrupt the running average - Gate auto-pause's own pause decision on gps_fix_trustworthy(), matching the resume checks - Run auto_pause_process() before gpx_process_point() so a pause/resume decision is made before the point using it is written - Widen format_time()'s seconds argument to unsigned long (soft/display.c) - Mirror all of the above in gps-test-tool's PC build, plus bound the \r\n append against fgets() filling the line buffer to capacity
  • 0cb1fe1832 Add .gitignore
  • 4d49267a83 Print moving/stopped time and average speeds in test tool summary
  • View comparison for these 16 commits »

3 weeks ago

k4be pushed to master at k4be/GPStracker

  • d5fdcac4d4 Print moving/stopped time and average speeds in test tool summary
  • 827047f5ac Gate and debounce fix acquired/lost logging on completed epochs Fix events were checked on every main-loop pass regardless of whether a new epoch's GGA and GSA had actually both been parsed yet, so sats=/hdop= in the log line could come from a stale epoch. Track epoch completion (nmea_epoch_complete()) and only evaluate the fix state then. Also require a state change to persist for FIX_HOLD_EPOCHS epochs before logging it, so marginal reception flapping between 2D/3D/no-fix for a minute produces at most one or two log lines instead of one per flip. A newly logged fix-lost event also requests an immediate sync, since it can precede a real signal/power problem. Mirrored into gps-test-tool so it exercises the same logging behavior.
  • 3a7f88ec8d Rework auto-pause resume-by-distance to use an anchor and persistence The previous check compared net displacement over a fixed window against a static multiple of the pause distance threshold, which could be fooled by GPS jitter accumulating across windows. Anchor the check on a running-average position taken while paused, scale the threshold by HDOP (a poor fix needs to move further to count), and require the condition to hold for most of a short sample history instead of firing on a single sample. distance() is exposed via gpx.h instead of being locally forward-declared in gpx.c, since autopause.c now needs it too.
  • b8c544b94e Flush log files immediately after boot and low-battery events Log lines written just before a brownout (imminent on low-battery shutdown) or right after a log file opens (boot/config lines) could otherwise sit unwritten for up to IVT_SYNC seconds and be lost.
  • 0e4df9c695 Read speed over ground from RMC instead of VTG Some receivers omit VTG entirely or send a shorter form of it, while RMC is the one sentence essentially every NMEA GNSS module emits, so sourcing speed from it is more robust. The outlier-capping logic (speed_sample_process()) is unchanged, just reused from the new call site.
  • View comparison for these 28 commits »

3 weeks ago

k4be pushed to master at k4be/GPStracker

  • 9242c6c9eb Print moving/stopped time and average speeds in test tool summary
  • 7a5cf4fc75 Gate and debounce fix acquired/lost logging on completed epochs Fix events were checked on every main-loop pass regardless of whether a new epoch's GGA and GSA had actually both been parsed yet, so sats=/hdop= in the log line could come from a stale epoch. Track epoch completion (nmea_epoch_complete()) and only evaluate the fix state then. Also require a state change to persist for FIX_HOLD_EPOCHS epochs before logging it, so marginal reception flapping between 2D/3D/no-fix for a minute produces at most one or two log lines instead of one per flip. A newly logged fix-lost event also requests an immediate sync, since it can precede a real signal/power problem. Mirrored into gps-test-tool so it exercises the same logging behavior.
  • 6f1dcae5c1 Rework auto-pause resume-by-distance to use an anchor and persistence The previous check compared net displacement over a fixed window against a static multiple of the pause distance threshold, which could be fooled by GPS jitter accumulating across windows. Anchor the check on a running-average position taken while paused, scale the threshold by HDOP (a poor fix needs to move further to count), and require the condition to hold for most of a short sample history instead of firing on a single sample. distance() is exposed via gpx.h instead of being locally forward-declared in gpx.c, since autopause.c now needs it too.
  • a1393896af Flush log files immediately after boot and low-battery events Log lines written just before a brownout (imminent on low-battery shutdown) or right after a log file opens (boot/config lines) could otherwise sit unwritten for up to IVT_SYNC seconds and be lost.
  • b93b12ee1f Read speed over ground from RMC instead of VTG Some receivers omit VTG entirely or send a shorter form of it, while RMC is the one sentence essentially every NMEA GNSS module emits, so sourcing speed from it is more robust. The outlier-capping logic (speed_sample_process()) is unchanged, just reused from the new call site.
  • View comparison for these 45 commits »

3 weeks ago

k4be pushed to master at k4be/k4be-gentoo-overlay

  • df1fef79c6 Fix __call_main
  • e783c8561c cross-avr/avr-libc: local bump to 2.3.2 for avrxmega3 device support ::gentoo only carries avr-libc 2.1.0, which predates the upstream 2.2.0 release that first shipped tinyAVR 0/1/2-series and megaAVR-0 (avrxmega3) device support: I/O headers, startup code and per-device libraries. Without it the crossdev avr toolchain cannot build for parts such as the ATtiny3217 (no <avr/iotn3217.h>, crtattiny3217.o or libattiny3217.a) even though avr-gcc 15 itself knows the avrxmega3 core and ships device-specs/specs-attiny3217. Upstream moved from Savannah to GitHub with 2.2.0. The GitHub release tarball ships a pre-generated ./configure and the avr/{lib,devices} trees (mlib-gen.py output), so no bootstrap / autotools / python is needed to build it. Manual pages are no longer a separate download; they build from the tree only when doxygen is present, which we do not pull in, so docs are disabled explicitly. Portage prefers this over the ::gentoo 2.1.0 automatically (higher version), so an `emerge --sync` / `@world` upgrade will not revert it. /etc/portage/crossdev/avr/env pins CROSSDEV_OVERLAY to this repo so a future `crossdev -t avr` re-run stays consistent. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016Qt4fDtTZPTpDz2cr7ZNT2
  • View comparison for these 2 commits »

1 month ago

k4be pushed to master at k4be/obrazki

3 months ago

k4be pushed to master at k4be/k4be-gentoo-overlay

6 months ago

k4be pushed to master at k4be/k4be-gentoo-overlay

6 months ago

k4be pushed to master at k4be/k4be-gentoo-overlay

6 months ago

k4be pushed to master at k4be/irc-clone

6 months ago

k4be created new branch master at k4be/irc-clone

6 months ago

k4be created repository k4be/irc-clone

6 months ago

k4be pushed to master at k4be/gpx-vis

  • eb6f55ade7 Fix login flash, elevation gain/loss accuracy, and stats label position - Hide auth page by default to prevent flash when already logged in - Filter GPS elevation noise with 5m hysteresis threshold, halving inflated gain/loss values - Move gain/loss stats label above the chart area to avoid overlap with profile Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

7 months ago

k4be pushed to master at k4be/gpx-vis

  • ae5a700f36 Show loading indicator on all tracks when opening a folder Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

7 months ago

k4be pushed to master at k4be/gpx-vis

  • 412c7f06f2 Add GPX export button to track list Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
  • ebb10eb407 Show elevation gain and loss in elevation profile chart Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
  • 2edcff8a58 Fix 401 handler: only clear token and reload if token exists Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
  • aed4ee7c7c Add interactive CLI for user management Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
  • View comparison for these 4 commits »

7 months ago

k4be pushed to master at k4be/gpx-vis

  • 9ffe4d72d3 Cache track point data in memory and show loading state on click - Track segment data is cached after first fetch; re-toggling a track on/off no longer triggers a network request - While fetching, the track item pulses and ignores further clicks (pointer-events:none) so repeated clicking has no effect - Cache is invalidated on edit (name/type change) and delete Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

7 months ago

k4be pushed to master at k4be/gpx-vis

  • ba55604528 Fix trackType missing from directory contents endpoint GET /api/directories/:id was not including trackType in the track attributes, causing: edit modal always showing "unset", type emoji not appearing in the file list for tracks inside folders, and incidentally clearing saved types when saving the edit form. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

7 months ago

k4be pushed to master at k4be/gpx-vis

  • b7c4a11b58 Add track type emoji in file list, folder type inference, always-visible buttons, and stats type filter - Item actions (buttons) now use absolute positioning so they always overlay the row on hover, even when the sidebar is narrow - Track type emoji moved to appear after the track name (not before) - Folders display a type emoji when all their items share the same type (computed recursively from cached dir contents) - Stats tab gains a type filter bar: pill buttons for each track type plus Untyped; multi-select; backend filters via ?type= query param Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

7 months ago