You should have a working program about 1.2019 or later.
I am not sure if I have it anymore.
The angles are calculated with arctan( y/x) or arctan(x/y )
+ checking the quadrant from the signs of X and Y
Arctan was an approximation with an accuracy of ~ 0.16 degrees.
Don't use Oshonsoft arctan. It had worse accuracy + it needs checking the 8 octants.
You should have a working program about 1.2019 or later.
I am not sure if I have it anymore.
The angles are calculated with arctan( y/x) or arctan(x/y )
+ checking the quadrant from the signs of X and Y
Arctan was an approximation with an accuracy of ~ 0.16 degrees.
Don't use Oshonsoft arctan. It had worse accuracy + it needs checking the 8 octants.
Hi J,
In todays programs, there are some errors with the COMP CODE, perhaps a mistake as I copied and pasted.
I have all of the programs! Here is one just after your date:
I think if this is ok, then this CODE will should be in recent programs. Let me know if this is ok, and I'll compare them.
EDIT: I just looked at todays program, and to me the DEGREE CALC (search) looks identical to the earlier one. I'll double chanck tomorrow.
Hi J,
Good memory!
At the moment that latest program is counting CCW, and this is wrong. It should count upwards when the REMOTE moved CW.
I'll also re-check.
C.
Hi J,
Good memory!
At the moment that latest program is counting CCW, and this is wrong. It should count upwards when the REMOTE moved CW.
I'll also re-check.
C.
Hi J,
I'm sure your suggestion worked, but as this COMP has just been BIAS calibrated I think it did a double reverse, so I put it back to how it was and it's now working.
Here the BASE COMP output also with XYand Z READings:
At this point I would like to know more about how the 3xaxis sine waves interact with each other so I'll start another thread, about just that.
Thanks, C.
Hi J,
I'm sure your suggestion worked, but as this COMP has just been BIAS calibrated I think it did a double reverse, so I put it back to how it was and it's now working.
Here the BASE COMP output also with XYand Z READings:
At this point I would like to know more about how the 3xaxis sine waves interact with each other so I'll start another thread, about just that.
Thanks, C.
Something is wrong with the values.
Z should be always negative and with those X,Y values the angle is around 45 degrees.
Where do you need the sine values?
What is double reverse?
Something is wrong with the values.
Z should be always negative and with those X,Y values the angle is around 45 degrees.
Where do you need the sine values?
What is double reverse?
Hi J, Double reverse? It's always best to do one change at a time, but there were two (Double) With the program as it was with the new BIAS cal but without your DEG= suggestion it reversed, and now gives 'move REMOTE CW' and it give CW READings. With the second change 'yours' it reverses it again.
Where do you need the sine values? As I notice that any sideways tilt, changes the DEG quite a lot, but shouldn't and coupled with you puzzle about Neg Z, I would like to understand better how 3x axis interact with each other. This is first the first time, I've fixed the compass (Flat), before I just picked it up without much regard for tilt.
I just tried moving it to app 45° and with a slight tilt, it READ 0.
But why do you get with
X55 Y57 Z45
355.51 degrees ??
You can calculate the degrees with the equation
on the first row of atn function in your program and get 43.99 degrees.
or by a function calculator and get 43.97697 degrees.
But why do you get with
X55 Y57 Z45
355.51 degrees ??
You can calculate the degrees with the equation
on the first row of atn function in your program and get 43.99 degrees.
or by a function calculator and get 43.97697 degrees.
Hi J,
I don't know why this happens, but the program I posted plus the BIASed COMP give this.
In your next post the PDF is indeed complicated, and I'll look at it later. If possible, I would hope to simplify it, for us more general people.
C.