Hi there!Please, someone had the following problem regarding ArduIMU altitude data?:ArduPilot legacy with version 2.7.1 (last one from sep/2010) (GPS set to 3 = arduimu)ArduIMU v2 version 1.8.2 (binary output set to 1) with uBlox GPS.All software downloaded from google repository (no svn usage).The message data read on the ArduPilot serial port is presenting the "altitude" (GPS) and "altitude to hold) with a tenth of the real value. For example my current location is about 903 meters above sea level but the "altitude" is being presented as 90 meters.I then set the AruIMU 1.8.2 to not print binary (0) and to print the GPS data. I then ran the ArduIMU test program and it is possible to see in the windows test program the true "altitude" value of 903 meters.Is there some problem with the Binary protocol?I take a look inthe ArduIMU Output.pde file and see that the binary protocol print serial data in this way:tempint=GPS.altitude / 100; // Altitude MSL in meters * 10 in 2 bytesIMU_buffer[10]=tempint&0xff;IMU_buffer[11]=(tempint>>8)&0xff;but in the ardupilot legacy code side, the protocol packet parser in GPS_IMU.pde, GPS_join_data() is doing://Storing GPS Height above the sea levelintUnion.byte[0] = IMU_buffer[j++];intUnion.byte[1] = IMU_buffer[j++];current_loc.alt = (long)intUnion.word * 10; // Altitude in meters * 100In other words, in the ArduIMU side it divide by 100 and in the ArduPliot side it recover by multiplying by 10.Is that correct? I didn`t changed anything in the code yet to multiply by 100 to see what happens because the same problem occur with the "altitude to hold" But I didn`t have chance to take a look in the code yet.Am I with the wrong ArduPilot legacy or ArduIMU version? Were to get the right ones?thanks in advance,Omar
You need to be a member of diydrones to add comments!
Replies
Answering to myself :-), I did the change in the ArduPilot GPS_IMU.pde file, GPS_join_data() function by multipling per 100:
if it is possible the last file for download mut be updated if it wasnt yet in the SVN trunk.