Lots of Android Fragments!

with No Comments

This past week I have done a lot with the Android application, Field Day. I’ve implemented the basic architecture that I think we are going to use.

It makes use of Android ‘Fragments’ class. Fragments were introduced to make it nicer when building UIs. Before Fragments (introduced in API 11), whenever a new screen on the Android device was shown, a new Activity was created. Even if only one thing on the page changed, you needed to create a new activity. That meant that there were many lifecycles that needed to be tracked and maintained. That’s drained the battery and made the code more complicated than it needed to be. The Activity lifecycle is complicated. With Fragments, you can easily swap out parts of a UI and still stay in the same lifecycle. The activity that created the fragment controls its lifecycle. There’s no extra ones that need to be maintained.

Right now, there are only about 3 activities, and 5 or 6 fragments. The main screen buttons, and when you click on ‘Take a Sample’ or ‘Lab Notebook’ are all fragments with one activity maintaining them. Once a specific sample type is clicked then the SensorSample.java activity is created. There are parts of the SensorSample activity that are going to be the same no matter what type of sample we are taking. That’s why those are also fragments. Code/UI elements that will be the same for all — Geocoordinate, for example — are on the SensorSample activity’s layout file, but there’s a FrameLayout in there that can be swapped out depending on the type of sample. It really helps with stopping the creation of repetitive code.

In the SensorSample activity, I’ve already implemented a LocationListener and Manager that will listen and update the user’s location. That will be used for the Geocoordinate. It doesn’t get written to the database yet, but I have implemented in both the code and UI so it shows up and does change. I tested it!

Progress Report 11/1-7

with No Comments

This week I stopped working on the alcohol burner (at Charlie’s insistence) and started to look for Sterno. I did not find Sterno at Marsh or Tru Value, so someone else might have to pick that up. Once we have that, I’m hoping to use a lightweight plastic or balsa for a the frame for the envelope, though it remains to be seen if either is can be light and strong enough (I’m counting on balsa) .  Meanwhile I started researching potential DIY kite designs from which we could do our thermal mapping. I like the kite idea because it can be used when the hot air balloon cannot (because it’s too windy) giving us more flexibility over when and where we do our thermal mapping. The designs I’m looking at right now are box kites, due to their relatively simple design, ease of construction, strength and stability in the air. I hope to start building a kite out of dowels and TyVek this week, and if it’s stable, I’ll scale those designs to accommodate the thermal camera.

Progress Report 10/18-24

with No Comments

During these weeks I explored the possibilities of using hot air balloons. The trick was, how do I generate enough heat to get lift the thermal camera? The answer is, a LOT. We are going to need to not only generate a lot of heat, we are going to need to have a huge envelope which holds this hot air. I’ve built a couple alcohol burners already, which worked OK. Early models exploded from vapour build-up, and later models had too little pressure to stay lit. Calibrating a burner to burn for long enough while still holding together will be quite the trick. In the mean time, I’ve been thinking: hot air balloons usually float on the calmest days. If Skalines is windy, is this the best approach?

The Arctic Fox & Other Projects

with No Comments

This week did some bits and pieces of several different things. Firstly, I wrote up a paragraph with some questions for Oli. This is mostly geared toward the eider in Skalanes, and what he would like to focus on with this species. I decided also to look further into the natural history of this birds and found that Steller’s Eider is a vagrant to Iceland that is declining at an unknown rate, however populations are decreasing and the species is listed as vulnerable on the IUCN red list.

I looked at some other species on the IUCN list, including the arctic fox, because Oli wanted us to look into home range/den surveying for them. IUCN lists them as a stable population of least concern which I find interesting. I am not quite sure how they are measuring some of these species, but I am looking into that. This does not mean that they are not an important species, worth looking at. Their habitats are limited and their diets are fairly specific which can be concerning in species decline and extinction. They live in very cold conditions in the northern steppe. With global warming they are bound to get pushed further and further north to the edges of Europe and North America. Oli mentioned surveying scat with a drone but I do not see this as a very effective solution because, first of all, detecting the scat would be extremely difficult and the wind might cause issues with a small-scale drone.

On another note, we still need to do some more brainstorming into what the most effective way to survey the birds at Skalanes will be. Thermal imagining is a great idea but it may either require the rewiring of the comera we have in order to hook it up to an arduino or we would need to look at other thermal technology, which could be expensive.

Prospect for bouncing the internet signal off of the side of the fjord looks very reasonable, we just need to ask Oli about putting up a billboard sized target on a neighbors land.Screen Shot 2015-11-09 at 3.49.47 PM    Screen Shot 2015-11-09 at 3.50.25 PM

Finally, Gail, Kristin, Charlie, Nic, Deeksha and I had a great meeting last week about the potential for a wilderness program associated with the field science work. Notes on this meeting are in the drive. Charlie submitted the grant request to the GLI committee and we are meeting again this week to further discuss the potential for this. Our next step will really be a budget and looking into what needs to happen in the next nine months, in order to plan a successful program.

Week of 8 November 2015

with No Comments

Another week, another 7 things moved 2.54cm each:

  1. Met with Gail Clark, Kristin, Erin, Nic and Deeksha to talk about if/how our field work in Iceland could be the basis for a Wilderness Program. Initially this looks good to us.
  2. Worked with G, K, E, N and D to assemble a proposal to the GLI’s development fund to cover C and G’s travel costs this coming summer. This would mean 7 of us in-country rather than 6.
  3. Ordered some bits for the soil and ambiance platforms.
  4. Worked with Tara on the science protocol design, (physical) interface design, and data protocol design for the soil platform. The data protocol design and by extension probably the other platforms too).
  5. Started to incorporate Oli’s replies and develop our next set of questions.
  6. Downloaded and installed Nic’s signed Android APK on my Nexus7! (Is this process documented? Do we have developer’s notes with the directories, release process, etc. described?)
  7. Learned how little I know about detecting Arctic fox dens.

This coming week we’ll see if roughly the same 7 things can move another inch or so:

  1. Finish next email to Oli.
  2. Work with Deeksha on data model and current data sets.
  3. Next steps for the Wilderness Program idea.
  4. Develop initial materials for Institutional Advancement to use with potential donors; meet with SallyS and AvisS.
  5. Work with Eamon on the visualization interface.
  6. Work with Erin and Eamon on the wifi link for Skalanes.
  7. Work on Field Day <-> Bluetooth <-> Platform interface.

Downloads and settings!

with No Comments

This week I worked on setting up a way to distribute the FieldDay app. The website now has a downloads page that will host our app. There will be a location for downloading the production APK which will be the compilation of Charlie, Kristin, and my code into a most recent working app. The individual coders will be able to host a most recent version of our APKs so that we can share and keep track of each others progress. During this process I coded in a way for us to upload and host nearly any file type but have restricted it back to just APK for now. Currently, all uploaded media is stored in a single directory on the server but I am trying to implement a way that we could simply scp our APK into a directory and they will be sorted into their correct location on the website. My next step is to also work on getting it so that when we distribute an APK it will be given a unique ID from our respective GIT services as another means of keeping track of everything.

On the back burner a bit, I have been working on taking the old settings page form Sheshat and implementing it into FieldDay with a few updates here and there. I will be able to spend more time on this once I get the downloads page all worked out so more updates to come!

Clean up done…now what?

with 2 Comments

I now have a master table with all our data in a consistent format,waiting to be imported into a database.
Based on Kristin’s post about,it looks like the next thing for me to start doing is learning about how to use SQLite.It will definitely be really nice to not have to deal with different versions of CSV data,and I’m excited to learn more about how to implement it.

The ability to look up later in the day records that we created earlier to associate bench values is a feature that seems particularly cool,in terms of having everything in one place at one time.

 

Sample Volume and SCIO

with No Comments

On Saturday Charlie and I talked about what the maximum number of samples we could reasonably process in the evening with bench-top sensors would be. We decided that 20 would be the upper limit. In the evening we will be collecting pH, conductivity, munsell color, fertility and organic content data. The most time-intensive test is organic content, which requires the sample to settle in water for up to 30 minutes so that the organic content can rise to the top. It will be very important for us to test the bench-top sensors with a large volume of samples before we take it into the field.

This week, the SCIO was ordered. I have been looking through the developer blog to see if anyone has used the SCIO for applications like ours. So far I have found that there is an interest but most people don’t have access to higher-caliber IR spectroscopy technology for calibration. However, we are fortunate enough to be working right down the hall from Mike Deibel. Mike has offered to let us use his Fluke portable FTIR to calibrate the SCIO. The developer SDK workflow has three steps, using the SCIO itself, the ‘development model’ web app, and the mobile developer package. The developer web app offers control of the algorithms and statistical methods that the SCIO uses to determine the composition of a sample. Using the spectra generated by the FTIR I think we can definitely ‘teach’ the SCIO to recognize the chemical signatures of different nutrients. The mobile app SDK is open and will ultimately allow Field Day to communicate with the SCIO.

SQLite DB for Data.

with 1 Comment

On Saturday, Charlie and I discussed the notion of persistent data for the Field Day android application. Previously, we would stream all of our data to a CSV — even empty lines or entries that are missing data in some spots, and this would cause data to be in a bunch of different data models.

I recently read a chapter on SQLite databases in Android and it seems really powerful. We’ve decided that we are going to use a SQLite database instead of just writing to a CSV file. With this, we could create primary keys and easily pick out all the lines that have empty fields for one column or another. Using a SQLite database will also be useful for our plans to implement an ‘On-Bench’ and ‘In-Field’ option for the soil platform. There are some sensor data that you wouldn’t take in the field and would need to do later that day — like pH or organic content. Using a SQLite database, we’ll be able to simply ask for the sample ID from earlier that day and update it with the pH and Organic Content. Our data will be less messy and we’ll have less random lines of data floating around.

Saw a Squirrel

with No Comments

This week I dedicated most of my time to helping Erin with figuring out how to use and implement the thermal camera as well as with setting up a plan with the balloon use. In terms of the thermal imagery, we were able to verify that at ~15m you could spot a squirrel on the camera screen though the actual heat reading appeared fairly inaccurate. Squirrels, like most mammals have a body temperature around 37 degrees C – the the camera however only picked up a heat signature of 20 degrees C. Weather would have been a factor in degreasing the body temperature, but this means that we can’t get an accurate reading to be able to tell differences in species so we will be heavily relying on post processing to determine animals. This leads into the second worry that the current camera cannot give a live feed or any form of video. This means that we need to either look into a different thermal tech or gutting and reworking the current camera we have.

1 2 3