#include <iostream>
using namespace std;
void Payload(unsigned long lastTime, float deltaOne, float deltaTwo, int factor) {
char buffer[sizeof(unsigned long) + sizeof(float) + sizeof(float) + sizeof(int) + 13];
sprintf(buffer, "CAPTION,%u,%.4f,%.4f,%d,", lastTime, deltaOne, deltaTwo, factor);
printf("%s", buffer);
printf("\nCAPTION,11285600,50.2035,54.2035,5,\n");
}
int main() {
unsigned long record = 11285600UL;
float delta1 = 50.2035;
float delta2 = 54.2035;
int factor = 5;
Payload(record, delta1, delta2, factor);
}
//http://pt.stackoverflow.com/q/184523/101
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdm9pZCBQYXlsb2FkKHVuc2lnbmVkIGxvbmcgbGFzdFRpbWUsIGZsb2F0IGRlbHRhT25lLCBmbG9hdCBkZWx0YVR3bywgaW50IGZhY3RvcikgewoJY2hhciBidWZmZXJbc2l6ZW9mKHVuc2lnbmVkIGxvbmcpICsgc2l6ZW9mKGZsb2F0KSArIHNpemVvZihmbG9hdCkgKyBzaXplb2YoaW50KSArIDEzXTsKICAgIHNwcmludGYoYnVmZmVyLCAiQ0FQVElPTiwldSwlLjRmLCUuNGYsJWQsIiwgbGFzdFRpbWUsIGRlbHRhT25lLCBkZWx0YVR3bywgZmFjdG9yKTsKICAgIHByaW50ZigiJXMiLCBidWZmZXIpOwogICAgcHJpbnRmKCJcbkNBUFRJT04sMTEyODU2MDAsNTAuMjAzNSw1NC4yMDM1LDUsXG4iKTsKfQoKaW50IG1haW4oKSB7CiAgICB1bnNpZ25lZCBsb25nIHJlY29yZCA9IDExMjg1NjAwVUw7CiAgICBmbG9hdCBkZWx0YTEgPSA1MC4yMDM1OwogICAgZmxvYXQgZGVsdGEyID0gNTQuMjAzNTsKICAgIGludCBmYWN0b3IgPSA1OwogICAgUGF5bG9hZChyZWNvcmQsIGRlbHRhMSwgZGVsdGEyLCBmYWN0b3IpOwp9CgovL2h0dHA6Ly9wdC5zdGFja292ZXJmbG93LmNvbS9xLzE4NDUyMy8xMDE=
CAPTION,11285600,50.2035,54.2035,5,
CAPTION,11285600,50.2035,54.2035,5,