package com.imdroid.sideslope.ntrip;

import com.imdroid.common.util.HttpUtils;
import com.imdroid.common.util.ThreadManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
 * @author likongyong
 * @date 2023/10/19 11:49
 */
public class HttpNtripServer {

    private static final Logger logger = LoggerFactory.getLogger(HttpNtripServer.class);

    /**
     * 修改挂载点获取xingyu差分的gga
     * @param mount
     * @param gga
     */
    public static void sendGGA(String mount, String gga){
        ThreadManager.getSingleThreadPool(HttpNtripServer.class.getName()).execute(()->{
            try{
                String url = "http://localhost:11001/ntrip/sendGGA/" + mount + "/" + gga;
                String result = HttpUtils.getUrl(url);
                logger.debug("{} send gga {} {}",mount, gga, result);
            }catch (Exception e){
                logger.error(e.toString());
            }
        });
    }
}
