Setting fuel quantity - conversion bug

So here’s something funky: I often make use of the auto-convert functionality
of the sim when reading/writing variables. That way, I can keep all my
internal variables metric and have an easier time with all them physics
calculations. So far, this worked fine, even in conjunction with simConnect.
It worked, until I tried to set the fuel quantity in liters. take this as an
example:

SimConnect_AddToDataDefinition(hSimConnect, DEFINITION_PAYLOAD_FUEL_LEFT_MAIN, "FUEL TANK LEFT MAIN QUANTITY", "liters");
double test = 42;
SimConnect_SetDataOnSimObject(SIMCONNECTOR::hSimConnect, SIMCONNECTOR::DEFINITION_PAYLOAD_FUEL_LEFT_MAIN, SIMCONNECT_OBJECT_ID_USER, 0, 0, sizeof(double), &test;);

This will set the left main tank to 42 gallons of fuel, instead of the
requested 42 liters. In contrast, I set all my payloads in “kg”, and it works
fine.

Thanks for pointing this out. A bug report has been made about this as the
conversion should be getting done the same as for other units.