mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-02-21 21:40:18 +00:00
fix conversion in 32 bits architectures
This commit is contained in:
parent
47d55c09f8
commit
e47b5c003c
@ -212,7 +212,9 @@ double Rtcm::bin_to_double(const std::string& s)
|
|||||||
// Computing two's complement
|
// Computing two's complement
|
||||||
boost::dynamic_bitset<> original_bitset(s);
|
boost::dynamic_bitset<> original_bitset(s);
|
||||||
original_bitset.flip();
|
original_bitset.flip();
|
||||||
reading_int = - (original_bitset.to_ulong() + 1);
|
std::string aux;
|
||||||
|
to_string(original_bitset, aux);
|
||||||
|
reading_int = - (strtoll(aux.c_str(), NULL, 2) + 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user