endian11
2020-09-18 b41f9db09c0145d4530e78c0c53d0a1cacd29e03
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package safeluck.drive.evaluation.routecollect;
 
import safeluck.drive.evaluation.fragment.TrainFragment;
import safeluck.drive.evaluation.routecollect.bean.RoadCrossInfo;
import safeluck.drive.evaluation.routecollect.bean.RoadInfo;
import safeluck.drive.evaluation.routecollect.impl.RouteModel;
 
/**
 * DriveJudge
 * Created by lzw on 2020/9/16. 10:08:18
 * 邮箱:632393724@qq.com
 * All Rights Saved! Chongqing AnYun Tech co. LTD
 */
public class RouteCollectController implements ILoadListener {
 
    ICollectView iCollectView;
    RouteModel routeModel;
 
    /**
     *  Topic=[bind_rtk_info_map],message={"utc":"20200917081227.40","qf":3,"coord_x":0.974,"coord_x_dir":"N","coord_y":-0.191,"coord_y_dir":"E","heading":315.0,"pitch":0.0,"roll":0.0,"sat_num":14,"latitude":31.174458016666667,"longitude":121.38786518333333,"altitude":58.9666,"speed":1.72591488,"track_ture":315.0}
     * @param collectView
     */
    public  RouteCollectController(ICollectView collectView){
        this.iCollectView = collectView;
        routeModel = new RouteModel();
    }
 
    public void startCollect() {
        if (iCollectView != null){
            iCollectView.beginCollectView();
        }
        if (routeModel != null){
            routeModel.startCollect(this);
        }
    }
 
    public void endCollect(){
        if (routeModel != null){
            routeModel.endCollect();
        }
    }
 
    @Override
    public void finishCollectItem(CollectPointResult collectPointResult) {
        if (iCollectView != null){
            iCollectView.endCollectView();
            iCollectView.routeItem(collectPointResult);
        }
    }
 
    @Override
    public void roadInfo(RoadInfo roadInfo) {
 
    }
 
    @Override
    public void roadCrossInfo(RoadCrossInfo roadCrossInfo) {
 
    }
 
}