speed = m2.getSpeed();
isOnGround = m2.isOnGround();
updateTrack(m2.getTrack());
break;
case 3:
ADSBMsg3 m3 = (ADSBMsg3) msg;
updatePosition(new Position(LatLon.fromDegrees(m3.getPosition().getLatitude(),
m3.getPosition().getLongitude()), m3.getAltitudeInMeters()));
isOnGround = m3.isOnGround();
emergencyFlag = m3.hasSentEmergencyCode();
break;
case 4:
ADSBMsg4 m4 = (ADSBMsg4) msg;
speed = m4.getSpeed();
updateTrack(m4.getTrack());