0

I am trying to copy paste and compute the input given in this link for the movement of mars. But wolfram cloud gives error. https://reference.wolfram.com/language/ref/AstroGraphics.html

When compute below instruction

mars = AstroPosition[Entity["Planet", "Mars"], {"Equatorial", #}] & /@
    DateRange["1 Jul 2022", "1 July 2023", "Week"];

I get the error shown below

"15/07/2022 12:00 am is not a valid location specification"

and similarly for some more dates.

bmf
  • 15,157
  • 2
  • 26
  • 63
  • Welcome to Mathematica S.E. To start: 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, since the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) consider accepting the answer, if any, that solves your problem, by clicking checkmark sign, 4) give help too, by answering questions in your areas of expertise. – bmf Feb 11 '23 at 13:37
  • That's a curious way things to fail. Try wrapping date strings in DateObject functions, like AstroPosition[Entity["Planet", "Mars"], {"Equatorial", #}] & /@ DateRange[DateObject["1 Jul 2022"], DateObject["1 July 2023"], "Week"] – kirma Feb 11 '23 at 14:13
  • You might be interested to try to evaluate Here on the same session. It should return an estimate of your geographic position as GeoPosition. Maybe it hasn't been resolved for you? Cloud version works for me, but it also has a value for Here. – kirma Feb 11 '23 at 14:18
  • @kirma thanks it worked. Guess I have to wrap in DateObJect.
    "Here" command gets evaluated to my lat long. So it does get resolved.
    – shanrrg Feb 11 '23 at 16:08
  • I'm still not quite certain why that fixed it, but using string-form dates on DateRange makes it also emit strings instead of DateObjects (which is frankly, in my opinion, strange), and something in the machinery didn't like that... – kirma Feb 11 '23 at 16:21

0 Answers0