I opened both tracks in trackEd: the old V1.5 is 8.3km long. The new track is 7.0km long, which is exactly the same as in reality.
Thanks
Thanks
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
import hypermedia.net.*;
int PORT_RX=30001;
String HOST_IP="127.0.0.1";
UDP udp;
int pos;
void setup() {
udp= new UDP(this,PORT_RX,HOST_IP);
//udp.log(true);
udp.listen(true);
}
void draw() {
}
void receive(byte[] data, String HOST_IP, int PORT_RX) {
pos = 25;
int gear = (data[pos] & 0xff) | ((data[pos+1] & 0xff) << 8) | ((data[pos+2] & 0xff) << 16) | ((data[pos+3] & 0xff) << 24);
pos = 33;
int speed = int(Float.intBitsToFloat((data[pos] & 0xff) | ((data[pos+1] & 0xff) << 8) | ((data[pos+2] & 0xff) << 16) | ((data[pos+3] & 0xff) << 24))*3.6);
pos = 29;
float fuel = Float.intBitsToFloat((data[pos] & 0xff) | ((data[pos+1] & 0xff) << 8) | ((data[pos+2] & 0xff) << 16) | ((data[pos+3] & 0xff) << 24));
pos = 13;
int rpm = (data[pos] & 0xff) | ((data[pos+1] & 0xff) << 8) | ((data[pos+2] & 0xff) << 16) | ((data[pos+3] & 0xff) << 24);
pos = 133;
int fsusp = int(Float.intBitsToFloat((data[pos] & 0xff) | ((data[pos+1] & 0xff) << 8) | ((data[pos+2] & 0xff) << 16) | ((data[pos+3] & 0xff) << 24))*1000);
pos = 137;
int rsusp = int(Float.intBitsToFloat((data[pos] & 0xff) | ((data[pos+1] & 0xff) << 8) | ((data[pos+2] & 0xff) << 16) | ((data[pos+3] & 0xff) << 24))*1000);
pos = 157;
int thro = int(Float.intBitsToFloat((data[pos] & 0xff) | ((data[pos+1] & 0xff) << 8) | ((data[pos+2] & 0xff) << 16) | ((data[pos+3] & 0xff) << 24))*100);
pos = 161;
int fBrak = int(Float.intBitsToFloat((data[pos] & 0xff) | ((data[pos+1] & 0xff) << 8) | ((data[pos+2] & 0xff) << 16) | ((data[pos+3] & 0xff) << 24))*100);
pos = 17;
int tempEng = int(Float.intBitsToFloat((data[pos] & 0xff) | ((data[pos+1] & 0xff) << 8) | ((data[pos+2] & 0xff) << 16) | ((data[pos+3] & 0xff) << 24)));
pos = 21;
int tempWat = int(Float.intBitsToFloat((data[pos] & 0xff) | ((data[pos+1] & 0xff) << 8) | ((data[pos+2] & 0xff) << 16) | ((data[pos+3] & 0xff) << 24)));
pos = 113;
int pitch = int(Float.intBitsToFloat((data[pos] & 0xff) | ((data[pos+1] & 0xff) << 8) | ((data[pos+2] & 0xff) << 16) | ((data[pos+3] & 0xff) << 24)));
pos = 117;
int lean = int(Float.intBitsToFloat((data[pos] & 0xff) | ((data[pos+1] & 0xff) << 8) | ((data[pos+2] & 0xff) << 16) | ((data[pos+3] & 0xff) << 24)));
println("gear = " +gear);
println("rpm = " +rpm +" rev/min");
println("speed = " +speed +" km/h");
println("fuel = " +fuel +" l");
println("front suspension = " +fsusp +" mm");
println("rear suspension = " +rsusp +" mm");
println("throttle = " +thro +" %");
println("front brake = " +fBrak +" %");
println("pitch = " +pitch +" °");
println("lean = " +lean +" °");
println("engine temp = " +tempEng +" °C");
println("water temp = " +tempWat +" °C");
println("-----------");
}