code: def gps_velocity_body(GPS_RAW_INT, ATTITUDE):
      '''return GPS velocity vector in body frame'''
      r = rotation(ATTITUDE)
      return r.transposed() * Vector3(GPS_RAW_INT.vel*0.01*cos(radians(GPS_RAW_INT.cog*0.01)),
                                      GPS_RAW_INT.vel*0.01*sin(radians(GPS_RAW_INT.cog*0.01)),
                                      -tan(ATTITUDE.pitch)*GPS_RAW_INT.vel*0.01f gps_velocity_body(GPS_RAW_INT, ATTITUDE):
      '''return GPS velocity vector in body frame'''
      r = rotation(ATTITUDE)
      return r.transposed() * Vector3(GPS_RAW_INT.vel*0.01*cos(radians(GPS_RAW_INT.cog*0.01)),
                                      GPS_RAW_INT.vel*0.01*sin(radians(GPS_RAW_INT.cog*0.01)),
                                      -tan(ATTITUDE.pitch)*GPS_RAW_INT.vel*0.01)
docs: return GPS velocity vector in body frame