     var logMax = Int(ceil(center)+logRange/2)
     if !left {
       logMin = max(0, logMin)
-      logMax = min(4, logMax)
+      logMax = min(5, logMax)
     }
     let bottom = center - logRange / 2
 //    let top    = center + logRange / 2

  }
  
  override func glkView(view: GLKView, drawInRect rect: CGRect) {
    
    currentDH += 0.01

    if let s = socket {
      if !s.isConnected {
        latestData = FlightData()
        
        latestData!.DeltaH = currentDH

      }
    }
    
    latestData!.AtmHeight = 5000
    
    glClearColor(0,0,0,1)
    glClear(GLbitfield(GL_COLOR_BUFFER_BIT) | GLbitfield(GL_DEPTH_BUFFER_BIT))
    
