Jump to content
The simFlight Network Forums

Off Topic,Epicinfo question


Recommended Posts

Hi Pete i'm driving crazy with this,maybe you can help,i am introducing a modification in my epl code,and i don't remember too much about epic ISA programming

The point is that I need to check when the aircraft bank is more than 25 degrees,to the left and to the right.

To do this i want to use the PH 13 (PLANE_BANK_DEGREES) that it says that the first two bytes ( 0 and 1 )are for the absolute value and the the others ( 2 and 3 ) are used to determine the negative value (bank to the left I guess )

I just want to put the value in a variable for check if it is at more than +25 o more than -25 but I have no idea how to do it.

Any sugestion ?

thanks Pete

Link to comment
Share on other sites

Hi Pete i'm driving crazy with this,maybe you can help,i am introducing a modification in my epl code,and i don't remember too much about epic ISA programming

Nor me!

I just want to put the value in a variable for check if it is at more than +25 of more than -25 but I have no idea how to do it.

A peek at some typical lines in a Log would help. But I think to detect negative you just need to check the top bit (0x8000) in the 16-bit value from bytes 2-3 (or the 0x80 bit in byte 3). To do you could either use AND or TEST (if those instructions are supported -- see I just don't remember!) or, considering EPL doesn't have negative numbers, see if the 16-bit value is greater than 32767 (0x7FFF) or the high byte greater than 127 (0x7F).

Or do the whole job in reverse by testing if the 16-bit value is either Less than 25 (i.e. 0 - 24) or between 32768 and 32793 (representing -1 to -24).

Regards

Pete

Link to comment
Share on other sites

Nor me!

:mrgreen:

A peek at some typical lines in a Log would help. But I think to detect negative you just need to check the top bit (0x8000) in the 16-bit value from bytes 2-3 (or the 0x80 bit in byte 3). To do you could either use AND or TEST (if those instructions are supported -- see I just don't remember!) or, considering EPL doesn't have negative numbers, see if the 16-bit value is greater than 32767 (0x7FFF) or the high byte greater than 127 (0x7F).

Or do the whole job in reverse by testing if the 16-bit value is either Less than 25 (i.e. 0 - 24) or between 32768 and 32793 (representing -1 to -24).

Regards

Pete

Thanks for the help,i will check it

May I check for " greather than 27" at byte 3 to get the negative ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.