0

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;
}
collapsar
  • 17,010
  • 4
  • 35
  • 61
  • Not exactly what you are asking for, but you might opt to 1. compute the smallest rectangle encompassing the `n` gps points and 2. call `get_target_list` on its four corners. This should provide you with a 'planning path' that in general will not be the most efficient but gets you started and which allows for certain perturbations and imprecisions among the gps point set. – collapsar Jun 27 '22 at 10:31
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Jun 27 '22 at 13:38
  • I understand you. for example we have 5 points, we will find the smallest rectangle passing through these 5 points, but we need to remove more points outside the contour of these 5 points, do you have any suggestions or keywords for the problem? . – triệu trinh Jun 28 '22 at 01:04

0 Answers0