ajustes
This commit is contained in:
parent
cd496d1253
commit
8c78870898
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -3,16 +3,32 @@
|
|||
"WorkspaceRootPath": "C:\\ZendionINC\\agrobot_base\\AgroBase\\",
|
||||
"Documents": [
|
||||
{
|
||||
"AbsoluteMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|C:\\ZendionINC\\agrobot_base\\AgroBase\\agrobase\\models\\operacoes\\operacaomapagpsmodel.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\\forms\\frmsimulacaomapagps.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\forms\\frmsimulacaomapagps.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\\mapasmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\models\\mapasmodel.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\\ultrasonica05model.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\models\\ultrasonica05model.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\\operacaomapagpsmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\models\\operacoes\\operacaomapagpsmodel.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\\frmsimulacaomapagps.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}|Form",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\forms\\frmsimulacaomapagps.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\\models\\pidmodel.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\models\\pidmodel.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\\dispositivosservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
|
||||
"RelativeMoniker": "D:0:0:{C54B41C0-1D21-4E3E-949E-0F86BBC86A33}|AgroBase\\AgroBase.csproj|solutionrelative:agrobase\\services\\dispositivosservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
|
||||
}
|
||||
],
|
||||
"DocumentGroupContainers": [
|
||||
|
|
@ -22,43 +38,94 @@
|
|||
"DocumentGroups": [
|
||||
{
|
||||
"DockedWidth": 200,
|
||||
"SelectedChildIndex": 2,
|
||||
"SelectedChildIndex": 5,
|
||||
"Children": [
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "PIDModel.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\PIDModel.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Models\\PIDModel.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\PIDModel.cs",
|
||||
"RelativeToolTip": "AgroBase\\Models\\PIDModel.cs",
|
||||
"ViewState": "AQIAAAsAAAAAAAAAAAA9wCkAAAAMAAAA",
|
||||
"DocumentIndex": 3,
|
||||
"Title": "UltrasonicA05Model.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\UltrasonicA05Model.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Models\\UltrasonicA05Model.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\UltrasonicA05Model.cs",
|
||||
"RelativeToolTip": "AgroBase\\Models\\UltrasonicA05Model.cs",
|
||||
"ViewState": "AQIAAGUAAAAAAAAAAAAnwOoAAAAjAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-12-17T16:39:11.967Z",
|
||||
"WhenOpened": "2024-12-17T23:45:03.654Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 2,
|
||||
"Title": "DispositivosService.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Services\\DispositivosService.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Services\\DispositivosService.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Services\\DispositivosService.cs",
|
||||
"RelativeToolTip": "AgroBase\\Services\\DispositivosService.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAABkAAAA4AAAA",
|
||||
"Title": "MapasModel.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\MapasModel.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Models\\MapasModel.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\MapasModel.cs",
|
||||
"RelativeToolTip": "AgroBase\\Models\\MapasModel.cs",
|
||||
"ViewState": "AQIAANMDAAAAAAAAAAAUwPgDAAAaAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-12-17T16:08:08.254Z",
|
||||
"WhenOpened": "2024-12-17T22:49:46.935Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 5,
|
||||
"Title": "frmSimulacaoMapaGPS.cs [Design]",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\frmSimulacaoMapaGPS.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Forms\\frmSimulacaoMapaGPS.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\frmSimulacaoMapaGPS.cs [Design]",
|
||||
"RelativeToolTip": "AgroBase\\Forms\\frmSimulacaoMapaGPS.cs [Design]",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-12-17T22:35:46.496Z",
|
||||
"EditorCaption": " [Design]"
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 6,
|
||||
"Title": "PIDModel.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\PIDModel.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Models\\PIDModel.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\PIDModel.cs",
|
||||
"RelativeToolTip": "AgroBase\\Models\\PIDModel.cs",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAqwAsAAAAYAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-12-17T21:24:50.059Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 1,
|
||||
"Title": "frmSimulacaoMapaGPS.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\frmSimulacaoMapaGPS.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Forms\\frmSimulacaoMapaGPS.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Forms\\frmSimulacaoMapaGPS.cs",
|
||||
"RelativeToolTip": "AgroBase\\Forms\\frmSimulacaoMapaGPS.cs",
|
||||
"ViewState": "AQIAALoAAAAAAAAAAAAqwLAAAABhAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-12-17T20:31:58.828Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 0,
|
||||
"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": "AQIAAAEDAAAAAAAAAAAWwE4DAAAhAAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-12-17T20:14:20.606Z",
|
||||
"EditorCaption": ""
|
||||
},
|
||||
{
|
||||
"$type": "Document",
|
||||
"DocumentIndex": 4,
|
||||
"Title": "OperacaoMapaGPSModel.cs",
|
||||
"DocumentMoniker": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\Operacoes\\OperacaoMapaGPSModel.cs",
|
||||
"RelativeDocumentMoniker": "AgroBase\\Models\\Operacoes\\OperacaoMapaGPSModel.cs",
|
||||
"ToolTip": "C:\\ZendionINC\\agrobot_base\\AgroBase\\AgroBase\\Models\\Operacoes\\OperacaoMapaGPSModel.cs",
|
||||
"RelativeToolTip": "AgroBase\\Models\\Operacoes\\OperacaoMapaGPSModel.cs",
|
||||
"ViewState": "AQIAACwAAAAAAAAAAAAYwDoAAAAMAAAA",
|
||||
"ViewState": "AQIAAAAAAAAAAAAAAAAAAI0AAAC0AAAA",
|
||||
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
|
||||
"WhenOpened": "2024-12-17T16:03:54.404Z",
|
||||
"EditorCaption": ""
|
||||
|
|
|
|||
|
|
@ -83,6 +83,13 @@
|
|||
this.lblAproximando = new System.Windows.Forms.Label();
|
||||
this.lblDistProx = new System.Windows.Forms.Label();
|
||||
this.lblDistAnt = new System.Windows.Forms.Label();
|
||||
this.btnReiniciar = new System.Windows.Forms.Button();
|
||||
this.lblKp = new System.Windows.Forms.Label();
|
||||
this.txtKp = new System.Windows.Forms.TextBox();
|
||||
this.lblKi = new System.Windows.Forms.Label();
|
||||
this.txtKi = new System.Windows.Forms.TextBox();
|
||||
this.lblKd = new System.Windows.Forms.Label();
|
||||
this.txtKd = new System.Windows.Forms.TextBox();
|
||||
this.pnlOpcoes.SuspendLayout();
|
||||
this.gpbSonar.SuspendLayout();
|
||||
this.gpbGPS.SuspendLayout();
|
||||
|
|
@ -92,6 +99,13 @@
|
|||
//
|
||||
// pnlOpcoes
|
||||
//
|
||||
this.pnlOpcoes.Controls.Add(this.lblKd);
|
||||
this.pnlOpcoes.Controls.Add(this.txtKd);
|
||||
this.pnlOpcoes.Controls.Add(this.lblKi);
|
||||
this.pnlOpcoes.Controls.Add(this.txtKi);
|
||||
this.pnlOpcoes.Controls.Add(this.lblKp);
|
||||
this.pnlOpcoes.Controls.Add(this.txtKp);
|
||||
this.pnlOpcoes.Controls.Add(this.btnReiniciar);
|
||||
this.pnlOpcoes.Controls.Add(this.lblQtdErro);
|
||||
this.pnlOpcoes.Controls.Add(this.chbAutomatico);
|
||||
this.pnlOpcoes.Controls.Add(this.txtQtdErro);
|
||||
|
|
@ -724,6 +738,77 @@
|
|||
this.lblDistAnt.TabIndex = 24;
|
||||
this.lblDistAnt.Text = "Distância Ponto Anterior: 0,00 m";
|
||||
//
|
||||
// btnReiniciar
|
||||
//
|
||||
this.btnReiniciar.Location = new System.Drawing.Point(1231, 16);
|
||||
this.btnReiniciar.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnReiniciar.Name = "btnReiniciar";
|
||||
this.btnReiniciar.Size = new System.Drawing.Size(121, 20);
|
||||
this.btnReiniciar.TabIndex = 31;
|
||||
this.btnReiniciar.Text = "Reiniciar Simulação";
|
||||
this.btnReiniciar.UseVisualStyleBackColor = true;
|
||||
this.btnReiniciar.Click += new System.EventHandler(this.btnReiniciar_Click);
|
||||
//
|
||||
// lblKp
|
||||
//
|
||||
this.lblKp.AutoSize = true;
|
||||
this.lblKp.Location = new System.Drawing.Point(1031, 56);
|
||||
this.lblKp.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblKp.Name = "lblKp";
|
||||
this.lblKp.Size = new System.Drawing.Size(20, 13);
|
||||
this.lblKp.TabIndex = 33;
|
||||
this.lblKp.Text = "Kp";
|
||||
//
|
||||
// txtKp
|
||||
//
|
||||
this.txtKp.Location = new System.Drawing.Point(1033, 71);
|
||||
this.txtKp.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.txtKp.Name = "txtKp";
|
||||
this.txtKp.Size = new System.Drawing.Size(54, 20);
|
||||
this.txtKp.TabIndex = 32;
|
||||
this.txtKp.Text = "1";
|
||||
this.txtKp.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// lblKi
|
||||
//
|
||||
this.lblKi.AutoSize = true;
|
||||
this.lblKi.Location = new System.Drawing.Point(1089, 56);
|
||||
this.lblKi.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblKi.Name = "lblKi";
|
||||
this.lblKi.Size = new System.Drawing.Size(16, 13);
|
||||
this.lblKi.TabIndex = 35;
|
||||
this.lblKi.Text = "Ki";
|
||||
//
|
||||
// txtKi
|
||||
//
|
||||
this.txtKi.Location = new System.Drawing.Point(1091, 71);
|
||||
this.txtKi.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.txtKi.Name = "txtKi";
|
||||
this.txtKi.Size = new System.Drawing.Size(54, 20);
|
||||
this.txtKi.TabIndex = 34;
|
||||
this.txtKi.Text = "1";
|
||||
this.txtKi.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// lblKd
|
||||
//
|
||||
this.lblKd.AutoSize = true;
|
||||
this.lblKd.Location = new System.Drawing.Point(1147, 57);
|
||||
this.lblKd.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.lblKd.Name = "lblKd";
|
||||
this.lblKd.Size = new System.Drawing.Size(20, 13);
|
||||
this.lblKd.TabIndex = 37;
|
||||
this.lblKd.Text = "Kd";
|
||||
//
|
||||
// txtKd
|
||||
//
|
||||
this.txtKd.Location = new System.Drawing.Point(1149, 72);
|
||||
this.txtKd.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.txtKd.Name = "txtKd";
|
||||
this.txtKd.Size = new System.Drawing.Size(54, 20);
|
||||
this.txtKd.TabIndex = 36;
|
||||
this.txtKd.Text = "1";
|
||||
this.txtKd.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||
//
|
||||
// frmSimulacaoMapaGPS
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
|
@ -820,5 +905,12 @@
|
|||
private System.Windows.Forms.CheckBox chbAutomatico;
|
||||
private System.Windows.Forms.Label lblQtdErro;
|
||||
private System.Windows.Forms.TextBox txtQtdErro;
|
||||
private System.Windows.Forms.Button btnReiniciar;
|
||||
private System.Windows.Forms.Label lblKd;
|
||||
private System.Windows.Forms.TextBox txtKd;
|
||||
private System.Windows.Forms.Label lblKi;
|
||||
private System.Windows.Forms.TextBox txtKi;
|
||||
private System.Windows.Forms.Label lblKp;
|
||||
private System.Windows.Forms.TextBox txtKp;
|
||||
}
|
||||
}
|
||||
|
|
@ -19,6 +19,11 @@ namespace AgroBase.Forms
|
|||
bool calc = false;
|
||||
bool parar = false;
|
||||
DateTime UltimaAtualizacao = DateTime.MinValue;
|
||||
int tempoGps = 1000;
|
||||
DateTime UltimaAtualizacaoGps = DateTime.MinValue;
|
||||
double ultimaLat = 0;
|
||||
double ultimaLon = 0;
|
||||
double ultimoAnguloGps = 0;
|
||||
|
||||
Queue<double> historicoAngulosControle = new Queue<double>();
|
||||
Queue<double> historicoAngulosCarro = new Queue<double>();
|
||||
|
|
@ -38,7 +43,7 @@ namespace AgroBase.Forms
|
|||
|
||||
private void frmSimulacaoMapaGPS_Load(object sender, EventArgs e)
|
||||
{
|
||||
tmrLeitura = new AsyncTaskTimerModel("tmrLeitura", tmrLeitura_Tick, 1000, this);
|
||||
tmrLeitura = new AsyncTaskTimerModel("tmrLeitura", tmrLeitura_Tick, 500, this);
|
||||
tmrLeitura.Start();
|
||||
|
||||
Variaveis.OperacaoEmAndamento.Mapa = new MapasModel()
|
||||
|
|
@ -47,6 +52,10 @@ namespace AgroBase.Forms
|
|||
};
|
||||
//Variaveis.OperacaoEmAndamento.Sensoriamento.SonarFrontal = new SonarModel(picSonar);
|
||||
KinectService.InicializarKinect(null, picSonar, null, null);
|
||||
|
||||
txtKd.Text = Variaveis.OperacaoEmAndamento.Controle.PIDdirecional.Kd.ToString();
|
||||
txtKi.Text = Variaveis.OperacaoEmAndamento.Controle.PIDdirecional.Ki.ToString();
|
||||
txtKp.Text = Variaveis.OperacaoEmAndamento.Controle.PIDdirecional.Kp.ToString();
|
||||
}
|
||||
|
||||
private void frmSimulacaoMapaGPS_FormClosing(object sender, FormClosingEventArgs e)
|
||||
|
|
@ -152,25 +161,48 @@ namespace AgroBase.Forms
|
|||
};
|
||||
}
|
||||
|
||||
ultimaLat = GPSService.UltimaLeitura.Latitude;
|
||||
ultimaLon = GPSService.UltimaLeitura.Longitude;
|
||||
|
||||
GPSService.AtualizarCoordenadasGPS();
|
||||
}
|
||||
|
||||
private void btnAcrescentarGPS_Click(object sender, EventArgs e)
|
||||
{
|
||||
bool atualizarCoordenadas = UltimaAtualizacaoGps.AddMilliseconds(tempoGps) < DateTime.Now;
|
||||
|
||||
double angulo = Variaveis.OperacaoEmAndamento.Mapa.AnguloCaminho;
|
||||
if (txtAnguloGPS.Text != "")
|
||||
{
|
||||
angulo = double.Parse(txtAnguloGPS.Text);
|
||||
angulo = atualizarCoordenadas ? double.Parse(txtAnguloGPS.Text) : ultimoAnguloGps;
|
||||
}
|
||||
if (StatusCarro == StatusCarroMapa.Manobrando && false)
|
||||
if (Variaveis.OperacaoEmAndamento.Controle.TipoMovimento == TipoMovimentoDirecional.MovimentoArco)
|
||||
{
|
||||
angulo += double.Parse(txtAnguloControle.Text);
|
||||
}
|
||||
double distancia = double.Parse(txtDistanciaGPS.Text); // Distância em metros
|
||||
|
||||
|
||||
double velocidade = FuncoesMatematicas.CalculaVelocidadeRPM(Variaveis.OperacaoEmAndamento.Controle.RPM_SP);
|
||||
double velocidadeMs = FuncoesMatematicas.ConverteKmhParaMs(velocidade);
|
||||
txtVelocidade.Text = velocidade.ToString("0.00");
|
||||
|
||||
TimeSpan tempoPassado = !chbAutomatico.Checked || UltimaAtualizacao == DateTime.MinValue ? new TimeSpan(5000000) : DateTime.Now - UltimaAtualizacao;
|
||||
// Calcula a distância com base no tempo passado (em segundos)
|
||||
double distancia = velocidadeMs * tempoPassado.TotalSeconds;
|
||||
|
||||
if (distancia == 0 && double.Parse(txtDistanciaGPS.Text) > 0)
|
||||
{
|
||||
distancia = double.Parse(txtDistanciaGPS.Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
txtDistanciaGPS.Text = distancia.ToString("0.00");
|
||||
}
|
||||
//double distancia = double.Parse(txtDistanciaGPS.Text); // Distância em metros
|
||||
//angulo -= 180; // Ângulo em graus
|
||||
|
||||
double latitude = GPSService.UltimaLeitura.Latitude;
|
||||
double longitude = GPSService.UltimaLeitura.Longitude;
|
||||
double latitude = ultimaLat;
|
||||
double longitude = ultimaLon;
|
||||
|
||||
// Conversão de ângulo de graus para radianos
|
||||
double anguloRad = angulo * (Math.PI / 180);
|
||||
|
|
@ -181,20 +213,38 @@ namespace AgroBase.Forms
|
|||
// Calcular deslocamento de latitude em radianos
|
||||
double deltaLat = distancia * Math.Cos(anguloRad) / raioTerra;
|
||||
// Converter de radianos para graus
|
||||
double latAtt = latitude + deltaLat * (180 / Math.PI);
|
||||
double _latAtt = latitude + deltaLat * (180 / Math.PI);
|
||||
|
||||
// Calcular deslocamento de longitude em radianos
|
||||
double deltaLong = distancia * Math.Sin(anguloRad) / (raioTerra * Math.Cos(latitude * (Math.PI / 180)));
|
||||
// Converter de radianos para graus
|
||||
double longAtt = longitude + deltaLong * (180 / Math.PI);
|
||||
double _longAtt = longitude + deltaLong * (180 / Math.PI);
|
||||
|
||||
// Atualizar os TextBoxes com as novas coordenadas
|
||||
txtLatitude.Text = latAtt.ToString();
|
||||
txtLongitude.Text = longAtt.ToString();
|
||||
if (atualizarCoordenadas)
|
||||
{
|
||||
if (double.IsNaN(_latAtt) || double.IsNaN(_longAtt))
|
||||
{
|
||||
|
||||
AtualizarPosicaoGPS();
|
||||
}
|
||||
|
||||
// Atualizar os TextBoxes com as novas coordenadas
|
||||
txtLatitude.Text = _latAtt.ToString();
|
||||
txtLongitude.Text = _longAtt.ToString();
|
||||
|
||||
UltimaAtualizacaoGps = DateTime.Now;
|
||||
|
||||
ultimoAnguloGps = angulo;
|
||||
|
||||
AtualizarPosicaoGPS();
|
||||
|
||||
calc = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
ultimaLat = _latAtt;
|
||||
ultimaLon = _longAtt;
|
||||
}
|
||||
|
||||
calc = true;
|
||||
AtualizarDadosTela();
|
||||
calc = false;
|
||||
}
|
||||
|
|
@ -322,6 +372,10 @@ namespace AgroBase.Forms
|
|||
|
||||
private void btnCalcularAngulo_Click(object sender, EventArgs e)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.Controle.PIDdirecional.Kd = double.Parse(txtKd.Text);
|
||||
Variaveis.OperacaoEmAndamento.Controle.PIDdirecional.Ki = double.Parse(txtKi.Text);
|
||||
Variaveis.OperacaoEmAndamento.Controle.PIDdirecional.Kp = double.Parse(txtKp.Text);
|
||||
|
||||
Variaveis.OperacaoEmAndamento.OpMapaGPS.CalculaDadosMovimentacaoAutonoma();
|
||||
|
||||
int errosConsiderar = int.Parse(txtQtdErro.Text);
|
||||
|
|
@ -337,6 +391,11 @@ namespace AgroBase.Forms
|
|||
historicoAngulosCarro.Enqueue(novoAngulo);
|
||||
double anguloCarro = historicoAngulosCarro.Peek(); // Valor de 5 ciclos atrás
|
||||
|
||||
if (double.IsNaN(anguloCarro))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
txtAnguloGPS.Text = anguloCarro.ToString("0.00");
|
||||
}
|
||||
|
||||
|
|
@ -349,14 +408,6 @@ namespace AgroBase.Forms
|
|||
|
||||
txtAnguloControle.Text = anguloAtrasado.ToString("0.00");
|
||||
|
||||
double velocidade = FuncoesMatematicas.CalculaVelocidadeRPM(Variaveis.OperacaoEmAndamento.Controle.RPM_SP);
|
||||
double velocidadeMs = FuncoesMatematicas.ConverteKmhParaMs(velocidade);
|
||||
txtVelocidade.Text = velocidade.ToString("0.00");
|
||||
|
||||
TimeSpan tempoPassado = !chbAutomatico.Checked || UltimaAtualizacao == DateTime.MinValue ? new TimeSpan(10000000) : DateTime.Now - UltimaAtualizacao;
|
||||
// Calcula a distância com base no tempo passado (em segundos)
|
||||
double distancia = velocidadeMs * tempoPassado.TotalSeconds;
|
||||
txtDistanciaGPS.Text = distancia.ToString("0.00");
|
||||
UltimaAtualizacao = DateTime.Now;
|
||||
|
||||
pnlOrientacaoTrajeto.Invalidate();
|
||||
|
|
@ -375,5 +426,14 @@ namespace AgroBase.Forms
|
|||
UltimaAtualizacao = DateTime.Now.AddSeconds(-1);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnReiniciar_Click(object sender, EventArgs e)
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento.ReiniciarSimulacao();
|
||||
frmSimulacaoMapaGPS frm = new frmSimulacaoMapaGPS();
|
||||
frm.Show();
|
||||
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1014,7 +1014,7 @@ namespace AgroBase.Models
|
|||
{
|
||||
if (sonar.DirecaoDesvio == Direcao.Parado || Variaveis.OperacaoEmAndamento.OpMapaGPS.StatusDentroRua.Contains(statusCarro))
|
||||
{
|
||||
TrajetoriaDinamica.Clear();
|
||||
//TrajetoriaDinamica.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -334,12 +334,10 @@ namespace AgroBase.Models.Modules
|
|||
MKS057DService.AdicionarComandoNaFila(MKS057DService.MontarComandoRequisicaoIO(modAddr));
|
||||
}
|
||||
|
||||
bool enviarComando = (!Modulo.DirMotor.Comandar && Modulo.DirMotor.Angulo != 0) || (!Modulo.DirMotor.AtingiuAnguloSP);
|
||||
|
||||
// Verifica se o angulo de set point do motor em questao e diferente do angulo atual, e se for, reenvia o comando para garantir que o motor esteja coerente com o set point
|
||||
if (!MKS057DService.Referenciando && (Modulo.DirMotor.UltimoComandoEnviado.AddMilliseconds(2000) < DateTime.Now) && enviarComando)
|
||||
if (!MKS057DService.Referenciando && (Modulo.DirMotor.UltimoComandoEnviado.AddMilliseconds(2000) < DateTime.Now) && !Modulo.DirMotor.AtingiuAnguloSP)
|
||||
{
|
||||
Modulo.DirMotor.EnviarComandoControle(Controle.UltimaDirecao, enviarComando);
|
||||
Modulo.DirMotor.EnviarComandoControle(Controle.UltimaDirecao, !Modulo.DirMotor.Comandar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1061,7 +1059,8 @@ namespace AgroBase.Models.Modules
|
|||
{
|
||||
get
|
||||
{
|
||||
return FuncoesMatematicas.ValorEstaEntre(Angulo, Angulo_SP, 1);
|
||||
double anguloSp = Comandar ? Angulo_SP : 0;
|
||||
return FuncoesMatematicas.ValorEstaEntre(Angulo, anguloSp, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -844,9 +844,9 @@ namespace AgroBase.Models
|
|||
{
|
||||
LimiteSaida = Controle.Angulo_Max,
|
||||
SetPoint = 0,
|
||||
Kp = 0.7,
|
||||
Ki = 0.05,
|
||||
Kd = 0.1
|
||||
Kp = 1.5, // 0.7
|
||||
Ki = 0.08, // 0.5
|
||||
Kd = 0.03 // 0.1
|
||||
};
|
||||
if (controle != null)
|
||||
{
|
||||
|
|
@ -976,9 +976,9 @@ namespace AgroBase.Models
|
|||
{
|
||||
LimiteSaida = Controle.Angulo_Max,
|
||||
SetPoint = 0,
|
||||
Kp = 0.7,
|
||||
Ki = 0.05,
|
||||
Kd = 0.1
|
||||
Kp = 1.5,
|
||||
Ki = 0.08,
|
||||
Kd = 0.03
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -988,6 +988,12 @@ namespace AgroBase.Models
|
|||
Mapa.GerarTrajetoriaDinamica();
|
||||
}
|
||||
|
||||
public void ReiniciarSimulacao()
|
||||
{
|
||||
Variaveis.OperacaoEmAndamento._EtapaAtual = StatusOperacao.Parametrizando;
|
||||
Variaveis.OperacaoEmAndamento.Iniciado = false;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,13 @@ namespace AgroBase.Models
|
|||
|
||||
var Config = Variaveis.OperacaoEmAndamento.DispSen?.Dados?.ConfiguracaoSensorUltrassom;
|
||||
|
||||
if (!UltrasonicA05Service.Iniciado || Config == null || Config.Configuracao == ConfiguracaoSensorUltrassonico.NaoUtilizado || Config.Sensores.All(x => x.Posicao == PosicaoSensorUltrassonico.NaoConectado))
|
||||
if (
|
||||
!UltrasonicA05Service.Iniciado || // ultrassom nao iniciado
|
||||
Config == null || // configuracao nao definida
|
||||
Config.Configuracao == ConfiguracaoSensorUltrassonico.NaoUtilizado || // configuracao para nao utilizar
|
||||
Config.Sensores.All(x => x.Posicao == PosicaoSensorUltrassonico.NaoConectado) || // configuracao com todos os sensores desconectados
|
||||
Config.Sensores.All(x => !x.Parada && !x.Desvio) // configuracao onde os sensores nao tem acao
|
||||
)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -625,7 +625,7 @@ namespace AgroBase.Services
|
|||
|
||||
public static Bitmap ExibirObstaculos(Bitmap bitmap, List<Subdivisao> subdivisoes, List<Obstaculo> obstaculos, bool ExibirTexto = false)
|
||||
{
|
||||
if (bitmap == null)
|
||||
if (bitmap == null || !Variaveis.OperacaoEmAndamento.Controle.SonarAtivado)
|
||||
{
|
||||
return bitmap;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ namespace AgroBase.Services
|
|||
public string ArquivoSaida = "";
|
||||
public string MapaUrl = "";
|
||||
public string CaminhoDadosMapa = "";
|
||||
public string CaminhoArquivo = "";
|
||||
public MapaFeatureCollectionModel DadosMapa;
|
||||
public bool Carregado = false;
|
||||
|
||||
|
|
@ -48,10 +49,10 @@ namespace AgroBase.Services
|
|||
|
||||
if (!string.IsNullOrEmpty(caminhoArquivo) || opfMapa.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
caminhoArquivo = string.IsNullOrEmpty(caminhoArquivo) ? opfMapa.FileName : caminhoArquivo;
|
||||
string extensao = "." + caminhoArquivo.Split('.')[caminhoArquivo.Split('.').Length - 1];
|
||||
NomeArquivos = caminhoArquivo.Split('\\')[caminhoArquivo.Split('\\').Length - 1].Replace(extensao, "");
|
||||
CaminhoMapa = caminhoArquivo.Replace(NomeArquivos, "").Replace(extensao, "").Replace("\\", "/");
|
||||
CaminhoArquivo = string.IsNullOrEmpty(caminhoArquivo) ? opfMapa.FileName : caminhoArquivo;
|
||||
string extensao = "." + CaminhoArquivo.Split('.')[CaminhoArquivo.Split('.').Length - 1];
|
||||
NomeArquivos = CaminhoArquivo.Split('\\')[CaminhoArquivo.Split('\\').Length - 1].Replace(extensao, "");
|
||||
CaminhoMapa = CaminhoArquivo.Replace(NomeArquivos, "").Replace(extensao, "").Replace("\\", "/");
|
||||
|
||||
pythonProcess = PythonService.RunScript(script, new string[]
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1,47 @@
|
|||
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Id":"1","Name":"Projeto","Length":21.332976190943135,"Dist1":0.0,"Dist2":0.0},"geometry":{"id":"0","type":"LineString","coordinates":[[-47.381495333333334,-22.213068166666666],[-47.381469166666669,-22.213091333333335],[-47.38141825,-22.213137833333334],[-47.3813925,-22.213161666666668],[-47.381369666666664,-22.2131845]]}},{"type":"Feature","properties":{"Id":"2","Name":"Projeto","Length":24.045328359726675,"Dist1":0.0,"Dist2":0.0},"geometry":{"id":"1","type":"LineString","coordinates":[[-47.381340166666668,-22.213175666666668],[-47.381375333333331,-22.213137166666666],[-47.38140933333333,-22.213102666666668],[-47.381453666666665,-22.213058166666666],[-47.381496666666663,-22.213015666666667]]}}]}
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"Id": "1",
|
||||
"Name": "Projeto",
|
||||
"Length": 21.332976190943135,
|
||||
"Dist1": 0.0,
|
||||
"Dist2": 0.0
|
||||
},
|
||||
"geometry": {
|
||||
"id": null,
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[-47.381495333333334, -22.213068166666666],
|
||||
[-47.38146916666667, -22.213091333333335],
|
||||
[-47.38141825, -22.213137833333333],
|
||||
[-47.3813925, -22.213161666666668],
|
||||
[-47.381369666666664, -22.2131845]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"Id": "2",
|
||||
"Name": "Projeto",
|
||||
"Length": 24.045328359726675,
|
||||
"Dist1": 0.0,
|
||||
"Dist2": 0.0
|
||||
},
|
||||
"geometry": {
|
||||
"id": null,
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[-47.381340166666668, -22.213175666666668],
|
||||
[-47.381375333333331, -22.213137166666666],
|
||||
[-47.38140933333333, -22.213102666666668],
|
||||
[-47.381453666666665, -22.213058166666666],
|
||||
[-47.381496666666663, -22.213015666666667]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<meta name="viewport" content="width=device-width,
|
||||
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<style>
|
||||
#map_37ad66d71d482fc31ae08a85e4088891 {
|
||||
#map_7ac81ec61e6e9fdf3f2a0f6fe49b98f1 {
|
||||
position: relative;
|
||||
width: 100.0%;
|
||||
height: 100.0%;
|
||||
|
|
@ -39,14 +39,14 @@
|
|||
<body>
|
||||
|
||||
|
||||
<div class="folium-map" id="map_37ad66d71d482fc31ae08a85e4088891" ></div>
|
||||
<div class="folium-map" id="map_7ac81ec61e6e9fdf3f2a0f6fe49b98f1" ></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
|
||||
|
||||
var map_37ad66d71d482fc31ae08a85e4088891 = L.map(
|
||||
"map_37ad66d71d482fc31ae08a85e4088891",
|
||||
var map_7ac81ec61e6e9fdf3f2a0f6fe49b98f1 = L.map(
|
||||
"map_7ac81ec61e6e9fdf3f2a0f6fe49b98f1",
|
||||
{
|
||||
center: [-22.213100083333334, -47.38141841666666],
|
||||
crs: L.CRS.EPSG3857,
|
||||
|
|
@ -60,6 +60,15 @@
|
|||
|
||||
|
||||
|
||||
var tile_layer_b1319f46ace58751b7062db8f25f20b3 = 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_b1319f46ace58751b7062db8f25f20b3.addTo(map_7ac81ec61e6e9fdf3f2a0f6fe49b98f1);
|
||||
|
||||
|
||||
|
||||
|
||||
var trajetosSelecionados = {};
|
||||
|
|
@ -73,7 +82,7 @@
|
|||
}*/
|
||||
});
|
||||
}
|
||||
function geo_json_c203a1c7026145208bab4067dd42aa10_onEachFeature(feature, layer) {
|
||||
function geo_json_cfc16ab3eb25dd8ad7693622d16294d9_onEachFeature(feature, layer) {
|
||||
layer.on({
|
||||
|
||||
click: function(e) {
|
||||
|
|
@ -109,20 +118,20 @@
|
|||
}*/
|
||||
});
|
||||
};
|
||||
var geo_json_c203a1c7026145208bab4067dd42aa10 = L.geoJson(null, {
|
||||
onEachFeature: geo_json_c203a1c7026145208bab4067dd42aa10_onEachFeature,
|
||||
var geo_json_cfc16ab3eb25dd8ad7693622d16294d9 = L.geoJson(null, {
|
||||
onEachFeature: geo_json_cfc16ab3eb25dd8ad7693622d16294d9_onEachFeature,
|
||||
|
||||
});
|
||||
|
||||
function geo_json_c203a1c7026145208bab4067dd42aa10_add (data) {
|
||||
geo_json_c203a1c7026145208bab4067dd42aa10
|
||||
function geo_json_cfc16ab3eb25dd8ad7693622d16294d9_add (data) {
|
||||
geo_json_cfc16ab3eb25dd8ad7693622d16294d9
|
||||
.addData(data);
|
||||
}
|
||||
geo_json_c203a1c7026145208bab4067dd42aa10_add({"features": [{"geometry": {"coordinates": [[-47.38149533333333, -22.213068166666666], [-47.38146916666667, -22.213091333333335], [-47.38141825, -22.213137833333334], [-47.3813925, -22.213161666666668], [-47.381369666666664, -22.2131845]], "id": "0", "type": "LineString"}, "id": 0, "properties": {"Dist1": 0.0, "Dist2": 0.0, "Id": "1", "Length": 21.332976190943135, "Name": "Projeto"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.38134016666667, -22.213175666666668], [-47.38137533333333, -22.213137166666666], [-47.38140933333333, -22.213102666666668], [-47.381453666666665, -22.213058166666666], [-47.38149666666666, -22.213015666666667]], "id": "1", "type": "LineString"}, "id": 1, "properties": {"Dist1": 0.0, "Dist2": 0.0, "Id": "2", "Length": 24.045328359726675, "Name": "Projeto"}, "type": "Feature"}], "type": "FeatureCollection"});
|
||||
geo_json_cfc16ab3eb25dd8ad7693622d16294d9_add({"features": [{"geometry": {"coordinates": [[-47.38149533333333, -22.213068166666666], [-47.38146916666667, -22.213091333333335], [-47.38141825, -22.213137833333334], [-47.3813925, -22.213161666666668], [-47.381369666666664, -22.2131845]], "id": null, "type": "LineString"}, "id": 0, "properties": {"Dist1": 0.0, "Dist2": 0.0, "Id": "1", "Length": 21.332976190943135, "Name": "Projeto"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.38134016666667, -22.213175666666668], [-47.38137533333333, -22.213137166666666], [-47.38140933333333, -22.213102666666668], [-47.381453666666665, -22.213058166666666], [-47.38149666666666, -22.213015666666667]], "id": null, "type": "LineString"}, "id": 1, "properties": {"Dist1": 0.0, "Dist2": 0.0, "Id": "2", "Length": 24.045328359726675, "Name": "Projeto"}, "type": "Feature"}], "type": "FeatureCollection"});
|
||||
|
||||
|
||||
|
||||
geo_json_c203a1c7026145208bab4067dd42aa10.addTo(map_37ad66d71d482fc31ae08a85e4088891);
|
||||
geo_json_cfc16ab3eb25dd8ad7693622d16294d9.addTo(map_7ac81ec61e6e9fdf3f2a0f6fe49b98f1);
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -143,7 +152,7 @@
|
|||
}
|
||||
trajeto_json_add({"features": []});
|
||||
|
||||
trajeto_json.addTo(map_37ad66d71d482fc31ae08a85e4088891);
|
||||
trajeto_json.addTo(map_7ac81ec61e6e9fdf3f2a0f6fe49b98f1);
|
||||
|
||||
function adicionarGeometria(novaGeometria) {
|
||||
trajeto_json.addData(novaGeometria);
|
||||
|
|
@ -201,7 +210,7 @@
|
|||
}
|
||||
trajeto_dinamico_json_add({"features": []});
|
||||
|
||||
trajeto_dinamico_json.addTo(map_37ad66d71d482fc31ae08a85e4088891);
|
||||
trajeto_dinamico_json.addTo(map_7ac81ec61e6e9fdf3f2a0f6fe49b98f1);
|
||||
|
||||
function adicionarGeometriaDinamica(novaGeometria) {
|
||||
trajeto_dinamico_json.addData(novaGeometria);
|
||||
|
|
@ -254,9 +263,9 @@
|
|||
|
||||
var marcadorEquipamento = L.marker([0, 0], {
|
||||
icon: customIcon
|
||||
}).addTo(map_37ad66d71d482fc31ae08a85e4088891);
|
||||
}).addTo(map_7ac81ec61e6e9fdf3f2a0f6fe49b98f1);
|
||||
|
||||
var marcadorBase = L.marker([0, 0], {}).addTo(map_37ad66d71d482fc31ae08a85e4088891);
|
||||
var marcadorBase = L.marker([0, 0], {}).addTo(map_7ac81ec61e6e9fdf3f2a0f6fe49b98f1);
|
||||
var icon = L.AwesomeMarkers.icon(
|
||||
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
|
||||
);
|
||||
|
|
@ -338,7 +347,7 @@
|
|||
}
|
||||
|
||||
if (foco) {
|
||||
map_37ad66d71d482fc31ae08a85e4088891.setView(novaPosicao, map_37ad66d71d482fc31ae08a85e4088891.getZoom());
|
||||
map_7ac81ec61e6e9fdf3f2a0f6fe49b98f1.setView(novaPosicao, map_7ac81ec61e6e9fdf3f2a0f6fe49b98f1.getZoom());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -355,7 +364,7 @@
|
|||
function atualizarSelecaoRuas(selecionadas) {
|
||||
selecionadas = JSON.parse(selecionadas);
|
||||
RuasSelecionadas = Array.isArray(selecionadas) ? [...selecionadas] : [];
|
||||
geo_json_c203a1c7026145208bab4067dd42aa10.eachLayer(function (layer) {
|
||||
geo_json_cfc16ab3eb25dd8ad7693622d16294d9.eachLayer(function (layer) {
|
||||
if (RuasSelecionadas.includes(parseInt(layer.feature.id))) {
|
||||
layer.setStyle({ color: 'blue' });
|
||||
} else {
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -480,4 +480,4 @@ C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\Debug\MathNet.Numerics.xml
|
|||
C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\Debug\OpenHardwareMonitorLib.dll
|
||||
C:\ZendionInc\agrobot_base\AgroBase\AgroBase\obj\Debug\AgroBase.Forms.frmA05Config.resources
|
||||
C:\ZendionInc\agrobot_base\AgroBase\AgroBase\obj\Debug\AgroBase.Forms.frmEthernet.resources
|
||||
C:\ZendionInc\agrobot_base\AgroBase\AgroBase\obj\Debug\AgroBase.csproj.CopyComplete
|
||||
C:\ZendionINC\agrobot_base\AgroBase\AgroBase\obj\Debug\AgroBase.csproj.Up2Date
|
||||
|
|
|
|||
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.
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1,47 @@
|
|||
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Id":"1","Name":"Projeto","Length":21.332976190943135,"Dist1":0.0,"Dist2":0.0},"geometry":{"id":"0","type":"LineString","coordinates":[[-47.381495333333334,-22.213068166666666],[-47.381469166666669,-22.213091333333335],[-47.38141825,-22.213137833333334],[-47.3813925,-22.213161666666668],[-47.381369666666664,-22.2131845]]}},{"type":"Feature","properties":{"Id":"2","Name":"Projeto","Length":24.045328359726675,"Dist1":0.0,"Dist2":0.0},"geometry":{"id":"1","type":"LineString","coordinates":[[-47.381340166666668,-22.213175666666668],[-47.381375333333331,-22.213137166666666],[-47.38140933333333,-22.213102666666668],[-47.381453666666665,-22.213058166666666],[-47.381496666666663,-22.213015666666667]]}}]}
|
||||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"Id": "1",
|
||||
"Name": "Projeto",
|
||||
"Length": 21.332976190943135,
|
||||
"Dist1": 0.0,
|
||||
"Dist2": 0.0
|
||||
},
|
||||
"geometry": {
|
||||
"id": null,
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[-47.381495333333334, -22.213068166666666],
|
||||
[-47.38146916666667, -22.213091333333335],
|
||||
[-47.38141825, -22.213137833333333],
|
||||
[-47.3813925, -22.213161666666668],
|
||||
[-47.381369666666664, -22.2131845]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"Id": "2",
|
||||
"Name": "Projeto",
|
||||
"Length": 24.045328359726675,
|
||||
"Dist1": 0.0,
|
||||
"Dist2": 0.0
|
||||
},
|
||||
"geometry": {
|
||||
"id": null,
|
||||
"type": "LineString",
|
||||
"coordinates": [
|
||||
[-47.381340166666668, -22.213175666666668],
|
||||
[-47.381375333333331, -22.213137166666666],
|
||||
[-47.38140933333333, -22.213102666666668],
|
||||
[-47.381453666666665, -22.213058166666666],
|
||||
[-47.381496666666663, -22.213015666666667]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<meta name="viewport" content="width=device-width,
|
||||
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<style>
|
||||
#map_db1225b1e62d9bab1ce65e5a1b0337da {
|
||||
#map_0fff78eb96d18efec1cee81d04739815 {
|
||||
position: relative;
|
||||
width: 100.0%;
|
||||
height: 100.0%;
|
||||
|
|
@ -39,14 +39,14 @@
|
|||
<body>
|
||||
|
||||
|
||||
<div class="folium-map" id="map_db1225b1e62d9bab1ce65e5a1b0337da" ></div>
|
||||
<div class="folium-map" id="map_0fff78eb96d18efec1cee81d04739815" ></div>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
|
||||
|
||||
var map_db1225b1e62d9bab1ce65e5a1b0337da = L.map(
|
||||
"map_db1225b1e62d9bab1ce65e5a1b0337da",
|
||||
var map_0fff78eb96d18efec1cee81d04739815 = L.map(
|
||||
"map_0fff78eb96d18efec1cee81d04739815",
|
||||
{
|
||||
center: [-22.213100083333334, -47.38141841666666],
|
||||
crs: L.CRS.EPSG3857,
|
||||
|
|
@ -60,13 +60,13 @@
|
|||
|
||||
|
||||
|
||||
var tile_layer_780db0f51e5cd4e2609b0632b0bfa588 = L.tileLayer(
|
||||
var tile_layer_34bda382118d1e677c622cff3c40dd70 = 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_780db0f51e5cd4e2609b0632b0bfa588.addTo(map_db1225b1e62d9bab1ce65e5a1b0337da);
|
||||
tile_layer_34bda382118d1e677c622cff3c40dd70.addTo(map_0fff78eb96d18efec1cee81d04739815);
|
||||
|
||||
|
||||
|
||||
|
|
@ -82,7 +82,7 @@
|
|||
}*/
|
||||
});
|
||||
}
|
||||
function geo_json_c919ee5e792846159b7b6a14116f9dcb_onEachFeature(feature, layer) {
|
||||
function geo_json_f1da1bfaa69b1a5885ba8a223c93d9bc_onEachFeature(feature, layer) {
|
||||
layer.on({
|
||||
|
||||
click: function(e) {
|
||||
|
|
@ -118,20 +118,20 @@
|
|||
}*/
|
||||
});
|
||||
};
|
||||
var geo_json_c919ee5e792846159b7b6a14116f9dcb = L.geoJson(null, {
|
||||
onEachFeature: geo_json_c919ee5e792846159b7b6a14116f9dcb_onEachFeature,
|
||||
var geo_json_f1da1bfaa69b1a5885ba8a223c93d9bc = L.geoJson(null, {
|
||||
onEachFeature: geo_json_f1da1bfaa69b1a5885ba8a223c93d9bc_onEachFeature,
|
||||
|
||||
});
|
||||
|
||||
function geo_json_c919ee5e792846159b7b6a14116f9dcb_add (data) {
|
||||
geo_json_c919ee5e792846159b7b6a14116f9dcb
|
||||
function geo_json_f1da1bfaa69b1a5885ba8a223c93d9bc_add (data) {
|
||||
geo_json_f1da1bfaa69b1a5885ba8a223c93d9bc
|
||||
.addData(data);
|
||||
}
|
||||
geo_json_c919ee5e792846159b7b6a14116f9dcb_add({"features": [{"geometry": {"coordinates": [[-47.38149533333333, -22.213068166666666], [-47.38146916666667, -22.213091333333335], [-47.38141825, -22.213137833333334], [-47.3813925, -22.213161666666668], [-47.381369666666664, -22.2131845]], "id": "0", "type": "LineString"}, "id": 0, "properties": {"Dist1": 0.0, "Dist2": 0.0, "Id": "1", "Length": 21.332976190943135, "Name": "Projeto"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.38134016666667, -22.213175666666668], [-47.38137533333333, -22.213137166666666], [-47.38140933333333, -22.213102666666668], [-47.381453666666665, -22.213058166666666], [-47.38149666666666, -22.213015666666667]], "id": "1", "type": "LineString"}, "id": 1, "properties": {"Dist1": 0.0, "Dist2": 0.0, "Id": "2", "Length": 24.045328359726675, "Name": "Projeto"}, "type": "Feature"}], "type": "FeatureCollection"});
|
||||
geo_json_f1da1bfaa69b1a5885ba8a223c93d9bc_add({"features": [{"geometry": {"coordinates": [[-47.38149533333333, -22.213068166666666], [-47.38146916666667, -22.213091333333335], [-47.38141825, -22.213137833333334], [-47.3813925, -22.213161666666668], [-47.381369666666664, -22.2131845]], "id": null, "type": "LineString"}, "id": 0, "properties": {"Dist1": 0.0, "Dist2": 0.0, "Id": "1", "Length": 21.332976190943135, "Name": "Projeto"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.38134016666667, -22.213175666666668], [-47.38137533333333, -22.213137166666666], [-47.38140933333333, -22.213102666666668], [-47.381453666666665, -22.213058166666666], [-47.38149666666666, -22.213015666666667]], "id": null, "type": "LineString"}, "id": 1, "properties": {"Dist1": 0.0, "Dist2": 0.0, "Id": "2", "Length": 24.045328359726675, "Name": "Projeto"}, "type": "Feature"}], "type": "FeatureCollection"});
|
||||
|
||||
|
||||
|
||||
geo_json_c919ee5e792846159b7b6a14116f9dcb.addTo(map_db1225b1e62d9bab1ce65e5a1b0337da);
|
||||
geo_json_f1da1bfaa69b1a5885ba8a223c93d9bc.addTo(map_0fff78eb96d18efec1cee81d04739815);
|
||||
|
||||
</script>
|
||||
|
||||
|
|
@ -152,7 +152,7 @@
|
|||
}
|
||||
trajeto_json_add({"features": []});
|
||||
|
||||
trajeto_json.addTo(map_db1225b1e62d9bab1ce65e5a1b0337da);
|
||||
trajeto_json.addTo(map_0fff78eb96d18efec1cee81d04739815);
|
||||
|
||||
function adicionarGeometria(novaGeometria) {
|
||||
trajeto_json.addData(novaGeometria);
|
||||
|
|
@ -210,7 +210,7 @@
|
|||
}
|
||||
trajeto_dinamico_json_add({"features": []});
|
||||
|
||||
trajeto_dinamico_json.addTo(map_db1225b1e62d9bab1ce65e5a1b0337da);
|
||||
trajeto_dinamico_json.addTo(map_0fff78eb96d18efec1cee81d04739815);
|
||||
|
||||
function adicionarGeometriaDinamica(novaGeometria) {
|
||||
trajeto_dinamico_json.addData(novaGeometria);
|
||||
|
|
@ -263,9 +263,9 @@
|
|||
|
||||
var marcadorEquipamento = L.marker([0, 0], {
|
||||
icon: customIcon
|
||||
}).addTo(map_db1225b1e62d9bab1ce65e5a1b0337da);
|
||||
}).addTo(map_0fff78eb96d18efec1cee81d04739815);
|
||||
|
||||
var marcadorBase = L.marker([0, 0], {}).addTo(map_db1225b1e62d9bab1ce65e5a1b0337da);
|
||||
var marcadorBase = L.marker([0, 0], {}).addTo(map_0fff78eb96d18efec1cee81d04739815);
|
||||
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_db1225b1e62d9bab1ce65e5a1b0337da.setView(novaPosicao, map_db1225b1e62d9bab1ce65e5a1b0337da.getZoom());
|
||||
map_0fff78eb96d18efec1cee81d04739815.setView(novaPosicao, map_0fff78eb96d18efec1cee81d04739815.getZoom());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -364,7 +364,7 @@
|
|||
function atualizarSelecaoRuas(selecionadas) {
|
||||
selecionadas = JSON.parse(selecionadas);
|
||||
RuasSelecionadas = Array.isArray(selecionadas) ? [...selecionadas] : [];
|
||||
geo_json_c919ee5e792846159b7b6a14116f9dcb.eachLayer(function (layer) {
|
||||
geo_json_f1da1bfaa69b1a5885ba8a223c93d9bc.eachLayer(function (layer) {
|
||||
if (RuasSelecionadas.includes(parseInt(layer.feature.id))) {
|
||||
layer.setStyle({ color: 'blue' });
|
||||
} else {
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue