# HOBF Sensor Lab 0.1 — setup and test guide This is a separate static experiment. It does not change HOBF Training, its database, timers or saved profiles. No build step, WordPress plugin, subscription, API key or database is required. Keep the supplied files together. Your downloaded ZIP is also your editable source backup. ## 1. Create an isolated location Recommended address: **https://sensors.hobf.store/**. A separate subdomain avoids interference from the Training app's existing service worker and separates browser storage. 1. Sign in to Hostinger hPanel. Open **Websites**, then the hosting dashboard for **hobf.store**. Confirm the selected domain before making changes. 2. Look under **Domains → Subdomains** for the option to create a subdomain. Enter **sensors**, choose **hobf.store**, and create it. Labels can vary by hosting setup. If this option is missing, stop and send a screenshot; do not replace your existing website or install WordPress just for this test. 3. Note the exact document-root folder assigned to **sensors.hobf.store**. It may be a folder beneath public_html. Use the folder Hostinger assigns, not a guessed folder. 4. If Hostinger asks for DNS, create the **sensors** record at the provider currently managing authoritative DNS for hobf.store, using the hosting IP Hostinger displays for THIS hosting account. Do not reuse an old IP from a screenshot. Do not change the root domain's nameservers or its existing app record. 5. Enable/check SSL for **sensors.hobf.store** and allow DNS/SSL setup to finish. The address must open over HTTPS without a certificate warning. Sensor APIs require a secure context. ## 2. Upload only into the new subdomain's folder 1. Download **HOBF-Sensor-Lab-v0.1.zip** to your computer and unzip it locally. 2. In Hostinger open **Files → File Manager**. Navigate to the document root recorded in step 3 above. Confirm it belongs to **sensors.hobf.store**, not the main Training app. 3. Upload these five files directly into that folder: `index.html`, `app.js`, `style.css`, `logo.svg`, `HOSTINGER-GUIDE.md`. 4. Do not upload the enclosing ZIP folder as another level. `index.html` must be directly inside the new subdomain's document root. 5. Do not delete any existing HOBF files. If this supposedly new folder contains a website, pause and send a screenshot before overwriting anything. 6. Open **https://sensors.hobf.store/**. The header must say **HOBF / SENSOR LAB**, version **0.1**. If you see Training or WordPress, the document-root/DNS mapping needs checking; do not clear all Chrome data or delete your main app. If you prefer extraction in File Manager, upload the ZIP only into the new folder. Extract it into a temporary folder named `unpacked`, then move its five files into the subdomain document root. Avoid creating `public_html/public_html` or `sensors/sensors` nesting. ## 3. First Android test 1. Open the full HTTPS address in Chrome, not inside WhatsApp or another in-app browser. Use a normal tab so saved results persist. 2. Tap **Enable phone sensors**. Allow motion/orientation permissions if prompted. 3. Gently move the phone. The status should change to **receiving**. Some phones may expose only one type of sensor data. 4. If no readings arrive, check the site's permissions in Chrome for **Motion sensors**, permit access, reload and tap Enable again. Permission availability and wording vary. Confirm HTTPS and keep the page in the foreground. On iPhone, the same button requests motion/orientation access where supported. 5. Start with **Raw sensor diagnostic**, phone on a table, 10 seconds. After 5 seconds of preparation the recording begins. Stay still for its first 2 seconds, then gently lift the phone. 6. Save the result. Export **backup JSON** and check that the file appears in Downloads. Reopen the page and verify the saved test remains. 7. Do not clear browser data as a troubleshooting step until you have exported a backup. This prototype has no service worker or offline cache. Future file updates should change the displayed version and asset query strings. ## 4. Guided split measurement This estimates horizontal separation of leg directions, **not a 3D hip-joint angle**. The phone is held in your hand only for this static test. 1. First validate on two straight lines forming a known 90° corner, away from metal/electronics. Enter reference `90`. 2. Keep the screen face-up and level. Point the phone's top edge along the first line. Capture A and hold still for 2 seconds. 3. Move to the second line without turning the phone upside down. Capture B. 4. Return to the first line and capture A again. This reports a return-drift check. Drift above 5° is flagged. The 2° stillness and 5° drift thresholds are engineering screening rules, NOT validated accuracy tolerances. 5. Repeat three times. Record all results, not just the best. A stable reading can still be systematically wrong; compare against the known angle. 6. For a seated straddle, adopt a comfortable repeatable position. Keep both legs unchanged throughout A → B → A. Align the top of the phone toward each foot, along the leg direction, without forcing range. Remove the reference field unless you actually know the angle. 7. Use the same phone, alignment, floor, case, warm-up and posture on later days. Small changes within your repeated-test spread are not convincing progress. Heading may drift or respond to magnetic interference depending on the phone/browser. There is no universal accuracy claim. If the phone cannot pass the corner test, do not use its split result as a training measurement. ## 5. Other available experiments | Test | What it records | Practical use and limitation | |---|---|---| | Inclination | Difference in the phone long-axis elevation relative to gravity, two stationary captures | Explore shin lean in knee-to-wall, a supported leg raise or trunk lean. Keep top edge direction consistent. It is segment inclination, not anatomical joint range. Rotation around vertical is not measured. | | Pull-up acceleration | Phone acceleration magnitude, peak, RMS, baseline RMS, sample rate and gaps; raw axes in JSON | Explore same-phone repeatability against video. Secure waist pouch or snug pocket. No pulling force, RFD, velocity, power or height calculation. | | Balance / stability | Same motion metrics during a fixed stance or supported hold | Compare identical placement and stance. Not center-of-pressure, fall risk or a medical balance assessment. Do not deliberately destabilize yourself. | | Squat / calf-raise tempo | Sensor trace plus assistant-tapped rep completion timestamps and intervals in JSON | Compare with video timing. Markers are manual, include reaction delay, and are not automatic repetitions. | | Raw diagnostic | Available gravity-inclusive and gravity-free acceleration, rotation rate, timestamps | Assess stationary noise, missing streams, sampling gaps and loose-phone artefacts. Raw axes stay in device coordinates. | Never use a loose neck lanyard during pull-ups, climbing or dynamic exercise. It can swing, strike or snag, and its acceleration is not your body's acceleration. A seated loose-lanyard diagnostic can demonstrate this artefact but should not be compared with snug-pocket training trials. Do not attempt maximal or unfamiliar movements solely to test the app. ## 6. Saving and comparing - **Save result** writes to this browser on this device, under a separate Sensor Lab storage key. No cloud account or cross-phone sync is provided. - **Export backup JSON** preserves all samples, angle captures, manual markers, metadata and notes. Restore it using **Restore backup JSON**. Existing results are retained; duplicates with the same ID are skipped. - **Export summary CSV** is for spreadsheet comparison. It includes angle reference error, peak/RMS acceleration, baseline noise and sample rate. Raw time series and manual intervals are in JSON, not the summary CSV. - Maximum: 100 saved trials, with a maximum 30-second motion recording per trial. Browser storage quota can be reached sooner. If saving fails, an unsaved-result JSON download is offered. - Store backups on your computer. Exports contain browser/device details and your notes; share only what you intend to disclose. Hosting access logs may still exist, but the app sends no sensor readings to a server. - For accuracy testing: record three known-angle trials, then three same-setup body trials. Compare mean error against the reference and maximum-minus-minimum spread. For motion, compare timestamps with a video and run three stationary recordings to establish noise. No universal pass/fail accuracy is asserted. ## 7. Prototype boundaries / testing status Core logic and JavaScript syntax have been checked with synthetic inputs. Real accelerometer, heading, permissions, motion artefacts and accuracy must be checked on your actual phone after upload. No fabricated demo readings are presented in the app. Tests cancel when the page becomes hidden; no background measurement is promised. A wake-lock request is attempted but not guaranteed by every browser. This package intentionally does not modify or integrate with HOBF Training. Keep the prototype separate until we review actual exported trials. Automatic rep detection, validated velocity estimation and other derived metrics are candidates for later experiments, not implemented claims. ## Technical references - [MDN: DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent) — secure context, acceleration units and browser coordinate differences. - [MDN: DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent) — orientation events and permission support. - Hostinger menu steps above follow hPanel's website/file-manager workflow; exact options depend on the hosting plan. Confirm the assigned document root before uploading.