# Step 6: Inset distance y0 if Z0 < Rin0: arg = Z0 / Rin0 if arg > 1: arg = 1 y0 = (L / math.pi) * math.acos(math.sqrt(arg)) else: y0 = 0.0 # Already matched at edge (Z0 >= Rin0)
# Convert back to mm return "patch_width_mm": W * 1000, "patch_length_mm": L * 1000, "effective_epsilon_r": round(ereff, 4), "edge_resistance_ohms": round(Rin0, 2), "inset_distance_from_edge_mm": round(y0 * 1000, 3), "input_impedance_at_inset_ohms": round(Rin0 * (math.cos(math.pi * y0 / L)**2), 2) patch antenna inset feed calculator
--- Results --- Patch width (W) : 37.26 mm Patch length (L) : 28.96 mm Effective εr : 4.125 Edge input resistance : 215.8 Ω Inset distance (y0) : 9.32 mm from edge Impedance at inset : 49.98 Ω # Step 6: Inset distance y0 if Z0