Archean
评价数不足
Time Server
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
565.645 KB
2024 年 12 月 25 日 上午 9:39
1 项改动说明 ( 查看 )

订阅以下载
Time Server

描述
Doesn't do much on it's own, but will broadcast the current time as well as how many daylight hours (and night hours) you have left for tracking the current in-game time.

This build is very configurable and I've ensured that it works by merely yanking out the HDD and placing it into your own computer and build.

VERY IMPORTANT!

This MUST face within a few degress of west.

Example Time Server Client:

https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=3391730677

CONCEPTS

The concept here is pretty simple, get the data, process it, and send it to the clients. Simple, right?

Yeah, it's a little more complex that that. Firstly without a date function to determine how to translate Linux time to a rational, formatted time took good old-fashioned code. I had to calculate how many years passed since Dec 31, 1970, then I had to account for leap-years, then calculate how many days are in each month, etc.

The cycle timer was a little easier and was done entirely in nodes. Essentially, I used a nav instrument to track the sun's position (accounting for pitch of the server being slightly off) and have XC watch for how fast the sun is moving and then calculate how much time it will take for the sun to make a transversal for 180 degrees.

The client is extremely simple, read beacons, put the data on a LCD screen.