Skip to content

Commit 4d0d9a3

Browse files
peterbarkerrobertlong13Ryanf55
committed
AP_TECS: log kinetic and potential estimates into TEC4
Co-authored-by: Bob Long <robertlong13@gmail.com> Co-authored-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
1 parent 102faee commit 4d0d9a3

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

libraries/AP_TECS/AP_TECS.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,25 @@ void AP_TECS::_update_throttle_with_airspeed(void)
844844
(double)SPE_err_min,
845845
(double)SPE_err_max);
846846
}
847+
// @LoggerMessage: TEC4
848+
// @Vehicles: Plane
849+
// @Description: Additional additional additional information about the Total Energy Control System
850+
// @URL: http://ardupilot.org/plane/docs/tecs-total-energy-control-system-for-speed-height-tuning-guide.html
851+
// @Field: TimeUS: Time since system startup
852+
// @Field: P: estimate of potential energy
853+
// @Field: K: estimate of kinetic energy
854+
// @Field: Pdem: demanded potential energy
855+
// @Field: Kdem: demanded kinetic energy
856+
AP::logger().WriteStreaming(
857+
"TEC4",
858+
"TimeUS," "P," "K," "Pdem," "Kdem",
859+
"Q" "f" "f" "f" "f",
860+
AP_HAL::micros64(),
861+
(double)_SPE_est,
862+
(double)_SKE_est,
863+
(double)_SPE_dem,
864+
(double)_SKE_dem
865+
);
847866
#endif
848867
}
849868

0 commit comments

Comments
 (0)