ajustes de movimento e orientacao GPS
This commit is contained in:
parent
63058b5abf
commit
77bca754c5
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -7,8 +7,24 @@
|
|||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\models\\generaljoystick.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|c:\\zendioninc\\agrobot_base\\agrobase\\agrobase\\models\\modules\\movimentacaounificadomodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\models\\modules\\movimentacaounificadomodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|C:\\ZendionINC\\agrobot_base\\AgroBase\\agrobase\\forms\\operacoes\\frmresultadosoperacao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\forms\\operacoes\\frmresultadosoperacao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|c:\\zendioninc\\agrobot_base\\agrobase\\agrobase\\models\\operacoes\\operacaomodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\models\\operacoes\\operacaomodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|C:\\ZendionINC\\agrobot_base\\AgroBase\\agrobase\\models\\modules\\sensoriamentomodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\models\\modules\\sensoriamentomodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|C:\\ZendionINC\\agrobot_base\\AgroBase\\agrobase\\services\\gpsservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\services\\gpsservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|C:\\ZendionINC\\agrobot_base\\AgroBase\\agrobase\\forms\\operacoes\\frmresultadosoperacao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\forms\\operacoes\\frmresultadosoperacao.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form"
|
||||
},
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|C:\\ZendionINC\\agrobot_base\\AgroBase\\agrobase\\forms\\frmacompanhamento.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
|
|
@ -26,21 +42,71 @@
|
|||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 1,
|
||||
"SelectedChildIndex": 5,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "MovimentacaoUnificadoModel.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\Modules\\MovimentacaoUnificadoModel.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Models\\Modules\\MovimentacaoUnificadoModel.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\Modules\\MovimentacaoUnificadoModel.cs",
|
||||
"RelativeToolTip": "AgroBase\\Models\\Modules\\MovimentacaoUnificadoModel.cs",
|
||||
"ViewState": "AQIAAF4CAAAAAAAAAAAhwBEEAAAuAAAA",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "OperacaoModel.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\Operacoes\\OperacaoModel.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Models\\Operacoes\\OperacaoModel.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\Operacoes\\OperacaoModel.cs",
|
||||
"RelativeToolTip": "AgroBase\\Models\\Operacoes\\OperacaoModel.cs",
|
||||
"ViewState": "AQIAADIHAAAAAAAAAAAYwJUHAABOAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-03-05T18:33:00.132Z",
|
||||
"WhenOpened": "2025-03-06T18:31:30.684Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "SensoriamentoModel.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\Modules\\SensoriamentoModel.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Models\\Modules\\SensoriamentoModel.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\Modules\\SensoriamentoModel.cs",
|
||||
"RelativeToolTip": "AgroBase\\Models\\Modules\\SensoriamentoModel.cs",
|
||||
"ViewState": "AQIAAL0FAAAAAAAAAIAwwLwGAAAsAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-03-06T16:33:21.903Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 4,
|
||||
"Title": "GPSService.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Services\\GPSService.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Services\\GPSService.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Services\\GPSService.cs",
|
||||
"RelativeToolTip": "AgroBase\\Services\\GPSService.cs",
|
||||
"ViewState": "AQIAACUAAAAAAAAAAAAQwAQCAAA0AAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-03-06T13:56:51.47Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "frmResultadosOperacao.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Operacoes\\frmResultadosOperacao.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Forms\\Operacoes\\frmResultadosOperacao.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Operacoes\\frmResultadosOperacao.cs",
|
||||
"RelativeToolTip": "AgroBase\\Forms\\Operacoes\\frmResultadosOperacao.cs",
|
||||
"ViewState": "AQIAAFsAAAAAAAAAAAAvwIcAAAAQAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-03-06T13:52:29.394Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 5,
|
||||
"Title": "frmResultadosOperacao.cs [Design]",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Operacoes\\frmResultadosOperacao.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Forms\\Operacoes\\frmResultadosOperacao.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\Operacoes\\frmResultadosOperacao.cs [Design]",
|
||||
"RelativeToolTip": "AgroBase\\Forms\\Operacoes\\frmResultadosOperacao.cs [Design]",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-03-06T13:52:27.605Z",
|
||||
"EditorCaption": " [Design]"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
|
|
@ -49,14 +115,14 @@
|
|||
"RelativeDocumentMoniker": "AgroBase\\Models\\GeneralJoystick.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\GeneralJoystick.cs",
|
||||
"RelativeToolTip": "AgroBase\\Models\\GeneralJoystick.cs",
|
||||
"ViewState": "AQIAAFYCAAAAAAAAAAASwHgCAABgAAAA",
|
||||
"ViewState": "AQIAAFYCAAAAAAAAAAASwHgCAABMAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-03-05T16:35:13.298Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 3,
|
||||
"DocumentIndex": 7,
|
||||
"Title": "MKS057DService.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Services\\MKS057DService.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Services\\MKS057DService.cs",
|
||||
|
|
@ -64,12 +130,11 @@
|
|||
"RelativeToolTip": "AgroBase\\Services\\MKS057DService.cs",
|
||||
"ViewState": "AQIAAOwBAAAAAAAAAAAlwBkCAAANAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-03-05T13:29:23.053Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2025-03-05T13:29:23.053Z"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"DocumentIndex": 6,
|
||||
"Title": "frmAcompanhamento.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\frmAcompanhamento.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Forms\\frmAcompanhamento.cs",
|
||||
|
|
@ -77,8 +142,7 @@
|
|||
"RelativeToolTip": "AgroBase\\Forms\\frmAcompanhamento.cs",
|
||||
"ViewState": "AQIAAAwAAAAAAAAAAAAAAG8AAABfAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2025-03-05T13:10:45.219Z",
|
||||
"EditorCaption": ""
|
||||
"WhenOpened": "2025-03-05T13:10:45.219Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,7 +195,8 @@ namespace AgroBase.Forms.Operacoes
|
|||
new GraficoInterativoSerieModel()
|
||||
{
|
||||
Titulo = "RPM SP",
|
||||
Valores = LogsMovimentacao.GroupBy(x => new {ID = x.Modulo_ID, Momento = x.Momento}).Select(x => x.Average(y => y.RPM_SP)).ToList(),
|
||||
//Valores = LogsMovimentacao.GroupBy(x => new {ID = x.Modulo_ID, Momento = x.Momento}).Select(x => x.Average(y => y.RPM_SP)).ToList(),
|
||||
Valores = LogsOperacao.Select(x => (double)x.Controle.RPM_SP).ToList(),
|
||||
Visivel = true,
|
||||
MostrarValor = true
|
||||
},
|
||||
|
|
@ -214,6 +215,13 @@ namespace AgroBase.Forms.Operacoes
|
|||
MostrarValor = true
|
||||
},
|
||||
new GraficoInterativoSerieModel()
|
||||
{
|
||||
Titulo = "EF SP",
|
||||
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "EF").Select(x => x.RPM_SP).ToList(),
|
||||
Visivel = false,
|
||||
MostrarValor = true
|
||||
},
|
||||
new GraficoInterativoSerieModel()
|
||||
{
|
||||
Titulo = "ET Roda",
|
||||
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "ET").Select(x => x.RPM_Roda).ToList(),
|
||||
|
|
@ -228,6 +236,13 @@ namespace AgroBase.Forms.Operacoes
|
|||
MostrarValor = true
|
||||
},
|
||||
new GraficoInterativoSerieModel()
|
||||
{
|
||||
Titulo = "ET SP",
|
||||
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "ET").Select(x => x.RPM_SP).ToList(),
|
||||
Visivel = false,
|
||||
MostrarValor = true
|
||||
},
|
||||
new GraficoInterativoSerieModel()
|
||||
{
|
||||
Titulo = "DT Roda",
|
||||
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DT").Select(x => x.RPM_Roda).ToList(),
|
||||
|
|
@ -242,6 +257,13 @@ namespace AgroBase.Forms.Operacoes
|
|||
MostrarValor = true
|
||||
},
|
||||
new GraficoInterativoSerieModel()
|
||||
{
|
||||
Titulo = "DT SP",
|
||||
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DT").Select(x => x.RPM_SP).ToList(),
|
||||
Visivel = false,
|
||||
MostrarValor = true
|
||||
},
|
||||
new GraficoInterativoSerieModel()
|
||||
{
|
||||
Titulo = "DF Roda",
|
||||
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DF").Select(x => x.RPM_Roda).ToList(),
|
||||
|
|
@ -255,6 +277,13 @@ namespace AgroBase.Forms.Operacoes
|
|||
Visivel = false,
|
||||
MostrarValor = true
|
||||
},
|
||||
new GraficoInterativoSerieModel()
|
||||
{
|
||||
Titulo = "DF SP",
|
||||
Valores = LogsMovimentacao.Where(x => x.Modulo_ID == "DF").Select(x => x.RPM_SP).ToList(),
|
||||
Visivel = false,
|
||||
MostrarValor = true
|
||||
},
|
||||
});
|
||||
|
||||
graficoMovTemperatura = new GraficoInterativoModel(chartMovTemperatura, Momentos, new List<GraficoInterativoSerieModel>()
|
||||
|
|
@ -853,7 +882,11 @@ namespace AgroBase.Forms.Operacoes
|
|||
private string DeserializarDadosOperacao(string caminho, string arquivo)
|
||||
{
|
||||
string opPath = caminho.Replace("data.lgop", arquivo) + ".json";
|
||||
string opStr = File.ReadAllText(opPath) + "]";
|
||||
string opStr = File.ReadAllText(opPath);
|
||||
if (!opStr.EndsWith("]"))
|
||||
{
|
||||
opStr += "]";
|
||||
}
|
||||
return opStr;
|
||||
}
|
||||
|
||||
|
|
@ -1071,12 +1104,10 @@ namespace AgroBase.Forms.Operacoes
|
|||
//var LogKnt = LogsKinect.FirstOrDefault(x => x.Momento == MomentoAtual);
|
||||
var LogOpe = LogsOperacao.FirstOrDefault(x => x.Momento == MomentoAtual);
|
||||
|
||||
double AnguloCarro = (LogsWt901C.FirstOrDefault(x => x.Momento == MomentoAtual)?.Inicializado ?? false ? LogOpe.WitMotion.AnguloCorrigido : LogOpe.Gps.OrientacaoReal);
|
||||
|
||||
MapaDinamico.AtualizarDados(
|
||||
null, //LogKnt.Iniciado && LogKnt.StatusDetecao ? LogKnt.ObstaculoCritico : null,
|
||||
(float)LogOpe.Trajetoria.AnguloCaminho,
|
||||
(float)AnguloCarro,
|
||||
(float)LogOpe.Gps.AnguloCarroDefinido,
|
||||
new GPSModel() { Latitude = Log.Latitude, Longitude = Log.Longitude },
|
||||
LogsGPS,
|
||||
null, //Variaveis.OperacaoEmAndamento.Mapa.TrajetoriaProjetada.FirstOrDefault(),
|
||||
|
|
@ -1102,13 +1133,18 @@ namespace AgroBase.Forms.Operacoes
|
|||
var SensorPot = LogSen?.SensoresPotenciometro?.FirstOrDefault(x => x.ID.Contains(ID));
|
||||
|
||||
double Angulo = Log?.Angulo ?? 0;
|
||||
double Multiplicador = 1;
|
||||
double Multiplicador = -1;
|
||||
Image img = Resources.roda_superior;
|
||||
if (ID.StartsWith("D"))
|
||||
if (ID.StartsWith("E"))
|
||||
{
|
||||
img = FuncoesGlobais.EspelharImagemHorizontalmente(img);
|
||||
Multiplicador = -1;
|
||||
//Multiplicador = -1;
|
||||
}
|
||||
if (ID == "EF" || ID == "DT")
|
||||
{
|
||||
Multiplicador = 1;
|
||||
}
|
||||
//Multiplicador = (Log?.Sentido_SP ?? Enums.Sentido.Parado) == Enums.Sentido.Antihorario ? -1 : 1;
|
||||
|
||||
PictureBox pic = FuncoesGlobais.FindControlRecursive<PictureBox>(tabDirecional, "picDIR_" + ID);
|
||||
pic.Image = FuncoesGlobais.RotacionarImagem(img, Angulo * Multiplicador);
|
||||
|
|
@ -1380,7 +1416,12 @@ namespace AgroBase.Forms.Operacoes
|
|||
private void pnlOrientacaoDirecional_Paint(object sender, PaintEventArgs e)
|
||||
{
|
||||
var LogOp = LogsOperacao.FirstOrDefault(x => x.Momento == MomentoAtual);
|
||||
double Angulo = LogOp != null ? (LogOp.Controle?.Angulo ?? 0) : 0;
|
||||
double Angulo = LogOp?.Controle?.Angulo ?? 0;
|
||||
Enums.Direcao direcaoControle = (LogOp?.Controle.TiposControle?.FirstOrDefault(x => x.Tipo == Enums.T_Code.Dir).UltimaDirecao ?? Enums.Direcao.Parado);
|
||||
Angulo *=
|
||||
direcaoControle == Enums.Direcao.Esquerda ? -1 :
|
||||
direcaoControle == Enums.Direcao.Direita ? 1 :
|
||||
0;
|
||||
FuncoesGlobais.DesenharInclinacao((Panel)sender, e, (float)Angulo, 90);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -544,7 +544,7 @@
|
|||
this.txtLongitude.Name = "txtLongitude";
|
||||
this.txtLongitude.Size = new System.Drawing.Size(135, 20);
|
||||
this.txtLongitude.TabIndex = 15;
|
||||
this.txtLongitude.Text = "-47,3721381666667";
|
||||
this.txtLongitude.Text = "-47,3952849455";
|
||||
this.txtLongitude.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// txtLatitude
|
||||
|
|
@ -554,7 +554,7 @@
|
|||
this.txtLatitude.Name = "txtLatitude";
|
||||
this.txtLatitude.Size = new System.Drawing.Size(135, 20);
|
||||
this.txtLatitude.TabIndex = 14;
|
||||
this.txtLatitude.Text = "-22,1789853333333";
|
||||
this.txtLatitude.Text = "-22,1721529805";
|
||||
this.txtLatitude.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// btnIniciarGPS
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using AgroBase.Services;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using static AgroBase.Models.Enums;
|
||||
|
|
@ -336,9 +337,10 @@ namespace AgroBase.Models.Modules
|
|||
|
||||
if (Modulo.DirMotor.SensorAnguloAuxiliar != null && Modulo.DirMotor.SensorAnguloAuxiliar.LimiteExcedido)
|
||||
{
|
||||
if (Modulo.DirMotor.SensorAnguloAuxiliar.ReleControle != null)
|
||||
var ReleControle = Variaveis.OperacaoEmAndamento.DispSen?.Dados?.Reles?.FirstOrDefault(x => x.ID.Contains(Modulo.DirMotor.SensorAnguloAuxiliar.ID));
|
||||
if (ReleControle != null)
|
||||
{
|
||||
GeneralJoystick.EnviarComandoSensoriamento(S_Code.sRLE, Modulo.DirMotor.SensorAnguloAuxiliar.ReleControle.ID, Estado.Desligado);
|
||||
GeneralJoystick.EnviarComandoSensoriamento(S_Code.sRLE, ReleControle.ID, Estado.Desligado);
|
||||
await Task.Delay(2000);
|
||||
}
|
||||
var _sentido = Modulo.DirMotor.SensorAnguloAuxiliar?.Sentido ?? Sentido.Parado;
|
||||
|
|
@ -765,12 +767,14 @@ namespace AgroBase.Models.Modules
|
|||
var _ControleDir = _Controle.TiposControle.FirstOrDefault(x => x.Tipo == T_Code.Dir);
|
||||
|
||||
bool movimentoCompensado =
|
||||
_Controle.TipoMovimento == TipoMovimentoDirecional.MovimentoArco ||
|
||||
_Controle.TipoMovimento == TipoMovimentoDirecional.RodasDianteiras ||
|
||||
_Controle.TipoMovimento == TipoMovimentoDirecional.RodasTraseiras;
|
||||
(_Controle.TipoMovimento == TipoMovimentoDirecional.MovimentoArco) ||
|
||||
(_Controle.TipoMovimento == TipoMovimentoDirecional.RodasDianteiras && Mod_ID.Contains("F")) ||
|
||||
(_Controle.TipoMovimento == TipoMovimentoDirecional.RodasTraseiras && Mod_ID.Contains("T"));
|
||||
bool emCurva = _ControleDir.UltimaDirecao != Direcao.Parado;
|
||||
double anguloDir = Variaveis.OperacaoEmAndamento.DispMvd?.Dados?.Modulos?.FirstOrDefault(x => x.Modulo_ID == Mod_ID)?.DirMotor?.Angulo_SP ?? 0;
|
||||
bool direcionalAtuado = anguloDir != 0;
|
||||
|
||||
if (movimentoCompensado && emCurva)
|
||||
if (movimentoCompensado && emCurva && direcionalAtuado)
|
||||
{
|
||||
if (
|
||||
(_ControleDir.UltimaDirecao == Direcao.Esquerda && Mod_ID.Contains("E")) ||
|
||||
|
|
@ -786,6 +790,22 @@ namespace AgroBase.Models.Modules
|
|||
}
|
||||
}
|
||||
|
||||
private float FatorCompensacaoCurvas
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CompensacaoNecessaria)
|
||||
{
|
||||
double compensacao = 1 - FuncoesMatematicas.Map(Math.Abs(Variaveis.OperacaoEmAndamento.Controle.Angulo), 0.0, 45.0, 0.0, 0.7);
|
||||
return (float)compensacao;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Dictionary<TipoMovimentoDirecional,ConfiguracaoSentidoMotor> ConfigSentidos { get; set; }
|
||||
public List<FuncoesPinout> Funcoes { get; set; }
|
||||
|
|
@ -957,7 +977,7 @@ namespace AgroBase.Models.Modules
|
|||
|
||||
ComandoLigado = RPM_SP > 0;
|
||||
|
||||
RPM_SP = Convert.ToInt32(RPM_SP * FatorCompensacaoCurvas());
|
||||
RPM_SP = Convert.ToInt32(RPM_SP * FatorCompensacaoCurvas);
|
||||
|
||||
Variaveis.OperacaoEmAndamento.SimulacaoRpmControle = (RPM_SP / VariaveisEquipamento.RelacaoRPM);
|
||||
|
||||
|
|
@ -1039,20 +1059,6 @@ namespace AgroBase.Models.Modules
|
|||
}
|
||||
}
|
||||
|
||||
private float FatorCompensacaoCurvas()
|
||||
{
|
||||
if (CompensacaoNecessaria)
|
||||
{
|
||||
double compensacao = 1 - FuncoesMatematicas.Map(Variaveis.OperacaoEmAndamento.Controle.Angulo, 0.0, 45.0, 0.0, 0.7);
|
||||
return (float)compensacao;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1409,6 +1415,7 @@ namespace AgroBase.Models.Modules
|
|||
if (SensorAnguloAuxiliar != null && SensorAnguloAuxiliar.Sentido != Sentido.Parado)
|
||||
{
|
||||
_sentido = SensorAnguloAuxiliar.Sentido == Sentido.Horario ? Sentido.Antihorario : Sentido.Horario;
|
||||
_angulo *= _sentido == Sentido.Antihorario ? -1 : 1;
|
||||
}
|
||||
|
||||
if (!Sucesso)
|
||||
|
|
@ -1469,7 +1476,7 @@ namespace AgroBase.Models.Modules
|
|||
if (_anguloEntrada == 9999)
|
||||
{
|
||||
inverterGiro = (_angulo > 0 && Angulo >= (_angulo - 0.5)) || (_angulo < 0 && Angulo <= (_angulo + 0.5));
|
||||
if (!inverterGiro && SensorAnguloAuxiliar != null && false)
|
||||
if (!inverterGiro && SensorAnguloAuxiliar != null)
|
||||
{
|
||||
if (SensorAnguloAuxiliar.Angulo < (SensorAnguloAuxiliar.LimiteMinimo / 2.0) || SensorAnguloAuxiliar.Angulo > (SensorAnguloAuxiliar.LimiteMaximo / 2.0))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1382,22 +1382,7 @@ namespace AgroBase.Models.Modules
|
|||
public class FirmwareSensorTemperatura
|
||||
{
|
||||
public string ID { get; set; }
|
||||
private bool _iniciado = false;
|
||||
public bool Iniciado
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Variaveis.OperacaoEmAndamento.DispSen.Dados.DadosLeitura.Momento.AddMilliseconds(SensoriamentoModel.TempoLimiteConexao) < DateTime.Now)
|
||||
{
|
||||
_iniciado = false;
|
||||
}
|
||||
return _iniciado;
|
||||
}
|
||||
set
|
||||
{
|
||||
_iniciado = value;
|
||||
}
|
||||
}
|
||||
public bool Iniciado { get; set; }
|
||||
private double _leitura;
|
||||
public double Leitura
|
||||
{
|
||||
|
|
@ -1485,22 +1470,7 @@ namespace AgroBase.Models.Modules
|
|||
public class FirmwareSensorCorrente
|
||||
{
|
||||
public string ID { get; set; }
|
||||
private bool _iniciado = false;
|
||||
public bool Iniciado
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Variaveis.OperacaoEmAndamento.DispSen.Dados.DadosLeitura.Momento.AddMilliseconds(SensoriamentoModel.TempoLimiteConexao) < DateTime.Now)
|
||||
{
|
||||
_iniciado = false;
|
||||
}
|
||||
return _iniciado;
|
||||
}
|
||||
set
|
||||
{
|
||||
_iniciado = value;
|
||||
}
|
||||
}
|
||||
public bool Iniciado { get; set; }
|
||||
public double BusVoltage { get; set; }
|
||||
public double ShuntVoltage { get; set; }
|
||||
public double? Current
|
||||
|
|
@ -1563,22 +1533,7 @@ namespace AgroBase.Models.Modules
|
|||
public class FirmwareSinaleiro
|
||||
{
|
||||
public string ID { get; set; }
|
||||
private bool _iniciado = false;
|
||||
public bool Iniciado
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Variaveis.OperacaoEmAndamento.DispSen.Dados.DadosLeitura.Momento.AddMilliseconds(SensoriamentoModel.TempoLimiteConexao) < DateTime.Now)
|
||||
{
|
||||
_iniciado = false;
|
||||
}
|
||||
return _iniciado;
|
||||
}
|
||||
set
|
||||
{
|
||||
_iniciado = value;
|
||||
}
|
||||
}
|
||||
public bool Iniciado { get; set; }
|
||||
public StatusLED Leitura { get; set; }
|
||||
public StatusLED Comando { get; set; }
|
||||
}
|
||||
|
|
@ -1586,66 +1541,21 @@ namespace AgroBase.Models.Modules
|
|||
public class FirmwareRele
|
||||
{
|
||||
public string ID { get; set; }
|
||||
private bool _iniciado = false;
|
||||
public bool Iniciado
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Variaveis.OperacaoEmAndamento.DispSen.Dados.DadosLeitura.Momento.AddMilliseconds(SensoriamentoModel.TempoLimiteConexao) < DateTime.Now)
|
||||
{
|
||||
_iniciado = false;
|
||||
}
|
||||
return _iniciado;
|
||||
}
|
||||
set
|
||||
{
|
||||
_iniciado = value;
|
||||
}
|
||||
}
|
||||
public bool Iniciado { get; set; }
|
||||
public Estado Leitura { get; set; }
|
||||
}
|
||||
|
||||
public class FirmwareServoFreio
|
||||
{
|
||||
public string ID { get; set; }
|
||||
private bool _iniciado = false;
|
||||
public bool Iniciado
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Variaveis.OperacaoEmAndamento.DispSen.Dados.DadosLeitura.Momento.AddMilliseconds(SensoriamentoModel.TempoLimiteConexao) < DateTime.Now)
|
||||
{
|
||||
_iniciado = false;
|
||||
}
|
||||
return _iniciado;
|
||||
}
|
||||
set
|
||||
{
|
||||
_iniciado = value;
|
||||
}
|
||||
}
|
||||
public bool Iniciado { get; set; }
|
||||
public int Angulo { get; set; }
|
||||
}
|
||||
|
||||
public class FirmwareSensorFluxo
|
||||
{
|
||||
public string ID { get; set; }
|
||||
private bool _iniciado = false;
|
||||
public bool Iniciado
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Variaveis.OperacaoEmAndamento.DispAtu.Dados.DadosLeitura.Momento.AddMilliseconds(SensoriamentoModel.TempoLimiteConexao) < DateTime.Now)
|
||||
{
|
||||
_iniciado = false;
|
||||
}
|
||||
return _iniciado;
|
||||
}
|
||||
set
|
||||
{
|
||||
_iniciado = value;
|
||||
}
|
||||
}
|
||||
public bool Iniciado { get; set; }
|
||||
public int Pulsos { get; set; }
|
||||
private int _periodo;
|
||||
public int Periodo
|
||||
|
|
@ -1736,22 +1646,7 @@ namespace AgroBase.Models.Modules
|
|||
public class FirmwareSensorMassa
|
||||
{
|
||||
public string ID { get; set; }
|
||||
private bool _iniciado = false;
|
||||
public bool Iniciado
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Variaveis.OperacaoEmAndamento.DispAtu.Dados.DadosLeitura.Momento.AddMilliseconds(SensoriamentoModel.TempoLimiteConexao) < DateTime.Now)
|
||||
{
|
||||
_iniciado = false;
|
||||
}
|
||||
return _iniciado;
|
||||
}
|
||||
set
|
||||
{
|
||||
_iniciado = value;
|
||||
}
|
||||
}
|
||||
public bool Iniciado { get; set; }
|
||||
private double _leitura;
|
||||
public double Leitura
|
||||
{
|
||||
|
|
@ -1822,22 +1717,7 @@ namespace AgroBase.Models.Modules
|
|||
public class FirmwareSensorPressao
|
||||
{
|
||||
public string ID { get; set; }
|
||||
private bool _iniciado = false;
|
||||
public bool Iniciado
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Variaveis.OperacaoEmAndamento.DispAtu.Dados.DadosLeitura.Momento.AddMilliseconds(SensoriamentoModel.TempoLimiteConexao) < DateTime.Now)
|
||||
{
|
||||
_iniciado = false;
|
||||
}
|
||||
return _iniciado;
|
||||
}
|
||||
set
|
||||
{
|
||||
_iniciado = value;
|
||||
}
|
||||
}
|
||||
public bool Iniciado { get; set; }
|
||||
public double Leitura { get; set; }
|
||||
public double Pressao { get; set; }
|
||||
}
|
||||
|
|
@ -1845,22 +1725,7 @@ namespace AgroBase.Models.Modules
|
|||
public class FirmwareSensorPotenciometro
|
||||
{
|
||||
public string ID { get; set; }
|
||||
private bool _iniciado = false;
|
||||
public bool Iniciado
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Variaveis.OperacaoEmAndamento.DispSen.Dados.DadosLeitura.Momento.AddMilliseconds(SensoriamentoModel.TempoLimiteConexao) < DateTime.Now)
|
||||
{
|
||||
_iniciado = false;
|
||||
}
|
||||
return _iniciado;
|
||||
}
|
||||
set
|
||||
{
|
||||
_iniciado = value;
|
||||
}
|
||||
}
|
||||
public bool Iniciado { get; set; }
|
||||
public int Leitura { get; set; }
|
||||
public double Angulo { get; set; }
|
||||
public Sentido Sentido { get; set; }
|
||||
|
|
@ -1931,16 +1796,6 @@ namespace AgroBase.Models.Modules
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public SensorReleModel ReleControle
|
||||
{
|
||||
get
|
||||
{
|
||||
var rele = Variaveis.OperacaoEmAndamento.DispSen?.Dados?.Reles?.FirstOrDefault(x => x.ID.Contains(ID));
|
||||
return rele;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -565,6 +565,9 @@ namespace AgroBase.Services
|
|||
byte EnderecoBase = Variaveis.OperacaoEmAndamento.DispSen.Dados.LoRaParametrosBase.address;
|
||||
EnviarCoordenadasParaMapa(VariaveisOperacao.PosicaoBase.Latitude, VariaveisOperacao.PosicaoBase.Longitude, VariaveisOperacao.PosicaoBase.OrientacaoReal, false, EnderecoBase);
|
||||
}
|
||||
|
||||
PenultimaLeitura.Inicializado = UltimaLeitura.Inicializado;
|
||||
UltimaLeitura.Inicializado = Iniciado;
|
||||
}
|
||||
|
||||
public static void EnviarCoordenadasParaMapa(double Latitude, double Longitude, double Orientacao, bool EmFoco, int ID)
|
||||
|
|
@ -688,7 +691,7 @@ namespace AgroBase.Services
|
|||
|
||||
WT901CService.DadosLeitura.AtualizarOffset(UltimaLeitura);
|
||||
|
||||
if (witIniciado && gpsIniciado)
|
||||
/*if (witIniciado && gpsIniciado)
|
||||
{
|
||||
// Obtém os ângulos de ambos os sensores
|
||||
double anguloWT901C = WT901CService.DadosLeitura.AnguloCorrigido;
|
||||
|
|
@ -713,6 +716,21 @@ namespace AgroBase.Services
|
|||
anguloFinal = CalcularAnguloUnificado(anguloGPS, UltimaLeitura.QualidadeFix, anguloGPSMovimento, distAnguloGPS);
|
||||
}
|
||||
else
|
||||
{
|
||||
anguloFinal = UltimaLeitura.OrientacaoMovimento;
|
||||
}*/
|
||||
|
||||
if (gpsIniciado)
|
||||
{
|
||||
// O GPS está disponível
|
||||
anguloFinal = UltimaLeitura.OrientacaoReal;
|
||||
}
|
||||
else if (witIniciado)
|
||||
{
|
||||
// Apenas o WT901C está disponível
|
||||
anguloFinal = WT901CService.DadosLeitura.AnguloCorrigido;
|
||||
}
|
||||
else
|
||||
{
|
||||
anguloFinal = UltimaLeitura.OrientacaoMovimento;
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -313,3 +313,5 @@
|
|||
19/02/2025 16:02:07:001 - Porta COM - 0: Erro ao processar fila de comandos. Erro=The port is closed.
|
||||
19/02/2025 16:05:23:105 - Porta COM77 - 0: Erro ao processar fila de comandos. Erro=The port is closed.
|
||||
05/03/2025 15:45:57:518 - Porta COM28 - 0: Erro ao processar fila de comandos. Erro=A porta está fechada.
|
||||
06/03/2025 14:24:18:717 - Porta COM28 - 0: Erro ao processar fila de comandos. Erro=A operação de E/S foi anulada devido a uma saída de thread ou a uma requisição de aplicativo.
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
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
File diff suppressed because one or more lines are too long
|
|
@ -25,7 +25,7 @@
|
|||
<meta name="viewport" content="width=device-width,
|
||||
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<style>
|
||||
#map_621b62163f2ccafd05c33f58249e3800 {
|
||||
#map_51dfa2a0ed79fead08325c35381c29cb {
|
||||
position: relative;
|
||||
width: 100.0%;
|
||||
height: 100.0%;
|
||||
|
|
@ -39,14 +39,14 @@
|
|||
<body>
|
||||
|
||||
|
||||
<div class="folium-map" id="map_621b62163f2ccafd05c33f58249e3800" ></div>
|
||||
<div class="folium-map" id="map_51dfa2a0ed79fead08325c35381c29cb" ></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
|
||||
|
||||
var map_621b62163f2ccafd05c33f58249e3800 = L.map(
|
||||
"map_621b62163f2ccafd05c33f58249e3800",
|
||||
var map_51dfa2a0ed79fead08325c35381c29cb = L.map(
|
||||
"map_51dfa2a0ed79fead08325c35381c29cb",
|
||||
{
|
||||
center: [0.0, 0.0],
|
||||
crs: L.CRS.EPSG3857,
|
||||
|
|
@ -60,13 +60,13 @@
|
|||
|
||||
|
||||
|
||||
var tile_layer_54182e004e62958132ef1f2ec111c5b8 = L.tileLayer(
|
||||
var tile_layer_116abed53c5f141948f6c11b03225600 = L.tileLayer(
|
||||
"https://tile.openstreetmap.org/{z}/{x}/{y}.png",
|
||||
{"attribution": "\u0026copy; \u003ca href=\"https://www.openstreetmap.org/copyright\"\u003eOpenStreetMap\u003c/a\u003e contributors", "detectRetina": false, "maxNativeZoom": 19, "maxZoom": 19, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
|
||||
);
|
||||
|
||||
|
||||
tile_layer_54182e004e62958132ef1f2ec111c5b8.addTo(map_621b62163f2ccafd05c33f58249e3800);
|
||||
tile_layer_116abed53c5f141948f6c11b03225600.addTo(map_51dfa2a0ed79fead08325c35381c29cb);
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -87,7 +87,7 @@
|
|||
}
|
||||
trajeto_json_add({"features": []});
|
||||
|
||||
trajeto_json.addTo(map_621b62163f2ccafd05c33f58249e3800);
|
||||
trajeto_json.addTo(map_51dfa2a0ed79fead08325c35381c29cb);
|
||||
|
||||
function adicionarGeometria(novaGeometria) {
|
||||
trajeto_json.addData(novaGeometria);
|
||||
|
|
@ -145,7 +145,7 @@
|
|||
|
||||
var marcadorDinamico = L.marker([0, 0], {
|
||||
icon: customIcon
|
||||
}).addTo(map_621b62163f2ccafd05c33f58249e3800);
|
||||
}).addTo(map_51dfa2a0ed79fead08325c35381c29cb);
|
||||
|
||||
// Conectar ao broker MQTT
|
||||
const client = mqtt.connect('ws://localhost:9001'); // Use wss para conexão segura
|
||||
|
|
@ -183,7 +183,7 @@
|
|||
marcadorDinamico.setRotationAngle(angulo);
|
||||
|
||||
adicionarCoordenada("Tj", [novaLongitude, novaLatitude]);
|
||||
map_621b62163f2ccafd05c33f58249e3800.setView(novaPosicao, map_621b62163f2ccafd05c33f58249e3800.getZoom());
|
||||
map_51dfa2a0ed79fead08325c35381c29cb.setView(novaPosicao, map_51dfa2a0ed79fead08325c35381c29cb.getZoom());
|
||||
});
|
||||
|
||||
function calcularOrientacao(P1latitude, P1longitude, P2latitude, P2longitude) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -103,6 +103,8 @@
|
|||
this.btnCarregar = new System.Windows.Forms.Button();
|
||||
this.txtDescricao = new System.Windows.Forms.TextBox();
|
||||
this.lblDescricao = new System.Windows.Forms.Label();
|
||||
this.txtQtdCameras = new System.Windows.Forms.TextBox();
|
||||
this.lblQuantidadeCamerasSolo = new System.Windows.Forms.Label();
|
||||
this.gpbModulos.SuspendLayout();
|
||||
this.pnlModulos.SuspendLayout();
|
||||
this.tabControl1.SuspendLayout();
|
||||
|
|
@ -466,7 +468,7 @@
|
|||
this.gpbSensoriamento.Controls.Add(this.cmbConfiguracaoUltrassom);
|
||||
this.gpbSensoriamento.Controls.Add(this.btnConfigurar);
|
||||
this.gpbSensoriamento.Enabled = false;
|
||||
this.gpbSensoriamento.Location = new System.Drawing.Point(3, 369);
|
||||
this.gpbSensoriamento.Location = new System.Drawing.Point(3, 405);
|
||||
this.gpbSensoriamento.Name = "gpbSensoriamento";
|
||||
this.gpbSensoriamento.Size = new System.Drawing.Size(529, 121);
|
||||
this.gpbSensoriamento.TabIndex = 6;
|
||||
|
|
@ -616,6 +618,8 @@
|
|||
//
|
||||
// gpbAtuador
|
||||
//
|
||||
this.gpbAtuador.Controls.Add(this.txtQtdCameras);
|
||||
this.gpbAtuador.Controls.Add(this.lblQuantidadeCamerasSolo);
|
||||
this.gpbAtuador.Controls.Add(this.lblMs);
|
||||
this.gpbAtuador.Controls.Add(this.txtDuracaoAtuacao);
|
||||
this.gpbAtuador.Controls.Add(this.lblDuracaoAtuacao);
|
||||
|
|
@ -631,7 +635,7 @@
|
|||
this.gpbAtuador.Controls.Add(this.lblPercentualAtuacao1);
|
||||
this.gpbAtuador.Location = new System.Drawing.Point(3, 197);
|
||||
this.gpbAtuador.Name = "gpbAtuador";
|
||||
this.gpbAtuador.Size = new System.Drawing.Size(529, 166);
|
||||
this.gpbAtuador.Size = new System.Drawing.Size(529, 202);
|
||||
this.gpbAtuador.TabIndex = 7;
|
||||
this.gpbAtuador.TabStop = false;
|
||||
this.gpbAtuador.Text = "Atuador";
|
||||
|
|
@ -933,6 +937,24 @@
|
|||
this.lblDescricao.TabIndex = 7;
|
||||
this.lblDescricao.Text = "Descrição";
|
||||
//
|
||||
// txtQtdCameras
|
||||
//
|
||||
this.txtQtdCameras.Location = new System.Drawing.Point(358, 163);
|
||||
this.txtQtdCameras.Name = "txtQtdCameras";
|
||||
this.txtQtdCameras.Size = new System.Drawing.Size(100, 20);
|
||||
this.txtQtdCameras.TabIndex = 13;
|
||||
this.txtQtdCameras.Text = "1";
|
||||
this.txtQtdCameras.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// lblQuantidadeCamerasSolo
|
||||
//
|
||||
this.lblQuantidadeCamerasSolo.AutoSize = true;
|
||||
this.lblQuantidadeCamerasSolo.Location = new System.Drawing.Point(6, 166);
|
||||
this.lblQuantidadeCamerasSolo.Name = "lblQuantidadeCamerasSolo";
|
||||
this.lblQuantidadeCamerasSolo.Size = new System.Drawing.Size(319, 13);
|
||||
this.lblQuantidadeCamerasSolo.TabIndex = 14;
|
||||
this.lblQuantidadeCamerasSolo.Text = "Quantidade de câmeras para detecção de ervas daninhas no solo";
|
||||
//
|
||||
// frmAjustesOperacao
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
|
@ -1051,5 +1073,7 @@
|
|||
private System.Windows.Forms.NumericUpDown nudVelMin;
|
||||
private System.Windows.Forms.NumericUpDown nudVelMax;
|
||||
private System.Windows.Forms.CheckBox chbSonarAtivado;
|
||||
private System.Windows.Forms.TextBox txtQtdCameras;
|
||||
private System.Windows.Forms.Label lblQuantidadeCamerasSolo;
|
||||
}
|
||||
}
|
||||
|
|
@ -133,6 +133,7 @@ namespace AgroMonitor.Forms
|
|||
|
||||
private void btnSalvar_Click(object sender, EventArgs e)
|
||||
{
|
||||
int.TryParse(txtQtdCameras.Text, out int qtdCameras);
|
||||
bool sucesso = Variaveis.OperacaoEmAndamento.SalvarParametrizacaoOperacao(
|
||||
txtDescricao.Text,
|
||||
txtCapacidadeReservatorio.Text,
|
||||
|
|
@ -144,7 +145,8 @@ namespace AgroMonitor.Forms
|
|||
(int)nudVelMax.Value,
|
||||
(int)nudVelMin.Value,
|
||||
ConfigUltrassom,
|
||||
chbSonarAtivado.Checked
|
||||
chbSonarAtivado.Checked,
|
||||
qtdCameras
|
||||
);
|
||||
if (!sucesso)
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1,185 +1 @@
|
|||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"Id": "1",
|
||||
"Name": "Projeto",
|
||||
"Length": 23.747936168010394,
|
||||
"Dist1": 0,
|
||||
"Dist2": 0
|
||||
},
|
||||
"geometry": {
|
||||
"id": null,
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
-47.372156833333335,
|
||||
-22.178973166666665
|
||||
],
|
||||
[
|
||||
-47.372197666666665,
|
||||
-22.178952
|
||||
],
|
||||
[
|
||||
-47.37225933333333,
|
||||
-22.178925833333334
|
||||
],
|
||||
[
|
||||
-47.372304666666665,
|
||||
-22.178904666666668
|
||||
],
|
||||
[
|
||||
-47.372361833333336,
|
||||
-22.178876166666665
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"Id": "2",
|
||||
"Name": "Projeto",
|
||||
"Length": 23.891304512285874,
|
||||
"Dist1": 0,
|
||||
"Dist2": 0
|
||||
},
|
||||
"geometry": {
|
||||
"id": null,
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
-47.3723795,
|
||||
-22.178883333333335
|
||||
],
|
||||
[
|
||||
-47.372341166666665,
|
||||
-22.178902666666666
|
||||
],
|
||||
[
|
||||
-47.37229466666667,
|
||||
-22.178925666666668
|
||||
],
|
||||
[
|
||||
-47.372234666666664,
|
||||
-22.1789555
|
||||
],
|
||||
[
|
||||
-47.372178166666664,
|
||||
-22.178984833333335
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"Id": "3",
|
||||
"Name": "Projeto",
|
||||
"Length": 23.838775018394195,
|
||||
"Dist1": 0,
|
||||
"Dist2": 0
|
||||
},
|
||||
"geometry": {
|
||||
"id": null,
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
-47.372177666666666,
|
||||
-22.1790005
|
||||
],
|
||||
[
|
||||
-47.3722225,
|
||||
-22.178979166666668
|
||||
],
|
||||
[
|
||||
-47.3722845,
|
||||
-22.178951166666668
|
||||
],
|
||||
[
|
||||
-47.3723305,
|
||||
-22.17893116666667
|
||||
],
|
||||
[
|
||||
-47.372374666666666,
|
||||
-22.178911
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"Id": "4",
|
||||
"Name": "Projeto",
|
||||
"Length": 23.760554463105805,
|
||||
"Dist1": 0,
|
||||
"Dist2": 0
|
||||
},
|
||||
"geometry": {
|
||||
"id": null,
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
-47.37239483333333,
|
||||
-22.178915166666666
|
||||
],
|
||||
[
|
||||
-47.37235066666667,
|
||||
-22.178935166666665
|
||||
],
|
||||
[
|
||||
-47.37228916666667,
|
||||
-22.178960833333335
|
||||
],
|
||||
[
|
||||
-47.372228666666665,
|
||||
-22.17898883333333
|
||||
],
|
||||
[
|
||||
-47.372188,
|
||||
-22.179009166666667
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"Id": "5",
|
||||
"Name": "Projeto",
|
||||
"Length": 23.888166936433826,
|
||||
"Dist1": 0,
|
||||
"Dist2": 0
|
||||
},
|
||||
"geometry": {
|
||||
"id": null,
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[
|
||||
-47.37217866666667,
|
||||
-22.179029
|
||||
],
|
||||
[
|
||||
-47.372224833333334,
|
||||
-22.179004
|
||||
],
|
||||
[
|
||||
-47.372283,
|
||||
-22.178976166666665
|
||||
],
|
||||
[
|
||||
-47.37232683333333,
|
||||
-22.178956333333332
|
||||
],
|
||||
[
|
||||
-47.37238383333333,
|
||||
-22.1789295
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Id":"1","Name":"CidadeJardimFundo","Length":7.0570051737487685,"Dist1":7.0570051737487685,"Dist2":0.0},"geometry":{"id":null,"type":"LineString","coordinates":[[-47.395268038666664,-22.172154729333332],[-47.395253384833332,-22.172156474333335],[-47.395231131,-22.172159042833332],[-47.3952169005,-22.172159611333335]]}},{"type":"Feature","properties":{"Id":"2","Name":"CidadeJardimFundo","Length":5.3317380071092622,"Dist1":7.0570051737487685,"Dist2":0.0},"geometry":{"id":null,"type":"LineString","coordinates":[[-47.3952167885,-22.172177683666668],[-47.395239748666668,-22.172175429],[-47.395255433666669,-22.172173393666668],[-47.395268102333333,-22.172171744666667]]}},{"type":"Feature","properties":{"Id":"3","Name":"CidadeJardimFundo","Length":6.76453730127734,"Dist1":7.0570051737487685,"Dist2":0.0},"geometry":{"id":null,"type":"LineString","coordinates":[[-47.3952834685,-22.1721922585],[-47.395263362666668,-22.172194317],[-47.395241582666664,-22.1721965925],[-47.395218172833331,-22.172198181666666]]}}]}
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<meta name="viewport" content="width=device-width,
|
||||
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<style>
|
||||
#map_dccb36e38912552ca38d417ba25e9de0 {
|
||||
#map_5ba7fbc36c434eca463304fe098247ae {
|
||||
position: relative;
|
||||
width: 100.0%;
|
||||
height: 100.0%;
|
||||
|
|
@ -39,16 +39,16 @@
|
|||
<body>
|
||||
|
||||
|
||||
<div class="folium-map" id="map_dccb36e38912552ca38d417ba25e9de0" ></div>
|
||||
<div class="folium-map" id="map_5ba7fbc36c434eca463304fe098247ae" ></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
|
||||
|
||||
var map_dccb36e38912552ca38d417ba25e9de0 = L.map(
|
||||
"map_dccb36e38912552ca38d417ba25e9de0",
|
||||
var map_5ba7fbc36c434eca463304fe098247ae = L.map(
|
||||
"map_5ba7fbc36c434eca463304fe098247ae",
|
||||
{
|
||||
center: [-22.178952583333334, -47.37227583333333],
|
||||
center: [-22.1721764555, -47.395250128499995],
|
||||
crs: L.CRS.EPSG3857,
|
||||
zoom: 12,
|
||||
zoomControl: true,
|
||||
|
|
@ -60,13 +60,13 @@
|
|||
|
||||
|
||||
|
||||
var tile_layer_750a00fc3eb289e88b9a6980b3a1a9eb = L.tileLayer(
|
||||
var tile_layer_d518041c286f64e24a30d7d3ced75c0e = L.tileLayer(
|
||||
"https://tile.openstreetmap.org/{z}/{x}/{y}.png",
|
||||
{"attribution": "\u0026copy; \u003ca href=\"https://www.openstreetmap.org/copyright\"\u003eOpenStreetMap\u003c/a\u003e contributors", "detectRetina": false, "maxNativeZoom": 19, "maxZoom": 19, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
|
||||
);
|
||||
|
||||
|
||||
tile_layer_750a00fc3eb289e88b9a6980b3a1a9eb.addTo(map_dccb36e38912552ca38d417ba25e9de0);
|
||||
tile_layer_d518041c286f64e24a30d7d3ced75c0e.addTo(map_5ba7fbc36c434eca463304fe098247ae);
|
||||
|
||||
|
||||
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
}*/
|
||||
});
|
||||
}
|
||||
function geo_json_62809d48ba27ab5ad47ded5f27d58304_onEachFeature(feature, layer) {
|
||||
function geo_json_7312c671fce6fbda0510e3942fc11b42_onEachFeature(feature, layer) {
|
||||
layer.on({
|
||||
|
||||
click: function(e) {
|
||||
|
|
@ -118,20 +118,20 @@
|
|||
}*/
|
||||
});
|
||||
};
|
||||
var geo_json_62809d48ba27ab5ad47ded5f27d58304 = L.geoJson(null, {
|
||||
onEachFeature: geo_json_62809d48ba27ab5ad47ded5f27d58304_onEachFeature,
|
||||
var geo_json_7312c671fce6fbda0510e3942fc11b42 = L.geoJson(null, {
|
||||
onEachFeature: geo_json_7312c671fce6fbda0510e3942fc11b42_onEachFeature,
|
||||
|
||||
});
|
||||
|
||||
function geo_json_62809d48ba27ab5ad47ded5f27d58304_add (data) {
|
||||
geo_json_62809d48ba27ab5ad47ded5f27d58304
|
||||
function geo_json_7312c671fce6fbda0510e3942fc11b42_add (data) {
|
||||
geo_json_7312c671fce6fbda0510e3942fc11b42
|
||||
.addData(data);
|
||||
}
|
||||
geo_json_62809d48ba27ab5ad47ded5f27d58304_add({"features": [{"geometry": {"coordinates": [[-47.372156833333335, -22.178973166666665], [-47.372197666666665, -22.178952], [-47.37225933333333, -22.178925833333334], [-47.372304666666665, -22.178904666666668], [-47.372361833333336, -22.178876166666665]], "id": null, "type": "LineString"}, "id": 0, "properties": {"Dist1": 0, "Dist2": 0, "Id": "1", "Length": 23.747936168010394, "Name": "Projeto"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.3723795, -22.178883333333335], [-47.372341166666665, -22.178902666666666], [-47.37229466666667, -22.178925666666668], [-47.372234666666664, -22.1789555], [-47.372178166666664, -22.178984833333335]], "id": null, "type": "LineString"}, "id": 1, "properties": {"Dist1": 0, "Dist2": 0, "Id": "2", "Length": 23.891304512285874, "Name": "Projeto"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.372177666666666, -22.1790005], [-47.3722225, -22.178979166666668], [-47.3722845, -22.178951166666668], [-47.3723305, -22.17893116666667], [-47.372374666666666, -22.178911]], "id": null, "type": "LineString"}, "id": 2, "properties": {"Dist1": 0, "Dist2": 0, "Id": "3", "Length": 23.838775018394195, "Name": "Projeto"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.37239483333333, -22.178915166666666], [-47.37235066666667, -22.178935166666665], [-47.37228916666667, -22.178960833333335], [-47.372228666666665, -22.17898883333333], [-47.372188, -22.179009166666667]], "id": null, "type": "LineString"}, "id": 3, "properties": {"Dist1": 0, "Dist2": 0, "Id": "4", "Length": 23.760554463105805, "Name": "Projeto"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.37217866666667, -22.179029], [-47.372224833333334, -22.179004], [-47.372283, -22.178976166666665], [-47.37232683333333, -22.178956333333332], [-47.37238383333333, -22.1789295]], "id": null, "type": "LineString"}, "id": 4, "properties": {"Dist1": 0, "Dist2": 0, "Id": "5", "Length": 23.888166936433826, "Name": "Projeto"}, "type": "Feature"}], "type": "FeatureCollection"});
|
||||
geo_json_7312c671fce6fbda0510e3942fc11b42_add({"features": [{"geometry": {"coordinates": [[-47.395268038666664, -22.172154729333332], [-47.39525338483333, -22.172156474333335], [-47.395231131, -22.172159042833332], [-47.3952169005, -22.172159611333335]], "id": null, "type": "LineString"}, "id": 0, "properties": {"Dist1": 7.0570051737487685, "Dist2": 0.0, "Id": "1", "Length": 7.0570051737487685, "Name": "CidadeJardimFundo"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.3952167885, -22.172177683666668], [-47.39523974866667, -22.172175429], [-47.39525543366667, -22.172173393666668], [-47.39526810233333, -22.172171744666667]], "id": null, "type": "LineString"}, "id": 1, "properties": {"Dist1": 7.0570051737487685, "Dist2": 0.0, "Id": "2", "Length": 5.331738007109262, "Name": "CidadeJardimFundo"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.3952834685, -22.1721922585], [-47.39526336266667, -22.172194317], [-47.395241582666664, -22.1721965925], [-47.39521817283333, -22.172198181666666]], "id": null, "type": "LineString"}, "id": 2, "properties": {"Dist1": 7.0570051737487685, "Dist2": 0.0, "Id": "3", "Length": 6.76453730127734, "Name": "CidadeJardimFundo"}, "type": "Feature"}], "type": "FeatureCollection"});
|
||||
|
||||
|
||||
|
||||
geo_json_62809d48ba27ab5ad47ded5f27d58304.addTo(map_dccb36e38912552ca38d417ba25e9de0);
|
||||
geo_json_7312c671fce6fbda0510e3942fc11b42.addTo(map_5ba7fbc36c434eca463304fe098247ae);
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -152,7 +152,7 @@
|
|||
}
|
||||
trajeto_json_add({"features": []});
|
||||
|
||||
trajeto_json.addTo(map_dccb36e38912552ca38d417ba25e9de0);
|
||||
trajeto_json.addTo(map_5ba7fbc36c434eca463304fe098247ae);
|
||||
|
||||
function adicionarGeometria(novaGeometria) {
|
||||
trajeto_json.addData(novaGeometria);
|
||||
|
|
@ -210,7 +210,7 @@
|
|||
}
|
||||
trajeto_dinamico_json_add({"features": []});
|
||||
|
||||
trajeto_dinamico_json.addTo(map_dccb36e38912552ca38d417ba25e9de0);
|
||||
trajeto_dinamico_json.addTo(map_5ba7fbc36c434eca463304fe098247ae);
|
||||
|
||||
function adicionarGeometriaDinamica(novaGeometria) {
|
||||
trajeto_dinamico_json.addData(novaGeometria);
|
||||
|
|
@ -263,9 +263,9 @@
|
|||
|
||||
var marcadorEquipamento = L.marker([0, 0], {
|
||||
icon: customIcon
|
||||
}).addTo(map_dccb36e38912552ca38d417ba25e9de0);
|
||||
}).addTo(map_5ba7fbc36c434eca463304fe098247ae);
|
||||
|
||||
var marcadorBase = L.marker([0, 0], {}).addTo(map_dccb36e38912552ca38d417ba25e9de0);
|
||||
var marcadorBase = L.marker([0, 0], {}).addTo(map_5ba7fbc36c434eca463304fe098247ae);
|
||||
var icon = L.AwesomeMarkers.icon(
|
||||
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
|
||||
);
|
||||
|
|
@ -347,7 +347,7 @@
|
|||
}
|
||||
|
||||
if (foco) {
|
||||
map_dccb36e38912552ca38d417ba25e9de0.setView(novaPosicao, map_dccb36e38912552ca38d417ba25e9de0.getZoom());
|
||||
map_5ba7fbc36c434eca463304fe098247ae.setView(novaPosicao, map_5ba7fbc36c434eca463304fe098247ae.getZoom());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -364,7 +364,7 @@
|
|||
function atualizarSelecaoRuas(selecionadas) {
|
||||
selecionadas = JSON.parse(selecionadas);
|
||||
RuasSelecionadas = Array.isArray(selecionadas) ? [...selecionadas] : [];
|
||||
geo_json_62809d48ba27ab5ad47ded5f27d58304.eachLayer(function (layer) {
|
||||
geo_json_7312c671fce6fbda0510e3942fc11b42.eachLayer(function (layer) {
|
||||
if (RuasSelecionadas.includes(parseInt(layer.feature.id))) {
|
||||
layer.setStyle({ color: 'blue' });
|
||||
} else {
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -203,6 +203,6 @@ C:\ZendionInc\agrobot_base\AgroBase\AgroMonitor\obj\Debug\AgroMonitor.frmInicial
|
|||
C:\ZendionInc\agrobot_base\AgroBase\AgroMonitor\obj\Debug\AgroMonitor.Properties.Resources.resources
|
||||
C:\ZendionInc\agrobot_base\AgroBase\AgroMonitor\obj\Debug\AgroMonitor.csproj.GenerateResource.cache
|
||||
C:\ZendionInc\agrobot_base\AgroBase\AgroMonitor\obj\Debug\AgroMonitor.csproj.CoreCompileInputs.cache
|
||||
C:\ZendionInc\agrobot_base\AgroBase\AgroMonitor\obj\Debug\AgroMonitor.csproj.CopyComplete
|
||||
C:\ZendionInc\agrobot_base\AgroBase\AgroMonitor\obj\Debug\AgroMonitor.exe
|
||||
C:\ZendionInc\agrobot_base\AgroBase\AgroMonitor\obj\Debug\AgroMonitor.pdb
|
||||
C:\ZendionINC\agrobot_base\AgroBase\AgroMonitor\obj\Debug\AgroMoni.D419EBC3.Up2Date
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue