def get_message(self):
        result = QuadPositionDerived()

        result.found_body = self.found_body

        result.x = self.x.p
        result.y = self.y.p
        result.z = self.z.p
        result.pitch = self.pitch.p
        result.roll = self.roll.p
        result.yaw = self.yaw.p

        result.x_vel = self.x.v
        result.y_vel = self.y.v
        result.z_vel = self.z.v
        result.pitch_vel = self.pitch.v
        result.roll_vel = self.roll.v
        result.yaw_vel = self.yaw.v

        result.x_acc = self.x.a
        result.y_acc = self.y.a
        result.z_acc = self.z.a
        result.pitch_acc = self.pitch.a
        result.roll_acc = self.roll.a
        result.yaw_acc = self.yaw.a

        # The time_diff is added to make the position plot on the
        # GUI work
        result.time_diff = 0.05

        return copy.deepcopy(result)
	def get_message(self):
		result = QuadPositionDerived()

		result.found_body=self.found_body

		result.x=self.x.p
		result.y=self.y.p
		result.z=self.z.p
		result.pitch=self.pitch.p
		result.roll=self.roll.p
		result.yaw=self.yaw.p

		result.x_vel=self.x.v
		result.y_vel=self.y.v
		result.z_vel=self.z.v
		result.pitch_vel=self.pitch.v
		result.roll_vel=self.roll.v
		result.yaw_vel=self.yaw.v

		result.x_acc=self.x.a
		result.y_acc=self.y.a
		result.z_acc=self.z.a
		result.pitch_acc=self.pitch.a
		result.roll_acc=self.roll.a
		result.yaw_acc=self.yaw.a
		
		# The time_diff is added to make the position plot on the
		# GUI work
		result.time_diff = 0.05

		return copy.deepcopy(result)
def Insert_Current_Data(current_data):
    result = QuadPositionDerived()
    result.found_body = current_data.found_body
    result.x = current_data.x
    result.y = current_data.y
    result.z = current_data.z
    result.pitch = current_data.pitch
    result.roll = current_data.roll
    result.yaw = current_data.yaw
    return (result)
Example #4
0
def Insert_Current_Data(current_data):
	result=QuadPositionDerived()
	result.found_body=current_data.found_body
	result.x=current_data.x
	result.y=current_data.y
	result.z=current_data.z
	result.pitch=current_data.pitch
	result.roll=current_data.roll
	result.yaw=current_data.yaw
	return(result)
Example #5
0
def Get_Quad_State(obj):
	result=QuadPositionDerived()
	result.found_body=obj.found_body
	result.x=obj.x
	result.y=obj.y
	result.z=obj.z
	result.yaw=obj.yaw
	result.pitch=obj.pitch
	result.roll=obj.roll
	result.x_vel=obj.x_vel
	result.y_vel=obj.y_vel
	result.z_vel=obj.z_vel
	result.yaw_vel=obj.yaw_vel
	result.pitch_vel=obj.pitch_vel
	result.roll_vel=obj.roll_vel
	result.x_acc=obj.x_acc
	result.y_acc=obj.y_acc
	result.z_acc=obj.z_acc
	result.yaw_acc=obj.yaw_acc
	result.pitch_acc=obj.pitch_acc
	result.roll_acc=obj.roll_acc
	result.time_diff=obj.time_secs
	return(result)
Example #6
0
def Get_Quad_State(obj):
    result = QuadPositionDerived()
    result.found_body = obj.found_body
    result.x = obj.x
    result.y = obj.y
    result.z = obj.z
    result.yaw = obj.yaw
    result.pitch = obj.pitch
    result.roll = obj.roll
    result.x_vel = obj.x_vel
    result.y_vel = obj.y_vel
    result.z_vel = obj.z_vel
    result.yaw_vel = obj.yaw_vel
    result.pitch_vel = obj.pitch_vel
    result.roll_vel = obj.roll_vel
    result.x_acc = obj.x_acc
    result.y_acc = obj.y_acc
    result.z_acc = obj.z_acc
    result.yaw_acc = obj.yaw_acc
    result.pitch_acc = obj.pitch_acc
    result.roll_acc = obj.roll_acc
    result.time_diff = obj.time_secs
    return (result)