Outflowing ionospheric ions observed by Geotail and Akebono and their transport in the near-Earth and mid-tail magnetosphere