0
$\begingroup$

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.

$\endgroup$
5
  • $\begingroup$ 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. $\endgroup$
    – bmf
    Commented Feb 11, 2023 at 13:37
  • $\begingroup$ 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"] $\endgroup$
    – kirma
    Commented Feb 11, 2023 at 14:13
  • $\begingroup$ 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. $\endgroup$
    – kirma
    Commented Feb 11, 2023 at 14:18
  • $\begingroup$ @kirma thanks it worked. Guess I have to wrap in DateObJect. "Here" command gets evaluated to my lat long. So it does get resolved. $\endgroup$
    – shanrrg
    Commented Feb 11, 2023 at 16:08
  • $\begingroup$ 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... $\endgroup$
    – kirma
    Commented Feb 11, 2023 at 16:21

0

Browse other questions tagged or ask your own question.