Marc's Public Blog - Remote Control Aircraft


All | Aquariums | Arduino | Btrfs | Cars | Cats | Clubbing | Computers | Dining | Diving | Electronics | Exercising | Festivals | Flying | Halloween | Hbot | Hiking | Linux | Linuxha | Mexico | Monuments | Museums | Outings | Public | Rc | Sciencemuseums | Solar | Tfsf | Trips



>>> Back to post index <<<

2015/12/20 Hacking MinimOSD-Extras to do what I needed thanks to OSS: Mode Rotation with Channel Toggle
π 2015-12-20 01:01 in Rc
MinimOSD-Extra is the open source arduino software that takes mavlink data from ardupilot and creates an on screen display on top of your real time video to give you a clue where you are, which direction you should go to fly back to home, how much battery you have left, altitude, airspeed, and artificial horizon if you're flying IFR, at night, or your camera being displayed (I have 3, one rear facing) does not give you a proper horizon you can refer to for hand flying.

Sadly, the device it runs on only has a measly 32KB of flash space, and with all the code it needs to interface with mavlink/ardupilot, talk to a video chip, and do calculations before displaying the result, you can't add much of anything to the current codebase. For reasons that I do not understand, I have not found anyone making an OSD board that would be compatible with the current code while providing more storage for new code.

While I'm not a big fan of the closed source commercial Vector flight controller, it has a really good OSD compared to ardupilot and minimosd. In the meantime, though, I needed minimOSD to be able to rotate my OSD screens without burning an extra switch on my transmitter. I need to rotate screens because I'm doing 3D FPV flying and it's distracting to have OSD data in one eye when you're trying to get a 3D effect from 2 images :)

The way you can do this without burning an extra RC channel is to use rotation swiching on an existing channel (you can also use rotation switching on the APM mode switch, but that never worked reliably for me), but the released code rotates forever as long as your switch is not in the down position, making the switch not usable for anything else.

Thankfully it's open source, so I was able to take the arduino code and improve it to do what I needed. Now, with my custom branch I can rotate the OSD screen by simply flipping any selected switch to any position and then back. This works with the mode switch too if you'd like (sadly the channel number is hardcoded to only be 5 to 8).
You can get my version from https://github.com/marcmerlin/MinimOSD-Extra (only compiled for plane, but you could port the code to copter if you wish). I've also cleaned up all the compilation warnings in the code, and removed a bit of dead code I found.

Pre-built binaries for plane: https://github.com/marcmerlin/MinimOSD-Extra/tree/master/Released/FW%20%26%20Char

Here are some screenshots from my OSD configuration:

60 degree pitch up, 82% power, 41A, 533W used
60 degree pitch up, 82% power, 41A, 533W used

stall speed 27kph under near full throttle
stall speed 27kph under near full throttle

The OSD horizon comes in handy when switching from the FPV camera to the bottom and rear facing cameras:

FPV cam
FPV cam

bottom cam
bottom cam

rear cam
rear cam

OSD flipping:

OSD screen #2
OSD screen #2

OSD screen off to allow for a proper 3D view
OSD screen off to allow for a proper 3D view

This is also useful for debugging and filing bugs. Guided mode was supposed to take over at 70m (it did), and fly back up (it did not, it pitched down, went up to 80pkh while pitching down and losing altitude down to 26m before I took over for manual flight):



More pages: October 2020 October 2017 July 2017 August 2016 July 2016 December 2015 November 2015 October 2015 September 2015 August 2015 May 2015 April 2015 August 2014 July 2014 February 2013 May 2011 October 2010 August 2010 July 2010 February 2010 January 2010 October 2009 September 2009 July 2009 June 2009 May 2009 July 2008 June 2007 May 2007 April 2007 March 2007 February 2007

>>> Back to post index <<<

Contact Email