1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| ' CombineFarfields
Sub Main ()
' First calculate the single farfield in 5 degree steps, if not already accomplished
SelectTreeItem("Farfields\farfield (f=27.18) [1]")
With FarfieldPlot
.Reset
.Plottype ("3d")
.Step (5)
.Step2(5)
.Plot
End With
ResultPath = GetProjectPath("Result") ' Assume that the farfield files are in the projects result folder
' Use the single result with different array element positions, rotations and phase shifts
' and combine them to the array farfield pattern.
With FarfieldArray
.ClearAntennaItems()
.SetCombineFrequency(27.18)
' Rotation angles around axis: z x' z"
' PosX PosY PosZ alph beta gamm Amp Phase
.AddAntennaItem(ResultPath + "farfield (f=27.18)2D_1.ffp", 0.0, 0.0, 0.0, 180, 0, 0, 1.0, -90.0)
.AddAntennaItem(ResultPath + "farfield (f=27.18)2D_1.ffp", 0.0, 0.0, 0.0, 90, 0, 0, 1.0, 0.0)
.AddAntennaItem(ResultPath + "farfield (f=27.18)2D_1.ffp", 0.0, 0.0, 0.0, 270, 0, 0, 1.0, 0.0)
.AddAntennaItem(ResultPath + "farfield (f=27.18)2D_1.ffp", 0.0, 0.0, 0.0, 0, 0, 0, 1.0, 90.0)
.SetNormalizeAntennas False
.ExecuteCombine(ResultPath + "combined_ff.ffp", 5.0) ' Store the combined antenna in 5 degree steps
' MsgBox "Actual Power / Power Sum = " & .GetCombinePowerRatio()
End With
' Put the new result into the navigation tree...
With Resulttree
.Name "Farfields\Array" ' Entry name and destination folder
.File ResultPath + "combined_ff.ffp" ' Result file name
.Type "Farfield"
.Add
End With
' ...and select it for beeing plotted.
SelectTreeItem("Farfields\Array")
End Sub |
Partager