I found one place to increase accuracy.
Replace the lines for calculating y0 with these.
I was doing a 2 step
Code:
C4 = BMP_AC4 / 2^15 / 1000
y0 = C4 * s^15
Now
which makes more accurate value for y0
so replace the code for calculating y0 (around lines 615-640) with the lines below
Code:
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'Sertxd(cr,lf,"y0 = C4 * s^15")
'Sertxd(cr,lf,"y0 = BMP_C4/1000/2^15 * 2^15")
'Sertxd(cr,lf,"y0 = BMP_C4/1000 ")
'get stored result
'Address = FPC_C4:PEEK Address, Word AMSW,Word ALSW
AMSW = BMP_AC4 // 1000
ALSW = 0
BMSW = 1000
BLSW = 0
Operator = Op_Div
Gosub Calculate 'calculate fraction part of C4/1000
'Sertxd (cr,lf," = "):GoSub DispResult
RMSW = BMP_AC4 / 1000 'integer part of C4/1000
RLSW = RLSW 'fractional part of C4/1000
'save result
Address = FPC_y0:POKE Address, Word RMSW,Word RLSW
#IFDEF ShowDebug
Sertxd (cr,lf,"FPC_y0 = "):GoSub DispFullResult
#ENDIF
Bookmarks