Efficient Legged Robot Locomotion Through Optimized Gait Planning for Unstructured Planetary Terrain (IEEE Access, 2026)