Skip to content

CodeAIR in a hand, and a ranger card, in the simulator's world - #173

Merged
david-firia merged 1 commit into
mainfrom
codeair-hold
Dec 3, 2026
Merged

david-firia merged 1 commit into
mainfrom
codeair-hold

Conversation

@david-firia

Copy link
Copy Markdown
Contributor

The world model for a CodeAIR in a student's hand, for FLY's early lessons (hold the drone, cover a ranger, slide it, tip it, turn it). The page's handles to drive it come in the PR stacked on this one.

In a hand (src/sim/world/codeair.js). hold(pose) takes the drone (any of x, y, z, heading, roll, pitch): it follows that pose through a short lag, no faster than a hand moves, with a small shake once off the floor. Nothing flies it while held, whatever its motors do, and it never goes through the floor. release() lets go: with its motors off it falls. The accelerometer reads gravity turned into the tipped body, the gyroscope the hand's turn, the flow sensor the slide.

The ranger card. setCard({ x, y, z, q }), a 15 by 10 cm card standing for a hand or a sheet of paper. Each ranger now casts its ray from where it sits on the frame along where the tipped frame points it, to the nearest of the floor, an underside above, a wall or box, and the card, so a tipped drone reads the slant. The card is not an obstacle to flight. The snapshot carries held and card.

Tests (tests/sim.mjs): the card against each ranger reads under 2 mm and taken away over 1000 mm; held, slid and turned, the flow sensor and gyroscope read it; tipped, the accelerometer reads gravity in the body and the down ranger the slant; let go, it falls.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SS5gJ2c2Qc8EBGyMEjiPVq

A hand takes the drone (hold, a pose it follows through a short lag, with a
small shake once lifted) and lets it go (release: with its motors off it
falls). The accelerometer reads gravity turned into the tipped body, the
gyroscope the hand's turn, the flow sensor the slide across the floor.

Each ranger now casts its ray from where it sits on the frame along where
the frame points it, to the nearest of the floor, an underside above, a wall
or box, and the ranger card: a 15 by 10 cm card that stands for a hand or a
sheet of paper, placed and turned by setCard. A tipped drone reads the slant.
The card is not an obstacle to flight. The snapshot carries both, for the
page's handles to come.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SS5gJ3p1XJhQBNJ3wv9z2z
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit d44c7c8):

https://firialabs-open-editor--pr173-codeair-hold-vowr1t97.web.app

(expires Thu, 10 Dec 2026 15:50:30 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 81259a1fec315ca1af3747d225d9c7424890be3e

@david-firia
david-firia merged commit c6f1481 into main Dec 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant