PDA

View Full Version : OutSim problem


eemece2
23rd January 2006, 11:34
Hello,

I`m triying to read the OutSim UDF packets, but without success.

I use C#, and also, for test the comunication, the Ethereal program.

On both I can only read the first value: the timer ( unsigned int - four bytes), and the last value: the Game ID (int - four bytes).

I cannot read all the other values correctly (Angular Velocity, Orientation, Acceleration, Velocity, Position ). Those values are continuously oscillating, although the car is stopped completely.

Also in the Ethereal program they appear oscillating continuously.

Why?
Somebody has had this one problem?

Thank you very much to all,

greetings,
Edu-eemece2

P.D. Sorry about my badly English.

Messiah
25th January 2006, 06:18
I have never worked with OutSim yet and don't take it serious if I'm wrong but make sure you are converting the raw data to float values (datatype float (4 bytes as well) not double or int or others).

Although the README and InSim doc confuses me... the InSim doc says:
You can identify an OutSim packet by its size (64 bytes) and first byte (zero). and the README says:
unsigned int :time in milliseconds (to check order) (4 bytes)
Angular Velocity :3 floats (12 bytes)
Orientation :3 floats Heading, Pitch, Roll (12 bytes)
Acceleration :3 floats X, Y, Z (12 bytes)
Velocity :3 floats X, Y, Z (12 bytes)
Position :3 ints X, Y, Z (metres x 65536) (12 bytes)
Game ID :1 int (optional ID - if specified in cfg.txt) (4 bytes) that makes a total of 68 bytes?

the_angry_angel
25th January 2006, 09:38
Using that reasoning surely its 69, because presumably the first byte of the time isnt going to be 0...

eemece2
3rd February 2006, 16:44
Sorry for the delay, and thanks,

I'll try to read these first byte, and then the raw data.

Yes, I am converting the raw data to float values, but, also with the Ethereal program, witch you can see all the raw data bytes, many of the bytes are continuosly changing ( with the car completelly stoped ).

May be the less significant bytes of the float values? I dont't know. I'll try it.

Regards,
Edu

Messiah
3rd February 2006, 20:49
The floating of the byte values maybe not that big in the actual floating point number value and probably only very very slight changes since the car very very slightly moves when stopped? At least (without deeper investigation using OutSim myself) it's the only thing I can think of.