-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Hello @ExperimentalAvionics
Made a small one refactoring your code for platformio or .pio and replaced all *ino files with *h files
I'm trying to figure out how to send altitude via the CAN bus
I can't understand why you use 3 bits to send altitude, even when the altitude is in feet,
Line 185 in b03a086
canMsg[2] = AltitudeINT;
Three bits give a huge number gigantic figure and it is excessive.
2^{24} - 1 = 16,777,215
Even up to 10,000 feet = 3 kilometers, where small planes don't fly in principle
canMsg[4] = AltitudeINT >> 16;
always equals zero.
Made this conclusion in the serial port(in HEX):
AltitudeINT = 553
VSI = 77611canMsg[2]29
canMsg[3]2
canMsg[4]0
canMsg[5]2B
canMsg[6]2F
Also interesting is the variable
Pressure_Int = pressure/10;
Do you use it to get raw altitude values, but this is some kind of nonsense and these are just decibars?
I'm interested in your project, I hope you clarify the above points🙂