Browse Source

计算单位修改

zhangzhiming 1 year ago
parent
commit
3d80d0b7bc

BIN
XzXdDw.App/Api/粗估精估/XcorrGpu.exe


+ 3 - 2
XzXdDw.App/UserControl/CtrlCgTool.cs

@@ -93,11 +93,13 @@ namespace XzXdDw.App.UserControl
                             sampleCount = (f2.Length / 4).ToString();
                             sampleCount = (f2.Length / 4).ToString();
                     }
                     }
 
 
+                    double fs = Convert.ToDouble(txtFs.Text);
+
                     Process p = new Process();
                     Process p = new Process();
                     p.StartInfo.WorkingDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "API\\粗估精估");
                     p.StartInfo.WorkingDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "API\\粗估精估");
                     p.StartInfo.FileName = Path.Combine(p.StartInfo.WorkingDirectory, "XcorrGpu.exe");
                     p.StartInfo.FileName = Path.Combine(p.StartInfo.WorkingDirectory, "XcorrGpu.exe");
                     // XcorrGpu.exe - m e:/ 1.dat - a e:/ 2.dat - s 8388608 - f 6250000 - c 1780 - r 500 - j 16384 - t 14 - p 0
                     // XcorrGpu.exe - m e:/ 1.dat - a e:/ 2.dat - s 8388608 - f 6250000 - c 1780 - r 500 - j 16384 - t 14 - p 0
-                    p.StartInfo.Arguments = $"-m \"{txtF1.Text}\" -a \"{txtF2.Text}\" -s {sampleCount} -f {txtFs.Text}" +
+                    p.StartInfo.Arguments = $"-m \"{txtF1.Text}\" -a \"{txtF2.Text}\" -s {sampleCount} -f {(Int64)(fs * 1e6)}" +
                         $" -c {txtDtoCenter.Text} -r {txtDtoRange.Text} -j {txtDfoRange.Text} -t {txtSnr.Text} -p {txtMode.SelectedIndex}";
                         $" -c {txtDtoCenter.Text} -r {txtDtoRange.Text} -j {txtDfoRange.Text} -t {txtSnr.Text} -p {txtMode.SelectedIndex}";
                     p.StartInfo.CreateNoWindow = true;
                     p.StartInfo.CreateNoWindow = true;
                     p.StartInfo.RedirectStandardError = true;
                     p.StartInfo.RedirectStandardError = true;
@@ -107,7 +109,6 @@ namespace XzXdDw.App.UserControl
                     p.WaitForExit();
                     p.WaitForExit();
                     var str = p.StandardOutput.ReadToEnd();
                     var str = p.StandardOutput.ReadToEnd();
                     sw.Stop();
                     sw.Stop();
-
                     if (str != null && str.Contains(":") && str.Length > 3)
                     if (str != null && str.Contains(":") && str.Length > 3)
                     {
                     {
                         var arr = str.Split(":".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)[1].Split("+".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                         var arr = str.Split(":".ToCharArray(), StringSplitOptions.RemoveEmptyEntries)[1].Split("+".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);