Having trouble with a FOR loop.

Ok so you get absolute height then and the data you showed above was just your glider being on the ground and small variations due to accuracy

So your ask is 1 beep when you cross 100m and then no beep until you cross 200m when you do 2 beeps etc and above 800m it’s a constant beep

This is easily programmed with a small state machine. Steps could be
BELOW_100
BELOW_200
BELOW_300
...
BELOW_800
TOO_HIGH

You monitor height and depending on current state you check when cross to a new level

switch(state) {
   case BELOW_100: // we were below 100
       if (Height >= 100) { // we are crossing the limit
         state = BELOW_200; // set new state and beep once
         beep(UP, 1); // write this function to beep the right number of times with frequency indicating up or down
      }
   break;

   case BELOW_200: // we were below 200
       if (Height >= 200) { // we are crossing the limit
         state = BELOW_300; // set new state and beep twice 
         beep(UP, 2);
      } else // check in case we went back below 100
      if (Height <= 98) { // manage a bit of room to not beep all the time around 100m
         state = BELOW_100; // record new state and beep once indicating crossing down
         beep(DOWN, 1);
      } 
   break;

   case BELOW_300:
       if (Height >= 300) {
         state = BELOW_400;
         beep(UP, 3);
      } else
      if (Height <= 198) {
         state = BELOW_200;
         beep(DOWN, 2);
      } 
   break;

... you get the idea

}

This is by far not the best code and can heavily be simplified with just a variable holding previous height and checking if trasnsition was crossed but this has the advantage of being super easy to read and could get you started

Read about enum to represent states with keywords in your language

enum : byte {BELOW_100, BELOW_200, BELOW_300, ..., BELOW_800, TOO_HIGH} state; // of course don’t write ... I’m lazy you need all the keywords in there