|aŠ˛ţ˙˙˙˙˙?˙ż´>TD @RCindex_universal€ TD @RCindex_2_lensesŠTJ%ŠTJ%¨€ H ž@@ D‹@*Program for determining RC …€č›Ŕ// Program for determining RC index (see Rohr formula) // https://tinyurl.com/44zpyhsb // RCindex_universal determines the paramaters from One know glass // RCindex_2_glass determines the parametersfrom catalogue refractive // indexes (Ohara, Schott and others) of two known glasses. // Author Josef Ladra Š 2021 // Version 1.2 EXPORT RCindex_universal() BEGIN LOCAL focal, dia, glass, ss, rc, bk7; LOCAL fpl51, fpl53, caf, save, save_data, type_glass; //get the lens pameters IF (SIZE(L6)==6) THEN focal:= L6(1); dia:= L6(2); bk7:= L6(3); fpl51:= L6(4); fpl53:= L6(5); caf:= L6(6); END; INPUT({ {focal,[0],{40,25,1}}, {dia,[0],{40,25,2}}, {bk7,0,{35,45,4}}, {fpl51,0,{80,15,4}}, {fpl53,0,{35,15,5}}, {caf,0,{80,15,5}}, {save,0,{85,15,6}} }, "Telescope lens data ", {"Focal lenght ","Diameter lens ", "BK7/F2 ", "FPL-51 ", "FPL-53 ", "CaF2 ", "Save " }, {"Enter focal lenght", "Enter diameter lens", "Check glass", "Check glass", "Check glass", "Check glass", "Save values"}); IF save==1 THEN save_data:= {focal, dia, bk7, fpl51, fpl53, caf}; L6:= save_data; END; //choose glass IF bk7 == 1 THEN ss := 2000; type_glass := "BK7/F2"; END; IF fpl51 == 1 THEN ss := 6000; type_glass := "FPL-51"; END; IF fpl53 == 1 THEN ss := 10000; type_glass := "FPL-53"; END; IF caf == 1 THEN ss := 16000; type_glass := "CaF2"; END; //make calculation and print rc:= ((920*dia)/((focal/dia)*ss)); IF rc < 1 THEN MSGBOX("Apochromat"); END; IF rc > 1 AND rc < 2 THEN MSGBOX("Semi Apochromat"); END; IF rc > 2 THEN MSGBOX("Achromat"); END; PRINT(); PRINT("RCindex = "+((920*dia)/((focal/dia)*ss))); PRINT("Type of glass = "+type_glass); PRINT("Focal lenght = "+focal+" mm"); PRINT("Diameter lens = "+dia+" mm"); PRINT("Ratio F = "+focal/dia); PRINT("Airy disk = "+2*1.22*.000546074*(focal/dia)+" mm"); PRINT("Depth of focus = "+2*1.22*.000546074*(focal/dia)*2*focal/dia+" mm"); PRINT("Dawes limit = "+116/dia+" arcseconds"); END; //2 know lenses, refractive indexes from the catalogue EXPORT RCindex_2_lenses() BEGIN LOCAL C, d, F, e, C1, d1, F1, e1; LOCAL fo, di, dis1, dis2, abbe1, abbe2, lambda, rc; LOCAL save, save_data, type1, type2; IF (SIZE(L5)==14) THEN C:= L5(1); d:= L5(2); F:= L5(3); e:= L5(4); C1:= L5(5); d1:= L5(6); F1:= L5(7); e1:= L5(8); abbe1:= L5(9); abbe2:= L5(10); type1:= L5(11); type2:= L5(12); fo:= L5(13); di:= L5(14); END; INPUT({ {C,[0],{8,15,1}}, {d,[0],{30,15,1}}, {F,[0],{55,15,1}}, {e,[0],{80,15,1}}, {C1,[0],{8,15,2}}, {d1,[0],{30,15,2}}, {F1,[0],{55,15,2}}, {e1,[0],{80,15,2}}, {abbe1,[0],{20,17,3}}, {abbe2,[0],{68,17,3}}, {type1,[2],{20,17,4}}, {type2,[2],{68,17,4}}, {fo,[0],{40,20,5}}, {di,[0],{40,20,6}}, {save,0,{85,15,6}} }, "Refractive indexes data", {"C ", "d ", "F ", "e ", "C'", "d'", "F'", "e'", "˝e1 ", "˝e2 ", "Glass 1 ","Glass 2 ", "Focal lenght ", "Diameter lens ", "Save" }, {"C line", "d line", "F line", "e line", "C' line", "d' line", "F' line", "e' line", "˝e1 (Abbe)", "˝e2 (Abbe)", "Enter name of glass", "Enter name of glass", "Focal lenght", "Diameter lens", "Save data"}); IF save==1 THEN save_data:= {C, d, F, e, C1, d1, F1, e1, abbe1, abbe2, type1,type2, fo, di}; L5:= save_data; END; //make calculation and print dis1:= (F-e)/(F-C); dis2:= (F1-e1)/(F1-C1); lambda:= 1/(ABS(dis1-dis2)/(abbe1-abbe2)); rc:= (920*di)/((fo/di)*lambda); IF rc < 1 THEN MSGBOX("Apochromat"); END; IF rc > 1 AND rc < 2 THEN MSGBOX("Semi Apochromat"); END; IF rc > 2 THEN MSGBOX("Achromat"); END; PRINT(); PRINT("Glass 1 = "+type1+", Glass 2 = "+type2); PRINT("RCindex = "+rc); PRINT("Focal lenght = "+fo+" mm"); PRINT("Diameter lens = "+di+" mm"); PRINT("Ratio F = "+fo/di); PRINT("Airy disk = "+2*1.22*.000546074*(fo/di)+" mm"); PRINT("Depth of focus = "+2*1.22*.000546074*(fo/di)*2*fo/di+" mm"); PRINT("Dawes limit = "+116/di+" arcseconds"); END;ěŽ@`D‹@€4g€ž@jc€4g†€˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙`D‹@˜ü€4gęž^ü†€˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙`D‹@D’bcbbŁ†€˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙`D‹@€†€˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙`D‹@ †€˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙`D‹@†€˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙`D‹@†€˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙`D‹@†€˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙`D‹@†€˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙`D‹@†€˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙