Hi @rune,
Assuming you have a power sense module (or equivalent) installed, and the firmware configured to read it:
the autopilot provides an estimate in the energy_consumed
field of the BATTERY_STATUS
MAVLink messages sent by the vehicle (which should be recorded in the telemetry logs).
Note that the power received by the vehicle is subject to the losses through the cables and voltage conversion before it reaches the vehicle (discussed a bit here), so if you’re wanting to measure power taken from the topside supply then you’ll either need to scale up the vehicle’s estimate, or actively monitor and measure power usage at the topside.