Open sfregosi opened 1 month ago
Some glider parameters are bit masks, shown in parameter files and parameter lists as decimal numbers, so we have to convert bit masks (binary numbers) back and forth to decimal. To convert a bit mask shown as a decimal number like 55 to binary, do this:
echo "obase=2;55" | bc
This results in an output of 110111
, which is how 55
is represented in binary. To convert a binary number like that to decimal, do this:
echo "$((2#110111))"
This results in an output of 55
.
These commands work from the command line on seaglider.pub and most (all?) other Unix systems.
Dave
P.S. I put this info in “binary-decimal conversion” in the “piloting resources – Fregosi-created materials” folder on GDrive. It’s in this folder on the grounds that Selene would have done this if I hadn’t.