“Design a sky map app” is a sensor-and-AR mobile system design prompt — Sky Guide, SkySafari, Stellarium, Star Walk are the references. The interview tests whether you understand sensor fusion (gyro + accel + magnetometer), real-time AR overlay, astronomical computation, and the unique requirements of a “point at sky → identify object” experience.
Clarify scope
- Stars only or also planets, satellites, comets?
- AR overlay or static sky map?
- Predictive (“when will Saturn rise”) features?
- Offline operation expected?
- Telescope control (ASCOM, smart-telescope APIs)?
The sensor fusion problem
Pointing the phone at the sky requires knowing:
- Where the phone is (GPS, lat/lon)
- What time it is (system clock, validated against time server)
- Which way the phone is pointing (sensor fusion of gyro, accel, magnetometer)
- Calibration of the magnetometer (the hardest part)
Sensor fusion in practice
- iOS: CoreMotion provides device attitude (CMAttitude) — already fused
- Android: SensorManager.getRotationMatrix combines accel + magnetometer; or use ROTATION_VECTOR sensor
- Drift handling: the magnetometer drifts; periodically calibrate against gyro+accel
- “Point at sun and tap” calibration (Stellarium-style) for indoor / interference scenarios
Astronomical computation
- Star catalog: ~100K stars (Hipparcos, Tycho-2) embedded in app (~50MB)
- Planet positions: VSOP87 or simplified Kepler — computed at runtime
- Moon: ELP-2000 or similar; high accuracy required (close to user)
- Constellations: hand-curated line patterns connecting bright stars
- Deep-sky objects (galaxies, nebulae): ~10K from NGC catalog
- Satellites: TLEs (two-line elements) updated weekly via celestrak.org
- Comets: orbital elements; less common
Ephemeris freshness
- Star positions: stable for human lifetimes (proper motion negligible at amateur scales)
- Planets: computed; no update needed
- Satellites: orbital elements decay; update TLEs every 1–7 days
- Comets: update on outburst or new discovery
The render pipeline
- Convert observer location + time → local sidereal time
- For each visible object: convert (RA, Dec) → Alt-Az coordinates
- Filter to objects above horizon
- Project to phone screen using device attitude
- Render with Metal / OpenGL ES / Vulkan
AR overlay
- Camera preview as background
- Star labels and constellation lines overlaid using sensor-derived attitude
- Tap an object to identify; see info card with distance, magnitude, history
- “Tonight’s highlights” auto-suggestions
Offline operation
- Star catalog and planet algorithms ship with the app
- GPS works offline (just slower without A-GPS)
- TLEs are the only thing requiring periodic update
- App should fully function in remote stargazing locations with no signal
Battery considerations
- Camera + sensors at 30 Hz is heavy
- Drop sensor poll rate when device idle (no movement)
- Allow night mode (red display) to preserve dark adaptation
- Auto-dim when not interacting
Night mode
- Red-tinted UI to preserve dark adaptation
- Reduced brightness override
- Toggle prominent in main view
Educational features
- Constellation stories (mythology)
- “Tonight” page with what is visible from current location
- Planning tools: ISS pass times, conjunction events, eclipses
- Notification: “ISS visible in 5 minutes from your location”
Telescope integration
- Smart telescopes (Vespera, Stellina, ZWO Seestar) connect via Wi-Fi
- App can drive go-to commands from the AR view
- Live image streaming from telescope camera
- Out of scope for most apps but a niche premium feature
Performance considerations
- Stars rendered as point sprites; 100K is fine on modern GPUs
- Use depth-sort only for transparency (planets behind/in-front)
- Frame rate target: 30+ fps for AR overlay
- Memory: ephemeris computations are cheap; the catalog dominates RAM
Astronomical accuracy
Amateur apps target arc-minute accuracy:
- Stars: better than 1 arcsec (Hipparcos catalog)
- Planets: arcsec-level with VSOP87
- Moon: arcmin-level
- Sun: arcsec-level
- Satellites: km-level position; arcmin-level apparent
Professional astronomy uses higher-fidelity algorithms; not needed for consumer apps.
What separates senior from staff
Senior candidates handle sensor fusion and basic rendering. Staff candidates address magnetometer drift, the calibration UX, and the offline ephemeris story. Principal candidates discuss telescope-control protocols, the educational content pipeline, and the very-large-aperture (computational photography for astrophotography) extension.
Frequently Asked Questions
How do I handle indoor / shielded magnetometer?
Detect with the magnetometer accuracy reading; prompt user for “calibration dance” or manual point-at-known-object calibration. Most apps degrade gracefully but get inaccurate.
Where do the catalogs come from?
Hipparcos, Tycho-2, Gaia DR3 (now standard) for stars. NGC + IC for deep-sky. JPL Horizons for planet/comet ephemerides. All public-domain or permissive-license.
What about light pollution overlay?
Some apps overlay light-pollution maps from VIIRS satellite data. Useful for stargazing-trip planning. Out of core but a frequent enhancement.