-
Notifications
You must be signed in to change notification settings - Fork 1
sprint3
This week, I designed a function that could take a rectangle and output the flight pattern to map this area. I found out that I needed the camera aperture angle to be able to compute the projected image on the ground which is still unknown. I sent an email to Jonas Vauterin who told me that he will make these values available through the API. I spent a lot of time looking for a library that would help me create such missions but found none that satisfied me. As a result, I created a Point and Vector class that would help me do the geometric transformations to build the mapping mission. Building everything from scratch took me more time than expected and I had no time to test the new features.
I helped Jonas fix some tests. Then I added the logout button on the MainActivity. But I had trouble making it work, so I spent some time remaking the layout of the main activity to fit the needs. I then spent another lot of time figuring out how to recreate an activity inside a test such that it took into account mocked data at creation. I estimated this task at 1 hour but spent three. Mostly learning complexe andoird layout and test states.
I then implemented a DroneData class that centralize all the Drone property that we will use and make sure they are correctly updated. I estimated this task to 4 hours, but it took me less time as I inspired a lot from the fly2find code, and it was very clear. I attempted to write some tests but I ran out of time and decided to end it there.
Furthermore, I finally created a utility class to easily create Toasts from ui thread or any other thread. I spent one hour writing the class and another hour writing the test. I found a very useful ToastMatcher on stackoverflow which simplify the testing of toasts.
To sum up, I failed to estimate correctly the time my tasks would take.
This week, I made it possible to show a mapping mission on the map using symbols for the different coordinates and linking them by lines. I also added a method which zoom on the mapping mission when we show it. I found that the documentation was not very clear on this subject and first used deprecated features (which seemed easier to use) and had to change the code to use the latest ones. This "lack" of documentation made me spend much time on tasks that were finally pretty easy. I also struggled to write tests and didn't manage to do them, because I didn't really know how to test private methods which change attributes of an activity class (how to call a private method and see if the attributes of the activity class have changed). In general, this made me understand that I still don't know much about Android Studio and that I should spend some time during my free time to learn and understand the basics better if I want to be more productive. Regarding my time estimate, I think that it was a bit better than the weeks before, except that I didn't expect to have problems with the testing which I underestimated.
I fixed the MappingMissionDao (to store the MappingMissions in the firebase). Then I linked it to the MappingMissionSelectionActivity, which required a test adaptation of the MainActivity, the MapBox activity, and of course the MappingMissionSelectionActivity. I also locked the screen orientation to vertical for the Login and Check-in activity. I'm still waiting for all other PR from this sprint to be merged to add copyright header to all files consistently along with the license.
This week, I had to implement the functionality that shows the phone location on the map. I created a LocationComponentManager class that asks the user for permission and sets the location options. Then in ItineraryCreateActivity, I just have to call a method to show the location. The main problem I had is that I had a bug where onPermissionResult was not called when the user grants or not the permission but I was able to fix it. The other problem I still have is that the code coverage for LocationComponentManager is very low because all the code that deals with the permissions isn't tested because espresso cannot interact with android popups (in this case, the one that asks for permission). There may be a solution to it but I would need more time to fix it.
I created two activities to allow the user to write informations about a simulation to allow the app to connect to it, or to disconnect from it. I then adapted two classes from Fly2Find, DroneUtils and DroneInstanceProveder, to allow them to work with our implementation, and to make them do what we need for our application.
During this sprint, we began the implementation of the drone and continued the implementation of the map and the mapping missions, but we had multiple problems in the test or didn't have time to test multiple tasks. We still have to improve ourselves to take this time into account when we assign time to the tasks.