Jump to content

Predator32767

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Predator32767

  1. no! as i said 447A 0000 is in decimal 1148846080.0. if i use this int() i become 1148846080 just without the ".0". But i have wasted the hole Weekend to find out how to calculate from 447A 0000 back to 1000 and it finaly works! Its a gigantic calculation behind this but it works. So i have to go from Hex to Decimal to Binary, Split this in 3 parts and calculate the Sign, the Exponent and the Mantissa in decimal and then i can use this 3 numbers to calculate back to 1000. I try to use some different numbers and it is pricise enough for this. Now i just have to manage the serial communication and the Spliting of the hole Package into single informations so i can use them for my "KSP-control-center". THX for the help!
  2. I can do what i want. It will not work. The only number i became is 1148846080.0 .There is an int() function but this just seems to "delete whats behind the dot": But i have another idea: I can use this number to calculate the percentage between Max an Current of the liquid fuel. If this will not work i give up.
  3. Yes i already found that calculator but i cant figure it out to do this calculation. My english isnt bad but i am not a mathematician and so it is hard to understand. EDIT: I found a tiny little button to switch to German on this Website so i will read this again step by step tomorrow! Well i said this a little bit wrong. I am not using the language that an Arduino uses but the same microprozessor. The language i am working with is Bascom. I found out that a "float" is called "single" in Bascom but as i said i dont know how to handle it. I just need some sort of a formula: 0x447a0000 -> 1000.
  4. Hello everyone! Im struggling with this Mod. I have managed to actualy see the data coming out of the serialport but i dont know how to convert this data so i can use it. I have used a virtual Serialport, a Terminal-program and this debugging tool to just see whats going on. So in the debugging tool i just changed the amount of liquid fuel to 1000 and watched whats happening in the data. So 4 nummbers are changing to "7A 44". Now the question: How on earth do i convert "7A 44" back into 1000? I have tried everything that the windows calculator can give me but ther is no 1000!! The problem is that i dont use Arduino so i cant use the Examples! or even read them. I am desperate. I dont need mutch data and i dont want to control something (i doing it a different way). Would be nice if someone can explain me this. I think i can do everything except this converting stuff. THX
×
×
  • Create New...