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,
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 = 77611
canMsg[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🙂
Hello @ExperimentalAvionics
Made a small one refactoring your code for
platformioor.pioand replaced all*inofiles with*hfilesI'm trying to figure out how to send altitude via the
CANbusI can't understand why you use
3 bitsto send altitude, even when the altitude is in feet,Three bits give a huge number gigantic figure and it is excessive.
Even up to
10,000 feet = 3 kilometers, where small planes don't fly in principlealways equals
zero.Made this conclusion in the serial port(in HEX):
Also interesting is the variable
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🙂