- int t = 0;
- for (double height : data.heights()) {
- if (height > apogee_height) {
- apogee_height = height;
- apogee_time = data.time(t);
+ /* This just finds the apogee time -- we've recorded the
+ * peak altitude separately in eeprom, and that could
+ * have occurred after the eeprom was full.
+ */
+ for (MicroDataPoint point : data.points()) {
+ if (point.height > searched_apogee) {
+ searched_apogee = point.height;
+ apogee_time = point.time;