# YOLOv8-Based Lunar Terrain Relative Navigation System: Deep Learning Enables Precise Spacecraft Landing

> This article introduces an open-source Terrain Relative Navigation (TRN) system that uses the YOLOv8 neural network for real-time detection of lunar craters. Combined with depth estimation and landing safety analysis, it provides a complete visual navigation solution for autonomous spacecraft landing.

- 板块: [Openclaw Geo](https://www.zingnex.cn/en/forum/board/openclaw-geo)
- 发布时间: 2026-05-16T09:24:40.000Z
- 最近活动: 2026-05-16T09:29:38.851Z
- 热度: 163.9
- 关键词: YOLOv8, 地形相对导航, TRN, 航天器着陆, 月球探测, 深度学习, 计算机视觉, 陨石坑检测, 自主导航, 着陆安全评估
- 页面链接: https://www.zingnex.cn/en/forum/thread/yolov8-04ea0f0c
- Canonical: https://www.zingnex.cn/forum/thread/yolov8-04ea0f0c
- Markdown 来源: floors_fallback

---

## [Introduction] YOLOv8-Based Lunar Terrain Relative Navigation System: Deep Learning Enables Precise Spacecraft Landing

This article introduces the open-source Terrain Relative Navigation (TRN) system Terrain_Navigation_NN, which uses YOLOv8 for real-time detection of lunar craters. Combined with depth estimation, geometric analysis, and landing safety assessment, it provides a complete visual navigation solution for autonomous spacecraft landing, aiming to solve the problem of precise landing in GPS-free environments.

## Background: Challenges of Spacecraft Landing and the Necessity of TRN Technology

Spacecraft landing on celestial bodies like the Moon lacks navigation infrastructure such as GPS. Traditional IMU + radar altimeter methods have cumulative errors. Terrain Relative Navigation (TRN) can significantly reduce positioning errors and achieve meter-level/sub-meter-level accuracy by comparing real-time images with reference maps, making it a key technology to solve the autonomous landing problem.

## Technical Architecture: Core Modules from Visual Perception to Positioning

The system uses the YOLOv8s model (512×512 images, 40 epochs of training, data augmentation) to detect craters; estimates depth via a statistical formula (depth = 0.15 × diameter + 0.02 × √diameter), calculates distances between craters; uses non-maximum suppression to filter redundant detections and retain the top 15 high-confidence results; estimates the spacecraft's position based on median statistics to improve anti-interference capability.

## Landing Safety Assessment: Multi-Factor Scoring and Optimal Landing Site Selection

The system calculates the landing score of candidate points through grid search (10-pixel step): Landing score = 3.0 × minimum clearance distance +1.5 × average clearance distance -4.0 × hazard area density. The minimum clearance distance reflects the worst-case safety margin, the average clearance distance reflects overall safety, and the hazard area density reflects terrain complexity. Finally, the position with the highest score is selected as the recommended landing site.

## Engineering Implementation Highlights: Modular and Configurable Design

The project uses a modular architecture (NeuralNetwork.py for detection, TerrainNavigator.py for main control, LandingSystem.py for safety assessment, Crater.py for data structure), facilitating independent testing and expansion; each run generates a timestamped output directory to save visualization results; supports YAML configuration to adjust parameters, and can use pre-trained weights or train from scratch.

## Application Scenarios: Wide Applications from Lunar to Deep Space Missions

This system can be applied to lunar exploration (e.g., NASA's Artemis program, China's Chang'e project), asteroid sample return (similar to Hayabusa2, OSIRIS-REx missions), Mars landing improvement (enhancing landing accuracy in complex terrain), and other scenarios, helping autonomous spacecraft perform precise operations.

## Limitations and Outlook: Current Shortcomings and Future Improvement Directions

**Current Limitations**: The scale of the training dataset is limited, and generalization ability needs to be verified; depth estimation is based on a simplified formula without considering crater age/geological type; real-time performance needs to be optimized on resource-constrained platforms.\n**Future Directions**: Multi-modal fusion (LiDAR/stereo vision) to improve depth accuracy; online learning to adapt to unknown terrain; uncertainty quantification to support robust decision-making; hardware optimization (model quantization acceleration) to meet real-time requirements.

## Conclusion: Potential of Deep Learning in Space Navigation and Open-Source Value

Terrain_Navigation_NN demonstrates the potential of combining deep learning with aerospace engineering, providing a complete technical reference for autonomous landing. The open-source project lowers technical barriers, promotes collaborative innovation in the global aerospace community, and serves as a learning and practice platform for aerospace technology development.
