Author Archives: Liyun

About Liyun

M.Sc. Economics from Barcelona Graduate School of Economics.

Solo (VFR) flight to Oceano, CA

Feb 17, 2020.

It has been five months since I got my private pilot license! The winter wasn't offering many good days to go up and enjoy the freshness of the air. Finally, spring is here and unlike last year, it doesn't rain much this time. I haven't done much flying since last Nov (only two trips to Monterey?), and I couldn't wait to have a great (long) weekend to go further. This time, I go all the way south to see the closest airport to the beach -- Oceano, CA (L52).

When I work up and checked the weather this morning around 8:30 am, to my surprise, the fog covered the entire path from Palo Alto to Paso Robles. I could fly down the coast, but what if I cannot land in Oceano? I could only fly VFR (and I don't want to fly when I cannot see anything...I am not commuting. Seeing the landscape is part of the joy of flying by myself). I decided to wait a few hours, and it finally cleared up around 10am. Well, by the time I was in the air, it was already 12pm, but at least, I knew it would be clear all the way and remain clear for my night landing. I haven't done a night landing forever. The Marina layer that covers Bay Area is challenging.

On the way to Oceano, I flew inland most of the time. After Paso Robles, I decided to check out high way 58 and the Carrizo Plain National Monument area. It could be really pretty if the flowers are blooming. However, despite the hills were green, there was no visible trace of flowers in my sight. I headed directly to Oceano after that. Sorry to confuse traffic control (Oakland Center and Santa Barbara Approach...I guess I was on their boundary).

Too early for the flower carpet

The entire flight was very smooth, until close to Oceano. I was wowing the beauty of the beach, the ocean, and the airport, then some turbulence called my attention back. Okay, I guess I need to control the airplane first and land safely...There's enough time to enjoy the beauty of the sight after I land.

Most of the time, after I land somewhere, I need to find a crew car (thanks Monterey!) or a rental car to get around. When I was planning for the flight last night, someone said that I wouldn't need a car in Oceano. Really? Aren't airports always far away from the towns? When I got close to the airport, yea, of course I won't need a car. When I was flying down wind, I was literally flying on top of the beach. I didn't expect it to be this close.

The airport is just right next to the beach!

Because of the detour to the mountains, I ended up spending about 1.5+ hours for the entire flight, even with ~15 knots tailwind. Well, I was really hungry, so although I really wanted to see the beach, I decided to get some food first. After lunch, I finally had the energy to go for a long walk. On the maps, it said "Oceano Dunes SVRA". I was wondering, what's special about the beach? Soon I founded it out that people could drive their normal cars inside of the state park! That's just crazy.

Driveway on the sand
Blowing the sands like a little kid, at Oceano Dunes

After a two hours walk, I went back to my plane. Some flowers are already blooming, e.g. California poppy, though I am still waiting for the season to see them dominate the entire hill. California sunshine is always on the healing side. Just a little bit out of the bay (i.e. 1.5-hour flight), I can find so many beautiful places for a day adventure.

On the way back, I flew along the coast until Monterey, then directly to San Carlos. I was using autopilot all the way until I disengaged it near the silicon valley (where I had to manually control the plane). It was after sunset, and it took me 1.5 hours again due to headwind. Luckily, I could spare my hands and take some pictures. Traffic wasn't busy after sunset...NorCar approach was quiet with only some commercial airliners' traffic, and they flew IFR 😉

Monterey city light after sunset
Santa Cruz city light after sunset
South Bay light at night

Back to San Carlos, and then home. It's a long day but I was well rested mentally. One more achievement -- I remembered to open and close VFR flight plans both ways!

Flight route -- outbound

An efficient way to give gifts in Stardew Valley

I was playing Stardew Valley recently... well, it consumed much of my weekends...

In the game, the player has to give gifts to all villagers to keep a good relationship with them. There is an official page displaying each one's preference, wiki. However, my life will be much easier if I can minimize the amount of distinct gifts I carry every day. When there is an optimization question, there is an analytical solution 🙂

My approach:

Use wiki's data as input, then identify the items that are favored by more than one villagers, and easy to obtain regardless of the season...as a result, I can arrange production and carriage easily and efficiently.

Output:

A network graph that shows how villagers are connected by gifts.

screen-shot-2016-11-06-at-6-52-54-pm

Source codes:

gift = read.csv("stardew valley gift.csv/Sheet 1-Table 1.csv", stringsAsFactors = F)

names(gift)

expand.gift = apply(gift, 1, 
      function (x) {
        gift_list = unlist(strsplit(x[2],"\n "))
        data.frame(v = x[1], g = gift_list)
        }
      )
expand.gift = do.call(rbind, expand.gift)

expand.gift$v = gsub("\n","",expand.gift$v)
expand.gift$g = gsub("[[:space:]]","",expand.gift$g)
expand.gift$v = paste0("v.",expand.gift$v)
names(expand.gift) = c("source","target")
write.csv(expand.gift, file = "expand.gift.csv", row.names = F)
expand.gift = subset(expand.gift, ! g %in% c("Prismatic Shard","Rabbit's Foot"))

expand.gift.mul = merge(expand.gift, expand.gift,
                        by.x = "v",by.y = "v")
expand.gift.mul = subset(expand.gift.mul, g.x!= g.y)

library(igraph)
gift.n = graph_from_edgelist(as.matrix(expand.gift.mul[,2:3]), T)
gift.n = as.undirected(gift.n, mode = "mutual")
V(gift.n)$size <- 1
l <- layout_with_kk(gift.n)
plot(gift.n,layout=l, vertex.label.cex	 = 0.7)

write_graph(gift.n, file = "svgift.gml",format = "gml")

Original dataset:
sheet-1-table-1.csv

Vector graph output:
svgift.pdf

My Second 600 KM

Ever since I first drove 600 KM in a day by myself, I never tried to drive that long again. Finally, it happened. Last weekend I had to drive 600 KM, for the second time in life.

The route was a loop starting from San Jose, then Monterey, then through 17 mile to Carmel, then down south to Big Sur and Hearst Castle, and finally drive back via 101.

Screen Shot 2016-02-29 at 10.53.52 PMWe were fortune enough to see the fog disappears in 17 mile. Everything happened in a sudden; dynamic.

DSC04474Then a front page photo of the famous tree in 17 mile.

DSC04553We saw three happy (or scared) rabbits... near the concrete bridge.

DSC04571

Sharp cliff and sapphire blue sea.

DSC04592

Sunset Near the Hearst Castle.

DSC04659

DSC04651