AdjaSatBasic.cs 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. using DevExpress.Xpo;
  2. using Ips.Library.Entity;
  3. using Ips.Sps.Tsks;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace Ips.Sps.Sigs
  10. {
  11. [NonPersistent]
  12. public class AdjaSatBasic : XPObject
  13. {
  14. public AdjaSatBasic() : base()
  15. {
  16. }
  17. public AdjaSatBasic(Session session) : base(session)
  18. {
  19. }
  20. public override void AfterConstruction()
  21. {
  22. base.AfterConstruction();
  23. FixCalc = false;
  24. this.DtoCenter = 0;
  25. this.DtoRange = 40000;
  26. this.DfoRange = 16384;
  27. this.Snr = 14;
  28. this.DtoCorr = 1;
  29. this.DfoCorr = 10;
  30. }
  31. private int _satId;
  32. [DisplayName("通联邻星")]
  33. public int SatId
  34. {
  35. get => _satId;
  36. set => SetPropertyValue(nameof(SatId), ref _satId, value);
  37. }
  38. private bool _FixCalc;
  39. [DisplayName("固定计算")]
  40. public bool FixCalc
  41. {
  42. get => _FixCalc;
  43. set => SetPropertyValue(nameof(FixCalc), ref _FixCalc, value);
  44. }
  45. private int _DtoCenter;
  46. [DisplayName("时差中心(us)")]
  47. public int DtoCenter
  48. {
  49. get => _DtoCenter;
  50. set => SetPropertyValue(nameof(DtoCenter), ref _DtoCenter, value);
  51. }
  52. private int _DtoRange;
  53. [DisplayName("时差范围(us)")]
  54. public int DtoRange
  55. {
  56. get => _DtoRange;
  57. set => SetPropertyValue(nameof(DtoRange), ref _DtoRange, value);
  58. }
  59. private int _DfoCenter;
  60. [DisplayName("频差中心(Hz)")]
  61. public int DfoCenter
  62. {
  63. get => _DfoCenter;
  64. set => SetPropertyValue(nameof(DfoCenter), ref _DfoCenter, value);
  65. }
  66. private int _DfoRange;
  67. [DisplayName("频差范围(Hz)")]
  68. public int DfoRange
  69. {
  70. get => _DfoRange;
  71. set => SetPropertyValue(nameof(DfoRange), ref _DfoRange, value);
  72. }
  73. private int _Snr;
  74. [DisplayName("信噪比(dB)")]
  75. public int Snr
  76. {
  77. get => _Snr;
  78. set => SetPropertyValue(nameof(Snr), ref _Snr, value);
  79. }
  80. private int _AddZero;
  81. [DisplayName("补零样点数")]
  82. public int AddZero
  83. {
  84. get => _AddZero;
  85. set => SetPropertyValue(nameof(AddZero), ref _AddZero, value);
  86. }
  87. private int _DtoCorr;
  88. [DisplayName("时差陷波(us)")]
  89. public int DtoCorr
  90. {
  91. get => _DtoCorr;
  92. set => SetPropertyValue(nameof(DtoCorr), ref _DtoCorr, value);
  93. }
  94. private int _DfoCorr;
  95. [DisplayName("频差陷波(Hz)")]
  96. public int DfoCorr
  97. {
  98. get => _DfoCorr;
  99. set => SetPropertyValue(nameof(DfoCorr), ref _DfoCorr, value);
  100. }
  101. private double _sigOffset;
  102. [DisplayName("信号偏移(s)")]
  103. public double SigOffset
  104. {
  105. get => _sigOffset;
  106. set => SetPropertyValue(nameof(SigOffset), ref _sigOffset, value);
  107. }
  108. public CorOptions GetCorOptions(int fs)
  109. {
  110. CorOptions options = new CorOptions();
  111. options.Fs = fs;
  112. options.DtoCenter = DtoCenter;
  113. options.DtoRange = DtoRange;
  114. options.DfoCenter = DfoCenter;
  115. options.DfoRange = DfoRange;
  116. options.Snr = Snr;
  117. options.AddZero = AddZero;
  118. options.DtoCorr = DtoCorr;
  119. options.DfoCorr = DfoCorr;
  120. options.TimeOffset = Convert.ToInt32(_sigOffset * 1e6);
  121. return options;
  122. }
  123. }
  124. }