I am having big trouble with extracting measurement results from a string from serial port.
I get a report through serial connectio from some device. It looks like that:
Plane 1 Angle 1 Plane 2 Angle 2 In RotorID rpm [g·mm] [°] [g·mm] [°] Tol 1964.7 0.145999 201.6 0.151779 346.5 Y 2014.5 0.156608 197.6 0.139722 340.9 Y ealon ok 2012.1 0.143454 199.8 0.150243 344.6 Y ealon nok 2023.3 0.430547 217.7 0.833347 313.3 Y DN-3259824_001 2135.9 0.305822 246.2 0.296502 305.2 Y DN-3259824_002 2051.4 0.324227 241.1 0.327651 299.0 Y DN-3259824_020 2045.9 0.139268 150.2 0.281890 21.6 Y
I cannot separate data with spaces, because sometimes there is no "RotorID" so all data shifts to the left.
There are always 7 columns. Sometimes RotorID is empty sometimes it consists some chars and some numbers. I never know its length. Other data is always present and separated with space.
Can you help me please.