I currently have a final project on building a ground control station for a lakebed topographic survey vessel. I want to build an algorithm to divide (grid) n Gps points into planning paths like the image above. I got it from Measure Ground Control software, my algorithm requirements are similar.
enter image description here
enter image description here
Picture from software Measure Ground Control.
i have succeeded for 4 gps points case, but not in case of more points. Can someone give me advide keywords or documentation on this. thank you
code 4 point, i code it in ESP32:
double get_target_list (int i, int _step_no, double _target_1, double _target_2, double _target_3, double _target_4){
double _target_list = 0;
int k_int = 0;
int mod_4 = 0;
k_int = i/4;
mod_4 = i%4;
if (mod_4 == 0)
_target_list = get_target((2*k_int), _step_no, _target_1, _target_2);
if (mod_4 == 1)
_target_list = get_target((2*k_int+1), _step_no, _target_1, _target_2);
if (mod_4 == 2)
_target_list = get_target((2*k_int), _step_no, _target_4, _target_3);
if (mod_4 == 3)
_target_list = get_target((2*k_int+1), _step_no, _target_4, _target_3);
return _target_list;
}