├── CNAME ├── AUTHORS.md ├── README.md ├── LICENSE └── index.html /CNAME: -------------------------------------------------------------------------------- 1 | marsclock.com -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | ## Principal Author 2 | 3 | James Tauber 4 | 5 | ## Contributors 6 | 7 | Dylan McCall 8 | Edgar Bonet 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | mars-clock 2 | ========== 3 | 4 | an (in progress) interactive explanation of the time on Mars 5 | 6 | See it running at http://jtauber.github.io/mars-clock/ 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2012-2017 James Tauber and contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |114 | This is a live calculation of the time on Mars including mission times for MSL Curiosity and MER-B Opportunity. 115 |
116 |117 | Also see my much more recent (and gentle) Orbits Tutorial. 118 |
119 |Mouse over a number on the left to get an explanation below
(in progress)
This is the number of milliseconds since
1 January 1970 00:00:00 UTC.
We get this straight from your browser.
244 |This is the number of days (rather than milliseconds) since a much older epoch than Unix time.
251 |252 | Rather than an elaborate conversion from the Gregorian date to the Julian date, we just divide 253 | millis by 86,400,000 to get the number of days since the Unix epoch and add that number 254 | to 2,440,587.5, the Julian Date at the Unix epoch. 255 |
256 |JDUT = 2,440,587.5 + (millis / 8.64 × 107 ms/day)
257 |264 | We actually need the Terrestrial Time (TT) Julian Date rather than the UTC-based one. 265 | This means we basically just add the leap seconds which, since 266 | ? are ? + 32.184. 267 |
268 |JDTT = JDUT + (? + 32.184) / 86,400
269 |
276 | This is the number we're going to use as the input to many of our Mars calculations.
277 | It's the number of (fractional) days since
12:00 on 1 January 2000
in Terrestrial Time.
278 |
280 | We know what JDTT was at the J2000 epoch (2,451,545.0) so it's trivial to convert. 281 |
282 |283 | ΔtJ2000 = JDTT - 2,451,545.0 284 |
285 |292 | The equivalent of the Julian Date for Mars is the Mars Sol Date. 293 |
294 |295 | At midnight on the 6th January 2000 (ΔtJ2000 = 4.5) it was midnight at the Martian 296 | prime meridian, so our starting point for Mars Sol Date is ΔtJ2000 − 4.5. 297 |
298 |299 | The length of a Martian day and Earth (Julian) day differ by a ratio of 1.027491252 so we divide by that. 300 |
301 |302 | By convention, to keep the MSD positive going back to midday December 29th 1873, we add 44,796. 303 |
304 |305 | There is a slight adjustment as the midnights weren't perfectly aligned. Allison, M., and M. McEwen 2000 has −0.00072 but 306 | the Mars24 site gives a more up-to-date −0.00096. 307 |
308 |309 | MSD = ([(ΔtJ2000 − 4.5) / 1.027491252] + 44,796.0 − 0.00096) 310 |
311 |318 | Coordinated Mars Time (or MTC) is like UTC but for Mars. Because it is just a mean time, 319 | it can be calculated directly from the Mars Sol Date as follows: 320 |
321 |322 | MTC = (24 h × MSD) mod 24 323 |
324 |331 | The mean anomaly is a measure of where an orbiting body is in its orbit. More precisely, 332 | it's a measure of how far into the full orbit the body is since its last periapsis (the point 333 | in the ellipse closest to the focus). 334 |
335 |336 | The mean anomaly is the ratio (time-wise) into the full orbit, multiplied by 2π (radians) or 360° although the value doesn't truly correspond to any angle. The mean anomaly is proportional to time (and 337 | hence area swept) rather that the actual angle of the body from the 338 | focus (which would be the true anomaly). 339 |
340 |341 | So the mean anomaly can be calculated from ΔtJ2000 if we know the mean 342 | anomaly at the J2000 epoch (19.3870°) and the mean daily motion (360° / length of anomalistic orbit in days). 343 |
344 |345 | This gives us: 346 |
347 |348 | M = 19.3870° + 0.52402075°ΔtJ2000 349 |
350 |351 | for Mars. 352 |
353 |360 | Mars goes around the Sun, but viewed from Mars's point of view, the Sun goes around Mars. 361 | I'm not talking about the daily motion of the Sun caused by Mars's rotation, but the year-long 362 | motion of the Sun viewed from Mars. 363 |
364 |365 | Because the orbit is an ellipse, the Sun will go faster some times than others. Imagine a 366 | fictitious Sun, though, that took the same Martian year to go around Mars but which orbited at a 367 | constant angular velocity (the mean of the real Sun). This is the fictitious mean Sun 368 | and it's easier to calculate its angle first because, like the mean anomaly, it is proportional 369 | to time. 370 |
371 |372 | Based on observations, Allison and McEwen give the angle at J2000 and the daily change (based on 373 | tropical orbit period) as 270.3863° and 0.52403840° / day respectively. 374 |
375 |This gives us: 376 |
377 | αFMS = 270.3863° + 0.52403840°ΔtJ2000 378 |
379 |386 | The eccentricity is the deviation of the orbit's ellipse from being a perfect circle. It varies 387 | ever so slightly over time and for Mars is given by e = 0.09340 + 2.477 × 10-9 / day ΔtJ2000 = . 388 |
389 |396 | The difference between the actual position of the Sun and the fictitious mean Sun is the same as 397 | the difference between the true anomaly and mean anomaly. This is called the Equation of Center. 398 |
399 |400 | For a two-body Kepler orbit, this difference can be approximated using a Fourier-Bessel series given 401 | the mean anomaly M and eccentricity e. This results in: 402 |
403 |
404 | (10.691° + 3° × 10-7 ΔtJ2000) sin M
405 |
+ 0.623° sin 2M
406 |
+ 0.050° sin 3M
407 |
+ 0.005° sin 4M
408 |
+ 0.0005° sin 5M
409 |
411 | We're not quite done yet as the above assumes a two-body Kepler motion and we need to include the 412 | perturbations caused by other planets previously calculated. 413 |
414 |Once they have been added, we have our equation of center.
415 |416 | By adding this to our mean anomaly, M, we also get our true anomaly ν = ° 417 |
418 |425 | We can now calculate the actual position of the Sun as follows: 426 |
427 |428 | LS = αFMS + (ν − M) 429 |
430 |431 | Remember, this is not the daily motion of the Sun caused by Mars's rotation, 432 | but the year-long motion of the Sun viewed from Mars. Think of it as where Mars is in its 433 | orbit around the Sun, flipped around to be from Mars's perspective (hence "areocentric"). 434 |
435 |