Development diary week 05 - GideonPARANOID/olandroid GitHub Wiki

Progress has been somewhat limited this week, due to the fact that I was away from last Thursday until today (Wednesday). However, I've still managed to keep on with some work.

The primary focus of the work this week has been animation. While I don't have a flowing animation of the progression of a flight working yet, I'm well on the way with having built a system which can get a point anywhere between the beginning & end of the flight using {0, 1}. This algorithm, animate(float progress) takes into account the varying lengths of flights, manoeuvres & components, to give a smooth movement when interpolating between the limits. For a rough idea of this, I've added in a seek bar (which disappointingly only seems to have a precision of 100 points) which passes its value into the animation functions. The actual usage of the animation at the moment (only drawing things behind the current point) isn't a final implementation either, & could be fancier - something I'll look into at some point.

That wasn't too tricky to implement, if it weren't for uncovering a pretty nasty bug. The problem was with the manoeuvre catalogue, when it got queried for a manoeuvre, it returned a reference to a manoeuvre in the catalogue, rather than an object. This meant that if there were multiple of the same manoeuvre in a flight, each would animate identically at the same time as they were the same object. To fix this, I implemented a copy constructor, which takes the reference to a manoeuvre from the catalogue & copies it, making a new manoeuvre to use in a flight.

Another issue I uncovered this week was the fact that some manoeuvres are currently impossible to encode in the current manoeuvre XML schema. The first one I noticed to be a problem is the split-a, a 180 half-loop involving a roll to ensure that the aircraft leaves the loop the same way up it entered it. I've had a few ideas on how to accommodate this - swapping matrix operation orders for component matrices, converting component arrays into a more linked data structure (for back-referencing) etc. - but nothing solid yet. I want to ensure that the solution will handle as many manoeuvres as possible effectively before writing it. That'll probably consume most of the coming week.

& finally, but not least, a quick demo of this week's build. I've compiled the demos into a playlist to make them easier to track. Unfortunately, the actionbar transparency is gone this week as I played around with my phone on Android 5.0 (Lollipop) at the weekend & it didn't like it, I'll find a way of reimplementing it soon.