- bien avancé avec mes fonctions trigo, mais il y a encore les atan négatives qui coincent et du coup les acos aussi
- ajouté un nouvel firmware plus complet pour le robot wifi
This commit is contained in:
@@ -1,12 +1,24 @@
|
||||
-- tests des routines trigonométriques pour NodeMCU
|
||||
print("\ntest_trigo1.lua zf180819.1731 \n")
|
||||
print("\ntest_trigo1.lua zf180820.2209 \n")
|
||||
|
||||
-- chargement des routines trigonométriques
|
||||
dofile("trigo3.lua")
|
||||
|
||||
for i = 0, 2*pi, 2*pi/100 do
|
||||
for i = 0, 2*math.pi, 2*math.pi/32 do
|
||||
a=i
|
||||
--print("tangente: "..a..", "..math.tan(a)..", "..ztan(a))
|
||||
b=math.tan(a)
|
||||
print("arctangente: "..b..", "..math.atan(b)..", "..zatan(b)..", "..math.atan(b)/zatan(b))
|
||||
-- b=math.tan(a)
|
||||
-- print("arctangente: "..a..", "..b..", "..math.atan(b)..", "..zatan(b)..", "..math.atan(b)/zatan(b))
|
||||
-- print("sinus: "..a..", "..math.sin(a)..", "..zsin(a)..", "..math.sin(a)/zsin(a))
|
||||
-- print("cosinus: "..a..", "..math.cos(a)..", "..zcos(a)..", "..math.cos(a)/zcos(a))
|
||||
-- print("tangente: "..a..", "..math.tan(a)..", "..ztan(a)..", "..math.tan(a)/ztan(a))
|
||||
-- b=math.sin(a)
|
||||
-- print("arcsinus: "..a..", "..b..", "..math.asin(b)..", "..zasin(b)..", "..math.asin(b)/zasin(b))
|
||||
b=math.cos(a)
|
||||
print("arccosinus: "..a..", "..b..", "..math.acos(b)..", "..zacos(b)..", "..math.acos(b)/zacos(b))
|
||||
end
|
||||
|
||||
print("\n")
|
||||
x=-0.70710678118655
|
||||
print(math.acos(x))
|
||||
print(zatan(math.sqrt(1-x*x)/x))
|
||||
print(math.sqrt(1-x*x)/x)
|
||||
|
||||
Reference in New Issue
Block a user