Open magnum3131 opened 2 years ago
Did you had a look the Site of Alex K.? https://sites.google.com/site/sbus2diy/home/sbus2protocol-part2/sbus2protocol-part3
The SBS-02G could be the same Format as SBS-01G
Please give us more informations: how much slots? where is altitude, vario and preassure located? did you have a SBS-02G for decoding?
Hi Eric,
Yes i have a SBS-02G for testing, i use your library to view the data in each slot. The SBS use 8 slot Slot 0 = Date not display on radio, i didn't work on it yet Slot 1 & 2 = 26 bit for latitude + 1 bit for pole(0 North, 1 South) + 4bit of longitude + 1bit i don't know Slot 3 & 4 = 23bit for longitude (27 total with slot 1&2) + 1 bit for pole + 8 bit of speed Slot 5 & 6 & 7 = Mix for Speed, Pressure, Alti and Vario
I already done the code for the pressure, alti & vario and it's working on 18MZ
I'm not to my home this evening, i don't have access to my detail note with the detail of each bit
Thanks
Hi,
Here the detail of slot
Slot 1 Latitude 16384 8192 4096 2048 1024 512 256 128 | 64 32 16 8 4 2 1 ?
Slot 2 Latitude 8 4 2 1 Pole 55554432 27577216 13588608 | 6594304 3297152 1448576 524288 262144 131072 65536 32768 Longitude
Slot 3 Longitude 524288 262144 131072 65536 32768 16384 8192 4096 | 2048 1024 512 256 128 64 32 16
Slot 4 Longitude 128 64 32 16 8 4 2 1 | Pole 111508864 55554432 27577216 13588608 6594304 3297152 1448576 Speed
Slot 5 Speed 1024 512 256 128 64 32 16 8 | 4 2 1 ? ? ? 256 ? Pressure
Slot 6 Pressure 4096 2048 1024 512 256 128 64 32 | 16 8 4 2 1 8192 4096 2048 Altitude
Slot 7 Altitude ? 2048 1024 512 256 128 64 32 | 16 8 4 2 1 32768 16384 8192 Vario
it's hard to understand your coding
try to make it readable in a Table
Slot Number | High Byte | Low Byte | Comment |
---|---|---|---|
Slot 0 | Time/Date | Time/Date | no work done |
Slot 1 | LAT Bit 8-15 ? | LAT Bit 0-7 | Slot 1 should contain a Date Time Bit in High Byte |
Slot 2 | LAT Bit 16-23? | LON Bit 0-4 ; Pole ; LAT Bit 24 -26 | not sure |
Slot 3 | |||
Slot 4 | |||
Slot 5 | |||
Slot 6 | |||
Slot 7 |
could you try it this way?
and it would be good to have a Log of the Sensor Which Bytes are in the Slots? And what is displayed to the 18MZ?
The SBS-01G and SBS-02G are strange. But maybe we could get it decoded together
Hi Eric,
I'll do that ASAP
I'm willing to help as well. I am also attempting to decode the data off an SBS-02G. I have the GPS module attached to an r7008sb which is talking to a T14SG. Happy to post some logs and write some code.
UTC is pretty straight forward. There was a comment on Jerry Chapman's blog (http://sbustelemetrysensors.blogspot.com) that described it clearly. Here is what that looks like:
static const uint8_t pSrc[24] = {0x13,0x53,0x1A, 0x93,0x71,0xD0, 0x53,0xDE,0xE2, 0xD3,0xAF,0xD7, 0x33,0xBF,0x00, 0xB3,0x2E,0x30, 0x73,0xBC,0xBB, 0xF3,0xE2,0xAE};
uint32_t seconds = pSrc[1] | (pSrc[2]<<8) | ((pSrc[4]&0x01)<<16);
uint32_t hours = 0.5 + floor(float(seconds) / 3600.0);
seconds -= 3600 * hours;
uint32_t minutes = 0.5 + floor(float(seconds)/60.0);
seconds %= 60;
printf("utc time: %02d:%02d:%02d\n", hours, minutes, seconds);
utc time: 20:04:35
I've had trouble parsing out his lat/lon though. He says his location is N 41:07.8440, W110:34.3932. Which should be buried in that array; however, I cannot seem to pull it out using Alex's table.
Hi,
Here the detail of SBS02G slot <html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
Slot Number | High Byte | | | | | | | | Low Byte | | | | | | | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 2 | 2 | 1 0 | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? | ? 1 | LAT 16384 | LAT 8192 | LAT 4096 | LAT 2048 | LAT 1024 | LAT 512 | LAT 256 | LAT 128 | LAT 64 | LAT 32 | LAT 16 | LAT 8 | LAT 4 | LAT 2 | LAT 1 | ? 2 | LON 8 | LON 4 | LON 2 | LON 1 | LAT Pôle 0 = N 1 = S | LAT 55554432 | LAT 27577216 | LAT 13588608 | LAT 6594304 | LAT 3297152 | LAT 1448576 | LAT 524288 | LAT 262144 | LAT 131072 | LAT 65536 | LAT 32768 3 | LON 524288 | LON 262144 | LON 131072 | LON 65536 | LON 32768 | LON 16384 | LON 8192 | LON 4096 | LON 2048 | LON 1024 | LON 512 | LON 256 | LON 128 | LON 64 | LON 32 | LON 16 4 | SPEED 128 | SPEED 64 | SPEED 32 | SPEED 16 | SPEED 8 | SPEED 4 | SPEED 2 | SPEED 1 | LON Pôle 0 = E 1 = W | LON 111508864 | LON 55554432 | LON 27577216 | LON 13588608 | LON 6594304 | LON 3297152 | LON 1448576 5 | Pressure 1024 | Pressure 512 | Pressure 256 | Pressure 128 | Pressure 64 | Pressure 32 | Pressure 16 | Pressure 8 | Pressure 4 | Pressure 2 | Pressure 1 | ? | GPS SIGNAL | GPS SIGNAL | Set 1 For Speed | SPEED 256 6 | Alti 4096 | Alti 2048 | Alti 1024 | Alti 512 | Alti 256 | Alti 128 | Alti 64 | Alti 32 | Alti 16 | Alti 8 | Alti 4 | Alti 2 | Alti 1 | Pressure 8192 | Pressure 4096 | Pressure 2048 7 | ? | Vario 2048 | Vario 1024 | Vario 512 | Vario 256 | Vario 128 | Vario 64 | Vario 32 | Vario 16 | Vario 8 | Vario 4 | Vario 2 | Vario 1 | Pressure 32768 | Pressure 16384 | Pressure 8192
Hi,
I'm working on the code to adding the GPS sensor SBS-02G. For the moment i manage to send the altitude, variometer and the pressure. But i'm stuck by the latitude and the longitude.
The latitude is coded on 26 bit wich can have the maximum value 67 108 864, insuffisant for 90°. According to my test the value of the bit is not always a power of 2. Here the detail of the 26 bit : 55554432, 27577216, 13588608, 6594304, 3297152, 1448576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1
Same thing with the longitude but this time with 27 bit : 111508864, 55554432, 27577216, 13588608, 6594304, 3297152, 1448576, 524288, 262144, 131072, 65536, 32768, 16384, 8192, 4096, 2048, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2,1
I tried to make a fonction to convert value with this bit but the radio display different value. Depending on the case i have the following difference between the send value and the display. 2400000, 2000000, 1600000, 1200000, 800000, 400000, 0
The difference depend of the coordonate
Have you ever seen this king of compression to transmit high value with less bit ?
Thanks