code: def view_indexes(self, done=None):
          '''return a list waypoint indexes in view order'''
          ret = []
          if done is None:
              done = set()
          idx = 0
  
          # find first point not done yet
          while idx < self.count():
              if not idx in done:
                  break
              idx += 1
              
          while idx < self.count():
              w = self.wp(idx)
              if idx in done:
                  if w.x != 0 or w.y != 0:
                      ret.append(idx)
                  break
              done.add(idx)
              if w.command == mavutil.mavlink.MAV_CMD_DO_JUMP:
                  idx = int(w.param1)
                  w = self.wp(idx)
                  if w.x != 0 or w.y != 0:
                      ret.append(idx)
                  continue
              if (w.x != 0 or w.y != 0) and self.is_location_command(w.command):
                  ret.append(idx)
              idx += 1
          return ref view_indexes(self, done=None):
          '''return a list waypoint indexes in view order'''
          ret = []
          if done is None:
              done = set()
          idx = 0
  
          # find first point not done yet
          while idx < self.count():
              if not idx in done:
                  break
              idx += 1
              
          while idx < self.count():
              w = self.wp(idx)
              if idx in done:
                  if w.x != 0 or w.y != 0:
                      ret.append(idx)
                  break
              done.add(idx)
              if w.command == mavutil.mavlink.MAV_CMD_DO_JUMP:
                  idx = int(w.param1)
                  w = self.wp(idx)
                  if w.x != 0 or w.y != 0:
                      ret.append(idx)
                  continue
              if (w.x != 0 or w.y != 0) and self.is_location_command(w.command):
                  ret.append(idx)
              idx += 1
          return ret
docs: return a list waypoint indexes in view order