Skip to content

Commit

Permalink
Using absolute altitude instead of relative.
Browse files Browse the repository at this point in the history
  • Loading branch information
raul-ortega committed Nov 1, 2017
1 parent b4e3b76 commit c672abd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/tracker/pitlab.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ void preProcessHexString(void){
void processPitlabFrame(void){
switch(lsRxData[0])
{
case 0:
case 0: // A
telemetry_sats = (uint16_t)Restore_byte(4);
break;
case 1:
telemetry_alt = (int16_t)Restore_short(2);
case 10: // 10 = K, pos 3 : Absolute altitude, 1 = B, pos 2 : Relative altitude
telemetry_alt = (int16_t)Restore_short(3);
gotAlt = true;
break;
case 2:
case 2: // C
gps_lon = Restore_long(1);
telemetry_lon = (int32_t)(round(((double)gps_lon * 100.0)/60.0));
break;
case 3:
case 3: // D
gps_lat = Restore_long(1);
telemetry_lat = (int32_t)(round(((double)gps_lat * 100.0)/60.0));
if(telemetry_sats >= 5) gotFix = true;
Expand Down

0 comments on commit c672abd

Please sign in to comment.