Friday, February 28, 2014

Ground OSD work in progress




So, here we are for ground osd.

It's a fork of minimosd-extra. I've replaced Mavlink support for LightTelemetry.
Ghettostation repack & send LTM packets to the minimosd at 38400 bauds using softserial. ( I don't think going higher baudrate in softserial won't cause problems. )
I had some hard time to make softserial working with servos. It was causing big troubles because of Timer & interrupts problems.
Once I've moved the servo to PWMServo lib it worked like it should.

There's not much things changed in the original minimosd code for now But I will lighten it, there's lot of useless things on it for ground use.

You can see the actual result:

 

Sorry for the glitches, I have a wiring problem on this little quad.

So we have like 400ms lag when using audio telemetry. I'm still working on tricks to improve this, but it's already far usable.

edit: I've found a bug on my side.
There was a bottleneck in the serial stream at 2400 bauds. Too much data, I've forgotten to count the start/stop bit for each bytes ( we're communicating with 8n2 serial ).
So I've switched the GPS & Sensor frames at 2 hz and here we go :


Far better isn't it. :)

 I'm still fighting on a way to grab the RSSI from the naze32. For now there's no ADC support in baseflight ( I've encountered some bugs by hacking it for analog rssi ) , and pwm rssi only works when not using PPM mode. I hope Dongs will be able to give a look to this.
 No problem with Taulabs btw.

Monday, February 17, 2014

LightTelemetry v2: en route to ground OSD.

LTM protocol has been extended to prepare the future ground OSD for Ghettostation.
I think I have some pretty good refresh rate of all needed data for that purpose.
We now have 3 different frames:

- GPS frame (G): Latitude, Longitude, Ground Speed, Altitude, Number of sats, GPS fix type

- Attitude frame (A): Pitch, Roll, Heading

- Sensors/Status frame (S): Battery Voltage, Current consumed, RSSI, Airspeed,  Armed state, Failsafe state, Flight mode


1200 bauds 2400 bauds+
G frame 2hz 5hz
A frame 5hz 10hz
S frame 2hz 5hz


GPS frame
0x24 0x54 0x47 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xFF
$ T G Latitude
(degre*10000000)
Longitude
(degre*10000000)
Ground Speed
(m/s)
Altitude
(cm)
first 2 bits: Fix
last 6 bits: Sats
CRC
xor byte 4 to 15
Start 1 Start 2 Frame ID Payload Checksum

Attitude frame
0x24 0x54 0x41 0x00 0x00 0x00 0x00 0x00 0x00 0xFF
$ T A Pitch
(degre)
Roll
(degre)
Heading
(degre)
CRC
xor byte 4 to 9
Start 1 Start 2 Frame ID Payload Checksum

Sensors/Status frame
0x24 0x54 0x53 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xFF
$ T S Vbat (mv) Consumed current (ma) RSSI Airspeed
(m/s)
1st bit: armed
2nd bit: failsafe
latest: flight mode
CRC
xor byte 4 to 10
Start 1 Start 2 Frame ID Payload Checksum

Ghettostation, Taulabs & Baseflight have all been updated to ltm v2 on my github.

You still can use my TL & BF builds here:  Google drive

There's almost no lag in the attitude data, that's a really good news, I was a bit afraid that such low baudrate would prevent a nice smooth horizon bar. 
Ground base OSD will be a really cool feature. Less cables on air seems better to me.