@Mark at first glance, you already do your own refueling, so all that really needs to happen is for you to look for the fuel truck to arrive, no? basically as soon as L:FSDT_GSX_REFUELING_STATE is set to 5, start the refuel.
And maybe make sure the L:FSDT_GSX_SETTINGS_PROGRESS_REFUEL/L:FSDT_GSX_SET_PROGRESS_REFUEL is correct