删除没用的
This commit is contained in:
@@ -1,157 +0,0 @@
|
||||
{
|
||||
"version": "v1.0.0",
|
||||
"dsp": {
|
||||
"library_path": "@/libdll_source.so",
|
||||
"center_freq": 15000000,
|
||||
"band_width": 10000,
|
||||
"sample_rate": 60000,
|
||||
"fft_point_number": 32768,
|
||||
"fft_period_ms": 10,
|
||||
"fft_win_type": "blkmc",
|
||||
"url": "0.0.0.0",
|
||||
"port": 6000,
|
||||
"power_min": -200,
|
||||
"power_max": 200,
|
||||
"power_offset": -166,
|
||||
"filename_prefix": "ECAP_",
|
||||
"filename_suffix": ".dat",
|
||||
"frame_rate": 30,
|
||||
"debug": false
|
||||
},
|
||||
"drogon": {
|
||||
"app": {
|
||||
"threads_num": 0
|
||||
}
|
||||
},
|
||||
"mlat": {
|
||||
"enable": false,
|
||||
"merge": false,
|
||||
"library_path": "@/mlat_source.dll",
|
||||
"function_name": "read"
|
||||
},
|
||||
"web_server": {
|
||||
"webapp": "@/wwwroot",
|
||||
"tiles": "@/../tiles"
|
||||
},
|
||||
"device": {
|
||||
"net": [
|
||||
{
|
||||
"key": "device",
|
||||
"ip": "192.168.1.75",
|
||||
"netmask": "255.255.255.0",
|
||||
"gateway": "192.168.1.1",
|
||||
"port": 9081
|
||||
},
|
||||
{
|
||||
"key": "wifi",
|
||||
"ip": "192.168.10.193",
|
||||
"netmask": "255.255.255.0",
|
||||
"gateway": "192.168.10.1",
|
||||
"port": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"mode_acs": {
|
||||
"timeout_seconds": 60,
|
||||
"read_milliseconds": 100,
|
||||
"monitor_msg_live": false,
|
||||
"mode_s_max_num": 700000,
|
||||
"mode_other_max_num": 10000,
|
||||
"report_data_feed_msg_mum": 10000,
|
||||
"data_feed": {
|
||||
"empty_wait_milliseconds": 10,
|
||||
"packet_byte_size": 1,
|
||||
"list": [
|
||||
{
|
||||
"key": "Port_10003",
|
||||
"enable": true,
|
||||
"type": "Data_Feed_TCP_Server",
|
||||
"output_format": {
|
||||
"type": "BIN",
|
||||
"use_status": true,
|
||||
"mode_s_output_type": "ALL_Mode_S",
|
||||
"use_mode_ac": true
|
||||
},
|
||||
"port": 10003
|
||||
},
|
||||
{
|
||||
"key": "Port_10004",
|
||||
"enable": false,
|
||||
"type": "Data_Feed_TCP_Server",
|
||||
"output_format": {
|
||||
"type": "BIN",
|
||||
"use_status": false,
|
||||
"mode_s_output_type": "DF_11_17_18",
|
||||
"use_mode_ac": false
|
||||
},
|
||||
"port": 10004
|
||||
},
|
||||
{
|
||||
"key": "Port_10005",
|
||||
"enable": false,
|
||||
"type": "Data_Feed_TCP_Client",
|
||||
"output_format": {
|
||||
"type": "BIN",
|
||||
"use_status": true,
|
||||
"mode_s_output_type": "NO_POS_Mode_S",
|
||||
"use_mode_ac": false
|
||||
},
|
||||
"url": "192.168.208.153",
|
||||
"port": 10005
|
||||
},
|
||||
{
|
||||
"key": "Port_30003",
|
||||
"enable": false,
|
||||
"type": "Data_Feed_TCP_Server",
|
||||
"output_format": {
|
||||
"type": "SBS",
|
||||
"use_status": false,
|
||||
"mode_s_output_type": "ALL_Mode_S",
|
||||
"use_mode_ac": true
|
||||
},
|
||||
"port": 30003
|
||||
}
|
||||
]
|
||||
},
|
||||
"data_source": {
|
||||
"list": [
|
||||
{
|
||||
"key": "mode_acs_shared_memory",
|
||||
"enable": true,
|
||||
"base_station_show": true,
|
||||
"aircraft_show": false,
|
||||
"color": "#e4f40b",
|
||||
"aircraft_pixel_size": 38,
|
||||
"lat": 37.073685,
|
||||
"lon": 120.870472,
|
||||
"alt": 9479.280000,
|
||||
"update_form_gps": false,
|
||||
"type": "Shared_Memory_Data_Source",
|
||||
"shared_memory_name": "mode_acs",
|
||||
"shared_memory_size": 20000,
|
||||
"data_type": "BIN_Blank"
|
||||
}
|
||||
]
|
||||
},
|
||||
"source_feed_relation": {
|
||||
"list": [
|
||||
{
|
||||
"key": "key_10003",
|
||||
"enable": true,
|
||||
"type": "First_Source_To_All_Feed_Relation"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"log": {
|
||||
"open_mode": "Delete",
|
||||
"piece_num": 10,
|
||||
"size_MB": 10
|
||||
},
|
||||
"console": {
|
||||
"record_playback": false,
|
||||
"mode_s_console": false,
|
||||
"post_request": false,
|
||||
"mlat_server": true
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -f /etc/hostapd.conf ] || exit 0
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
printf "Starting hostapd: "
|
||||
start-stop-daemon -S -x /usr/sbin/hostapd -- -B /etc/hostapd.conf
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
stop)
|
||||
printf "Stopping hostapd: "
|
||||
start-stop-daemon -K -q -x /usr/sbin/hostapd
|
||||
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
||||
;;
|
||||
restart | reload)
|
||||
$0 stop
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
start | "")
|
||||
while true; do
|
||||
printf "Starting E-CAP: "
|
||||
cd /root/
|
||||
./Radarcape_Local_Server_aarch64-buildroot-linux-gnu-gxx_Linux_Debug >out.log 2>&1
|
||||
# ./Radarcape_Local_Server_aarch64-buildroot-linux-gnu-gxx_Linux_Debug
|
||||
sleep 3
|
||||
done &
|
||||
;;
|
||||
stop | status)
|
||||
printf "Stopping E-CAP: "
|
||||
pkill Radarcape_Local_Server_aarch64-buildroot-linux-gnu-gxx_Linux_Debug
|
||||
;;
|
||||
restart | reload | force-reload)
|
||||
echo "Error: argument '$1' not supported" >&2
|
||||
exit 3
|
||||
;;
|
||||
*)
|
||||
echo "Usage: [start|stop]" >&2
|
||||
exit 3
|
||||
;;
|
||||
esac
|
||||
@@ -1,302 +0,0 @@
|
||||
{
|
||||
"version": "windows_v1.1.2",
|
||||
"dsp": {
|
||||
"library_path": "@/dll_source.dll",
|
||||
"center_freq": 16000000,
|
||||
"band_width": 6000,
|
||||
"sample_rate": 60000,
|
||||
"fft_point_number": 2048,
|
||||
"fft_period_ms": 50,
|
||||
"fft_win_type": "blkmc",
|
||||
"url": "0.0.0.0",
|
||||
"port": 6000,
|
||||
"power_min": -380,
|
||||
"power_max": 120,
|
||||
"power_offset": -166,
|
||||
"frame_rate": 60,
|
||||
"debug": false,
|
||||
"demod_mode": "LSB",
|
||||
"audio_gain": 30,
|
||||
"color_gain": 120
|
||||
},
|
||||
"drogon": {
|
||||
"app": {
|
||||
"threads_num": 0,
|
||||
"client_max_body_size": "1000M",
|
||||
"client_max_memory_body_size": "1000M"
|
||||
}
|
||||
},
|
||||
"http_monitor": {
|
||||
"access_log": true,
|
||||
"slow_request_threshold_ms": 1000,
|
||||
"slow_scope_threshold_ms": 100
|
||||
},
|
||||
"mlat": {
|
||||
"enable": false,
|
||||
"merge": false,
|
||||
"library_path": "@/mlat_source.dll",
|
||||
"function_name": "adsb_read"
|
||||
},
|
||||
"web_server": {
|
||||
"webapp": "D:/ae/proj/projects/ECAP_Server/ver/v1.0.4/wwwroot",
|
||||
"tiles": "D:/tiles"
|
||||
},
|
||||
"device": {
|
||||
"net": [
|
||||
{
|
||||
"key": "device",
|
||||
"ip": "192.168.1.75",
|
||||
"netmask": "255.255.255.0",
|
||||
"gateway": "192.168.1.1",
|
||||
"port": 80
|
||||
},
|
||||
{
|
||||
"key": "wifi",
|
||||
"ip": "192.168.10.193",
|
||||
"netmask": "255.255.255.0",
|
||||
"gateway": "192.168.10.1",
|
||||
"port": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"mode_acs": {
|
||||
"timeout_seconds": 160,
|
||||
"max_speed_m_s": 1000,
|
||||
"air_pos_timeout": 8,
|
||||
"surface_pos_timeout": 32,
|
||||
"read_milliseconds": 100,
|
||||
"max_track_point_size": 20000,
|
||||
"mode_s_max_num": 700000,
|
||||
"mode_other_max_num": 10000,
|
||||
"report_data_feed_msg_mum": 10000,
|
||||
"default_min_aircraft_list_num": 10,
|
||||
"ignore_df_11": true,
|
||||
"monitor_msg_live": false,
|
||||
"ecap_sqlite_path": "D:/ae/proj/projects/ECAP_Server/sqlite/ecap.sqlite",
|
||||
"data_feed": {
|
||||
"empty_wait_milliseconds": 30,
|
||||
"packet_byte_size": 0,
|
||||
"tcp_server_default_connect_user_buffer_size": 409600,
|
||||
"tcp_server_default_connect_system_buffer_size": 409600,
|
||||
"list": [
|
||||
{
|
||||
"key": "Port_10003",
|
||||
"enable": true,
|
||||
"type": "Data_Feed_TCP_Server",
|
||||
"output_format": {
|
||||
"type": "BIN",
|
||||
"use_status": true,
|
||||
"mode_s_output_type": "ALL_Mode_S",
|
||||
"use_mode_ac": true,
|
||||
"sbs_only_pos": true
|
||||
},
|
||||
"port": 10003,
|
||||
"connect_user_buffer_size": 409600,
|
||||
"connect_system_buffer_size": 409600
|
||||
},
|
||||
{
|
||||
"key": "22333",
|
||||
"enable": false,
|
||||
"type": "Data_Feed_UDP_Server",
|
||||
"output_format": {
|
||||
"type": "BIN",
|
||||
"use_status": false,
|
||||
"mode_s_output_type": "ALL_Mode_S",
|
||||
"use_mode_ac": false,
|
||||
"sbs_only_pos": false
|
||||
},
|
||||
"port": 50001
|
||||
},
|
||||
{
|
||||
"key": "Port_10004",
|
||||
"enable": false,
|
||||
"type": "Data_Feed_UDP_Client",
|
||||
"output_format": {
|
||||
"type": "AVR",
|
||||
"use_status": false,
|
||||
"mode_s_output_type": "DF_11_17_18",
|
||||
"use_mode_ac": false,
|
||||
"sbs_only_pos": true
|
||||
},
|
||||
"url": "192.168.1.75",
|
||||
"port": 30004
|
||||
},
|
||||
{
|
||||
"key": "Port_10005",
|
||||
"enable": true,
|
||||
"type": "Data_Feed_TCP_Client",
|
||||
"output_format": {
|
||||
"type": "BIN",
|
||||
"use_status": true,
|
||||
"mode_s_output_type": "NO_POS_Mode_S",
|
||||
"use_mode_ac": true,
|
||||
"sbs_only_pos": true
|
||||
},
|
||||
"url": "192.168.1.167",
|
||||
"port": 10005
|
||||
},
|
||||
{
|
||||
"key": "Port_30003",
|
||||
"enable": false,
|
||||
"type": "Data_Feed_TCP_Server",
|
||||
"output_format": {
|
||||
"type": "SBS",
|
||||
"use_status": false,
|
||||
"mode_s_output_type": "ALL_Mode_S",
|
||||
"use_mode_ac": true,
|
||||
"sbs_only_pos": true
|
||||
},
|
||||
"port": 30003,
|
||||
"connect_user_buffer_size": 0,
|
||||
"connect_system_buffer_size": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"data_source": {
|
||||
"list": [
|
||||
{
|
||||
"key": "aaaa",
|
||||
"enable": false,
|
||||
"base_station_show": true,
|
||||
"aircraft_show": true,
|
||||
"color": "#d1a54c",
|
||||
"aircraft_pixel_size": 20,
|
||||
"type": "File_Data_Source",
|
||||
"lat": 37.000000,
|
||||
"lon": 121.000000,
|
||||
"alt": 0.000000,
|
||||
"update_form_gps": false,
|
||||
"show_icao": true,
|
||||
"show_call_sign": true,
|
||||
"show_fly_status": true,
|
||||
"keep_mode": true,
|
||||
"file_path": "D:\\ae\\proj\\projects\\ECAP_Server\\data\\BIN_Blank_Text\\ADS-B_195_0205.txt",
|
||||
"data_type": "BIN_Blank_Text",
|
||||
"play_mode": "loop"
|
||||
},
|
||||
{
|
||||
"key": "lzy_dll",
|
||||
"enable": true,
|
||||
"base_station_show": true,
|
||||
"aircraft_show": true,
|
||||
"color": "#454641",
|
||||
"aircraft_pixel_size": 28,
|
||||
"type": "Dll_Data_Source",
|
||||
"lat": 37.433547,
|
||||
"lon": 121.408730,
|
||||
"alt": 23.000000,
|
||||
"update_form_gps": true,
|
||||
"show_icao": true,
|
||||
"show_call_sign": false,
|
||||
"show_fly_status": false,
|
||||
"keep_mode": true,
|
||||
"library_path": "@/dll_source.dll",
|
||||
"function_name": "adsb_read",
|
||||
"data_type": "BIN_Blank_Text",
|
||||
"buffer_size": 200000
|
||||
}
|
||||
]
|
||||
},
|
||||
"source_feed_relation": {
|
||||
"list": [
|
||||
{
|
||||
"key": "key_10003",
|
||||
"enable": true,
|
||||
"type": "First_Source_To_All_Feed_Relation"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"log": {
|
||||
"open_mode": "Delete",
|
||||
"piece_num": 10,
|
||||
"size_MB": 10
|
||||
},
|
||||
"console": {
|
||||
"record_playback": false,
|
||||
"mode_s_console": false,
|
||||
"post_request": false,
|
||||
"mlat_server": true
|
||||
},
|
||||
"external_database": {
|
||||
"list": [
|
||||
{
|
||||
"name": "tar1090_db_aircraft",
|
||||
"download_url": "https://raw.githubusercontent.com/wiedehopf/tar1090-db/refs/heads/csv/aircraft.csv.gz",
|
||||
"description": "wiedehopf/tar1090-db 发布的轻量 ICAO24 飞机静态库,提供注册号、机型、年份和运营方备注。",
|
||||
"update_interval_seconds": 604800,
|
||||
"last_updated_at": 0
|
||||
},
|
||||
{
|
||||
"name": "wiedehopf_tar1090_db_aircraft",
|
||||
"download_url": "https://raw.githubusercontent.com/wiedehopf/tar1090-db/refs/heads/csv/aircraft.csv.gz",
|
||||
"description": "wiedehopf/tar1090-db 项目发布的飞机静态数据库镜像,供 tar1090 本地识别飞机。",
|
||||
"update_interval_seconds": 604800,
|
||||
"last_updated_at": 0
|
||||
},
|
||||
{
|
||||
"name": "mictronics_aircraft_database",
|
||||
"download_url": "https://raw.githubusercontent.com/wiedehopf/tar1090-db/refs/heads/csv/aircraft.csv.gz",
|
||||
"description": "Mictronics 社区飞机数据库的 tar1090 汇总镜像,可按 ICAO24 查询注册号、机型和运营方。",
|
||||
"update_interval_seconds": 604800,
|
||||
"last_updated_at": 0
|
||||
},
|
||||
{
|
||||
"name": "opensky_aircraft_database",
|
||||
"download_url": "https://opensky-network.org/datasets/metadata/aircraftDatabase.csv",
|
||||
"description": "OpenSky Network 飞机元数据 CSV,包含制造商、型号、注册号和运营方等字段。",
|
||||
"update_interval_seconds": 604800,
|
||||
"last_updated_at": 0
|
||||
},
|
||||
{
|
||||
"name": "faa_aircraft_registry",
|
||||
"download_url": "https://registry.faa.gov/database/ReleasableAircraft.zip",
|
||||
"description": "FAA 官方可公开下载的美国飞机注册库,MASTER.txt 包含 Mode-S Hex 注册信息。",
|
||||
"update_interval_seconds": 86400,
|
||||
"last_updated_at": 0
|
||||
},
|
||||
{
|
||||
"name": "icao_doc_8643_aircraft_type_designators",
|
||||
"download_url": "",
|
||||
"description": "ICAO Doc 8643 机型代码表,用于将 A320、B738 等 designator 映射为制造商、型号和类别。",
|
||||
"update_interval_seconds": 2419200,
|
||||
"last_updated_at": 0
|
||||
},
|
||||
{
|
||||
"name": "vrs_routes",
|
||||
"download_url": "https://vrs-standing-data.adsb.lol/routes.csv",
|
||||
"description": "VRS 航线表,以 callsign 查询机场代码序列,用于推断起飞机场、经停机场和目的机场。",
|
||||
"update_interval_seconds": 3600,
|
||||
"last_updated_at": 0
|
||||
},
|
||||
{
|
||||
"name": "vrs_airports",
|
||||
"download_url": "https://vrs-standing-data.adsb.lol/airports.csv",
|
||||
"description": "VRS 机场字典,提供机场代码、名称、国家、经纬度和高度。",
|
||||
"update_interval_seconds": 3600,
|
||||
"last_updated_at": 0
|
||||
},
|
||||
{
|
||||
"name": "adsblol_vrs_standing_data_routes",
|
||||
"download_url": "https://vrs-standing-data.adsb.lol/routes.csv",
|
||||
"description": "ADSB.lol 发布的 VRS standing-data 航线镜像,以 callsign 查询机场代码序列。",
|
||||
"update_interval_seconds": 3600,
|
||||
"last_updated_at": 0
|
||||
},
|
||||
{
|
||||
"name": "vradarserver_standing_data_routes",
|
||||
"download_url": "https://vrs-standing-data.adsb.lol/routes.csv",
|
||||
"description": "Virtual Radar Server standing-data 的航线适配表;当前在线更新使用 ADSB.lol 公共镜像。",
|
||||
"update_interval_seconds": 3600,
|
||||
"last_updated_at": 0
|
||||
},
|
||||
{
|
||||
"name": "opensky_flightdata_api_cache",
|
||||
"download_url": "",
|
||||
"description": "OpenSky FlightData API 查询缓存,按 ICAO24 和时间范围保存历史航班起降机场结果。",
|
||||
"update_interval_seconds": 0,
|
||||
"last_updated_at": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,251 +0,0 @@
|
||||
{
|
||||
"version": "v1.0.4",
|
||||
"dsp": {
|
||||
"library_path": "@/dll_source.dll",
|
||||
"center_freq": 16000000,
|
||||
"band_width": 6000,
|
||||
"sample_rate": 60000,
|
||||
"fft_point_number": 2048,
|
||||
"fft_period_ms": 50,
|
||||
"fft_win_type": "blkmc",
|
||||
"url": "0.0.0.0",
|
||||
"port": 6000,
|
||||
"power_min": -380,
|
||||
"power_max": 120,
|
||||
"power_offset": -166,
|
||||
"frame_rate": 60,
|
||||
"debug": false,
|
||||
"demod_mode": "LSB",
|
||||
"audio_gain": 30,
|
||||
"color_gain": 120
|
||||
},
|
||||
"drogon": {
|
||||
"app": {
|
||||
"threads_num": 0,
|
||||
"client_max_body_size": "1000M",
|
||||
"client_max_memory_body_size": "1000M"
|
||||
}
|
||||
},
|
||||
"mlat": {
|
||||
"enable": false,
|
||||
"merge": false,
|
||||
"library_path": "@/mlat_source.dll",
|
||||
"function_name": "adsb_read"
|
||||
},
|
||||
"web_server": {
|
||||
"webapp": "@/wwwroot",
|
||||
"tiles": "D:/tiles"
|
||||
},
|
||||
"device": {
|
||||
"net": [
|
||||
{
|
||||
"key": "device",
|
||||
"ip": "192.168.1.75",
|
||||
"netmask": "255.255.255.0",
|
||||
"gateway": "192.168.1.1",
|
||||
"port": 80
|
||||
},
|
||||
{
|
||||
"key": "wifi",
|
||||
"ip": "192.168.10.193",
|
||||
"netmask": "255.255.255.0",
|
||||
"gateway": "192.168.10.1",
|
||||
"port": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"mode_acs": {
|
||||
"timeout_seconds": 160,
|
||||
"max_speed_m_s": 1000,
|
||||
"air_pos_timeout": 8,
|
||||
"surface_pos_timeout": 32,
|
||||
"read_milliseconds": 100,
|
||||
"max_track_point_size": 20000,
|
||||
"mode_s_max_num": 700000,
|
||||
"mode_other_max_num": 10000,
|
||||
"report_data_feed_msg_mum": 10000,
|
||||
"default_min_aircraft_list_num": 10,
|
||||
"ignore_df_11": true,
|
||||
"monitor_msg_live": false,
|
||||
"ecap_sqlite_path": "D:/ae/proj/projects/ECAP_Server/sqlite/ecap.sqlite",
|
||||
"data_feed": {
|
||||
"empty_wait_milliseconds": 30,
|
||||
"packet_byte_size": 0,
|
||||
"tcp_server_default_connect_user_buffer_size": 0,
|
||||
"tcp_server_default_connect_system_buffer_size": 0,
|
||||
"list": [
|
||||
{
|
||||
"key": "Port_10003",
|
||||
"enable": true,
|
||||
"type": "Data_Feed_TCP_Server",
|
||||
"output_format": {
|
||||
"type": "BIN",
|
||||
"use_status": true,
|
||||
"mode_s_output_type": "ALL_Mode_S",
|
||||
"use_mode_ac": true,
|
||||
"sbs_only_pos": true
|
||||
},
|
||||
"port": 10003,
|
||||
"connect_user_buffer_size": 409600,
|
||||
"connect_system_buffer_size": 409600
|
||||
},
|
||||
{
|
||||
"key": "22333",
|
||||
"enable": false,
|
||||
"type": "Data_Feed_UDP_Server",
|
||||
"output_format": {
|
||||
"type": "BIN",
|
||||
"use_status": false,
|
||||
"mode_s_output_type": "ALL_Mode_S",
|
||||
"use_mode_ac": false,
|
||||
"sbs_only_pos": false
|
||||
},
|
||||
"port": 50001
|
||||
},
|
||||
{
|
||||
"key": "Port_10004",
|
||||
"enable": false,
|
||||
"type": "Data_Feed_UDP_Client",
|
||||
"output_format": {
|
||||
"type": "AVR",
|
||||
"use_status": false,
|
||||
"mode_s_output_type": "DF_11_17_18",
|
||||
"use_mode_ac": false,
|
||||
"sbs_only_pos": true
|
||||
},
|
||||
"url": "192.168.1.75",
|
||||
"port": 30004
|
||||
},
|
||||
{
|
||||
"key": "Port_10005",
|
||||
"enable": true,
|
||||
"type": "Data_Feed_TCP_Client",
|
||||
"output_format": {
|
||||
"type": "BIN",
|
||||
"use_status": true,
|
||||
"mode_s_output_type": "NO_POS_Mode_S",
|
||||
"use_mode_ac": true,
|
||||
"sbs_only_pos": true
|
||||
},
|
||||
"url": "192.168.1.75",
|
||||
"port": 10005
|
||||
},
|
||||
{
|
||||
"key": "Port_30003",
|
||||
"enable": false,
|
||||
"type": "Data_Feed_TCP_Server",
|
||||
"output_format": {
|
||||
"type": "SBS",
|
||||
"use_status": false,
|
||||
"mode_s_output_type": "ALL_Mode_S",
|
||||
"use_mode_ac": true,
|
||||
"sbs_only_pos": true
|
||||
},
|
||||
"port": 30003,
|
||||
"connect_user_buffer_size": 0,
|
||||
"connect_system_buffer_size": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
"data_source": {
|
||||
"list": [
|
||||
{
|
||||
"key": "aaaa",
|
||||
"enable": true,
|
||||
"base_station_show": true,
|
||||
"aircraft_show": true,
|
||||
"color": "#d1a54c",
|
||||
"aircraft_pixel_size": 20,
|
||||
"lat": 37.000000,
|
||||
"lon": 121.000000,
|
||||
"alt": 0.000000,
|
||||
"update_form_gps": false,
|
||||
"type": "File_Data_Source",
|
||||
"file_path": "D:\\ae\\proj\\projects\\ECAP_Server\\data\\BIN_Blank_Text\\ADS-B_195_0205.txt",
|
||||
"data_type": "BIN_Blank_Text",
|
||||
"play_mode": "one"
|
||||
},
|
||||
{
|
||||
"key": "本地radarcape",
|
||||
"enable": true,
|
||||
"base_station_show": true,
|
||||
"aircraft_show": true,
|
||||
"color": "#cb3065",
|
||||
"aircraft_pixel_size": 20,
|
||||
"lat": 37.000000,
|
||||
"lon": 121.000000,
|
||||
"alt": 0.000000,
|
||||
"update_form_gps": false,
|
||||
"type": "TCP_Client_Data_Source",
|
||||
"ip": "192.168.71.101",
|
||||
"port": 10003
|
||||
},
|
||||
{
|
||||
"key": "r205_113",
|
||||
"enable": false,
|
||||
"base_station_show": false,
|
||||
"aircraft_show": true,
|
||||
"color": "#661a30",
|
||||
"aircraft_pixel_size": 30,
|
||||
"lat": 37.000000,
|
||||
"lon": 121.000000,
|
||||
"alt": 0.000000,
|
||||
"update_form_gps": false,
|
||||
"type": "TCP_Client_Data_Source",
|
||||
"ip": "192.168.205.113",
|
||||
"port": 10003
|
||||
},
|
||||
{
|
||||
"key": "102",
|
||||
"enable": true,
|
||||
"base_station_show": true,
|
||||
"aircraft_show": true,
|
||||
"color": "#186ce1",
|
||||
"aircraft_pixel_size": 20,
|
||||
"lat": 0.000000,
|
||||
"lon": 0.000000,
|
||||
"alt": 0.000000,
|
||||
"update_form_gps": false,
|
||||
"type": "TCP_Client_Data_Source",
|
||||
"ip": "192.168.1.102",
|
||||
"port": 10003
|
||||
},
|
||||
{
|
||||
"key": "r205_116",
|
||||
"enable": false,
|
||||
"base_station_show": true,
|
||||
"aircraft_show": true,
|
||||
"color": "#d7c1b6a3",
|
||||
"aircraft_pixel_size": 40,
|
||||
"lat": 0.000000,
|
||||
"lon": 0.000000,
|
||||
"alt": 5394.960000,
|
||||
"update_form_gps": true,
|
||||
"type": "TCP_Client_Data_Source",
|
||||
"ip": "192.168.205.116",
|
||||
"port": 10003
|
||||
}
|
||||
]
|
||||
},
|
||||
"source_feed_relation": {
|
||||
"list": [
|
||||
{
|
||||
"key": "key_10003",
|
||||
"enable": true,
|
||||
"type": "First_Source_To_All_Feed_Relation"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"log": {
|
||||
"open_mode": "Delete",
|
||||
"piece_num": 10,
|
||||
"size_MB": 10
|
||||
},
|
||||
"console": {
|
||||
"record_playback": false,
|
||||
"mode_s_console": false,
|
||||
"post_request": false,
|
||||
"mlat_server": true
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"library_path": "@/dll_source.dll",
|
||||
"center_freq": 200000,
|
||||
"band_width": 6000,
|
||||
"sample_rate": 60000,
|
||||
"fft_point_number": 2048,
|
||||
"fft_period_ms": 50,
|
||||
"fft_win_type": "blkmc"
|
||||
}
|
||||
@@ -1,201 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# 检查参数数量
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: $0 <sequence_number>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dir_path="/root/u"
|
||||
|
||||
# 检查U盘目录是否存在
|
||||
if [ ! -d "$dir_path" ]; then
|
||||
echo "U盘目录不存在,正在创建U盘目录..."
|
||||
mkdir -p "$dir_path" # 创建目录
|
||||
else
|
||||
echo "U盘目录已经存在."
|
||||
fi
|
||||
|
||||
# 获取命令行参数
|
||||
sequence_number=$1
|
||||
|
||||
# 定义一个函数来执行复制操作并输出结果
|
||||
copy_file() {
|
||||
local source_file="$1"
|
||||
local target_dir="$2"
|
||||
if [ -f "$source_file" ]; then
|
||||
cp "$source_file" "$target_dir"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "文件 $source_file 已成功复制到 $target_dir 目录。"
|
||||
else
|
||||
echo "复制文件 $source_file 时出错。"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "当前目录下未找到 $source_file 文件。"
|
||||
fi
|
||||
}
|
||||
# 添加 启动脚本 到 /etc/init.d/
|
||||
copy_file "S79hostapd" "/etc/init.d/"
|
||||
copy_file "S90E-CAP" "/etc/init.d/"
|
||||
#copy_file "S99Check_reboot" "/etc/init.d/"
|
||||
|
||||
# 移除 启动脚本
|
||||
rename_file() {
|
||||
local original_name="$1"
|
||||
local new_name="$2"
|
||||
|
||||
if [ -f "$original_name" ]; then
|
||||
mv "$original_name" "$new_name"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "已成功将 $original_name 重命名为 $new_name"
|
||||
else
|
||||
echo "重命名 $original_name 时出错。"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "$original_name 文件不存在"
|
||||
fi
|
||||
}
|
||||
rename_file "/etc/init.d/S49weston" "/etc/init.d/_S49weston"
|
||||
rename_file "/etc/init.d/S41dhcpcd" "/etc/init.d/_S41dhcpcd"
|
||||
|
||||
# 生成 /etc/hostapd.conf 文件
|
||||
hostapd_config="# 无线网络接口名称,可通过 ifconfig 或 ip addr 命令查看
|
||||
interface=wlan0
|
||||
# 使用的驱动程序,通常为 nl80211
|
||||
driver=nl80211
|
||||
# 热点的 SSID
|
||||
ssid=E-CAP_${sequence_number}
|
||||
# 通道号,可根据需要调整
|
||||
channel=6
|
||||
# 认证和加密模式
|
||||
hw_mode=g
|
||||
ieee80211n=1
|
||||
wmm_enabled=1
|
||||
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
|
||||
macaddr_acl=0
|
||||
auth_algs=1
|
||||
ignore_broadcast_ssid=0
|
||||
wpa=2
|
||||
wpa_key_mgmt=WPA-PSK
|
||||
wpa_pairwise=TKIP
|
||||
rsn_pairwise=CCMP
|
||||
# 热点的密码
|
||||
wpa_passphrase=12345678"
|
||||
|
||||
echo "$hostapd_config" >/etc/hostapd.conf
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "文件 /etc/hostapd.conf 已成功生成。"
|
||||
else
|
||||
echo "生成 /etc/hostapd.conf 文件时出错。"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 生成 /etc/dnsmasq.conf 文件
|
||||
dnsmasq_config="# 监听的接口
|
||||
interface=wlan0
|
||||
# DHCP 服务的 IP 地址范围
|
||||
dhcp-range=192.168.10.10,192.168.10.100,255.255.255.0,12h
|
||||
# 网关地址
|
||||
dhcp-option=3,192.168.10.1
|
||||
# DNS 服务器地址
|
||||
dhcp-option=6,8.8.8.8
|
||||
# 本地 DNS 服务器地址
|
||||
server=8.8.8.8
|
||||
# 禁用 DNS 缓存
|
||||
no-hosts
|
||||
# 不读取 /etc/resolv.conf 文件
|
||||
no-resolv"
|
||||
|
||||
echo "$dnsmasq_config" >/etc/dnsmasq.conf
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "文件 /etc/dnsmasq.conf 已成功生成。"
|
||||
else
|
||||
echo "生成 /etc/dnsmasq.conf 文件时出错。"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 生成 /etc/network/interfaces 文件
|
||||
network_config="# interface file auto-generated by buildroot
|
||||
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
address 192.168.1.${sequence_number}
|
||||
netmask 255.255.255.0
|
||||
gateway 192.168.1.1
|
||||
dns-nameservers 192.168.1.1 8.8.8.8
|
||||
post-up /usr/sbin/ethtool -s eth0 speed 100 duplex full autoneg off
|
||||
pre-down /usr/sbin/ethtool -s eth0 autoneg on
|
||||
# post-up 网络接口被激活之后应该执行的命令。
|
||||
# pre-down 在网络接口即将被关闭之前执行的命令。
|
||||
# 添加这两行命令是为了限制网速为100M,解决phy网络排线过长导致网卡不稳定的问题。
|
||||
|
||||
auto wlan0
|
||||
iface wlan0 inet static
|
||||
address 192.168.10.${sequence_number}
|
||||
netmask 255.255.255.0
|
||||
gateway 192.168.10.1
|
||||
dns-nameservers 192.168.10.1 8.8.8.8"
|
||||
|
||||
# 生成 /etc/network/interfaces 文件
|
||||
echo "$network_config" >/etc/network/interfaces
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "文件 /etc/network/interfaces 已成功生成。"
|
||||
else
|
||||
echo "生成 /etc/network/interfaces 文件时出错。"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d "/root/tiles" ]; then
|
||||
if [ -f "tiles.zip" ]; then # 检查 tiles.zip 文件是否存在
|
||||
unzip -q "tiles.zip" -d "/root/" # 解压 tiles.zip 到 /root/ 目录
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "tiles.zip 已成功解压到 /root/ 目录。"
|
||||
else
|
||||
echo "解压 tiles.zip 到 /root/ 目录时出错。"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "当前目录下未找到 tiles.zip 文件。"
|
||||
fi
|
||||
else
|
||||
echo "瓦片文件夹已存在。"
|
||||
fi
|
||||
|
||||
# 检查当前目录下的 Radarcape_Local_Server_aarch64-buildroot-linux-gnu-gxx_Linux_Debug 文件是否存在
|
||||
if [ -f "Radarcape_Local_Server_aarch64-buildroot-linux-gnu-gxx_Linux_Debug" ]; then
|
||||
# 给文件添加执行权限
|
||||
chmod +x "Radarcape_Local_Server_aarch64-buildroot-linux-gnu-gxx_Linux_Debug"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "已成功给当前目录下的 Radarcape_Local_Server_aarch64-buildroot-linux-gnu-gxx_Linux_Debug 文件添加执行权限。"
|
||||
else
|
||||
echo "给当前目录下的 Radarcape_Local_Server_aarch64-buildroot-linux-gnu-gxx_Linux_Debug 文件添加执行权限时出错。"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "当前目录下未找到 Radarcape_Local_Server_aarch64-buildroot-linux-gnu-gxx_Linux_Debug 文件。"
|
||||
fi
|
||||
|
||||
# 定义要设置的 root 密码
|
||||
ROOT_PASSWORD="123"
|
||||
|
||||
# 使用 expect 来非交互式地修改 root 密码
|
||||
expect <<EOF
|
||||
spawn passwd root
|
||||
expect "New password:"
|
||||
send "$ROOT_PASSWORD\r"
|
||||
expect "Retype new password:"
|
||||
send "$ROOT_PASSWORD\r"
|
||||
expect eof
|
||||
EOF
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "root 用户密码已成功设置。"
|
||||
else
|
||||
echo "设置 root 用户密码时出错。"
|
||||
exit 1
|
||||
fi
|
||||
@@ -1,36 +0,0 @@
|
||||
|
||||
|
||||
|
||||
# interface file auto-generated by buildroot
|
||||
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
address ${ip}
|
||||
netmask ${netmask}
|
||||
gateway ${gateway}
|
||||
dns-nameservers ${gateway} 8.8.8.8
|
||||
post-up /usr/sbin/ethtool -s eth0 speed 100 duplex full autoneg off
|
||||
pre-down /usr/sbin/ethtool -s eth0 autoneg on
|
||||
# post-up 网络接口被激活之后应该执行的命令。
|
||||
# pre-down 在网络接口即将被关闭之前执行的命令。
|
||||
# 添加这两行命令是为了限制网速为100M,解决phy网络排线过长导致网卡不稳定的问题。
|
||||
|
||||
auto wlan0
|
||||
iface wlan0 inet static
|
||||
address ${wifi_ip}
|
||||
netmask ${wifi_netmask}
|
||||
gateway ${wifi_gateway}
|
||||
dns-nameservers ${wifi_gateway} 8.8.8.8
|
||||
|
||||
|
||||
auto eth75
|
||||
iface eth75 inet static
|
||||
address 192.168.59.75
|
||||
netmask 255.255.255.0
|
||||
gateway 192.168.59.1
|
||||
dns-nameservers 192.168.59.1 8.8.8.8
|
||||
post-up /usr/sbin/ethtool -s eth75 speed 100 duplex full autoneg off
|
||||
pre-down /usr/sbin/ethtool -s eth75 autoneg on
|
||||
@@ -1,20 +0,0 @@
|
||||
sudo nano /etc/polkit-1/rules.d/90-ecap.rules
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (
|
||||
subject.user == "heco" &&
|
||||
action.id == "org.freedesktop.systemd1.manage-units" &&
|
||||
action.lookup("unit") == "ecap.service"
|
||||
) {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
|
||||
sudo mkdir /etc/polkit-1/rules.d
|
||||
sudo chmod 777 /etc/polkit-1/rules.d
|
||||
sudo touch /etc/polkit-1/rules.d/90-ecap.rules
|
||||
sudo chmod 777 /etc/polkit-1/rules.d/90-ecap.rules
|
||||
|
||||
sudo systemctl restart polkit
|
||||
systemctl stop ecap
|
||||
systemctl start ecap
|
||||
systemctl restart ecap
|
||||
@@ -1,205 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 日志轮换函数
|
||||
rotate_log() {
|
||||
local LOG_FILE="$1" # 日志文件路径
|
||||
local MAX_SIZE="$2" # 最大日志文件大小(如 50M)
|
||||
local MAX_BACKUPS="$3" # 保留的最大备份数量
|
||||
|
||||
# 如果日志文件是 /dev/null,直接返回,不进行轮换
|
||||
if [ "$LOG_FILE" == "/dev/null" ]; then
|
||||
echo "日志文件是 /dev/null,跳过日志轮换"
|
||||
return
|
||||
fi
|
||||
|
||||
local LOG_DIR=$(dirname "$LOG_FILE") # 日志文件所在的目录
|
||||
local DATE_FORMAT=$(date +"%Y%m%d-%H%M%S") # 当前日期和时间格式
|
||||
|
||||
# 检查日志文件是否存在
|
||||
if [ ! -f "$LOG_FILE" ]; then
|
||||
echo "日志文件不存在,创建新日志文件: $LOG_FILE"
|
||||
touch "$LOG_FILE"
|
||||
fi
|
||||
|
||||
# 检查日志文件的大小
|
||||
log_size=$(stat -c %s "$LOG_FILE") # 获取日志文件的大小(字节)
|
||||
max_size_bytes=$(numfmt --from=iec $MAX_SIZE) # 转换最大大小为字节
|
||||
|
||||
# 如果日志文件大小超过限制,进行轮换
|
||||
if [ "$log_size" -ge "$max_size_bytes" ]; then
|
||||
echo "日志文件超过最大限制 $MAX_SIZE,开始轮换日志"
|
||||
|
||||
# 创建备份目录(如果没有的话)
|
||||
mkdir -p "$LOG_DIR/backups"
|
||||
|
||||
# 获取备份文件名
|
||||
backup_file="${LOG_DIR}/backups/$(basename "$LOG_FILE").${DATE_FORMAT}"
|
||||
|
||||
# # 备份当前日志文件
|
||||
# mv "$LOG_FILE" "$backup_file"
|
||||
# echo "备份日志为: $backup_file"
|
||||
#
|
||||
# # 创建一个新的空日志文件
|
||||
# touch "$LOG_FILE"
|
||||
|
||||
# 复制当前日志作为备份(不动 inode)
|
||||
cp "$LOG_FILE" "$backup_file"
|
||||
echo "备份日志为: $backup_file"
|
||||
|
||||
# 截断原日志文件(FD 不变)
|
||||
: >"$LOG_FILE"
|
||||
|
||||
# 压缩备份日志文件
|
||||
gzip "$backup_file"
|
||||
echo "压缩备份日志为: ${backup_file}.gz"
|
||||
|
||||
# 删除多余的备份文件(如果超过最大保留数量)
|
||||
backups_count=$(ls "$LOG_DIR/backups" | grep -E "^$(basename "$LOG_FILE")" | wc -l)
|
||||
if [ "$backups_count" -gt "$MAX_BACKUPS" ]; then
|
||||
# 删除最早的备份
|
||||
oldest_backup=$(ls -t "$LOG_DIR/backups" | grep -E "^$(basename "$LOG_FILE")" | tail -n 1)
|
||||
rm "${LOG_DIR}/backups/$oldest_backup"
|
||||
echo "删除最早的备份日志: ${LOG_DIR}/backups/$oldest_backup"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
BOOT_TIME=$(uptime -s) # 使用 uptime 命令获取系统的开机时间
|
||||
MAX_SIZE="1M" # 最大日志文件大小
|
||||
MAX_BACKUPS=2 # 保留的最大备份数量
|
||||
# 自动崩溃收集服务
|
||||
#sudo systemctl stop apport.service
|
||||
#sudo systemctl disable apport.service
|
||||
#ulimit -c unlimited
|
||||
#echo "/home/heco/ys_ecap_server/core/core_%e_${BOOT_TIME}_.%t.%p" | tee /proc/sys/kernel/core_pattern
|
||||
|
||||
USE_VALGRIND=0
|
||||
USE_data_process=0
|
||||
|
||||
NAME1="data_process"
|
||||
NAME2="ecap_server"
|
||||
#LOG_PATH1="/dev/null"
|
||||
#LOG_PATH2="/dev/null"
|
||||
LOG_PATH1="$DIR/data_process.log"
|
||||
LOG_PATH2="$DIR/ecap_server.log"
|
||||
|
||||
if [ "$USE_data_process" == 1 ]; then
|
||||
rotate_log "$LOG_PATH1" "$MAX_SIZE" "$MAX_BACKUPS"
|
||||
fi
|
||||
|
||||
rotate_log "$LOG_PATH2" "$MAX_SIZE" "$MAX_BACKUPS"
|
||||
|
||||
# Ensure the log files exist and are writable
|
||||
if [ "$USE_data_process" == 1 ]; then
|
||||
echo "系统开机时间: $BOOT_TIME" >>"${LOG_PATH1}"
|
||||
touch "${LOG_PATH1}"
|
||||
fi
|
||||
|
||||
echo "系统开机时间: $BOOT_TIME" >>"${LOG_PATH2}"
|
||||
touch "${LOG_PATH2}"
|
||||
echo "${DIR} 创建log文件成功"
|
||||
|
||||
if [ "$USE_VALGRIND" == 1 ]; then
|
||||
echo "启用valgrind内存检查程序"
|
||||
valgrind --leak-check=full --log-file=${DIR}/${NAME2}_valgrind.log --show-leak-kinds=all ${DIR}/${NAME2} >>"${LOG_PATH2}" 2>&1 &
|
||||
fi
|
||||
|
||||
SLEEP_SEC="${1:-10}"
|
||||
sleep "$SLEEP_SEC"
|
||||
echo "等待 ${SLEEP_SEC}s 完成"
|
||||
|
||||
if [ "$USE_data_process" == 1 ]; then
|
||||
echo "第一次启动 ${NAME1}"
|
||||
${DIR}/${NAME1} >>"${LOG_PATH1}" 2>&1 &
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "第一次启动 Failed to start ${NAME1} at $(date)" >>"${LOG_PATH1}"
|
||||
fi
|
||||
fi
|
||||
|
||||
restart_count_2=0
|
||||
echo "第一次启动 ${NAME2}"
|
||||
${DIR}/${NAME2} >>"${LOG_PATH2}" 2>&1 &
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "第一次启动 Failed to start ${NAME2} at $(date)" >>"${LOG_PATH2}"
|
||||
fi
|
||||
|
||||
while true; do
|
||||
# 监控 data_process
|
||||
|
||||
if [ "$USE_data_process" == 1 ]; then
|
||||
if ! pgrep -x "$NAME1" >/dev/null; then
|
||||
restart_count_1=$((restart_count_1 + 1))
|
||||
echo "重启 ${NAME1} at $(date) - count: ${restart_count_1}" >>"${LOG_PATH1}"
|
||||
echo "重启 ${NAME1} at $(date) - count: ${restart_count_1}"
|
||||
|
||||
# 真正重启程序
|
||||
${DIR}/${NAME1} >>"${LOG_PATH1}" 2>&1 &
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to start ${NAME1} at $(date)" >>"${LOG_PATH1}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
sleep 60
|
||||
|
||||
# 监控 ecap_server
|
||||
if [ "$USE_VALGRIND" == 0 ]; then
|
||||
if ! pgrep -x "$NAME2" >/dev/null; then
|
||||
|
||||
ss -ltnp >>"${LOG_PATH2}"
|
||||
restart_count_2=$((restart_count_2 + 1))
|
||||
echo "重启 ${NAME2} at $(date) - count: ${restart_count_2}" >>"${LOG_PATH2}"
|
||||
echo "重启 ${NAME2} at $(date) - count: ${restart_count_2}"
|
||||
# 真正启动
|
||||
${DIR}/${NAME2} >>"${LOG_PATH2}" 2>&1 &
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to start ${NAME2} at $(date)" >>"${LOG_PATH2}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$USE_data_process" == 1 ]; then
|
||||
rotate_log "$LOG_PATH1" "$MAX_SIZE" "$MAX_BACKUPS"
|
||||
fi
|
||||
|
||||
rotate_log "$LOG_PATH2" "$MAX_SIZE" "$MAX_BACKUPS"
|
||||
|
||||
done
|
||||
|
||||
# tail -f /home/heco/ys_ecap_server/ecap_1201/data_process.log
|
||||
# tail -f /home/heco/ys_ecap_server/ecap_1201/ecap_server.log
|
||||
# multitail /home/heco/ys_ecap_server/ecap_1201/data_process.log /home/heco/ys_ecap_server/ecap_1201/ecap_server.log
|
||||
|
||||
# kill -SIGINT <pid>
|
||||
# pkill -SIGINT <process-name>
|
||||
# pkill -SIGINT 1125ecap_server
|
||||
# pgrep -l 1125ecap_server
|
||||
# [ubuntu创建守护进程,并设置开机自启动(rc.local,rc_local.sercive)] https://blog.csdn.net/weixin_46954054/article/details/134862013
|
||||
# [Ubuntu开机自启动脚本/命令的几种方案] https://blog.csdn.net/weixin_43455581/article/details/107815743
|
||||
|
||||
# sudo pkill protect.bash && sudo pkill -SIGINT ecap_server && pgrep -l protect.bash
|
||||
|
||||
# pgrep -l protect.bash
|
||||
# sudo pkill protect.bash
|
||||
# sudo pkill -SIGINT ecap_server
|
||||
|
||||
# /home/heco/ys_ecap_server/protect.bash ecap_server
|
||||
|
||||
# kill -SIGINT <pid>
|
||||
# pkill -SIGINT <process-name>
|
||||
# pkill -SIGINT 1125ecap_server
|
||||
# pgrep -l 1125ecap_server
|
||||
# [ubuntu创建守护进程,并设置开机自启动(rc.local,rc_local.sercive)] https://blog.csdn.net/weixin_46954054/article/details/134862013
|
||||
# [Ubuntu开机自启动脚本/命令的几种方案] https://blog.csdn.net/weixin_43455581/article/details/107815743
|
||||
|
||||
# pgrep -l protect.bash
|
||||
# pkill protect.bash
|
||||
|
||||
# /home/heco/ys_ecap_server/protect.bash ecap_server
|
||||
|
||||
# sudo systemctl daemon-reload
|
||||
# sudo systemctl enable rc-local.service # 设置开机自启
|
||||
# sudo systemctl disable rc-local.service # 关闭开机自启
|
||||
# sudo systemctl start rc-local.service # 立即启动服务
|
||||
# sudo systemctl status rc-local.service
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
reboot
|
||||
|
||||
#cat etc/network/interfaces
|
||||
#
|
||||
#ip link set dev eth0 down
|
||||
#ip link set dev eth0 up
|
||||
|
||||
#sudo systemctl restart networking
|
||||
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"file_name": "./qingdao/data",
|
||||
"http_server": {
|
||||
"ip": "0.0.0.0",
|
||||
"port": 40000
|
||||
},
|
||||
"tcp_server": {
|
||||
"ip": "0.0.0.0",
|
||||
"port": 40001,
|
||||
"clients": [
|
||||
{
|
||||
"id": 0,
|
||||
"ip": "0.0.0.0",
|
||||
"port": 10003,
|
||||
"info": "仿制radarcape"
|
||||
},
|
||||
{
|
||||
"id": 0,
|
||||
"ip": "0.0.0.0",
|
||||
"port": 10003,
|
||||
"info": "radarcape"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
export u_path="/media/udisk0"
|
||||
export exe_name="Radarcape_Local_Server_aarch64-buildroot-linux-gnu-gxx_Linux_Debug"
|
||||
export guard_exe_name="/bin/sh /etc/init.d/S90E-CAP start"
|
||||
|
||||
echo "pkill !"
|
||||
pkill -f "${guard_exe_name}"
|
||||
pkill -f "${exe_name}"
|
||||
|
||||
echo "remove logs !"
|
||||
rm -rf /root/logs*
|
||||
|
||||
echo "update config.json!"
|
||||
cp -r "$u_path"/config.json /root
|
||||
echo "update restart_net_service.sh!"
|
||||
cp -r "$u_path"/restart_net_service.sh /root
|
||||
echo "update interface!"
|
||||
cp -r "$u_path"/interface /root
|
||||
echo "update wwwroot!"
|
||||
rm -rf /root/wwwroot
|
||||
cp -rp "$u_path"/wwwroot /root
|
||||
|
||||
while pgrep -f "${guard_exe_name}" >/dev/null; do
|
||||
echo "${guard_exe_name} Process is still running wait one second!"
|
||||
sleep 1
|
||||
done
|
||||
while pgrep -f "${exe_name}" >/dev/null; do
|
||||
echo "${exe_name} Process is running still running wait one second!"
|
||||
sleep 1
|
||||
done
|
||||
|
||||
echo "update ${exe_name}!"
|
||||
cp -r "$u_path/${exe_name}" /root
|
||||
|
||||
#/bin/sh /etc/init.d/S90E-CAP start
|
||||
|
||||
echo "程序更新成功!"
|
||||
|
||||
# 查看挂载: mount
|
||||
# 卸载U盘: umount /media/udisk0
|
||||
# U盘默认地址:/media/udisk0
|
||||
# 单独更新 cp -r /media/udisk0/* /root
|
||||
# mkdir /root/u && chmod 777 /root/u
|
||||
# 自动部署: cp /media/udisk0/deploy.sh /root/u && chmod 777 /root/u/deploy.sh && /root/u/deploy.sh 190
|
||||
# 更新: cp /media/udisk0/update.sh /root/u && chmod 777 /root/u/update.sh && /root/u/update.sh
|
||||
|
||||
# sudo fdisk -l
|
||||
|
||||
# /etc/init.d/S90E-CAP stop
|
||||
# pkill
|
||||
@@ -1,124 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [[ "${UPGRADE_DAEMONIZED:-0}" != "1" ]]; then
|
||||
export UPGRADE_DAEMONIZED=1
|
||||
nohup "$0" "$@" >/dev/null 2>&1 &
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# ---------- 参数校验 ----------
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "用法: $0 <old_version> <new_version>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
old_version="$1"
|
||||
new_version="$2"
|
||||
|
||||
# ---------- 脚本目录 ----------
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
# ---------- 日志 ----------
|
||||
LOG_DIR="${SCRIPT_DIR}/upgrade_logs"
|
||||
LOG_FILE="${LOG_DIR}/upgrade_${old_version}_to_${new_version}.log"
|
||||
mkdir -p "$LOG_DIR"
|
||||
|
||||
# 覆盖写日志(重要)
|
||||
: >"$LOG_FILE"
|
||||
|
||||
# 所有输出写日志 + 控制台
|
||||
exec > >(tee -a "$LOG_FILE") 2>&1
|
||||
|
||||
echo "===== Upgrade start: $(date) ====="
|
||||
echo "old_version=${old_version}"
|
||||
echo "new_version=${new_version}"
|
||||
echo "SCRIPT_DIR=${SCRIPT_DIR}"
|
||||
|
||||
# ---------- 路径定义 ----------
|
||||
OLD_DIR="${SCRIPT_DIR}/${old_version}"
|
||||
NEW_DIR="${SCRIPT_DIR}/${new_version}"
|
||||
PKG="${NEW_DIR}/${new_version}.zip"
|
||||
STOP_SCRIPT="${OLD_DIR}/stop.bash"
|
||||
PT_BIN="${NEW_DIR}/pt"
|
||||
PROTECT_SCRIPT="${SCRIPT_DIR}/protect.bash"
|
||||
|
||||
# ---------- 基础校验 ----------
|
||||
for d in "$OLD_DIR" "$NEW_DIR"; do
|
||||
[ -d "$d" ] || {
|
||||
echo "目录不存在: $d"
|
||||
exit 1
|
||||
}
|
||||
done
|
||||
|
||||
[ -f "$PKG" ] || {
|
||||
echo "升级包不存在: $PKG"
|
||||
exit 1
|
||||
}
|
||||
|
||||
command -v unzip >/dev/null || {
|
||||
echo "unzip 未安装"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# ---------- 停止旧版本 ----------
|
||||
echo "[1/5] 停止旧版本"
|
||||
if [ -x "$STOP_SCRIPT" ]; then
|
||||
"$STOP_SCRIPT"
|
||||
else
|
||||
echo "stop.bash 不存在或不可执行: $STOP_SCRIPT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ---------- 解压新版本(覆盖) ----------
|
||||
echo "[2/5] 解压新版本"
|
||||
unzip -o "$PKG" -d "$NEW_DIR"
|
||||
|
||||
# ---------- 校验新程序 ----------
|
||||
echo "[3/5] 校验新程序"
|
||||
[ -f "$PT_BIN" ] || {
|
||||
echo "pt 程序不存在: $PT_BIN"
|
||||
exit 1
|
||||
}
|
||||
chmod +x "$PT_BIN"
|
||||
|
||||
# ---------- 写 protect.bash(覆盖) ----------
|
||||
echo "[4/5] 写 protect.bash"
|
||||
|
||||
cat >"$PROTECT_SCRIPT" <<EOF
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
NAME="ecap_server"
|
||||
DIR="/home/heco/ys_ecap_server/${new_version}"
|
||||
|
||||
if [ ! -x "\${DIR}/pt" ]; then
|
||||
echo "pt 不存在或不可执行: \${DIR}/pt"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"\${DIR}/pt" > "\${DIR}/pt.log" 2>&1
|
||||
EOF
|
||||
|
||||
chmod +x "$PROTECT_SCRIPT"
|
||||
|
||||
# ---------- 启动新版本 ----------
|
||||
echo "[5/5] 启动新版本"
|
||||
|
||||
LOG_FILE="${NEW_DIR}/pt.log"
|
||||
|
||||
# 确保日志文件存在
|
||||
if [ ! -e "$LOG_FILE" ]; then
|
||||
touch "$LOG_FILE"
|
||||
fi
|
||||
|
||||
# 设置日志权限
|
||||
chmod 777 "$LOG_FILE"
|
||||
|
||||
# 后台启动新版本
|
||||
nohup "$PT_BIN" 0 >>"$LOG_FILE" 2>&1 &
|
||||
disown
|
||||
|
||||
echo "Upgrade finished, pt started in background"
|
||||
exit 0
|
||||
@@ -1,174 +0,0 @@
|
||||
{
|
||||
"version": "v1.0.0",
|
||||
"dsp": {
|
||||
"url": "0.0.0.0",
|
||||
"port": 6000,
|
||||
"center_freq": 800000,
|
||||
"band_width": 6000,
|
||||
"sample_rate": 7500,
|
||||
"fft_point_number": 1024,
|
||||
"fft_period_ms": 50,
|
||||
"fft_win_type": "blkmc",
|
||||
"library_path": "@/libdll_source.so",
|
||||
"filename_prefix": "ECAP_",
|
||||
"filename_suffix": ".dat",
|
||||
"power_min": -200,
|
||||
"power_max": 200,
|
||||
"power_offset": -166,
|
||||
"frame_rate": 30,
|
||||
"debug": false
|
||||
},
|
||||
"drogon": {
|
||||
"app": {
|
||||
"threads_num": 0
|
||||
}
|
||||
},
|
||||
"mlat": {
|
||||
"enable": false,
|
||||
"merge": false,
|
||||
"library_path": "@/mlat_source.dll",
|
||||
"function_name": "read"
|
||||
},
|
||||
"web_server": {
|
||||
"webapp": "@/wwwroot",
|
||||
"tiles": "@/tiles"
|
||||
},
|
||||
"device": {
|
||||
"net": [
|
||||
{
|
||||
"key": "device",
|
||||
"ip": "192.168.1.75",
|
||||
"netmask": "255.255.255.0",
|
||||
"gateway": "192.168.1.1",
|
||||
"port": 9081
|
||||
},
|
||||
{
|
||||
"key": "wifi",
|
||||
"ip": "192.168.10.193",
|
||||
"netmask": "255.255.255.0",
|
||||
"gateway": "192.168.10.1",
|
||||
"port": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"mode_acs": {
|
||||
"timeout_seconds": 60,
|
||||
"read_milliseconds": 100,
|
||||
"mode_s_max_num": 700000,
|
||||
"mode_other_max_num": 10000,
|
||||
"report_data_feed_msg_mum": 10000,
|
||||
"monitor_msg_live": false,
|
||||
"data_feed": {
|
||||
"empty_wait_milliseconds": 10,
|
||||
"packet_byte_size": 1,
|
||||
"list": [
|
||||
{
|
||||
"key": "Port_10003",
|
||||
"enable": true,
|
||||
"type": "Data_Feed_TCP_Server",
|
||||
"output_format": {
|
||||
"type": "BIN",
|
||||
"use_status": true,
|
||||
"mode_s_output_type": "ALL_Mode_S",
|
||||
"use_mode_ac": true
|
||||
},
|
||||
"port": 10003
|
||||
},
|
||||
{
|
||||
"key": "Port_10004",
|
||||
"enable": false,
|
||||
"type": "Data_Feed_TCP_Server",
|
||||
"output_format": {
|
||||
"type": "BIN",
|
||||
"use_status": false,
|
||||
"mode_s_output_type": "DF_11_17_18",
|
||||
"use_mode_ac": false
|
||||
},
|
||||
"url": "0.0.0.0",
|
||||
"port": 10004
|
||||
},
|
||||
{
|
||||
"key": "Port_10005",
|
||||
"enable": false,
|
||||
"type": "Data_Feed_TCP_Client",
|
||||
"output_format": {
|
||||
"type": "BIN",
|
||||
"use_status": true,
|
||||
"mode_s_output_type": "NO_POS_Mode_S",
|
||||
"use_mode_ac": false
|
||||
},
|
||||
"url": "192.168.208.153",
|
||||
"port": 10005
|
||||
},
|
||||
{
|
||||
"key": "Port_30003",
|
||||
"enable": false,
|
||||
"type": "Data_Feed_TCP_Server",
|
||||
"output_format": {
|
||||
"type": "SBS",
|
||||
"use_status": false,
|
||||
"mode_s_output_type": "ALL_Mode_S",
|
||||
"use_mode_ac": true
|
||||
},
|
||||
"port": 30003
|
||||
}
|
||||
]
|
||||
},
|
||||
"data_source": {
|
||||
"list": [
|
||||
{
|
||||
"key": "dll",
|
||||
"enable": true,
|
||||
"base_station_show": true,
|
||||
"aircraft_show": true,
|
||||
"color": "#6c5552fa",
|
||||
"aircraft_pixel_size": 34,
|
||||
"lat": 37.510269,
|
||||
"lon": 121.439950,
|
||||
"alt": 1000.000000,
|
||||
"update_form_gps": false,
|
||||
"type": "Dll_Data_Source",
|
||||
"library_path": "@/libdll_source.so",
|
||||
"function_name": "adsb_read",
|
||||
"data_type": "BIN_Blank"
|
||||
},
|
||||
{
|
||||
"key": "binary_data48__2025-01-06.222333",
|
||||
"enable": false,
|
||||
"base_station_show": true,
|
||||
"aircraft_show": true,
|
||||
"color": "#4e545c",
|
||||
"aircraft_pixel_size": 38,
|
||||
"lat": 37.510269,
|
||||
"lon": 121.439950,
|
||||
"alt": 1000.000000,
|
||||
"update_form_gps": false,
|
||||
"type": "File_Data_Source",
|
||||
"file_path": "C:\\wyc\\CLionProjects\\plantSunCat\\mainProjects\\Radarcape\\data\\BIN\\binary_data48__2025-01-06.2.log",
|
||||
"data_type": "BIN",
|
||||
"play_mode": "analysis"
|
||||
}
|
||||
]
|
||||
},
|
||||
"source_feed_relation": {
|
||||
"list": [
|
||||
{
|
||||
"key": "key_10003",
|
||||
"enable": true,
|
||||
"type": "First_Source_To_All_Feed_Relation"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"log": {
|
||||
"open_mode": "Delete",
|
||||
"piece_num": 10,
|
||||
"size_MB": 10
|
||||
},
|
||||
"console": {
|
||||
"record_playback": false,
|
||||
"mode_s_console": false,
|
||||
"post_request": false,
|
||||
"mlat_server": true
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"library_path": "@/libdll_source.so",
|
||||
"center_freq": 200000,
|
||||
"band_width": 6000,
|
||||
"sample_rate": 60000,
|
||||
"fft_point_number": 2048,
|
||||
"fft_period_ms": 50,
|
||||
"fft_win_type": "blkmc"
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
前端构思
|
||||
|
||||
|
||||
那些接口写整体加上 一个数据源参数
|
||||
数据源可以设置颜色 默认随机色
|
||||
|
||||
|
||||
Reference in New Issue
Block a user