Giter VIP home page Giter VIP logo

Comments (8)

ProtossProbe avatar ProtossProbe commented on August 11, 2024

@emptymalei
我想到一个问题,火星与地球的距离时刻在变化,大概是几光分到十几光分,这样的话换算出来的时间到底是什么时候的时间??需要考虑对钟么?

from interimmbook.

emptymalei avatar emptymalei commented on August 11, 2024

@SpaceXploration 我们的对时是在一个太阳系静止参考系的时间。这样就不用考虑光的问题了。

from interimmbook.

emptymalei avatar emptymalei commented on August 11, 2024

我看了pyMarsTime那个,就是现成的程序,不需要做任何改动。

不过我们不需要这么复杂的,可以写一个简化版的。

闰年的函数我给了,剩下一个非常简单的事情就是计算我们地球日历的julian 天数,用这个来和火星的类似对应起来,也可以算,基本上几行程序。思路就是这样。周末我看看写出来。我还可以写一个mathematica 版的。

虽然我不怎么会写 js,但我觉得 js 也就是几行程序。再想想看。

from interimmbook.

emptymalei avatar emptymalei commented on August 11, 2024

想了想,还是开一个单独的 repo

from interimmbook.

syrte avatar syrte commented on August 11, 2024

@emptymalei 我也在想写来着,不知道怎么能做成互动的。iPython Notebook不能在线运行吧,js应该是可以,不过完全没用过。

嗯,从长远看,我们还是需要有交互式网页,一些小计算器转换器之类的。

from interimmbook.

emptymalei avatar emptymalei commented on August 11, 2024

@styra 嗯,感觉那些就后面考虑吧。我倒是学过 js,不过如果程序比较复杂我估计比较困难。比较好的方法是,我们就把函数/算法写出来,然后看看谁比较熟悉 js 就找其翻译过去就好了。

  1. 计算地球时间当前 julian date, 就知道多少天数了
  2. 计算火星元年第一天对应的 julian date 的天数
  3. 计算从火星元年到要换算的日期的 julian date 天数
  4. 把这些天数换算成火星天
  5. 计算这些火星日对应多少火星年、月(需要利用上面的 is_leap_year() 函数)

这里忽略了日出日落/一天开始的问题,先这样吧,主要是为了后面写 js 方便。如果是要真的完整的计算日期以及时间的对应,就直接用那个 pyMarsTime 吧。

from interimmbook.

emptymalei avatar emptymalei commented on August 11, 2024

https://github.com/jtauber/mars-clock/

这个是 js 版本的,估计就直接改一下关键的数字就可以了。不过需要自己看他的代码看看是不是跟我们定的一致。

from interimmbook.

emptymalei avatar emptymalei commented on August 11, 2024

建立了新的 repo

https://github.com/InterImm/marsCalendar

后续讨论在新仓库进行。此处关闭。

from interimmbook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.