ajustes no geoleverarm

This commit is contained in:
Diego Freitas 2026-03-25 07:14:38 -03:00
parent fdb71b03bf
commit f3476d6773
3 changed files with 8 additions and 6 deletions

View File

@ -1583,7 +1583,7 @@ namespace AgroBase.Models
{
var (la_frontal, la_lateral) = ((JObject)controleBase._comp_value).ToObject<(double?, double?)>();
if (la_lateral != null || la_frontal != null)
GPSService.LeverArm = new GeoLeverArm(la_frontal ?? 0, la_lateral ?? 0);
GPSService.LeverArm = new GeoLeverArm(offsetFisicoFrontalCm: VariaveisEquipamento.LeverArmFrontalCm, offsetFisicoLateralCm: VariaveisEquipamento.LeverArmLateralCm, offsetCampoFrontalCm: la_frontal ?? 0, offsetCampoLateralCm: la_lateral ?? 0);
return;
}

View File

@ -49,7 +49,7 @@ namespace AgroBase.Services
private static bool LoopRTK_Ntrip = false;
public static bool CorrecaoRTK_Ntrip = false;
public static DateTime UltimoEnvioCorrecaoRTK = DateTime.MinValue;
public static GeoLeverArm LeverArm = new GeoLeverArm();
public static GeoLeverArm LeverArm = new GeoLeverArm(offsetFisicoFrontalCm: VariaveisEquipamento.LeverArmFrontalCm, offsetFisicoLateralCm: VariaveisEquipamento.LeverArmLateralCm);
public static void AtualizarPortaCOM(SerialPort Porta)
{
@ -1347,14 +1347,16 @@ namespace AgroBase.Services
public double LatDeg { get; }
public double LonDeg { get; }
public double AltElipsoidalM { get; }
public double HeadingDeg { get; }
public TiposCorrecaoGPS FixQuality { get; }
public GgaFix(DateTime tsUtc, double latDeg, double lonDeg, double altElipsoidalM, TiposCorrecaoGPS fixQuality)
public GgaFix(DateTime tsUtc, double latDeg, double lonDeg, double altElipsoidalM, double headingDeg, TiposCorrecaoGPS fixQuality)
{
TsUtc = tsUtc;
LatDeg = latDeg;
LonDeg = lonDeg;
AltElipsoidalM = altElipsoidalM;
HeadingDeg = headingDeg;
FixQuality = fixQuality;
}
}
@ -1374,11 +1376,11 @@ namespace AgroBase.Services
private readonly bool invertHeading;
private readonly bool mirrorLateral;
public GeoLeverArm(double offsetCampoFrontalCm = 0, double offsetCampoLateralCm = 0, bool invH = false, bool mirrL = false)
public GeoLeverArm(double offsetFisicoFrontalCm = 0, double offsetFisicoLateralCm = 0, double offsetCampoFrontalCm = 0, double offsetCampoLateralCm = 0, bool invH = false, bool mirrL = false)
{
// fixos do equipamento
xFisico = VariaveisEquipamento.LeverArmFrontalCm / 100.0;
yFisico = VariaveisEquipamento.LeverArmLateralCm / 100.0;
xFisico = offsetFisicoFrontalCm / 100.0;
yFisico = offsetFisicoLateralCm / 100.0;
// ajustes de campo
xCampo = offsetCampoFrontalCm / 100.0;