3.8 KiB
3.8 KiB
Decimal Day Progress Watchface - Implementation Plan
Concept Overview
Create a joke/novelty Garmin watchface that displays time as a decimal day progress meter instead of traditional 12/24 hour format.
Key Features
- 10 equal divisions on the watchface (instead of 12 hours)
- Single hand showing day progress as a decimal (0-10)
- Analog display with tick marks at each decimal position
- Optional digital readout showing exact decimal time
Time Mapping
- Midnight (00:00) → 0.0
- 6:00 AM → 2.5
- Noon (12:00) → 5.0
- 6:00 PM → 7.5
- Midnight (24:00) → 10.0 (wraps to 0)
Technical Implementation
Project Structure
MetricWatchFace/
├── manifest.xml # App metadata and device compatibility
├── monkey.jungle # Build configuration
├── resources/
│ ├── drawables/
│ │ └── drawables.xml # Layout definitions
│ ├── strings/
│ │ └── strings.xml # Localization
│ └── settings/
│ └── settings.xml # User settings (if needed)
└── source/
├── MetricWatchFaceApp.mc # Application entry point
└── MetricWatchFaceView.mc # Main watchface view logic
Core Calculation
Decimal Time Formula:
decimalTime = (currentHour + currentMinute/60.0 + currentSecond/3600.0) / 24.0 * 10.0
Hand Angle Calculation:
handAngle = (decimalTime / 10.0) * 360.0 - 90.0 // -90 to start at top (12 o'clock position)
Drawing Components
-
Watchface Circle
- Use
drawCircle()ordrawArc()for outline - Draw 10 tick marks at 36° intervals (360°/10)
- Use
-
Decimal Markers
- Place numbers 0-9 around the perimeter
- Position 0 at top (traditional 12 o'clock position)
- Position 5 at bottom (traditional 6 o'clock position)
-
Progress Hand
- Use
fillPolygon()to draw a triangle/arrow hand - Calculate hand coordinates using trigonometry
- Rotate based on current decimal time
- Use
-
Digital Display (optional)
- Show exact decimal time (e.g., "3.47")
- Position at center or bottom of face
Key Methods
MetricWatchFaceView.mc:
initialize()- Set up initial stateonUpdate(dc)- Main rendering method (called periodically)computeDecimalTime()- Calculate current decimal timedrawWatchFace(dc)- Draw the analog face and markersdrawHand(dc, decimalTime)- Draw the progress handdrawDigitalTime(dc, decimalTime)- Optional digital display
Device Compatibility
Target devices:
- Fenix series (5, 6, 7)
- Forerunner series (245, 645, 945)
- Vivoactive series (3, 4)
- Other modern Garmin watches with Connect IQ support
Considerations:
- Handle different screen sizes/resolutions
- Support both round and semi-round displays
- Test with MIP and AMOLED displays
Implementation Steps
-
Project Setup
- Create manifest.xml with app metadata
- Set up basic directory structure
- Create application entry point
-
Core Logic
- Implement decimal time calculation
- Add time update handling
- Create view class structure
-
Rendering
- Draw watchface circle and divisions
- Add decimal markers (0-9)
- Implement hand rotation logic
- Add digital display
-
Testing & Refinement
- Test in simulator
- Verify calculations at key times
- Optimize drawing performance
- Test on actual device if available
Future Enhancements (Optional)
- Add date display
- Include battery indicator
- Show step count or other metrics
- Customizable colors via settings
- Alternative hand styles
- Animation effects
References
- Garmin Connect IQ SDK Documentation
- Swiss Railway Clock example (analog implementation)
- Monkey C API reference for graphics primitives