ajustes can e regras de atuacao de bicos
This commit is contained in:
parent
b8ea15d2f3
commit
75bb0558c5
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -62,7 +62,10 @@ namespace AgroBase.Models
|
|||
get
|
||||
{
|
||||
var motivos = HealthWorkerService.ModulosSaude.FirstOrDefault(x => x.modulo == Dispositivo)?.motivos ?? new System.Collections.Generic.List<string>();
|
||||
return string.Join(", ", motivos);
|
||||
var cond_op = HealthWorkerService.ModulosSaude.FirstOrDefault(x => x.modulo == Dispositivo)?.condicoes_operacionais?.Select(x => x.descricao) ?? new System.Collections.Generic.List<string>();
|
||||
string motivos_str = string.Join(", ", motivos);
|
||||
string cond_op_str = string.Join(", ", cond_op);
|
||||
return motivos_str + (motivos.Any() && cond_op.Any() ? ", " : "") + cond_op_str;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1715,6 +1715,7 @@ namespace AgroBase.Models
|
|||
Variaveis.OperacaoEmAndamento.AtualizarDadosContexto();
|
||||
VisualWorkerService.AtualizarAnalise();
|
||||
WeedWorkerService.AtualizarAnalise();
|
||||
GPSService.AtualizaDadosRedis();
|
||||
|
||||
var _Trajetoria = Variaveis.OperacaoEmAndamento.Trajetoria;
|
||||
var _DispMvd = Variaveis.OperacaoEmAndamento.DispMvd;
|
||||
|
|
|
|||
|
|
@ -129,8 +129,8 @@ namespace AgroBase.Models.Operadores
|
|||
return new WeedWorkerAnaliseEstatisticasBicosModel()
|
||||
{
|
||||
larguras = new List<double>(larguras),
|
||||
contagem_cana_frac_por_bico = new List<double>(contagem_cana_frac_por_bico),
|
||||
contagem_cana_px_por_bico = new List<double>(contagem_cana_px_por_bico),
|
||||
contagem_cana_frac_por_bico = new List<double>(contagem_cana_frac_por_bico ?? new List<double>()),
|
||||
contagem_cana_px_por_bico = new List<double>(contagem_cana_px_por_bico ?? new List<double>()),
|
||||
faixa = faixa?.Clone()
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ namespace AgroBase.Services
|
|||
private static bool LoopRTK_Ntrip = false;
|
||||
public static bool CorrecaoRTK_Ntrip = false;
|
||||
public static DateTime UltimoEnvioCorrecaoRTK = DateTime.MinValue;
|
||||
private static AsyncTaskTimerModel tmrHeartbeat;
|
||||
|
||||
public static void AtualizarPortaCOM(SerialPort Porta)
|
||||
{
|
||||
|
|
@ -77,9 +76,6 @@ namespace AgroBase.Services
|
|||
{
|
||||
Task.Run(async () => await AplicarCorrecaoRTK_Ntrip());
|
||||
}
|
||||
tmrHeartbeat?.Dispose();
|
||||
tmrHeartbeat = new AsyncTaskTimerModel("tmrHeartbeatGps", tmrHeartbeat_Tick, 500);
|
||||
tmrHeartbeat.Start();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1211,12 +1207,7 @@ namespace AgroBase.Services
|
|||
}
|
||||
|
||||
|
||||
private static async Task tmrHeartbeat_Tick()
|
||||
{
|
||||
AtualizaDadosRedis();
|
||||
}
|
||||
|
||||
private static void AtualizaDadosRedis()
|
||||
public static void AtualizaDadosRedis()
|
||||
{
|
||||
GPSModel posicaoAtual = Variaveis.OperacaoEmAndamento.Simulando ? historicoPosicao.Peek() : UltimaLeitura;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace AgroBase.Services
|
|||
{
|
||||
get
|
||||
{
|
||||
return Referenciando ? 250 : 1000;
|
||||
return Referenciando ? 250 : 2000;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -445,7 +445,8 @@ namespace AgroBase.Services
|
|||
}
|
||||
}
|
||||
|
||||
if (!CanManager.CanService.Iniciado)
|
||||
//if (!CanManager.CanService.Iniciado && CanManager.UseCanSerial)
|
||||
if (CanManager.UseCanSerial && !CanManager.CanService.Iniciado)
|
||||
{
|
||||
CanManager.CanService.Fechar();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
public class WaveshareCANFDService
|
||||
|
|
@ -36,6 +37,7 @@ public class WaveshareCANFDService
|
|||
|
||||
// versão do callback por lote com contagem
|
||||
public delegate void FramesBatchHandler(VCI_CAN_OBJ[] frames);
|
||||
private readonly object _canLock = new object();
|
||||
|
||||
public bool IsOpen => isOpen;
|
||||
public int Canal => ((int)channelIndex + 1);
|
||||
|
|
@ -88,6 +90,8 @@ public class WaveshareCANFDService
|
|||
[DllImport("ControlCANFD.dll", CallingConvention = CallingConvention.StdCall)]
|
||||
public static extern uint VCI_StartCAN(uint DeviceType, uint DeviceInd, uint CANInd);
|
||||
[DllImport("ControlCANFD.dll", CallingConvention = CallingConvention.StdCall)]
|
||||
public static extern uint VCI_ResetCAN(uint DeviceType, uint DeviceInd, uint CANInd);
|
||||
[DllImport("ControlCANFD.dll", CallingConvention = CallingConvention.StdCall)]
|
||||
public static extern uint VCI_ClearBuffer(uint DeviceType, uint DeviceInd, uint CANInd);
|
||||
|
||||
[DllImport("ControlCANFD.dll", CallingConvention = CallingConvention.StdCall)]
|
||||
|
|
@ -298,25 +302,55 @@ public class WaveshareCANFDService
|
|||
|
||||
private bool InitAndStartCAN()
|
||||
{
|
||||
// reconfigura baud FD
|
||||
uint baud = MapToFdBaudCode(_lastKbps);
|
||||
if (VCI_SetReference(DEVICE_TYPE, DEVICE_INDEX, channelIndex, 0, ref baud) != 1)
|
||||
return false;
|
||||
|
||||
var cfg = new VCI_INIT_CONFIG
|
||||
lock (_canLock)
|
||||
{
|
||||
AccCode = 0,
|
||||
AccMask = 0xFFFFFFFF,
|
||||
Reserved = 0,
|
||||
Filter = 0,
|
||||
Timing0 = 0,
|
||||
Timing1 = 0,
|
||||
Mode = 0
|
||||
};
|
||||
if (VCI_InitCAN(DEVICE_TYPE, DEVICE_INDEX, channelIndex, ref cfg) != 1)
|
||||
return false;
|
||||
// 1) Garante canal parado antes de mexer no baud
|
||||
VCI_ResetCAN(DEVICE_TYPE, DEVICE_INDEX, channelIndex); // ignora retorno
|
||||
VCI_CloseDevice(DEVICE_TYPE, DEVICE_INDEX); // fecha handle antigo (se existir)
|
||||
Thread.Sleep(100);
|
||||
|
||||
return VCI_StartCAN(DEVICE_TYPE, DEVICE_INDEX, channelIndex) == 1;
|
||||
if (VCI_OpenDevice(DEVICE_TYPE, DEVICE_INDEX, 0) != 1)
|
||||
return false;
|
||||
|
||||
// 2) Tenta configurar baud com retry curto
|
||||
uint baud = MapToFdBaudCode(_lastKbps);
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
if (VCI_SetReference(DEVICE_TYPE, DEVICE_INDEX, channelIndex, 0, ref baud) == 1)
|
||||
break;
|
||||
Thread.Sleep(50);
|
||||
if (i == 2) { VCI_CloseDevice(DEVICE_TYPE, DEVICE_INDEX); return false; }
|
||||
}
|
||||
|
||||
// 3) Init + Start
|
||||
var cfg = new VCI_INIT_CONFIG
|
||||
{
|
||||
AccCode = 0,
|
||||
AccMask = 0xFFFFFFFF,
|
||||
Reserved = 0,
|
||||
Filter = 0, // filtro aberto
|
||||
Timing0 = 0,
|
||||
Timing1 = 0,
|
||||
Mode = 0 // normal (não listen-only)
|
||||
};
|
||||
|
||||
if (VCI_InitCAN(DEVICE_TYPE, DEVICE_INDEX, channelIndex, ref cfg) != 1)
|
||||
{
|
||||
VCI_CloseDevice(DEVICE_TYPE, DEVICE_INDEX);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Opcional: VCI_ClearBuffer antes de Start
|
||||
// VCI_ClearBuffer(DEVICE_TYPE, DEVICE_INDEX, channelIndex);
|
||||
|
||||
if (VCI_StartCAN(DEVICE_TYPE, DEVICE_INDEX, channelIndex) != 1)
|
||||
{
|
||||
VCI_CloseDevice(DEVICE_TYPE, DEVICE_INDEX);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private bool HardReopen()
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -29,5 +29,5 @@
|
|||
"top_topics_and_observing_domains": [ ]
|
||||
} ],
|
||||
"hex_encoded_hmac_key": "40F346D3248C3AFDF2BEE1FE496DBD32F7CED6E5AE98B881ABC421AA7E7B5642",
|
||||
"next_scheduled_calculation_time": "13401819543884442"
|
||||
"next_scheduled_calculation_time": "13401819543884678"
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,3 +1,3 @@
|
|||
2025/09/02-08:53:17.510 23f4 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/MANIFEST-000001
|
||||
2025/09/02-08:53:17.517 23f4 Recovering log #3
|
||||
2025/09/02-08:53:17.520 23f4 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/000003.log
|
||||
2025/09/02-15:26:01.850 514c Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/MANIFEST-000001
|
||||
2025/09/02-15:26:01.856 514c Recovering log #3
|
||||
2025/09/02-15:26:01.859 514c Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/000003.log
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
2025/09/02-08:47:11.765 3b04 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/MANIFEST-000001
|
||||
2025/09/02-08:47:11.773 3b04 Recovering log #3
|
||||
2025/09/02-08:47:11.777 3b04 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/000003.log
|
||||
2025/09/02-14:58:51.846 5a08 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/MANIFEST-000001
|
||||
2025/09/02-14:58:51.853 5a08 Recovering log #3
|
||||
2025/09/02-14:58:51.856 5a08 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/000003.log
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"net":{"http_server_properties":{"servers":[{"alternative_service":[{"advertised_alpns":["h3"],"expiration":"13401373997903613","port":443,"protocol_str":"quic"}],"anonymization":["DAAAAAcAAABmaWxlOi8vAA==",false,0],"network_stats":{"srtt":7779},"server":"https://tile.openstreetmap.org","supports_spdy":true}],"supports_quic":{"address":"2804:d78:6a8:5d00:c40:d68b:d066:c8cf","used_quic":true},"version":5},"network_qualities":{"CAASABiAgICA+P////8B":"4G","CAESABiAgICA+P////8B":"4G","CAISABiAgICA+P////8B":"4G","CAYSABiAgICA+P////8B":"Offline"}}}
|
||||
{"net":{"http_server_properties":{"servers":[{"alternative_service":[{"advertised_alpns":["h3"],"expiration":"13401397562240555","port":443,"protocol_str":"quic"}],"anonymization":["DAAAAAcAAABmaWxlOi8vAA==",false,0],"network_stats":{"srtt":8099},"server":"https://tile.openstreetmap.org","supports_spdy":true}],"supports_quic":{"address":"2804:d78:6a8:5d00:5cea:6dfe:6183:a825","used_quic":true},"version":5},"network_qualities":{"CAASABiAgICA+P////8B":"4G","CAESABiAgICA+P////8B":"4G","CAISABiAgICA+P////8B":"4G","CAYSABiAgICA+P////8B":"Offline"}}}
|
||||
|
|
@ -1 +1 @@
|
|||
{"sts":[{"expiry":1788349633.320866,"host":"bWGAftl61rqoc0YzqPncsLvQQh/iC2Bdp3ejUeGC83w=","mode":"force-https","sts_include_subdomains":true,"sts_observed":1756813633.320875}],"version":2}
|
||||
{"sts":[{"expiry":1788372244.780766,"host":"bWGAftl61rqoc0YzqPncsLvQQh/iC2Bdp3ejUeGC83w=","mode":"force-https","sts_include_subdomains":true,"sts_observed":1756836244.78077}],"version":2}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,3 +1,3 @@
|
|||
2025/09/02-09:10:40.010 23f4 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/MANIFEST-000001
|
||||
2025/09/02-09:10:40.012 23f4 Recovering log #3
|
||||
2025/09/02-09:10:40.015 23f4 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/000003.log
|
||||
2025/09/02-15:26:58.622 514c Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/MANIFEST-000001
|
||||
2025/09/02-15:26:58.623 514c Recovering log #3
|
||||
2025/09/02-15:26:58.626 514c Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/000003.log
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
2025/09/02-08:53:00.810 3b04 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/MANIFEST-000001
|
||||
2025/09/02-08:53:00.812 3b04 Recovering log #3
|
||||
2025/09/02-08:53:00.817 3b04 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/000003.log
|
||||
2025/09/02-15:12:04.177 5a08 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/MANIFEST-000001
|
||||
2025/09/02-15:12:04.178 5a08 Recovering log #3
|
||||
2025/09/02-15:12:04.181 5a08 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/000003.log
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
2025/09/02-08:53:17.431 67f8 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/MANIFEST-000001
|
||||
2025/09/02-08:53:17.433 67f8 Recovering log #7
|
||||
2025/09/02-08:53:17.433 67f8 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/000007.log
|
||||
2025/09/02-15:26:01.777 678c Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/MANIFEST-000001
|
||||
2025/09/02-15:26:01.778 678c Recovering log #7
|
||||
2025/09/02-15:26:01.778 678c Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/000007.log
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
2025/09/02-08:47:11.681 4a8c Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/MANIFEST-000001
|
||||
2025/09/02-08:47:11.683 4a8c Recovering log #7
|
||||
2025/09/02-08:47:11.683 4a8c Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/000007.log
|
||||
2025/09/02-14:58:51.760 62e4 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/MANIFEST-000001
|
||||
2025/09/02-14:58:51.762 62e4 Recovering log #7
|
||||
2025/09/02-14:58:51.762 62e4 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/000007.log
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,221 +1 @@
|
|||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"Id": "1",
|
||||
"Name": "CidadeJardimTerreno2",
|
||||
"Length": 14.558011415731592,
|
||||
"Dist1": 14.558011415731592,
|
||||
"Dist2": 0.0
|
||||
},
|
||||
"geometry": {
|
||||
"id": null,
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
-47.395205344,
|
||||
-22.172559531333334
|
||||
],
|
||||
[
|
||||
-47.395212610166666,
|
||||
-22.172614638833334
|
||||
],
|
||||
[
|
||||
-47.395219157,
|
||||
-22.172656417833334
|
||||
],
|
||||
[
|
||||
-47.395223544833335,
|
||||
-22.1726892105
|
||||
],
|
||||
[
|
||||
-47.39522414098443,
|
||||
-22.17269369161165
|
||||
],
|
||||
[
|
||||
-47.395225326538004,
|
||||
-22.172702654611555
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"Id": "2",
|
||||
"Name": "CidadeJardimTerreno2",
|
||||
"Length": 14.771318274761821,
|
||||
"Dist1": 14.558011415731592,
|
||||
"Dist2": 0.0
|
||||
},
|
||||
"geometry": {
|
||||
"id": null,
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
-47.39521090233333,
|
||||
-22.172708800833334
|
||||
],
|
||||
[
|
||||
-47.395206943666665,
|
||||
-22.172679811
|
||||
],
|
||||
[
|
||||
-47.395202420666664,
|
||||
-22.1726491015
|
||||
],
|
||||
[
|
||||
-47.395198865666664,
|
||||
-22.172615782833333
|
||||
],
|
||||
[
|
||||
-47.395193255833334,
|
||||
-22.172577132833332
|
||||
],
|
||||
[
|
||||
-47.395192610024395,
|
||||
-22.17257265769541
|
||||
],
|
||||
[
|
||||
-47.395191325698136,
|
||||
-22.172563706509337
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"Id": "3",
|
||||
"Name": "CidadeJardimTerreno2",
|
||||
"Length": 14.827915524386164,
|
||||
"Dist1": 14.558011415731592,
|
||||
"Dist2": 0.0
|
||||
},
|
||||
"geometry": {
|
||||
"id": null,
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
-47.3951762925,
|
||||
-22.172561603
|
||||
],
|
||||
[
|
||||
-47.395180824166665,
|
||||
-22.172591686166665
|
||||
],
|
||||
[
|
||||
-47.395185745333336,
|
||||
-22.172623080166666
|
||||
],
|
||||
[
|
||||
-47.395190433,
|
||||
-22.172656367166667
|
||||
],
|
||||
[
|
||||
-47.395195199,
|
||||
-22.172693641833334
|
||||
],
|
||||
[
|
||||
-47.39519576904436,
|
||||
-22.172698125891035
|
||||
],
|
||||
[
|
||||
-47.39519690267159,
|
||||
-22.172707094716973
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"Id": "4",
|
||||
"Name": "CidadeJardimTerreno2",
|
||||
"Length": 14.785159385903514,
|
||||
"Dist1": 14.558011415731592,
|
||||
"Dist2": 0.0
|
||||
},
|
||||
"geometry": {
|
||||
"id": null,
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
-47.39518293216667,
|
||||
-22.1727127985
|
||||
],
|
||||
[
|
||||
-47.39517819266667,
|
||||
-22.172680514833335
|
||||
],
|
||||
[
|
||||
-47.3951732595,
|
||||
-22.172646752833334
|
||||
],
|
||||
[
|
||||
-47.39516880516667,
|
||||
-22.1726149155
|
||||
],
|
||||
[
|
||||
-47.39516381233334,
|
||||
-22.172581167166665
|
||||
],
|
||||
[
|
||||
-47.39516315429932,
|
||||
-22.172576693573966
|
||||
],
|
||||
[
|
||||
-47.39516184565584,
|
||||
-22.172567745443878
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"Id": "5",
|
||||
"Name": "CidadeJardimTerreno2",
|
||||
"Length": 14.80117692191233,
|
||||
"Dist1": 14.558011415731592,
|
||||
"Dist2": 0.0
|
||||
},
|
||||
"geometry": {
|
||||
"id": null,
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
-47.395147317833334,
|
||||
-22.172566031
|
||||
],
|
||||
[
|
||||
-47.395151503166666,
|
||||
-22.172595452333333
|
||||
],
|
||||
[
|
||||
-47.3951561855,
|
||||
-22.172628011166665
|
||||
],
|
||||
[
|
||||
-47.39516159866667,
|
||||
-22.172663757333332
|
||||
],
|
||||
[
|
||||
-47.39516672716667,
|
||||
-22.172697770833334
|
||||
],
|
||||
[
|
||||
-47.395167397572706,
|
||||
-22.172702242832194
|
||||
],
|
||||
[
|
||||
-47.39516873082615,
|
||||
-22.17271118781009
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Id":"1","Name":"CidadeJardimTerreno2","Length":14.558011415731592,"Dist1":14.558011415731592,"Dist2":0.0},"geometry":{"id":"0","type":"LineString","coordinates":[[-47.395205344,-22.172559531333334],[-47.395212610166666,-22.172614638833334],[-47.395219157,-22.172656417833334],[-47.395223544833335,-22.1726892105],[-47.395224140984432,-22.172693691611649],[-47.395225326538004,-22.172702654611555]]}},{"type":"Feature","properties":{"Id":"2","Name":"CidadeJardimTerreno2","Length":14.771318274761821,"Dist1":14.558011415731592,"Dist2":0.0},"geometry":{"id":"1","type":"LineString","coordinates":[[-47.395210902333332,-22.172708800833334],[-47.395206943666665,-22.172679811],[-47.395202420666664,-22.1726491015],[-47.395198865666664,-22.172615782833333],[-47.395193255833334,-22.172577132833332],[-47.395192610024395,-22.172572657695412],[-47.395191325698136,-22.172563706509337]]}},{"type":"Feature","properties":{"Id":"3","Name":"CidadeJardimTerreno2","Length":14.827915524386164,"Dist1":14.558011415731592,"Dist2":0.0},"geometry":{"id":"2","type":"LineString","coordinates":[[-47.3951762925,-22.172561603],[-47.395180824166665,-22.172591686166665],[-47.395185745333336,-22.172623080166666],[-47.395190433,-22.172656367166667],[-47.395195199,-22.172693641833334],[-47.395195769044363,-22.172698125891035],[-47.395196902671593,-22.172707094716973]]}},{"type":"Feature","properties":{"Id":"4","Name":"CidadeJardimTerreno2","Length":14.785159385903514,"Dist1":14.558011415731592,"Dist2":0.0},"geometry":{"id":"3","type":"LineString","coordinates":[[-47.395182932166669,-22.1727127985],[-47.39517819266667,-22.172680514833335],[-47.3951732595,-22.172646752833334],[-47.395168805166669,-22.1726149155],[-47.395163812333337,-22.172581167166665],[-47.395163154299318,-22.172576693573966],[-47.395161845655842,-22.172567745443878]]}},{"type":"Feature","properties":{"Id":"5","Name":"CidadeJardimTerreno2","Length":14.801176921912329,"Dist1":14.558011415731592,"Dist2":0.0},"geometry":{"id":"4","type":"LineString","coordinates":[[-47.395147317833334,-22.172566031],[-47.395151503166666,-22.172595452333333],[-47.3951561855,-22.172628011166665],[-47.395161598666668,-22.172663757333332],[-47.395166727166668,-22.172697770833334],[-47.395167397572706,-22.172702242832194],[-47.39516873082615,-22.172711187810091]]}}]}
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
<meta name="viewport" content="width=device-width,
|
||||
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<style>
|
||||
#map_b38d811fa61af8b65eff35dfc9035850 {
|
||||
#map_47cab050b27762312e18e400b40e3fda {
|
||||
position: relative;
|
||||
width: 100.0%;
|
||||
height: 100.0%;
|
||||
|
|
@ -54,14 +54,14 @@
|
|||
<body>
|
||||
|
||||
|
||||
<div class="folium-map" id="map_b38d811fa61af8b65eff35dfc9035850" ></div>
|
||||
<div class="folium-map" id="map_47cab050b27762312e18e400b40e3fda" ></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
|
||||
|
||||
var map_b38d811fa61af8b65eff35dfc9035850 = L.map(
|
||||
"map_b38d811fa61af8b65eff35dfc9035850",
|
||||
var map_47cab050b27762312e18e400b40e3fda = L.map(
|
||||
"map_47cab050b27762312e18e400b40e3fda",
|
||||
{
|
||||
center: [0.0, 0.0],
|
||||
crs: L.CRS.EPSG3857,
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
|
||||
|
||||
|
||||
var tile_layer_ad727f4f6e04926dedef75d899276bfb = L.tileLayer(
|
||||
var tile_layer_c21a0073a929b35b83b4ce5d32979cdb = L.tileLayer(
|
||||
"https://tile.openstreetmap.org/{z}/{x}/{y}.png",
|
||||
{
|
||||
"minZoom": 0,
|
||||
|
|
@ -95,7 +95,7 @@
|
|||
);
|
||||
|
||||
|
||||
tile_layer_ad727f4f6e04926dedef75d899276bfb.addTo(map_b38d811fa61af8b65eff35dfc9035850);
|
||||
tile_layer_c21a0073a929b35b83b4ce5d32979cdb.addTo(map_47cab050b27762312e18e400b40e3fda);
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -116,7 +116,7 @@
|
|||
}
|
||||
trajeto_json_add({"features": []});
|
||||
|
||||
trajeto_json.addTo(map_b38d811fa61af8b65eff35dfc9035850);
|
||||
trajeto_json.addTo(map_47cab050b27762312e18e400b40e3fda);
|
||||
|
||||
function adicionarGeometria(novaGeometria) {
|
||||
trajeto_json.addData(novaGeometria);
|
||||
|
|
@ -179,9 +179,9 @@
|
|||
|
||||
var marcadorEquipamento = L.marker([0, 0], {
|
||||
icon: customIcon
|
||||
}).addTo(map_b38d811fa61af8b65eff35dfc9035850);
|
||||
}).addTo(map_47cab050b27762312e18e400b40e3fda);
|
||||
|
||||
var marcadorBase = L.marker([0, 0], {}).addTo(map_b38d811fa61af8b65eff35dfc9035850);
|
||||
var marcadorBase = L.marker([0, 0], {}).addTo(map_47cab050b27762312e18e400b40e3fda);
|
||||
var icon = L.AwesomeMarkers.icon(
|
||||
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
|
||||
);
|
||||
|
|
@ -246,7 +246,7 @@
|
|||
}
|
||||
|
||||
if (foco) {
|
||||
map_b38d811fa61af8b65eff35dfc9035850.setView(novaPosicao, map_b38d811fa61af8b65eff35dfc9035850.getZoom());
|
||||
map_47cab050b27762312e18e400b40e3fda.setView(novaPosicao, map_47cab050b27762312e18e400b40e3fda.getZoom());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -268,7 +268,7 @@
|
|||
marcadorDinamico.setRotationAngle(angulo);
|
||||
|
||||
adicionarCoordenada("Tj", [novaLongitude, novaLatitude]);
|
||||
map_b38d811fa61af8b65eff35dfc9035850.setView(novaPosicao, map_b38d811fa61af8b65eff35dfc9035850.getZoom());*/
|
||||
map_47cab050b27762312e18e400b40e3fda.setView(novaPosicao, map_47cab050b27762312e18e400b40e3fda.getZoom());*/
|
||||
});
|
||||
|
||||
function calcularOrientacao(P1latitude, P1longitude, P2latitude, P2longitude) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
<meta name="viewport" content="width=device-width,
|
||||
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<style>
|
||||
#map_21ca758b860567b95d146fc0853c971f {
|
||||
#map_dc4d0222f44d72615f99a25deb4f0c22 {
|
||||
position: relative;
|
||||
width: 100.0%;
|
||||
height: 100.0%;
|
||||
|
|
@ -54,14 +54,14 @@
|
|||
<body>
|
||||
|
||||
|
||||
<div class="folium-map" id="map_21ca758b860567b95d146fc0853c971f" ></div>
|
||||
<div class="folium-map" id="map_dc4d0222f44d72615f99a25deb4f0c22" ></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
|
||||
|
||||
var map_21ca758b860567b95d146fc0853c971f = L.map(
|
||||
"map_21ca758b860567b95d146fc0853c971f",
|
||||
var map_dc4d0222f44d72615f99a25deb4f0c22 = L.map(
|
||||
"map_dc4d0222f44d72615f99a25deb4f0c22",
|
||||
{
|
||||
center: [-22.172636164916668, -47.395186322185666],
|
||||
crs: L.CRS.EPSG3857,
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
|
||||
|
||||
|
||||
var tile_layer_aa19b16e8f9ad64dd51817e34341c533 = L.tileLayer(
|
||||
var tile_layer_2f64a3c6107754f4fb674d21d1931d30 = L.tileLayer(
|
||||
"https://tile.openstreetmap.org/{z}/{x}/{y}.png",
|
||||
{
|
||||
"minZoom": 0,
|
||||
|
|
@ -95,7 +95,7 @@
|
|||
);
|
||||
|
||||
|
||||
tile_layer_aa19b16e8f9ad64dd51817e34341c533.addTo(map_21ca758b860567b95d146fc0853c971f);
|
||||
tile_layer_2f64a3c6107754f4fb674d21d1931d30.addTo(map_dc4d0222f44d72615f99a25deb4f0c22);
|
||||
|
||||
|
||||
|
||||
|
|
@ -111,7 +111,7 @@
|
|||
}*/
|
||||
});
|
||||
}
|
||||
function geo_json_40d1c4f07ee5691fa37b3e9a1cd24536_onEachFeature(feature, layer) {
|
||||
function geo_json_eaefb25f8a45d088b6e3c45831e86479_onEachFeature(feature, layer) {
|
||||
|
||||
layer.on({
|
||||
|
||||
|
|
@ -148,23 +148,23 @@
|
|||
}*/
|
||||
});
|
||||
};
|
||||
var geo_json_40d1c4f07ee5691fa37b3e9a1cd24536 = L.geoJson(null, {
|
||||
onEachFeature: geo_json_40d1c4f07ee5691fa37b3e9a1cd24536_onEachFeature,
|
||||
var geo_json_eaefb25f8a45d088b6e3c45831e86479 = L.geoJson(null, {
|
||||
onEachFeature: geo_json_eaefb25f8a45d088b6e3c45831e86479_onEachFeature,
|
||||
|
||||
...{
|
||||
}
|
||||
});
|
||||
|
||||
function geo_json_40d1c4f07ee5691fa37b3e9a1cd24536_add (data) {
|
||||
geo_json_40d1c4f07ee5691fa37b3e9a1cd24536
|
||||
function geo_json_eaefb25f8a45d088b6e3c45831e86479_add (data) {
|
||||
geo_json_eaefb25f8a45d088b6e3c45831e86479
|
||||
.addData(data);
|
||||
}
|
||||
geo_json_40d1c4f07ee5691fa37b3e9a1cd24536_add({"features": [{"geometry": {"coordinates": [[-47.395205344, -22.172559531333334], [-47.395212610166666, -22.172614638833334], [-47.395219157, -22.172656417833334], [-47.395223544833335, -22.1726892105], [-47.39522414098443, -22.17269369161165], [-47.395225326538004, -22.172702654611555]], "id": null, "type": "LineString"}, "id": 0, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "1", "Length": 14.558011415731592, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.39521090233333, -22.172708800833334], [-47.395206943666665, -22.172679811], [-47.395202420666664, -22.1726491015], [-47.395198865666664, -22.172615782833333], [-47.395193255833334, -22.172577132833332], [-47.395192610024395, -22.17257265769541], [-47.395191325698136, -22.172563706509337]], "id": null, "type": "LineString"}, "id": 1, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "2", "Length": 14.771318274761821, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.3951762925, -22.172561603], [-47.395180824166665, -22.172591686166665], [-47.395185745333336, -22.172623080166666], [-47.395190433, -22.172656367166667], [-47.395195199, -22.172693641833334], [-47.39519576904436, -22.172698125891035], [-47.39519690267159, -22.172707094716973]], "id": null, "type": "LineString"}, "id": 2, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "3", "Length": 14.827915524386164, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.39518293216667, -22.1727127985], [-47.39517819266667, -22.172680514833335], [-47.3951732595, -22.172646752833334], [-47.39516880516667, -22.1726149155], [-47.39516381233334, -22.172581167166665], [-47.39516315429932, -22.172576693573966], [-47.39516184565584, -22.172567745443878]], "id": null, "type": "LineString"}, "id": 3, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "4", "Length": 14.785159385903514, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.395147317833334, -22.172566031], [-47.395151503166666, -22.172595452333333], [-47.3951561855, -22.172628011166665], [-47.39516159866667, -22.172663757333332], [-47.39516672716667, -22.172697770833334], [-47.395167397572706, -22.172702242832194], [-47.39516873082615, -22.17271118781009]], "id": null, "type": "LineString"}, "id": 4, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "5", "Length": 14.80117692191233, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}], "type": "FeatureCollection"});
|
||||
geo_json_40d1c4f07ee5691fa37b3e9a1cd24536.setStyle(function(feature) {return feature.properties.style;});
|
||||
geo_json_eaefb25f8a45d088b6e3c45831e86479_add({"features": [{"geometry": {"coordinates": [[-47.395205344, -22.172559531333334], [-47.395212610166666, -22.172614638833334], [-47.395219157, -22.172656417833334], [-47.395223544833335, -22.1726892105], [-47.39522414098443, -22.17269369161165], [-47.395225326538004, -22.172702654611555]], "id": "0", "type": "LineString"}, "id": 0, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "1", "Length": 14.558011415731592, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.39521090233333, -22.172708800833334], [-47.395206943666665, -22.172679811], [-47.395202420666664, -22.1726491015], [-47.395198865666664, -22.172615782833333], [-47.395193255833334, -22.172577132833332], [-47.395192610024395, -22.17257265769541], [-47.395191325698136, -22.172563706509337]], "id": "1", "type": "LineString"}, "id": 1, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "2", "Length": 14.771318274761821, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.3951762925, -22.172561603], [-47.395180824166665, -22.172591686166665], [-47.395185745333336, -22.172623080166666], [-47.395190433, -22.172656367166667], [-47.395195199, -22.172693641833334], [-47.39519576904436, -22.172698125891035], [-47.39519690267159, -22.172707094716973]], "id": "2", "type": "LineString"}, "id": 2, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "3", "Length": 14.827915524386164, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.39518293216667, -22.1727127985], [-47.39517819266667, -22.172680514833335], [-47.3951732595, -22.172646752833334], [-47.39516880516667, -22.1726149155], [-47.39516381233334, -22.172581167166665], [-47.39516315429932, -22.172576693573966], [-47.39516184565584, -22.172567745443878]], "id": "3", "type": "LineString"}, "id": 3, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "4", "Length": 14.785159385903514, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.395147317833334, -22.172566031], [-47.395151503166666, -22.172595452333333], [-47.3951561855, -22.172628011166665], [-47.39516159866667, -22.172663757333332], [-47.39516672716667, -22.172697770833334], [-47.395167397572706, -22.172702242832194], [-47.39516873082615, -22.17271118781009]], "id": "4", "type": "LineString"}, "id": 4, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "5", "Length": 14.80117692191233, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}], "type": "FeatureCollection"});
|
||||
geo_json_eaefb25f8a45d088b6e3c45831e86479.setStyle(function(feature) {return feature.properties.style;});
|
||||
|
||||
|
||||
|
||||
geo_json_40d1c4f07ee5691fa37b3e9a1cd24536.addTo(map_21ca758b860567b95d146fc0853c971f);
|
||||
geo_json_eaefb25f8a45d088b6e3c45831e86479.addTo(map_dc4d0222f44d72615f99a25deb4f0c22);
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -185,7 +185,7 @@
|
|||
}
|
||||
trajeto_json_add({"features": []});
|
||||
|
||||
trajeto_json.addTo(map_21ca758b860567b95d146fc0853c971f);
|
||||
trajeto_json.addTo(map_dc4d0222f44d72615f99a25deb4f0c22);
|
||||
|
||||
function adicionarGeometria(novaGeometria) {
|
||||
trajeto_json.addData(novaGeometria);
|
||||
|
|
@ -243,7 +243,7 @@
|
|||
}
|
||||
trajeto_dinamico_json_add({"features": []});
|
||||
|
||||
trajeto_dinamico_json.addTo(map_21ca758b860567b95d146fc0853c971f);
|
||||
trajeto_dinamico_json.addTo(map_dc4d0222f44d72615f99a25deb4f0c22);
|
||||
|
||||
function adicionarGeometriaDinamica(novaGeometria) {
|
||||
trajeto_dinamico_json.addData(novaGeometria);
|
||||
|
|
@ -296,9 +296,9 @@
|
|||
|
||||
var marcadorEquipamento = L.marker([0, 0], {
|
||||
icon: customIcon
|
||||
}).addTo(map_21ca758b860567b95d146fc0853c971f);
|
||||
}).addTo(map_dc4d0222f44d72615f99a25deb4f0c22);
|
||||
|
||||
var marcadorBase = L.marker([0, 0], {}).addTo(map_21ca758b860567b95d146fc0853c971f);
|
||||
var marcadorBase = L.marker([0, 0], {}).addTo(map_dc4d0222f44d72615f99a25deb4f0c22);
|
||||
var icon = L.AwesomeMarkers.icon(
|
||||
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
|
||||
);
|
||||
|
|
@ -380,7 +380,7 @@
|
|||
}
|
||||
|
||||
if (foco) {
|
||||
map_21ca758b860567b95d146fc0853c971f.setView(novaPosicao, map_21ca758b860567b95d146fc0853c971f.getZoom());
|
||||
map_dc4d0222f44d72615f99a25deb4f0c22.setView(novaPosicao, map_dc4d0222f44d72615f99a25deb4f0c22.getZoom());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -397,7 +397,7 @@
|
|||
function atualizarSelecaoRuas(selecionadas) {
|
||||
selecionadas = JSON.parse(selecionadas);
|
||||
RuasSelecionadas = Array.isArray(selecionadas) ? [...selecionadas] : [];
|
||||
geo_json_40d1c4f07ee5691fa37b3e9a1cd24536.eachLayer(function (layer) {
|
||||
geo_json_eaefb25f8a45d088b6e3c45831e86479.eachLayer(function (layer) {
|
||||
if (RuasSelecionadas.includes(parseInt(layer.feature.id))) {
|
||||
layer.setStyle({ color: 'blue' });
|
||||
} else {
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -207,7 +207,7 @@ class ModuloAtuador(ModuloDiagnosticoBase):
|
|||
penalidade_percentual_herbicida = 0
|
||||
if sensor_massa_ativado:
|
||||
percent_min = ContextoGlobalRedis.get_equipamento().get("percentual_reservatorio_min", 5.0)
|
||||
percent_atual = ContextoGlobalRedis.get_contexto().get("Gerais", {}).get("percentual_reservatorio", 0.0)
|
||||
percent_atual = round(ContextoGlobalRedis.get_contexto().get("Gerais", {}).get("percentual_reservatorio", 0.0), 2)
|
||||
if percent_atual < percent_min:
|
||||
penalidade_percentual_herbicida = 50
|
||||
cond_op_mod.append({
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ class ModuloGPS(ModuloDiagnosticoBase):
|
|||
|
||||
def atualizar_saude(self):
|
||||
try:
|
||||
now = time.perf_counter()
|
||||
modulo = ContextoGlobalRedis.get_modulo(self.t_code)
|
||||
FREQ_BASE = modulo.get("freq_base", 1)
|
||||
FREQ_MIN = FREQ_BASE * 0.2
|
||||
|
|
@ -20,6 +21,10 @@ class ModuloGPS(ModuloDiagnosticoBase):
|
|||
conectado = modulo.get("conectado", False)
|
||||
freq_pos = modulo.get("freq", {}).get("posicao", 0.0)
|
||||
freq_ori = modulo.get("freq", {}).get("orientacao", 0.0)
|
||||
ts_pos = modulo.get("timestamp", {}).get("posicao", 0.0)
|
||||
ts_ori = modulo.get("timestamp", {}).get("orientacao", 0.0)
|
||||
fail_pos = (now - ts_pos) > 2.0
|
||||
fail_ori = (now - ts_ori) > 2.0
|
||||
fix = modulo.get("fix", 0)
|
||||
rtk = modulo.get("rtk", False)
|
||||
hAcc = modulo.get("hAcc", 0)
|
||||
|
|
@ -29,13 +34,13 @@ class ModuloGPS(ModuloDiagnosticoBase):
|
|||
saude = 100
|
||||
motivos = []
|
||||
|
||||
if not conectado:
|
||||
motivos.append("GPS desconectado")
|
||||
if not conectado or fail_pos or fail_ori:
|
||||
motivos.append("desconectado")
|
||||
saude = 0
|
||||
elif freq_pos <= FREQ_MIN:
|
||||
elif freq_pos <= FREQ_MIN or fail_pos:
|
||||
motivos.append("Sem resposta de coordenadas")
|
||||
saude = 0
|
||||
elif freq_ori <= FREQ_MIN:
|
||||
elif freq_ori <= FREQ_MIN or fail_ori:
|
||||
motivos.append("Sem resposta de orientacao")
|
||||
saude = 0
|
||||
else:
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -102,7 +102,7 @@ def definir_comando(pid: PIDAdaptativo, envio_necessario: bool):
|
|||
},
|
||||
"RegrasAtivas": {
|
||||
"matriz_custo": False,
|
||||
"deteccao_obstaculos": False,
|
||||
"deteccao_obstaculos": True,
|
||||
},
|
||||
"Equipamento": {
|
||||
"largura": _equipamento.get("largura", 0.85),
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -220,9 +220,9 @@ class ContextoGlobalRedis:
|
|||
conectado = _saude.get("conectado", False)
|
||||
status = _saude.get("status", (StatusModulo.FALHA.value if conectado else StatusModulo.DESCONECTADO.value))
|
||||
saude = _saude.get("saude", 0.0)
|
||||
motivos = _saude.get("motivos", []) or ["Modulo desconectado"]
|
||||
saude_individual = _saude.get("saude_individual") or []
|
||||
condicoes_operacionais = _saude.get("condicoes_operacionais") or []
|
||||
motivos = _saude.get("motivos", [])
|
||||
saude_individual = _saude.get("saude_individual", [])
|
||||
condicoes_operacionais = _saude.get("condicoes_operacionais", [])
|
||||
|
||||
tem_condicao_critica = any(cond.get("severidade") == 100 for cond in condicoes_operacionais)
|
||||
mod_mandatorio = t_code.value in modulos_mandatorios
|
||||
|
|
@ -251,7 +251,7 @@ class ContextoGlobalRedis:
|
|||
})
|
||||
|
||||
# 🔹 Apenas registrar motivo se for módulo obrigatório e estiver ruim
|
||||
if mod_mandatorio and status != StatusModulo.OPERANTE.value:
|
||||
if mod_mandatorio and status not in [StatusModulo.OPERANTE.value, StatusModulo.ALERTA.value]:
|
||||
motivo_txt = "Desconectado" if status == StatusModulo.DESCONECTADO.value else "; ".join(motivos)
|
||||
motivos_dos_modulos_mandatorios.append(f"{t_code.name}: {motivo_txt}")
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -74,7 +74,7 @@ def load_seg_config(force_reload=False):
|
|||
# "kernel_morf": 3
|
||||
# }
|
||||
_CONFIG_CACHE = {
|
||||
"debug_visual": True,
|
||||
"debug_visual": False,
|
||||
"frames_consecutivos": 3,
|
||||
"frames_histerese": 2,
|
||||
"min_area_px": 400,
|
||||
|
|
@ -95,6 +95,18 @@ def load_seg_config(force_reload=False):
|
|||
"kernel_morf": 3,
|
||||
"seg_every_n": 1,
|
||||
"det_every_n": 0,
|
||||
|
||||
"usar_radar_global_gate": True,
|
||||
"min_frac_erva_por_bico_on": 0.03,
|
||||
"min_frac_erva_por_bico_off": 0.015,
|
||||
"max_frac_cana_por_bico": 0.005,
|
||||
"ema_frac_bico": 0.35,
|
||||
"on_frames_required": 5,
|
||||
"off_frames_required": 3,
|
||||
"cana_halo_px": 8,
|
||||
"min_area_erva_px": 120,
|
||||
"erva_thresh_vel_gain_local": 0.6,
|
||||
"k_roi_shift_px_per_vnorm": 24.0
|
||||
}
|
||||
dadosAtu = ContextoGlobalRedis.get_operacao().get("Atu", {})
|
||||
contexto = ContextoGlobalRedis.get_contexto()
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class WeedDetector:
|
|||
self.predictions = None
|
||||
self.dados_visuais = {}
|
||||
self._dbg_img_shape = (640, 360)
|
||||
self._mostrar_debug = False
|
||||
self._mostrar_debug = True
|
||||
|
||||
self._dbg_last_ts = None
|
||||
self._dbg_fps_ema = None # fps do "ciclo de debug" (pós-segmentação)
|
||||
|
|
|
|||
Loading…
Reference in New Issue