ArduPilot / ArduPilot/MissionPlanner

Decimal vs double

Open
#3,264 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2.4k
Forks
2.9k
Avg merge
19h 16m
Merged PRs (30d)
4

Description

I've seen an issue where a cast from double to decimal causes an exception. Need to fix mavparam to remove all decimals

An int32 can be 100% represented by a double. So replace decimal with double. Only issue is with float rounding. So needs to be considered

Ie decimal.maxvalue < float.maxvalue

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the mavparam handling and tracing where the double-to-decimal cast occurs. Review the implications of replacing decimal with double, including float rounding and the stated max-value difference. Done means the relevant mavparam paths no longer cause the reported cast exception without introducing unacceptable rounding or range issues.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
desktop
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.