Replies: 2 comments 5 replies
-
The purpose of the telescope control plugin is establishing outgoing connections to GOTO telescopes. Everything concerning connecting the TC plugin from external programs is IMHO out of scope. What do you want to achieve? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've got an dish that i want to control with goto commands and get the current postion of the dish in stellarium. I want it all running from a raspberrypi, the goto commands i can already receive on the pi. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The program makes a tcp/ip connection and can send some data. But nothing happens in Stellarium.
I'm using C and the logfile from stellarium says :
TelescopeTCP( "New Telescope 1" )::prepareCommunication: Connection established
TelescopeTCP( "New Telescope 1" )::performReading: bad packet size: 6144
Max thread count (Global Pool): 6
TelescopeTCP( "New Telescope 1" )::prepareCommunication: Attempting to connect to host "127.0.0.1" at port 10001
TelescopeTCP( "New Telescope 1" ): turning off Nagle algorithm.
TelescopeTCP( "New Telescope 1" )::prepareCommunication: Connection established
SlewDialog::loadPointsFromFile(): No points loaded. File is missing: "C:\Users\Lammert\AppData\Roaming\Stellarium\modules\TelescopeControl\points.json"
My client says :
Server is listening on 127.0.0.1:10001...
Connected to client
Sending data...
Sending data...
Sending data...
Send failed: 10053
My source code is :
`#define _WINSOCK_DEPRECATED_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <winsock2.h>
#include <windows.h>
#pragma comment(lib, "ws2_32.lib") // Link with ws2_32.lib
#define HOST "127.0.0.1"
#define PORT 10001
// Define the message structure
#pragma pack(push, 1) // Ensure no padding is added
typedef struct {
int16_t length; // 2 bytes
int16_t type; // 2 bytes
int64_t time; // 8 bytes
uint32_t ra; // 4 bytes, unsigned
int32_t dec; // 4 bytes, signed
int32_t status; // 4 bytes, signed
} Message;
#pragma pack(pop)
void initialize_message(Message* msg) {
msg->length = htons(24); // Network byte order
msg->type = htons(0); // Network byte order
msg->time = _byteswap_uint64(0); // Network byte order
msg->ra = htonl(0x100000000 / 24); // Network byte order
msg->dec = htonl(0x40000000 / 90); // Network byte order
msg->status = htonl(0); // Network byte order
}
int main() {
// Initialize Winsock
WSADATA wsaData;
if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) {
printf("WSAStartup failed: %d\n", WSAGetLastError());
return 1;
}
}`
Hope you guys can see the error.
gr. Lamko
Beta Was this translation helpful? Give feedback.
All reactions