I am now at the stage of working on my Attitude display and, when I look at how others have solved the problem it looks like some trig is involved. The trig doesn't bother me but where do all of the constants come from? For example:
Code: Select all
-- Move horizon pitch
pitch = var_cap(pitch,-30,30)
radial = math.rad(roll * -1)
x = -(math.sin(radial) * pitch * 4.25)
y = (math.cos(radial) * pitch * 4.25)
move(img_horizon, x-100, y-246, nil, nil)
move(img_horizondeg, x-100, y-246, nil, nil)
Sparky