Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Floating point conversion fixes #1761

Closed
wants to merge 4 commits into from
Closed

Floating point conversion fixes #1761

wants to merge 4 commits into from

Conversation

LorenzMeier
Copy link
Member

@thomasgubler Could you review this? These patches are based on enabling -Wfloat-conversion on GCC 4.9. I haven't fixed all resulting locations yet, but I'd like to get this started.

@@ -68,10 +68,10 @@ int ASHTECH::handle_message(int len)
7 The checksum data, always begins with *
Fields 5 and 6 together yield the total offset. For example, if field 5 is -5 and field 6 is +15, local time is 5 hours and 15 minutes earlier than GMT.
*/
double ashtech_time = 0.0;
unsigned long long ashtech_time = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure? UTC seems to be a float.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I completely missed that.

@thomasgubler
Copy link
Contributor

looks good otherwise

@LorenzMeier
Copy link
Member Author

@dyeldandi could you test these changes with your Ashtech receiver? They make the code much more efficient.

@LorenzMeier
Copy link
Member Author

Applied.

@LorenzMeier LorenzMeier deleted the floatfixes branch February 15, 2015 09:17
@dyeldandi
Copy link
Contributor

@LorenzMeier sorry for the delay, the weather here is not really flight-friendly. We made a couple of tests and it looks good.
http://dash.oznet.ch/view/TDmMp2QJztG9Hd7Am2XnVE
http://dash.oznet.ch/view/n6o2HuDMkQLbYWifKWdfmU
During the first one copter was dragged around manually, not in real flight (due to weather conditions)
and in the second one copter was just standing still

PX4BuildBot added a commit that referenced this pull request Jan 13, 2022
    - mavlink in PX4/Firmware (0bdf3f6): mavlink/mavlink@75204ad
    - mavlink current upstream: mavlink/mavlink@68ff649
    - Changes: mavlink/mavlink@75204ad...68ff649

    68ff649f 2022-01-13 Hamish Willee - MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT - deprecate (#1768)
ae531d97 2022-01-13 Peter Barker - Move "external" dialects to be normal dialects (#1761)
00a3f8ed 2022-01-12 Julian Oes - Revert "Delete unused cmake tree (#1760)" (#1782)
aa0764bd 2022-01-12 Hamish Willee - MAV_PROTOCOL_CAPABILITY_PARAM_UNION - rename/reserved (#1771)
c3b46620 2022-01-12 Hamish Willee - Update mavlink_udp.c example readme to use mavlink 2 (#1780)
0449a5ec 2022-01-12 Tatsuya Yamaguchi - add extended sensor status bits to MAVLink UDP example (#1778)
fc3539e1 2022-01-10 Josh Henderson - ardupilotmega: Sync to ArduPilot downstream 10-JAN-2022 (#1777)
27395aa7 2022-01-06 Julian Oes - pymavlink: update submodule to latest master (#1776)
2180611b 2022-01-06 Hamish Willee - MAV_WINCH_STATUS_CLUTCH_ENGAGED: Winch clutch is engaged allowing motor to move freely
7c6f104f 2022-01-05 Jacob Dahl - Extend WINCH_STATUS_FLAG and WINCH_ACTION (#1766)
dcb44e75 2022-01-06 Hamish Willee - Delete unused cmake tree (#1760)
5b8bec5b 2022-01-05 Hamish Willee - common.xml: AUTOTUNE_AXIS_YAW - fix value to correct one for bitmask (#1767)
PX4BuildBot added a commit that referenced this pull request Jan 13, 2022
    - mavlink in PX4/Firmware (44f6ba6): mavlink/mavlink@75204ad
    - mavlink current upstream: mavlink/mavlink@68ff649
    - Changes: mavlink/mavlink@75204ad...68ff649

    68ff649f 2022-01-13 Hamish Willee - MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT - deprecate (#1768)
ae531d97 2022-01-13 Peter Barker - Move "external" dialects to be normal dialects (#1761)
00a3f8ed 2022-01-12 Julian Oes - Revert "Delete unused cmake tree (#1760)" (#1782)
aa0764bd 2022-01-12 Hamish Willee - MAV_PROTOCOL_CAPABILITY_PARAM_UNION - rename/reserved (#1771)
c3b46620 2022-01-12 Hamish Willee - Update mavlink_udp.c example readme to use mavlink 2 (#1780)
0449a5ec 2022-01-12 Tatsuya Yamaguchi - add extended sensor status bits to MAVLink UDP example (#1778)
fc3539e1 2022-01-10 Josh Henderson - ardupilotmega: Sync to ArduPilot downstream 10-JAN-2022 (#1777)
27395aa7 2022-01-06 Julian Oes - pymavlink: update submodule to latest master (#1776)
2180611b 2022-01-06 Hamish Willee - MAV_WINCH_STATUS_CLUTCH_ENGAGED: Winch clutch is engaged allowing motor to move freely
7c6f104f 2022-01-05 Jacob Dahl - Extend WINCH_STATUS_FLAG and WINCH_ACTION (#1766)
dcb44e75 2022-01-06 Hamish Willee - Delete unused cmake tree (#1760)
5b8bec5b 2022-01-05 Hamish Willee - common.xml: AUTOTUNE_AXIS_YAW - fix value to correct one for bitmask (#1767)
PX4BuildBot added a commit that referenced this pull request Jan 14, 2022
    - mavlink in PX4/Firmware (8ca02b4): mavlink/mavlink@75204ad
    - mavlink current upstream: mavlink/mavlink@68ff649
    - Changes: mavlink/mavlink@75204ad...68ff649

    68ff649f 2022-01-13 Hamish Willee - MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT - deprecate (#1768)
ae531d97 2022-01-13 Peter Barker - Move "external" dialects to be normal dialects (#1761)
00a3f8ed 2022-01-12 Julian Oes - Revert "Delete unused cmake tree (#1760)" (#1782)
aa0764bd 2022-01-12 Hamish Willee - MAV_PROTOCOL_CAPABILITY_PARAM_UNION - rename/reserved (#1771)
c3b46620 2022-01-12 Hamish Willee - Update mavlink_udp.c example readme to use mavlink 2 (#1780)
0449a5ec 2022-01-12 Tatsuya Yamaguchi - add extended sensor status bits to MAVLink UDP example (#1778)
fc3539e1 2022-01-10 Josh Henderson - ardupilotmega: Sync to ArduPilot downstream 10-JAN-2022 (#1777)
27395aa7 2022-01-06 Julian Oes - pymavlink: update submodule to latest master (#1776)
2180611b 2022-01-06 Hamish Willee - MAV_WINCH_STATUS_CLUTCH_ENGAGED: Winch clutch is engaged allowing motor to move freely
7c6f104f 2022-01-05 Jacob Dahl - Extend WINCH_STATUS_FLAG and WINCH_ACTION (#1766)
dcb44e75 2022-01-06 Hamish Willee - Delete unused cmake tree (#1760)
5b8bec5b 2022-01-05 Hamish Willee - common.xml: AUTOTUNE_AXIS_YAW - fix value to correct one for bitmask (#1767)
PX4BuildBot added a commit that referenced this pull request Jan 15, 2022
    - mavlink in PX4/Firmware (662dd0d): mavlink/mavlink@75204ad
    - mavlink current upstream: mavlink/mavlink@3d80920
    - Changes: mavlink/mavlink@75204ad...3d80920

    3d809200 2022-01-14 Hamish Willee - MAV_PROTOCOL_CAPABILITY_FLIGHT_INFORMATION - mark as reserved capability (#1775)
68ff649f 2022-01-13 Hamish Willee - MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT - deprecate (#1768)
ae531d97 2022-01-13 Peter Barker - Move "external" dialects to be normal dialects (#1761)
00a3f8ed 2022-01-12 Julian Oes - Revert "Delete unused cmake tree (#1760)" (#1782)
aa0764bd 2022-01-12 Hamish Willee - MAV_PROTOCOL_CAPABILITY_PARAM_UNION - rename/reserved (#1771)
c3b46620 2022-01-12 Hamish Willee - Update mavlink_udp.c example readme to use mavlink 2 (#1780)
0449a5ec 2022-01-12 Tatsuya Yamaguchi - add extended sensor status bits to MAVLink UDP example (#1778)
fc3539e1 2022-01-10 Josh Henderson - ardupilotmega: Sync to ArduPilot downstream 10-JAN-2022 (#1777)
27395aa7 2022-01-06 Julian Oes - pymavlink: update submodule to latest master (#1776)
2180611b 2022-01-06 Hamish Willee - MAV_WINCH_STATUS_CLUTCH_ENGAGED: Winch clutch is engaged allowing motor to move freely
7c6f104f 2022-01-05 Jacob Dahl - Extend WINCH_STATUS_FLAG and WINCH_ACTION (#1766)
dcb44e75 2022-01-06 Hamish Willee - Delete unused cmake tree (#1760)
5b8bec5b 2022-01-05 Hamish Willee - common.xml: AUTOTUNE_AXIS_YAW - fix value to correct one for bitmask (#1767)
PX4BuildBot added a commit that referenced this pull request Jan 15, 2022
    - mavlink in PX4/Firmware (c0ddc25): mavlink/mavlink@75204ad
    - mavlink current upstream: mavlink/mavlink@3d80920
    - Changes: mavlink/mavlink@75204ad...3d80920

    3d809200 2022-01-14 Hamish Willee - MAV_PROTOCOL_CAPABILITY_FLIGHT_INFORMATION - mark as reserved capability (#1775)
68ff649f 2022-01-13 Hamish Willee - MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT - deprecate (#1768)
ae531d97 2022-01-13 Peter Barker - Move "external" dialects to be normal dialects (#1761)
00a3f8ed 2022-01-12 Julian Oes - Revert "Delete unused cmake tree (#1760)" (#1782)
aa0764bd 2022-01-12 Hamish Willee - MAV_PROTOCOL_CAPABILITY_PARAM_UNION - rename/reserved (#1771)
c3b46620 2022-01-12 Hamish Willee - Update mavlink_udp.c example readme to use mavlink 2 (#1780)
0449a5ec 2022-01-12 Tatsuya Yamaguchi - add extended sensor status bits to MAVLink UDP example (#1778)
fc3539e1 2022-01-10 Josh Henderson - ardupilotmega: Sync to ArduPilot downstream 10-JAN-2022 (#1777)
27395aa7 2022-01-06 Julian Oes - pymavlink: update submodule to latest master (#1776)
2180611b 2022-01-06 Hamish Willee - MAV_WINCH_STATUS_CLUTCH_ENGAGED: Winch clutch is engaged allowing motor to move freely
7c6f104f 2022-01-05 Jacob Dahl - Extend WINCH_STATUS_FLAG and WINCH_ACTION (#1766)
dcb44e75 2022-01-06 Hamish Willee - Delete unused cmake tree (#1760)
5b8bec5b 2022-01-05 Hamish Willee - common.xml: AUTOTUNE_AXIS_YAW - fix value to correct one for bitmask (#1767)
PX4BuildBot added a commit that referenced this pull request Jan 17, 2022
    - mavlink in PX4/Firmware (eb9c887): mavlink/mavlink@75204ad
    - mavlink current upstream: mavlink/mavlink@3d80920
    - Changes: mavlink/mavlink@75204ad...3d80920

    3d809200 2022-01-14 Hamish Willee - MAV_PROTOCOL_CAPABILITY_FLIGHT_INFORMATION - mark as reserved capability (#1775)
68ff649f 2022-01-13 Hamish Willee - MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT - deprecate (#1768)
ae531d97 2022-01-13 Peter Barker - Move "external" dialects to be normal dialects (#1761)
00a3f8ed 2022-01-12 Julian Oes - Revert "Delete unused cmake tree (#1760)" (#1782)
aa0764bd 2022-01-12 Hamish Willee - MAV_PROTOCOL_CAPABILITY_PARAM_UNION - rename/reserved (#1771)
c3b46620 2022-01-12 Hamish Willee - Update mavlink_udp.c example readme to use mavlink 2 (#1780)
0449a5ec 2022-01-12 Tatsuya Yamaguchi - add extended sensor status bits to MAVLink UDP example (#1778)
fc3539e1 2022-01-10 Josh Henderson - ardupilotmega: Sync to ArduPilot downstream 10-JAN-2022 (#1777)
27395aa7 2022-01-06 Julian Oes - pymavlink: update submodule to latest master (#1776)
2180611b 2022-01-06 Hamish Willee - MAV_WINCH_STATUS_CLUTCH_ENGAGED: Winch clutch is engaged allowing motor to move freely
7c6f104f 2022-01-05 Jacob Dahl - Extend WINCH_STATUS_FLAG and WINCH_ACTION (#1766)
dcb44e75 2022-01-06 Hamish Willee - Delete unused cmake tree (#1760)
5b8bec5b 2022-01-05 Hamish Willee - common.xml: AUTOTUNE_AXIS_YAW - fix value to correct one for bitmask (#1767)
PX4BuildBot added a commit that referenced this pull request Jan 18, 2022
    - mavlink in PX4/Firmware (37e04f5): mavlink/mavlink@75204ad
    - mavlink current upstream: mavlink/mavlink@3d80920
    - Changes: mavlink/mavlink@75204ad...3d80920

    3d809200 2022-01-14 Hamish Willee - MAV_PROTOCOL_CAPABILITY_FLIGHT_INFORMATION - mark as reserved capability (#1775)
68ff649f 2022-01-13 Hamish Willee - MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT - deprecate (#1768)
ae531d97 2022-01-13 Peter Barker - Move "external" dialects to be normal dialects (#1761)
00a3f8ed 2022-01-12 Julian Oes - Revert "Delete unused cmake tree (#1760)" (#1782)
aa0764bd 2022-01-12 Hamish Willee - MAV_PROTOCOL_CAPABILITY_PARAM_UNION - rename/reserved (#1771)
c3b46620 2022-01-12 Hamish Willee - Update mavlink_udp.c example readme to use mavlink 2 (#1780)
0449a5ec 2022-01-12 Tatsuya Yamaguchi - add extended sensor status bits to MAVLink UDP example (#1778)
fc3539e1 2022-01-10 Josh Henderson - ardupilotmega: Sync to ArduPilot downstream 10-JAN-2022 (#1777)
27395aa7 2022-01-06 Julian Oes - pymavlink: update submodule to latest master (#1776)
2180611b 2022-01-06 Hamish Willee - MAV_WINCH_STATUS_CLUTCH_ENGAGED: Winch clutch is engaged allowing motor to move freely
7c6f104f 2022-01-05 Jacob Dahl - Extend WINCH_STATUS_FLAG and WINCH_ACTION (#1766)
dcb44e75 2022-01-06 Hamish Willee - Delete unused cmake tree (#1760)
5b8bec5b 2022-01-05 Hamish Willee - common.xml: AUTOTUNE_AXIS_YAW - fix value to correct one for bitmask (#1767)
dagar pushed a commit that referenced this pull request Jan 18, 2022
    - mavlink in PX4/Firmware (37e04f5): mavlink/mavlink@75204ad
    - mavlink current upstream: mavlink/mavlink@3d80920
    - Changes: mavlink/mavlink@75204ad...3d80920

    3d809200 2022-01-14 Hamish Willee - MAV_PROTOCOL_CAPABILITY_FLIGHT_INFORMATION - mark as reserved capability (#1775)
68ff649f 2022-01-13 Hamish Willee - MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT - deprecate (#1768)
ae531d97 2022-01-13 Peter Barker - Move "external" dialects to be normal dialects (#1761)
00a3f8ed 2022-01-12 Julian Oes - Revert "Delete unused cmake tree (#1760)" (#1782)
aa0764bd 2022-01-12 Hamish Willee - MAV_PROTOCOL_CAPABILITY_PARAM_UNION - rename/reserved (#1771)
c3b46620 2022-01-12 Hamish Willee - Update mavlink_udp.c example readme to use mavlink 2 (#1780)
0449a5ec 2022-01-12 Tatsuya Yamaguchi - add extended sensor status bits to MAVLink UDP example (#1778)
fc3539e1 2022-01-10 Josh Henderson - ardupilotmega: Sync to ArduPilot downstream 10-JAN-2022 (#1777)
27395aa7 2022-01-06 Julian Oes - pymavlink: update submodule to latest master (#1776)
2180611b 2022-01-06 Hamish Willee - MAV_WINCH_STATUS_CLUTCH_ENGAGED: Winch clutch is engaged allowing motor to move freely
7c6f104f 2022-01-05 Jacob Dahl - Extend WINCH_STATUS_FLAG and WINCH_ACTION (#1766)
dcb44e75 2022-01-06 Hamish Willee - Delete unused cmake tree (#1760)
5b8bec5b 2022-01-05 Hamish Willee - common.xml: AUTOTUNE_AXIS_YAW - fix value to correct one for bitmask (#1767)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants