├── 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 | Mars Clock by James Tauber 4 | 12 | 13 | 14 | 107 | 108 | 109 | 110 |
111 |

Mars Clock by James Tauber

112 | 113 |

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 |
120 | 121 | 122 | 123 | 124 | 127 |
128 | 129 |
130 |

Earth

131 | 132 |
133 | 134 | 135 | 136 | 140 |
141 | 142 | 145 | 146 |
147 |
148 | 151 | 154 | 157 |
158 | 159 | 163 | 164 |

Mars

165 | 166 | 170 | 171 | 175 | 176 | 179 | 182 | 185 |
186 | PBS = ° 187 |
188 | 191 | ν = ° 192 | 195 |
196 | EOT = ° = 197 |
198 | 199 |

Curiosity
137.4°E longitude

200 | 201 |
202 |

Mission Sol

203 |
204 |
205 | 206 |
207 |

Mission Time (Landing LMST)

208 |
209 |
210 | 211 |
212 |

Local True Solar Time

213 |
214 |
215 | 216 |

Opportunity

217 | 218 |
219 |

Mission Sol

220 |
221 |
222 | 223 |
224 |

Mission Time (HLST)

225 |
226 |
227 | 228 |
229 |

Local True Solar Time

230 |
231 |
232 |
233 |
234 | 235 |
236 |

Mouse over a number on the left to get an explanation below
(in progress)

237 |
238 |
239 |

Milliseconds since
Unix Epoch

240 | 241 |
242 |

This is the number of milliseconds since
1 January 1970 00:00:00 UTC.

243 |

We get this straight from your browser.

244 |
245 |
246 |
247 |

Julian Date (UT)

248 | 249 |
250 |

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 |
258 |
259 |
260 |

Julian Date (TT)

261 | 262 |
263 |

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 |
270 |
271 |
272 |

Days Since J2000 Epoch

273 | 274 |
275 |

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 |

279 |

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 |
286 |
287 |
288 |

Mars Sol Date

289 |
290 |
291 |

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 |
312 |
313 |
314 |

Coordinated Mars Time

315 |
316 |
317 |

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 |
325 |
326 |
327 |

Mars Mean Anomaly

328 | ° 329 |
330 |

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 |
354 |
355 |
356 |

Angle of Fictitious Mean Sun

357 | ° 358 |
359 |

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 |
380 |
381 |
382 |

Eccentricity

383 | 384 |
385 |

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 |
390 |
391 |
392 |

Equation of Center

393 | ° 394 |
395 |

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 |

410 |

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 |
419 |
420 |
421 |

Areocentric Solar Longitude

422 | ° 423 |
424 |

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 |
436 |
437 | 438 |
439 |
440 | Formulae from 441 | Allison, M., and M. McEwen 2000. A post-Pathfinder evaluation of aerocentric solar coordinates with improved timing recipes for Mars seasonal/diurnal climate studies. Planet. Space Sci. 48, 215-235. 442 | and Mars24 Algorithm and Worked Examples 443 |
444 | 445 |
446 | 447 | 602 | 615 | 616 | 617 | --------------------------------------------------------------------------------