The paper presents a mission planner for an autonomous unmanned aerial vehicle (UAV) battery management system. The objective of the system is to plan replacements of the UAV's battery on the static battery management stations. The plan ensures that UAVs have sufficient energy to fulfill their long-term mission, which would otherwise be impossible. The paper provides a detailed description of the mission planner and all of its components. The functionality of the planner is successfully demonstrated in simulated multi-UAV multi-station scenarios.