## 2 Materials and Methods
### Methods
#### 2.2.4 Onboard Autonomous Planning Algorithm  
Onboard autonomous planning is a process of response to new tasks dynamically, which requires high timeliness and optimality of a planning algorithm. Heuristic algorithm is intuitive, easy to understand and efficient in solving [35]. It can give feasible solutions with high rewards in a short time and low computing consumption, which meets the requirements of onboard autonomous planning. Therefore, we propose a heuristic algorithm for onboard autonomous planning. The proposed algorithm consists of matching the longitude and latitude of the target regions (observation tasks) with the pixel of the CLM, computing cloud cover rate and screening out tasks requiring adjustment, selection of the tasks and observation windows, and local neighborhood search. 1. Matching the longitude and latitude of the targets with the pixel of the CLM. Each ground target has a latitude and longitude. In order to determine the cloud over the target region, the latitude and longitude of the target are matched with the pixels in the CLM products to obtain accurate cloud cover rate in pixel units. The resolution of the CLM products is 4 km, and supplementary data 'FullMask_Grid_4000.raw' has a size of 2748 \(\times\) 2748. The process of matching the longitude and latitude of the targets with the pixel region of the CLM is as following: Firstly, finding the corresponding pixel point in the 'FullMask_Grid_4000.raw' data based on the central latitude and longitude of targets. Secondly, matching the pixel point with the CLM pixel area. Thirdly, according to the size of the target, calculating the corresponding pixel area. For example, the actual ground size of the target is 60 km \(\times\) 60 km, which is 15 \(\times\) 15 pixel area in the CLM image;
2. Computing cloud cover rate and screening out tasks requiring adjustment. The International Satellite Cloud Climatology Project gives the cloud level according to the cloud cover of remote sensing images: cloud cover below 35% is set as low cloud level; cloud cover between 35% and 65% is set as medium cloud level; cloud cover above 65% is set as high cloud level. Referring to this cloud level, we set the cloud cover threshold to 65%, and after each acquisition of CLM images, we judge the cloud cover over all observed targets in this planning cycle. If the cloud cover is larger than 65%, the observation plan of this task in the current planning cycle is cancelled and the task is added to the set of pending tasks;
3. Selection of tasks and observation windows. The set of pending tasks consists of multiple new tasks, the tasks and observation windows need to be selected according to certain rules. Here the selection of new tasks is based on the task demand degree, which indicates the urgency of the task planning, and it is calculated using the following equation. \[\rho_{i}=\frac{p_{i}}{TW_{i}}\] (10) where \(p_{i}\) is the priority of task \(i\), \(TW_{i}\) is the number of available time windows of task \(i\). The available time windows at this point are the time windows after the current planning. Tasks with higher priority and fewer observation windows have a higher task planning urgency. That is, the higher value \(\rho_{j}\), the higher the task demand should be. For the selection of observation windows, it is considered that a task often has multiple observation windows. Here, the selection is based on the temporal order of the observation windows, i.e., the observation window with an earlier start time should be selected first; and
4. Local neighborhood search. Given that the neighborhood of the current solution often contains better neighborhood solutions, a local neighborhood search can be performed on the current solution. Local neighborhood search is a kind of heuristic algorithm which has the advantages of timeliness, high efficiency and succinctness. In this paper, insertion neighborhood search is used to arrange the current tasks.