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

Sunday, 16 February 2014

Agricultural Simulator 2011: Review

The main farming simulator that most people know is the Farming Simulator series by GIANTS Software. But there are a bunch of copies, such as Actalogic’s Agricultural Simulator. This wasn’t supposed to be a review.. but it ended out that way….
Review
There are 2 main differences between this and the Farming Simulator range. First off, the actual crops/tractor work is quite limited. You can do it, but it’s a real waste of money, and time. In Farming Simulator the main goal is about the tractor work. Farming Simulator has animals, but it’s quite limited in that respect. Agricultural Simulator has tried to be different here. The animals in AS2011 gain far more attention. You buy, fatten up and sell the animals, thus turning a profit. There are many more breeds of animals than FS2011 or 2013. FS2011 had 1, cows, FS2013 introduced sheep and chickens… Agricultural Simulator 2011 has Cows, Bulls, Sheep, Goats, Donkeys, Geese, Deer, Rabbits, Horses (?!) ..there are more but I can’t remember them off the top of my head… Each one has it’s own breeding cycle and demand.
In terms of crops, there are more here too, there are the main 4, Maize, Wheat, Barley and Canola (Which all make an appearance in FS2011-FS2013), but then there is Rye, Oats, Buckwheat, and I’m sure there are more, I’ve just not unlocked them yet… The fields require a bit more work than in Farming Simulator, they all need ploughing between crops, (you can just cultivate the stubble in for FS), then cultivating, fertilising (Can choose manure or artificial) and seeding. Then you can spray the crops while they’re growing to do.. something.. not sure what it changes, probably just yield. Lots more work there! There are AI that can help out, they’re slightly more in-depth than in FS as well. You hire workers from a list, and they can be assigned a job, tractor and machinery. They’ll then take these from the vehicle shed, drive to the field, do the job and return the machinery.  They can also be trained up with machines, allowing them to.. do something.. possibly work faster. They’ll do all the main crop work, including harvesting, but you’ll have to drive the trailer to empty the combine after they filled it.
The grain can be stored in a silo, and sold from there, but if you take it to a factory or depot you can get more for it. In Farming Simulator, you take your products to one of 4 or so buyers, and you can see the price in the PDA, so allowing you to choose the best price. AS2011 you don’t have a PDA like that, so you have to load your trailer and pick one. The price might be high or low, so you’ve gotta weigh up driving to the next one to check their prices, at the cost of the fuel to get there. Each place will only accept a certain amount as well, so no more selling millions of tonnes to the pub anymore…
The machines appear to be all CLASS machinery… Clearly the only company that’d give them a license  to reproduce their vehicles in game…
Graphics wise, AS2011 is far from optimised. It has more graphical depth, the tractors for example, get dirty from use, there are tyre tracks in the ground where you’ve driven. This improved graphics (Over FS2011, or indeed FS2013) come at the cost of hugely increased graphics card hunger… Unreasonably so, it’s like I’m running 5 copies of Skyrim at max res. I work on remote sensing data, where you’ve got BIG satellite images, which have to be processed and analysed, and it doesn't use up half the RAM and graphics RAM as AS2011….
Overall, Agricultural Simulator has much more depth than Farming Simulator, but it lacks the fun of Farming Simulator, it is much more of a serious business management game than a fun “OO argh! Get off my land!” kind of game…
I can’t really compare it that well really, I like them both at different times, if I’m missing the farm and tractors I’ll play Farming Simulator, but if I’m in the mood for some business management, I’ll choose Agricultural Simulator.
Overall I’d give Agricultural Simulator 2011 a 7/10, it is good, but it’s the graphics try a little too hard in some areas (Mud) and leave the other things (Like the terrain & trees) looking naff and very odd..
Farming Simulator 2013 gets an 8/10. It is a much more polished and balanced product, but lacks the depth of Agricultural Simulator 2011.
Agricultural Simulator 2011 is available from Steam
Farming Simulator 2013 is also available from Steam

Monday, 10 February 2014

Simple Hydrophone (Sealed)

grabber

So, I’ve sealed up my hydrophone. I used Olive Oil to fill the case. I’m slightly worried about it becoming rancid over time, but I didn’t have any mineral oil at my disposal, and didn’t fancy sucking some out of my car.

Around the wire I used a heavy duty glue (Meant for sealing walking boots.. so I figured it’d do just fine for sealing the hydrophone) and silicone sealant to seal the inside of the cap, just to be extra sure. The cap is also glued onto the case to prevent it from coming off during operation. I need to make friends with someone who has access to a laser cutter, or a 3D printer to try and make some sort of case to further strengthen the camera case and prevent the lid from coming off during operation.

The image above shows what happens if you put the hydrophone on top of the computer case. In air the output from the hydrophone is almost nothing, just a bit when you touch the case. Hopefully this will mean that the hydrophone works well when in contact with water… We shall see! I’ll field test it shortly.

-Skipper

Friday, 7 February 2014

Simple Hydrophone (2nd Circuit)

So, condensing microphones.. as it turns out, are not the same as the microphones I’m used to… They don’t work like a reverse speaker, but are in fact more like a variable capacitor… So… That explains why my circuits didn’t work, and that I now have to adapt my circuitry to adapt to this.

So, I started off with this:

image

Problem with this was that the capacitor charged up, then saturated…

image

You can see it charging up to ideal at around 2.5s, then it saturates and the output signal slowly diminishes Sad smile 

To combat this I put a high value resistor across the cap, so it wouldn’t charge fully:

image

To be honest, I’ve no idea why it’s charging up like that, it should just block DC… I dunno… Maybe it’s the wrong way around

Thursday, 6 February 2014

Simple Hydrophone (Part 2)

So, progress!

My keystone jack and my volt meter arrived today, so I’ve assembled it all today.

2014-02-06 12-41-25.104

That's the completed reel. 30m cable with the hydrophone on the end.

2014-02-06 12-42-03.310

This is the amplifier circuit. Its pretty small, and actually could be made smaller.. But this fits inside the camera case well.

2014-02-06 12-42-16.749

Microphone assembly

I’ve not used vero board before. When I was doing Electronics at GCSE, we had a PCB printer, so we got to play with the real things, so I never actually had to use veroboard. Soldering is surprisingly difficult…

2014-02-06 12-42-21.255

The solder doesn’t want to stick to the wires, or the board… so I ended up having to add loads more…

Anyways, this is the back of the board before I trimmed the rest of the wires.

TEMP

This is the output of the waterfall display. The little white pulses between 1000hz and 2500hz are me whistling to test it…

Anyways, I need to fill the camera case that the assembly is within with mineral oil, to improve the hydrophone sensitivity under the water, and to lower the buoyancy and make the hydrophone actually sink…

Wednesday, 5 February 2014

Simple Hydrophone (Mk1)

This little project is for making a simple hydrophone.
What is a hydrophone?
Well, a hydrophone is an underwater microphone. Basically…
My initial plan was to make 2 hydrophones that would work together to produce a “3D Image” of the sound, Sonar. The theory behind this was that sound coming from a certain direction will hit the microphone nearer the sound source first, then the second one, the delay in the signal would give an angle to the sound source. The idea from this was to create a “waterfall display” which would show if there was sounds coming from different directions, it would show all the bearings around the microphones, and lines of high intensity would flow down from the bearings where a sound source existed, be it a boat or a dolphin.
Complicated stuff.. That was the problem… I had no idea how to produce that…
So, instead I decided to make a single hydrophone, and just to listen to what was under the water!
Much easier!
My basic ingrediants are:
A Microphone (From RS Online)
3.5mm audio jack (Also from RS Online)
Camera film case (I got them for free from a local camera shop)
30m Ethernet cable
Ethernet Keystone Punch Down Jack (A plug!) From Amazon
A bunch of electrical dohickies, but I’ll come to that later!
So, the initial design was just to trail the microphone in the water, in the camera case, and plug the output straight into the 3.5mm jack and plug that into the computer.
Good! But, the output was incredibly weak, and full of noise, so I had to put an amplifier on it…
I did electronics at A-level, but I cannot remember much… OP Amps, I remember can be used as an amplifier (the amp part…). I tried that, but with no joy, so I used a transistor instead.
image
So, this is my amplifier circuit. It’s not especially advanced, and to be honest I just slapped it together, but it worked! I tried some different designs that I thought would be better, but for some reason they didn't work.
So, this is my current stage
I’m waiting on my ethernet jack. I’m then going to use the Ethernet cable as the trailing cable from the hydrophone to the computer. I’ll put the microphone output into the ethernet cable, then the ethernet cable will run to the surface, where it’ll plug into the amplifier, and then into the 3.5mm jack into the computer.
This output can then be recorded and listened to. My camera is currently not working, so I can’t post pictures at the moment.. But they’ll come!

Sunday, 5 January 2014

Project Freja: Final Code

So, a nice little code dump here. This is the final code dump of Project Freja. This logged the moisture, altitude, accuracy (in m), position and date to the SD card. Hope you can make something of it!

//Newest as of 02/11/2013
#include <SD.h>
#include <LiquidCrystal.h>
LiquidCrystal lcd(0, 1, 5, 4, 3, 2);
#include <Adafruit_GPS.h>
#include <SoftwareSerial.h>
#include <math.h>
SoftwareSerial mySerial(8, 7);
const int sensorPin = A0;
const float baselineMoisture = 0.0;
Adafruit_GPS GPS(&mySerial);
boolean usingInterrupt = false;
void useInterrupt(boolean);
#define chipSelect 10 //SD card define
File logfile;
int switchState = 0;

//Function
// convert NMEA coordinate to decimal degrees
float decimalDegrees(float nmeaCoord) {
  uint16_t wholeDegrees = 0.01*nmeaCoord;
  return wholeDegrees + (nmeaCoord - 100.0*wholeDegrees)/60.0;
}
//EndFunction

//Function
//To convert HDOP into metre range
float Accu(float x1) {
  float result;
  result = sqrt(sq(x1) * 44.89 + 1);
  return result;
}
//EndFunction

//Function Read Hex Value Return decimal

uint8_t parseHex(char c) {
  if (c < '0')
    return 0;
  if (c <= '9')
    return c - '0';
  if (c < 'A')
    return 0;
  if (c <= 'F')
    return (c - 'A')+10;
}
//Function end
void setup() 
{
   pinMode(9, INPUT); //The Switch input
   lcd.begin(16,2);
//Serial.begin(115200);
       // connect to the GPS at the desired rate
  GPS.begin(9600);
  GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA);
  GPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ);   // 1 or 5 Hz update rate
  GPS.sendCommand(PGCMD_NOANTENNA);
    useInterrupt(true);

  delay(1000);
  mySerial.println(PMTK_Q_RELEASE);
}


SIGNAL(TIMER0_COMPA_vect) {
  char c = GPS.read();
}

void useInterrupt(boolean v) {
  if (v) {
    // Timer0 is already used for millis() - we'll just interrupt somewhere
    // in the middle and call the "Compare A" function above
    OCR0A = 0xAF;
    TIMSK0 |= _BV(OCIE0A);
    usingInterrupt = true;
  } else {
    // do not call the interrupt function COMPA anymore
    TIMSK0 &= ~_BV(OCIE0A);
    usingInterrupt = false;
  }
   pinMode(10, OUTPUT); //SD card select
   if (!SD.begin(10)) {
  //  Serial.println("initialization failed!");
    return;
  }
}

uint32_t timer = millis();
 
void loop()                     // run over and over again
{
  int sensorVal = analogRead(sensorPin);
  switchState = digitalRead(9);
#  // in case you are not using the interrupt above, you'll
  // need to 'hand query' the GPS, not suggested :(
  if (! usingInterrupt) {
    // read data from the GPS in the 'main loop'
    char c = GPS.read();
 
  }
 
  // if a sentence is received, we can check the checksum, parse it...
  if (GPS.newNMEAreceived()) {
    // a tricky thing here is if we print the NMEA sentence, or data
    // we end up not listening and catching other sentences!
    // so be very wary if using OUTPUT_ALLDATA and trytng to print out data
    //Serial.println(GPS.lastNMEA());   // this also sets the newNMEAreceived() flag to false
 
    if (!GPS.parse(GPS.lastNMEA()))   // this also sets the newNMEAreceived() flag to false
      return;  // we can fail to parse a sentence in which case we should just wait for another
  }

  // if millis() or timer wraps around, we'll just reset it
  if (timer > millis())  timer = millis();
 
if ((GPS.fix)&& (switchState == HIGH)) {
   logfile = SD.open("GPSlog.txt", FILE_WRITE);
//Serial.print("Fix & High");
   logfile.print(decimalDegrees(GPS.latitude), 5); logfile.print(",-");
   logfile.print(decimalDegrees(GPS.longitude), 5); logfile.print(",");
   logfile.print(sensorVal);
   logfile.print(",");
   logfile.print(Accu(GPS.HDOP));
   logfile.print(",");
   logfile.println(GPS.altitude);
   logfile.close();
   lcd.clear();
   lcd.setCursor(0,0);
   lcd.print("Logged to Card");
   delay(1000);
}
 
  // approximately every 2 seconds or so, print out the current stats
  if (millis() - timer > 2000) {
    timer = millis(); // reset the timer
   
//  Serial.print(" quality: "); Serial.println((int)GPS.fixquality);

    if (GPS.fix) {
 
lcd.clear();
lcd.setCursor(0,0);
lcd.print(decimalDegrees(GPS.latitude), 5);
      lcd.print(",+-");
      lcd.print(Accu(GPS.HDOP), 1);
      lcd.print("m");
      lcd.setCursor(0,1);
      lcd.print(decimalDegrees(GPS.longitude), 5);
      lcd.print(",");

      lcd.print(sensorVal); lcd.print("%");
      lcd.print(GPS.speed, 1);
      
      }
      if (!GPS.fix) {
        lcd.clear();
       
        lcd.setCursor(0,0);
        lcd.print("No Fix");
      }
       }
}

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!