mirror of
https://github.com/okalachev/flix.git
synced 2025-07-27 01:29:33 +00:00
Minor code simplifications
This commit is contained in:
parent
253f2fe3dd
commit
fe98a5bf97
@ -47,9 +47,9 @@ void sendMavlink() {
|
||||
lastFast = t;
|
||||
|
||||
const float zeroQuat[] = {0, 0, 0, 0};
|
||||
Quaternion attitudeFRD = fluToFrd(attitude); // MAVLink uses FRD coordinate system
|
||||
Quaternion att = fluToFrd(attitude); // MAVLink uses FRD coordinate system
|
||||
mavlink_msg_attitude_quaternion_pack(SYSTEM_ID, MAV_COMP_ID_AUTOPILOT1, &msg,
|
||||
time, attitudeFRD.w, attitudeFRD.x, attitudeFRD.y, attitudeFRD.z, rates.x, rates.y, rates.z, zeroQuat);
|
||||
time, att.w, att.x, att.y, att.z, rates.x, rates.y, rates.z, zeroQuat);
|
||||
sendMessage(&msg);
|
||||
|
||||
mavlink_msg_rc_channels_scaled_pack(SYSTEM_ID, MAV_COMP_ID_AUTOPILOT1, &msg, controlsTime * 1000, 0,
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<sdf version="1.5">
|
||||
<model name="flix">
|
||||
<plugin name="flix" filename="libflix.so"/>
|
||||
<link name="body">
|
||||
<inertial>
|
||||
<mass>0.065</mass>
|
||||
@ -23,38 +24,14 @@
|
||||
<update_rate>1000</update_rate>
|
||||
<imu>
|
||||
<angular_velocity>
|
||||
<x>
|
||||
<noise type="gaussian">
|
||||
<stddev>0.00174533</stddev><!-- 0.1 degrees per second -->
|
||||
</noise>
|
||||
</x>
|
||||
<y>
|
||||
<noise type="gaussian">
|
||||
<stddev>0.00174533</stddev>
|
||||
</noise>
|
||||
</y>
|
||||
<z>
|
||||
<noise type="gaussian">
|
||||
<stddev>0.00174533</stddev>
|
||||
</noise>
|
||||
</z>
|
||||
<x><noise type="gaussian"><stddev>0.00174533</stddev></noise></x><!-- 0.1 degrees per second -->
|
||||
<y><noise type="gaussian"><stddev>0.00174533</stddev></noise></y>
|
||||
<z><noise type="gaussian"><stddev>0.00174533</stddev></noise></z>
|
||||
</angular_velocity>
|
||||
<linear_acceleration>
|
||||
<x>
|
||||
<noise type="gaussian">
|
||||
<stddev>0.0784</stddev><!-- 8 mg -->
|
||||
</noise>
|
||||
</x>
|
||||
<y>
|
||||
<noise type="gaussian">
|
||||
<stddev>0.0784</stddev>
|
||||
</noise>
|
||||
</y>
|
||||
<z>
|
||||
<noise type="gaussian">
|
||||
<stddev>0.0784</stddev>
|
||||
</noise>
|
||||
</z>
|
||||
<x><noise type="gaussian"><stddev>0.0784</stddev></noise></x><!-- 8 mg -->
|
||||
<y><noise type="gaussian"><stddev>0.0784</stddev></noise></y>
|
||||
<z><noise type="gaussian"><stddev>0.0784</stddev></noise></z>
|
||||
</linear_acceleration>
|
||||
</imu>
|
||||
</sensor>
|
||||
@ -90,6 +67,5 @@
|
||||
<material><ambient>1 1 1 0.5</ambient><diffuse>1 1 1 0.5</diffuse></material>
|
||||
</visual>
|
||||
</link>
|
||||
<plugin name="flix" filename="libflix.so"/>
|
||||
</model>
|
||||
</sdf>
|
||||
|
Loading…
x
Reference in New Issue
Block a user