FS2 Goto controller gets incorrect Coordinates from Stellarium
FS2 Goto controller connected via USB-RS232 converter on PC is getting incorrect coordinates for target objects. Telescope controlled directly thru serial port, using J2000 coordinate system and LX200 compatible command set.
Sending 14h15m38.25 / 19°10'10.97" results in 4h05m1 / +9°00' M at the controller handbox. It looks somehow similar but the decimals gets nulled. eg (15 -> 05)
I got the information from the vendor of that controller that this used to work a couple of years back (not sure what release) but not anymore with recent Stellarium releases. Tested that also with different PC - same result
Thanks for adding your first issue to Stellarium. If you have questions, please do not hesitate to contact us.
Most likely related to, and duplicate of #1214. The implementation of the LX200 protocol used to deviate from the specification of the protocol available from Meade, so much that the compiler complained about a particular character value. After fixing this one year ago, genuine LX200 reportedly continued to work, but apparently many clones now have problems, which finally start to be reported a year after the repair.
Thanks for letting me know. Wouldn't it make sense to add another option named "LX200 Clone" or similar, which is using the command set BEFORE the correction were implemented? I assume there are a lot of clones out there having same issues....
And how would we know that FIXING an error would cause a problem? We will probably have to re-implement the ERROR to make users of devices unknown to ourselves happy again. The original LX200 was able to live with both implementations, as we learned a few days ago. I don't care personally, just will have to live with a permanently nagging compiler warning...
Ok, got it. Well yes, I would really appreciate to get it to work with my FS2. Possibly other unknown users as well....
Otherwise, can you please provide some more details of the command changes? An Arduino solution to reassemble the commands for LX200 clones might help for me.
Hi @prior-philip
We use FS2 in our observatory with Stellarium too. The current implementation of LX200 in Stellarium does not work at all with FS2 anymore. All relevant operations have some form of incompatibility. As a workaround, we downloaded the source code and compiled it with the necessary modifications in the LX200 telescope commands. I can provide a fixed version if you are interested.
@m-butti To track down relevant changes it would be helpful to know what version last worked with that FS2. And yes, we (better: our users. I have no time for running such device.) would be interested in your patch as long as other LX200 will then not fail. I.e., we would need some configuration option in the GUI and settings file to switch between (original) LX200 and that FS2 variant.
@gzotti the changes are the following:
-
In Lx200Command.cpp, there are four instances where a command is prefixed with a # (like #:GR#). FS2 needs this prefix removed to work, so the commands sent are as follows: :U#, :Q#, :GR# and :GD#
-
In Lx200Command.cpp also, there are two lines commenting out a space character for :Sr an :Sd commands. FS2 needs this space, otherwise it misinterprets the coordinates and slews to a wrong destination.
-
And finally in Lx200Connection.cpp in Lx200Connection::sendGoto there is a StopSlew before Ra, Dec and Goto are sent. FS2, when not in motion seems to cache the stop command and "activates" it after the move command is next initiated. Therefore we need to remove that StopSlew to get the telescope to actually move.
I do not know, if those changes would affect other LX200 telescopes and don't have one to test it out unfortunately. If you like I can submit a merge request with those changes.
A switching option between standard LX200 and LX200FS2 would also be a great idea.
We would need a pull request that already includes the switching option, assuming that genuine LX200 work with the current implementation. Else we leave this open (thanks for the details) until somebody has free time.