Notice to YSPilots/YSFLIGHT

Notice to YSPilots/YSFLIGHT
Legacy Pack available under the YSFLIGHT category.
Any individual requests for a model must be made to my email address, see bottom of the page..
Enjoy!
Skippy

Tuesday, 31 December 2013

ArcGIS Domain Coded field to field of domain value

Sorry for the confusing title… Basically this is a tutorial of doing something that took me ages to figure out, though it probably shouldn’t have…

So, first off, you need a feature class with a domain field thats within a Geodatabase (The geodatabase has the domain class)

Then, you need to convert the domain to a table>

image

My Geodatabase is a list of land ownership in Oregon, called Land_lines.gdb

My domain is dom_LLI_PROP_STATUS, which contains abbreviations of the property ownership like: BLM for Bureau of Land Management.. I want a field that just says “Bureau of Land Management” rather than one that looks like it does, but the actual value is “BLM”.

So, using Domain to Table too, (Data Management>Domains) export the domain

image

This is what my settings looked like. The code field is the field in the table that leads to the domain, like BLM, the Field Description would be the longer description, like Bureau of Land Management.

Go ahead and export this to a table somewhere… (Remember where though…)

You then want to do a join between the table and your original feature class.

So, my feature class is called “Dissolved Land Lines”, and the code field (With BLM etc etc) in is called “PropertyStatus”. I want to do a join on this field, and the exported table with the Code Field (Which I called “Code” in the settings in the screengrab).

I did this by right clicking the feature class (Within ArcMap) and going to “Joins and Relates” and then to “Join…”. Within Join, I selected the “PropertyStatus” field of the feature class to be the field that the join would be based on. Then the table to be joined was the one we exported above, the join field is the “Code Field” field (Named “Code” above). Hit Okay and off it trundles.

If you look in the attributes table there will now be a nice list of all the vales that relate to the “PropertyStatus” field.

image

Then go ahead and export the feature class or do whatever you want with it!

Sunday, 15 December 2013

Creeper plushie

So, this is something i made for my other half for Christmas, but i couldn't resist giving it to her early...

Thursday, 12 December 2013

Converting a Digital Elevation Model into a .ter (YS Flight Terrain Model)

I’m currently doing a Masters Degree in GIS and Conservation, the upshot of that is that I get access to all sorts of cool data… (Though this bit is freely available on the net)

One of my old haunts was the game YSFlight, a free flight simulator. Available from here. I used to make planes and things for this simulator, and occasionally maps. Now I learn how to make maps for a living, and have access to all sorts of mapping resources, so I decided i’d try and mix the two together.

YSFlight uses a file called a .fld file, or field file, for its maps. These files are made up of subcomponants, such as objects and terrains (There are more, but I would be here all day). Now, most of YSFlight is a pretty simple code, the planes use polygons and vectors that if you feel like it, you can modify with notepad…

The field files are the same. One of the componants of the field file is a terrain (.ter)  file. Your field file can have many of these .ter files inside it, and these are the bits I’m trying to modify.

So, the terrain file is pretty simple structure wise:

The top of the code looks like this:

TerrMesh
NBL 401 401
TMS 50 50

TerrMesh just says what it is. NBL 401 401 gives the number of rows and columns, so 401 rows and 401 columns. (It can be any number really, and usually they’re much smaller)

TMS gives the sizes of the squares, so 50/50 (Not sure if the units are ft or m, I think m) – So they’re 50x50m square, each cell.

Then comes the data, it begins with “BLO” then the elevation, then… some other details that I dont understand.. Colour is one of the tags following.. For this project though, all I need is the elevation.

Here is one bit:

BLO 65 R 1 46 112 10 1 46 112 10

This says that the vertex is 65m up.

So, now comes the good bit… I use a program called ArcMap, its an industry standard piece of GIS software. One of the functions of ArcMap is the ability to export a Raster Digital Elevation Model (Which is basically a picture where darker places mean lower height, lighter places mean higher height) into an ASCII file.

The begining of the ASCII file looks like this:

ncols 401   //Number of Columns
nrows 401 //Number of Rows
xllcenter 460000 //The location of the square
yllcenter 520000 //Also location
cellsize 50 //Size of the cells

Now, with the comments I added, you can see the data contained is very similar to the beginning of the terrain file, contains number of columns, rows and the cell size. The rest of the data is also quite helpful. The rest contains heights separated by a space, for example:

20.0 21.0 21.0 20.0 21.0 21.0 21.0 22.0 22.0 23.0 23.0 23.0 24.0 24.0 24.0

(Thats a pretty flat bit of land) Each new line is a new row in the grid, and each space is a new column.

My coding ability is a bit rubbish… I could’ve probably written a script that simply converted this.. but I’ve no idea where I’d even start, so instead I used notepad++ and excel.

Firstly I opened the ascii file into Excel, it thinks its a CSV file, so I tell it the data is separated by a space, and it makes a nice table where each value is in a different cell, then each row is the length of the number of columns it should be (In my case, 401 columns long, 401 rows high)

I then ran an equation below this selecting the first cell that had the height data in (Cell A6):

="BLO "&A6 &" R 1 46 112 10 1 46 112 10"

This formula takes the value of A6, and adds “BLO “ before, and “ R…etc etc” after the height, so you get a full load of cells with the whole data that the .ter file wants!

I copied this all into notepad++. At the end of each BLO section in the .ter file, after every 401 columns, comes a line which just says “BLO 0.00”, so I did a find and replace, finding the new line marker and replacing it with “BLO 0.00” on a new line. I also did a find and replace as each cell, when copied over, is separated by a tab, so I replaced the tab space with a new line.

This gives the whole middle section of the .ter file, all that remains is to copy it into the .ter, below the TMS 50 50 section, and above the long list of “BLO 0.00” (401 in fact) that ends the file (before the final END).

 

I ran this for a small section of coastline in the UK, Ordinance Survey Grid Square NZ62, around Saltburn. The data came from the OS’ Panorama DTM.

So, I did all this and created a new .ter file. This i imported into Scenery Editor (From YSFLIGHT.com). The file is huge, 5mb in total, and not really practical for an everyday map being used to fly around in, but it is a technical achievement! Here is the result being flown in YSFLIGHT:

image

Not hugely impressive I know!

The only real problem, apart from the big file size, is that the image is back to front, North is South…This could quite easily be modified though if it is a common problem that it flips it around.

The data is here: http://www.mediafire.com/download/55u1yxq13l8fxs6/DEMtoYS.zip

If you want it. The OS data is crown copyright, details in that link<

Anyways! Fly safe

-Skipper

Tuesday, 20 August 2013

2nd Custom Snail

image

Another custom snail for you!

-Skip

How the little piggies are coming on

So, before I told you about the little piggies we had on the farm ( ==-Here-== ).

How are they coming on now? Well, they’ve grown pretty big.

image

Ms Larchfield also pigged 2 weeks later, and now they are all in together.

image

Wednesday, 31 July 2013

Scything Pt2

So, I started again after lunch, and made some good progress. The farmer from Botton Farm was cutting our Arable Silage field (The one I sowed in may), he finished a very large field in the time it took me to do about 4 rows of my little field… Well, there is a reason behind technological advances…
image
Rain stopped play, so I sat in the tractor for a while, waiting for it to blow over.
image
It didnt… So I finished the last little bit in the rain.
But at 5pm, I finished my little field:
image
Yay!
Oh I do love scything!
-Skip

Scything Pt1

So, I’ve started to scythe a field in Botton, here it is before I started:
DSCF2283
After 45 minutes of work….
DSCF2286

Its gonna be a long day!
DSCF2285
My beauty!

Monday, 15 July 2013

Places to Go in Berlin: Museumsdorfes Düppel

Hello, well, this isn’t usually a tourist information site… But this is one place I want to strongly recommend you go to. (If you’re in Berlin.. Maybe don’t go there just to see this place…)

Here in Yorkshire we’ve got a museum called the Ryedale Folk Museum, it’s basically the local history from Iron Age up to the Victorian period. It’s a nice little museum, quite poshly done, with some interactive displays, some tractors a horse, some goats and some chickens. It’s also worth a visit if you’re up here by the way… But I’ve got side tracked now!

So, I was on holiday in Berlin with my girlfriend this summer, and she recommended a place with an unpronounceable name, (actually it’s quite easy, Museum’s Dorfs Dupple). She’d been there as a child, but not been back for many years, so we decided to give it a go.

What it is:

I’m gonna call it Dupple, it’s easier to remember, and I don’t have the u with the eyes on on my keyboard. Dupple is a reconstruction of a Slavic Village. I’m not going to pretend I know much about the Slavic people, I know they are from the east somewhere, and they came west to Berlin… That’s the extend of what I’ve picked up.

The village is designed around archaeological finds from the area, and the date they’ve gone for is 800 years ago (1200s). Well, on the surface it is your regular medieval village, they have some displays of finds in cases, etc. That didn’t really get me interested that much.

The first thing I found that I absolutely loved was an audio.. thing, what do you call them? You press a button, it tells you something interesting.image

This was something on that track, but it was this wooden box ^

There were 2 big holes drilled on the front, labelled “Play” and “Stop.” So, I pressed play, and there was a whirring noise, then it started to tell it’s tale, but it was not some fancy high tech audio device, it was a tape player, and the holes were in line with the play and stop buttons Smile

When it got to the end, it repeated, and you had to press the stop button. It was so primitive, but so effective, I thought it was absolutely great, and very sweet!

The thing I loved about all of the museum is that it is essentially how I would make a museum (If I had those skills…). The Ryedale Folk Museum is very professional, and suffers because of it, everything has a neat little sign on a plate, and is all very official. Dupple has little laminated tags that someone has probably just printed off and laminated themselves. All the “exhibits” are totally hands on.

 IMG_1461

Well Well Welll

A good example is this well, in the Ryedale Folk Museum, I imagine this would be padlocked so it didn’t move, and behind some sort of fence to stop you touching it. Here you are actively encouraged to use it, no warning about trapping your fingers in it, or a safety fence to prevent you from doing so.

There are often events on at the museum, and the morning of the day we came (We came in the afternoon) they’d been running a workshop on how to make tar from Birch bark, something I’ve since tried to do, and failed miserably at… But it was very hands on, they were using bean cans with a tube stuck in the bottom and collecting the tar in camera film cases.

We saw a green wood turner (Bodgers we call them) and he was very proudly telling everyone watching how he made his tools himself, it was very sweet. Sweet seems to be the key word here…

image

The museum is very armature, and that is, in this case, definitely not a bad thing. That doesn’t mean that if you’re a serious historian that you may not learn anything, I’m sure you would, but you need to be able to speak German, or have a translator… I was more interested in the practical side of what they were doing, how they were hand forging the sheep shears, how they were trying to recreate ancient breeds of sheep and pig and how they made tar. It is very strongly into Experimental Archaeology, which, besides Dr Daniel Jackson, is the best kind of Archaeology, recreating the techniques used back then.

image

I’d definitely recommend it, the entrance fee was €2, so really, you can’t go wrong. It is very nicely done, and well, very sweet! I hope it continues for future generations, I’d love to bring my kids there.

Get yourself there and support them, and know that if I had made a museum, it would look just like here!

 

 

 Getting There

The first issue we actually had was in getting there, so this is what we found:

The best, most direct route we found on the way back it is U3 to Krumme Lanke (It’s at the end of the line, otherwise take the S-Bahn S1 towards Potsdam and get off at Mexikoplatz (The station building is pretty cool looking)DSCF2249

Mexikoplatz S-Bahn Station

From there you are gonna have to hop a bus to get any further. The bus you want is 118, going towards Potsdam. Get off at Clauertstrasse, then head down Clauerstrasse, onto the funny cobblestone road thing until you find the sign!

But here is it on the map:

 https://maps.google.co.uk/maps?q=museumsdorf+d%C3%BCppel&um=1&ie=UTF-8&hl=en&sa=N&tab=wl

Wednesday, 19 June 2013

Custom Snails

image

Custom paint job on a snail!

I’m not sure… really… I was a little bored at tea-break time…

Monday, 3 June 2013

How the seeds are coming on

image

So, the seeds that I planted a little while ago have now begun to grow. The lines are not as straight as I would’ve liked, and there are some gaps in places, but overall, it’s not too bad!

We planted some pumpkins about a week ago, and today I went up and checked to see how they were growing, as we’ve another 500 more to plant tomorrow.

When I got there I begun to power harrow the next bed ready for planting, and I moved the fleece off the pumpkins and found that all the pumpkins had been eaten!

image

There was almost nothing left! Damned slugs! 600 pumpkins! GONE!

So in the end I power harrowed the whole lot and we planted the new pumpkins in the place where the old ones were….

image

Monday, 6 May 2013

Final Steps

So, the final steps are to grass seed on top of the barley. This is done with a similar seed drill, but without the “drill” part.

DSCF0590

See:

DSCF0587

Broom! Broom!

DSCF0595

The grass is seeded twice over, once up and down like the barley, then side to side to ensure a complete covering of grass. The side to side is bumpy as hell as you’re going through all the wheelings from before… Waaa!

After this the grass seed is rolled in with a Cambridge Roller, which is a bit lighter than the heavy roller.

20h that took me…

Sunday, 5 May 2013

Field Work Continues

So, today I had to roll in the Barley I’d seeded yesterday. This is done with a heavy rollerDSCF0574

This roller makes a hell of a noise moving it on the road!

DSCF0577

Almost there! You can see the turning pattern at the bottom, where you turn over the previous row and end up with a bit missing which you get the next time when you go over the previous row again.

DSCF0582

My Ipod got incredibly dusty!

Saturday, 4 May 2013

What a full day!

Good things come to those who wait… Apparently. Well, I was hoping for some serious tractor work, and today I got my wish.
The morning began as per usual, image
Made Pikachu a nappy,
fed some animals
drank tea.
Then I went to Honey Bee Nest and got the seed drill….image
Good old fashioned technology! The seed drills:
image
My…. almost straight lines… The bit on the right is drilled, the bit on the left is still to be done:
image
So I finished the field at about 8:30pm and went home and had supper. Smile
Actually it wasn't even that much time, at about 9 I got a call that one of Botton Farm’s sheep was lambing, and since the farmer was on holiday….
Ah…. Well, the first one was incredibly weak and didn’t make it, despite me stomach tubing it with colostrum…. The 2nd was fine… So I took them both into the barn and then was told there was another lamb wondering around in the field….
Sure enough there was a new, wet lamb…There was a sheep seemingly claiming responsibility for the lamb, but she had 2 old lambs already, and I’ve not heard of any sheep having a 3rd lamb so far after…. I brought her and the 3 lambs into the barn and she was determined that this little one was hers… But when I put it with the first mum, she started licking it, so it must’ve been hers!

Friday, 3 May 2013

Baby Piggies

Our pigs all have rather weird names. We’ve got 2 who have the names of where they come from, Larchfield and High Farm, then we’ve got James the Boar, Francesca. And recently, 3 that went to the land where the grass is always green and the sun always shines, Foxy, Moxxi and Roxi. (They fetched us a good price deadweight)

Francesca just pigged the other day, that is to say, she had piglets. DSCF0499

There is 8 in total, 1 is hiding somewhere in this photograph…Or he could be underneath…. DSCF0505

 

And one of Pikachu the pet lamb….

DSCF0509

Thursday, 25 April 2013

Project Freya: Moisture Sensor to the LCD screen

Okay, the first thing I thought would be useful would be to write data to an LCD screen, and my arduino starter kit came with an LCD screen.

So, my set up looks like this:

DSCF0462

The sensor leads are going off in the middle on the left hand side of the image.

Tada! Code:

#include <LiquidCrystal.h>
LiquidCrystal lcd(0, 1, 5, 4, 3, 2);
const int sensorPin = A0;
const float baselineMoisture = 0.0;
void setup(){
  lcd.begin(16,2);
// Serial.begin(9600);
  lcd.print("loading");
}

void loop(){
  int sensorVal = analogRead(sensorPin);
//  Serial.println(sensorVal);
  lcd.print(sensorVal);
  delay(500);
  lcd.clear();
}

 

The result is this:

When the sensor (Two wires… 2 posts ago…) is not touching anything moist it reads 0:

DSCF0459

And when my dry fingers are across the two wires:

DSCF0461

// The potentiometer to the left is for LCD brightness

Project Freya: Overview

I wanted to give my little Arduino project a proper name. And with it coming along in leaps and bounds I figured it was about time to give it a good one.

So, Project Freya. Freya being the Norse goddess of love and fertility. Fertility being the key here as it’s to be used on a farm to assess fields… (So soil fertility)

Basically the outline of the project is for a device that does the following:

  • Records the coordinates for a given position
  • Records soil moisture taken from a probe/set of probes
  • Logs both of these values onto something that enables easy translation into a GIS program, in my case ESRI’s ArcMap.

My platform of choice is the Arduino (From www.arduino.cc)

I picked up the Arduino Uno Starter Kit.

image

I figured I’d do all the tutorials and so forth and get my hand in to the language. I did the first tutorial and decided to free lance from there.

The first part of the requirement was for GPS reception:
For this I got an Adafruit Ultimate GPS Logger Shield. http://www.adafruit.com/products/1272

The advantage of this is that it fills both the first and third requirement, GPS and SD card. Perfect!

I wrecked the board whilst soldering on the pins though, I stuck on standard male pins, then realised I actually needed some of the inputs to run the sensors and later the LCD screen, so I had to unsolder the pins and put header pins on, and broke some of the tracks in the process. Note: if you are using this board, choose header pins straight away and don’t even try and solder on normal pins…

 

My moisture sensors are very simple, and partially described in the previous post. The circuit diagram can be seen here:

[image%255B2%255D.png]

These are the actual probes of the sensor. Two nails soldered to wires. These will be mounted to something, maybe a broom handle, with some method of ensuring that each sample site the probes are inserted the same distance from each other and to the same depth.

DSCF0470

That’s the basics of the project. It has expanded from these few key parts a bit now, see later posts about that though!

-Skipper

Arduino Moisture Sensor

 

Hallo, so, I got an Arduino to take the place of my Raspberry Pi. It’s more hardware oriented and therefore more geared towards the RPi projects I mentioned earlier.

So, my first goal is to create a moisture sensor.

This is done using the analogue pins.

Analogue pin 0, A0, is held low by a 10kohm resistor, Above this is one wire of the sensor. From the +ve rail is the other wire of the sensor. Currently the sensor is simply 2 bits of wire and the moisture is read from my fingers. But in the final prototype it will be read off of 2 nails stuck in the soil.

image
Circuit diagram

This is the code I used, it echos the reading back over the serial port to the computer.

const int sensorPin = A0;
void setup(){
  Serial.begin(9200);
}
void loop(){
  int sensorVal = analogRead(sensorPin);
  Serial.println(sensorVal);
  delay(500);
}

 

Refresh rate is 1/2 a second.

Saturday, 13 April 2013

RIP Monkey

So, my dear little pet lamb, Monkey, died. She had been unwell for a few days. Possibly as a result of the diarrhoea she has had since we took her in, maybe it just took it’s toll on her system. She got weaker and weaker and refused to eat so we had to try and force feed her with electrolytes and glucose solution, but it didn’t help and she passed away in the night.

DSCF0257

I’ll remember you fondly little Monkey.

Monday, 8 April 2013

Raspberry Pi: Minecraft Pi...

So, I've been trying to come up with some ideas for projects for my Raspberry Pi. These are some of the better ones:
First one is for use with Minecraft Pi edition..
So, here it is, couple the Raspberry with a GPS, take the GPS data and convert the coordinates into 1m increments  maybe set a different map datum as well, so where you are is Zero, Zero, Zero. Take that coordinate data and use the following bit of code:
world.setBlock(x,y,z,blockTypeId (Say stone or dirt, whatever))
Take the x, y and z data from your GPS and you've got a little system you can walk about with and it'll crudely map the terrain you're walking over. Of course you'd have to walk every metre of an area you want... but the idea is there.

Second, this one i'm thinking of doing more seriously. Again, needs a GPS, and a tracked robot. So, I work on a farm, we have lots of fields. Something that would be useful to know is the surface moisture, as it can tell us a lot about what is happening in the field, is there a blocked drain, do we need to put one in, will the yield of this area be good or is it too water logged. (There are more interesting things to know about a field, ie Nitrate concentraiton, humus thickness, compaction etc, but moisture is the easiest to get a reading on).
So, moisture probe on a stick. Set the boundaries of the field into the computer, and set the little rover off. Every metre or so, stick goes into the ground and result gets recorded. Get this throughout the field and plug the data into ArcMap, turn it into a heat map and you've got a nice indicator of how the fields look moisture wise. Would probably reveal some interesting trends... Maybe. This could also work as a hand held probe thing, which would save on programming, but would require a bit more leg work and time. 

With the hand held probe, could use LED indicators to point to the next sample point, then maybe a LED to indicate when to sample.
Ideas Ideas!

Tuesday, 2 April 2013

Pikachu joins Monkey: The Pet Lambs

So, we've got another little pet lamb to keep Monkey company.
I called her Pikachu because she has little black tips to her ears and looks very cute. Funny story surrounding her "becoming a pet lamb"
Her mother is a shearling (That is a sheep that's over 1 years, younger than 2). The shearlings on Botton Farm are still about to fatten up and eventually go for meat. However one of the tups seems to have not been castrated properly and served a ewe shearling... The result was Pikachu walking around in with the 'lambs.' The shearlings are not really old enough to have lambs of their own, so Pikachu became a pet lamb as well. She's just with us for a little while to make sure she survives, then she'll got to another house probably. Till then she can share Monkey's box.

Wednesday, 27 March 2013

Pet lamb


I've got something to admit. I've known it for some time now... 

I have a pet lamb. Actually I've not known it for that long since I only got her last week.
So, her name is Monkey, and she's a cross between a Mule dam and a Texel tup. 

Her story is a sad one. 
She was born to sheep number 86, one of a triplet, and probably the strongest of the three. 
Near her nursery pen was sheep number 90. She just had 1 lamb, her second lamb died during birth. 
Sheep #86 wasn't producing enough milk to feed all 3 lambs, so we had to foster one lamb onto #90, since she just had 1.  Monkey was chosen as she was the biggest. We skinned the dead lamb from #90, and dressed Monkey in her new macabre jacket. Instead of the new foster mother accepting Monkey, she could tell it wasn't her lamb, and kept beating her up. After 2 days of trying to foster Monkey on, we called it a day and took off Monkey's jacket and I got to keep her!
So, Monkey moved in with us in Old Botton Farm.

Since her diet has somewhat changed from Ewes milk to conventional Lamb Milk Replacer (A powdered milk substitute) she's got terrible diarrhea and so we made her some nappies for when she is in the house.