code: func GetBeaconStartForTime(ts time.Time) time.Duration {
  	gpsTime := gps.Time(ts).TimeSinceGPSEpoch()
  
  	return gpsTime - (gpsTime % beaconPeriod)
  }
docs: // GetBeaconStartForTime returns the beacon start time as a duration
  // since GPS epoch for the given time.Time.