realtime interface to Celestia
Real-Time Celestia Version 2 now available
Hello Everyone,
I have a new version of the Real-Time Celestia code. It is available for download at http://www.knology.net/~tec. I fixed several issues. Here are a few new capabilities.
1. Celestia now broadcasts information using the UDP port 3001. Now anyone can get data from Celestia. The playback tool will read incoming UDP messages from Celestia and print them out to the screen.
2. I fixed some of the quaternion issues related to orienting UDP models.
3. I fixed a bug with the new *.xyzq input trajectory files. The user can now use the *.xyzq file format to input locations and quaternions.
4. The playback tool has been overhauled. More capabilities have been added such as removing Celestia bodies that have been broadcast by the playback tool.
I am still working on more real-time capabilites so let me know what you think.
Tim
I have a new version of the Real-Time Celestia code. It is available for download at http://www.knology.net/~tec. I fixed several issues. Here are a few new capabilities.
1. Celestia now broadcasts information using the UDP port 3001. Now anyone can get data from Celestia. The playback tool will read incoming UDP messages from Celestia and print them out to the screen.
2. I fixed some of the quaternion issues related to orienting UDP models.
3. I fixed a bug with the new *.xyzq input trajectory files. The user can now use the *.xyzq file format to input locations and quaternions.
4. The playback tool has been overhauled. More capabilities have been added such as removing Celestia bodies that have been broadcast by the playback tool.
I am still working on more real-time capabilites so let me know what you think.
Tim
What exactly can your realtime celestia do. Is it possible to synchronise two celestia applications, running on different computers, over the net.
Sorry if this is a dumb question.
maxim
Sorry if this is a dumb question.
maxim
Get my stuff from celestia.ziegelstein.net
Celestia to Celestia
Hmmmm. I never though of communicating two Celestias together. Do you have an example why you would want to do this? I can make modifications for this scenario if you can explain it to me.
The protocol uses UDP over the ethernet. You question is not a dumb one.
My real time code allows a client (like my playback tool) to send Celestia some body information. It doesn't have to be my playback tool. I just wrote the playback tool to be used as an example.
Tim
The protocol uses UDP over the ethernet. You question is not a dumb one.
My real time code allows a client (like my playback tool) to send Celestia some body information. It doesn't have to be my playback tool. I just wrote the playback tool to be used as an example.
Tim
3 Celestias as simulator windows
Maxim,
I just thought of something that would use "Celestia to Celestia" communications. Someone could use Celestia for a space ship simulator. You could have 3 Celestia computers running left, forward and right window. The forward Celestia would be the master and drive the other two (left/right) windows ( or channels as I call them). The left and right Celestia would be slaves and pointed about 46 degrees offset from the forward. A small message from the forward Celestia would be sent to command the other two Celestia to move its rotation viewing angle.
This would be very simple to write. I will add this to my todo list.
Tim
I just thought of something that would use "Celestia to Celestia" communications. Someone could use Celestia for a space ship simulator. You could have 3 Celestia computers running left, forward and right window. The forward Celestia would be the master and drive the other two (left/right) windows ( or channels as I call them). The left and right Celestia would be slaves and pointed about 46 degrees offset from the forward. A small message from the forward Celestia would be sent to command the other two Celestia to move its rotation viewing angle.
This would be very simple to write. I will add this to my todo list.
Tim
My question was only for curiosity. I don't have plans. But there are certainly several possible scenarios for a usefull app-to-app communication:
- A spaceflight simulation is definitely not the main purpose of Celestia, but a similar scenario can make use of a 3-wall, 4-wall or 6-wall cave (which could show surely impressive views of planet systems).
- A teacher-to-pupils scenario can duplicate teachers live acting on each pupils computer instead of a single beamer view.
- Similar a pupils-to-teacher scenario lets the teacher watch a pupils efforts.
- An event could be watched from different view positions simultaneaously - similar to the splitview function, but without tiling precious viewarea on a single monitor.
- On a monitor-wall (3x3, 4x4, 10x10, ...) you could create an ultra-hires view of the universe - surely an eyecatcher, even for bigger events.
64k Mars VT showing the highest level on a full disk view - that I'd really like to see!
- Invite your friends for cruising the universe together over the net...
You may think of more...
maxim
- A spaceflight simulation is definitely not the main purpose of Celestia, but a similar scenario can make use of a 3-wall, 4-wall or 6-wall cave (which could show surely impressive views of planet systems).
- A teacher-to-pupils scenario can duplicate teachers live acting on each pupils computer instead of a single beamer view.
- Similar a pupils-to-teacher scenario lets the teacher watch a pupils efforts.
- An event could be watched from different view positions simultaneaously - similar to the splitview function, but without tiling precious viewarea on a single monitor.
- On a monitor-wall (3x3, 4x4, 10x10, ...) you could create an ultra-hires view of the universe - surely an eyecatcher, even for bigger events.
64k Mars VT showing the highest level on a full disk view - that I'd really like to see!
- Invite your friends for cruising the universe together over the net...
You may think of more...
maxim
Get my stuff from celestia.ziegelstein.net
Tim
RealTime is a wonderful feature. I managed to build an executable version out of your source code, but I am not a networking user. According to your instruction "... You can execute Celestia and the playback tool on the same computer.....", I tried and nothing happened. Do I have to configure my computer with Ethernet and UDP support if I want to run the realtime modified Celestia1.4.1 and the Playback tool on the same computer?
RealTime is a wonderful feature. I managed to build an executable version out of your source code, but I am not a networking user. According to your instruction "... You can execute Celestia and the playback tool on the same computer.....", I tried and nothing happened. Do I have to configure my computer with Ethernet and UDP support if I want to run the realtime modified Celestia1.4.1 and the Playback tool on the same computer?
Joe
RealTime on the same computer
I think I know what is wrong. The twqo bodies that are transmitted from the playback tool are valid at certain times. I think it is May 10 at 10:38am. You must set your Celestia time to that time to see these bodies. If that does not fix the problem, look at the prints at the bottom of the screen to see what is happening. The dis.log file will also give you insight on the problems.
By the way, using Maxim's ideas from this weekend I was able to code up Celestia to slave another Celestia app to rotate and translate the perspective view in realtime. This is such as cool feature. I can also slave another Celstia app and offet the perspective view's quaternions. This is nice if you want to use Celestia as a space craft simulator left or right window. I have a few more improvements to the realtime and I wll release another version soon.
Tim
By the way, using Maxim's ideas from this weekend I was able to code up Celestia to slave another Celestia app to rotate and translate the perspective view in realtime. This is such as cool feature. I can also slave another Celstia app and offet the perspective view's quaternions. This is nice if you want to use Celestia as a space craft simulator left or right window. I have a few more improvements to the realtime and I wll release another version soon.
Tim
Well, Tim, my problem is that the realtime modified Celestia1.4.1 does not initialise itself at all on my XP Window PC, I checked the source with debugging and found out that the programme terminates itself at:
I realised it is termonated by the exit(1) call inside putDatagram(buffer, size) function.
I wonder if I need to configure my PC with DIS networking support, or not? Or do I need to install any other networking programmes in order to run the RealTime feature?
void RealTime::broadcast_information(Simulation &sim)
{
...
...
for (int s=0; s < numSats; s++)
{
...
...
udp->out->putDatagram(buffer, size);
}
...
}
I realised it is termonated by the exit(1) call inside putDatagram(buffer, size) function.
I wonder if I need to configure my PC with DIS networking support, or not? Or do I need to install any other networking programmes in order to run the RealTime feature?
Joe
RealTime on the same computer
Sorry Joe for all of your troubles. Here are a few things to try. I am guessing that you need an Ethernet card but I am not sure. Do you have one in your XP computer?
The method that you having problems with is where Celestia is broadcasting information about itself for others to receive. You don't need this method if you don't want to know Celestia's output. This activity is broadast on port 3001. Simply place a return at the top of broadcast_information() so the method is bypassed.
The area you showed me is not initialization. If it terminates in broadcast_information then it passed the port initialization functions. If you have an ethernet card you should not have to add any software or tune your card.
Try this and let me know.
Tim
The method that you having problems with is where Celestia is broadcasting information about itself for others to receive. You don't need this method if you don't want to know Celestia's output. This activity is broadast on port 3001. Simply place a return at the top of broadcast_information() so the method is bypassed.
The area you showed me is not initialization. If it terminates in broadcast_information then it passed the port initialization functions. If you have an ethernet card you should not have to add any software or tune your card.
Try this and let me know.
Tim
New Real-Time version posted on web site
All,
There is a new Real-Time version 2.0 posted on the Real-Time web site:
http://www.knology.net/~tec
There are many new bug fixes and additions to the Real-Time software as well as a new web site format.
Tim
There is a new Real-Time version 2.0 posted on the Real-Time web site:
http://www.knology.net/~tec
There are many new bug fixes and additions to the Real-Time software as well as a new web site format.
Tim
Hi, Guys
Anyone has tried Tim's RealTime version of Celestia? Please share your successful experience with me. The programme does not work on my Window XP machine with Ethernet card and always exit unexpectedly due to the WSAEHOSTUNREACH (10065) No route to host error. Any help on how to set up and configure the system is much appreciated.
Anyone has tried Tim's RealTime version of Celestia? Please share your successful experience with me. The programme does not work on my Window XP machine with Ethernet card and always exit unexpectedly due to the WSAEHOSTUNREACH (10065) No route to host error. Any help on how to set up and configure the system is much appreciated.
Joe
Network Error
Hey Joe,
Sorry for your frustrations. I don't know off hand what the issue is but I will help you through this. Have you tried to recompile all of the code? If you have different network drivers, you will probably need to re-build the entire project. Did you try to start the playback application last?
Which program is giving you the error? Will you step through the debugger and tell me which line in UdpSocket.cpp it is exiting. Is it the playback tool or Celestia? Make sure you are using the latest software on my web site. Version 2.0 is the latest.
Tim
Sorry for your frustrations. I don't know off hand what the issue is but I will help you through this. Have you tried to recompile all of the code? If you have different network drivers, you will probably need to re-build the entire project. Did you try to start the playback application last?
Which program is giving you the error? Will you step through the debugger and tell me which line in UdpSocket.cpp it is exiting. Is it the playback tool or Celestia? Make sure you are using the latest software on my web site. Version 2.0 is the latest.
Tim
Hi, Tim
Thanks for the quick response, I am sure it is the networking set-up caused my problem. Yep, I am using your latest code from your website and have re-built both the Celestia and the udpOrbit without any change on the code. I was runing both programmes on a single machine under Window XP. The problem:
I tried to start Celestia first and it always exits before the window shows up.
Then I tested with runing udpOrbit alone, it starts OK, then any button press makes it exit.
What I found with debugging was this following code causes the exit:
The value of error variable is WSAEHOSTUNREACH (10065) No route to host
Well, it seems there has not been more posts on this useful feature in this forum though I would hope it deserves more discussion.
Thanks for the quick response, I am sure it is the networking set-up caused my problem. Yep, I am using your latest code from your website and have re-built both the Celestia and the udpOrbit without any change on the code. I was runing both programmes on a single machine under Window XP. The problem:
I tried to start Celestia first and it always exits before the window shows up.
Then I tested with runing udpOrbit alone, it starts OK, then any button press makes it exit.
What I found with debugging was this following code causes the exit:
int UdpSocket::putDatagram( const char *data, int size )
{
int retval = sendto(fd, data, size, 0, (struct sockaddr *)
&outAddr, sizeof(outAddr));
if (retval < 0)
{
int error = WSAGetLastError();
if (error == WSAEWOULDBLOCK)
return 0;
else
{
TRACE("sendto failed, winsock error %d", WSAGetLastError());
exit(1);
}
}
return retval;
}
The value of error variable is WSAEHOSTUNREACH (10065) No route to host
Well, it seems there has not been more posts on this useful feature in this forum though I would hope it deserves more discussion.
Joe
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 8 months
- Location: Hamburg, Germany
Joe wrote:...
Well, it seems there has not been more posts on this useful feature in this forum though I would hope it deserves more discussion.
Why?
I am still waiting to see some concrete applications (not words) that are of major interest to a larger sub-community of people. Personally I think the real time code is a too specific application to be part of Celestia's core code. If there was an implementation via scripting (lua) this would look much more appropriate to me.
Bye Fridger
Network Error
Joe,
I tried a test. I assumed you have no router, switch or network hub so I disconnected my laptop from my network hub and tried to execute the playback tool. The UdpSocket::putDatagram failed with the error, 10065. For some reason a network card is not activated when there is no router, switch or network hub.
Do you have one of the devices that you can use? Do you use one to get your email and surf the web? I think you should just have to connect it to the router, switch or network hub even if your computer is the only one on the net.
Tim
I tried a test. I assumed you have no router, switch or network hub so I disconnected my laptop from my network hub and tried to execute the playback tool. The UdpSocket::putDatagram failed with the error, 10065. For some reason a network card is not activated when there is no router, switch or network hub.
Do you have one of the devices that you can use? Do you use one to get your email and surf the web? I think you should just have to connect it to the router, switch or network hub even if your computer is the only one on the net.
Tim
...to be part of Celestia's core code
Hey, Fridger, I agree with you, but please don't get me wrong. I was hoping there had been more interests in this feature (just a personal wish), but I didn't say it would be a part of Celestia's core code. However if Tim would continue his effort along the line, scripting implementation might be possible--it is worthy of trying anyway.
Joe
network
Joe,
I talked to a buddy at work about your network issues. He suggested to just get a loopback cable instead of buying a more expensive hub or switch.
You said:
However if Tim would continue his effort along the line, scripting implementation might be possible--it is worthy of trying anyway.
What do you mean about "scripting implementation". Are you suggesting that I could implement the UDP message sets for scripting?
Tim
I talked to a buddy at work about your network issues. He suggested to just get a loopback cable instead of buying a more expensive hub or switch.
You said:
However if Tim would continue his effort along the line, scripting implementation might be possible--it is worthy of trying anyway.
What do you mean about "scripting implementation". Are you suggesting that I could implement the UDP message sets for scripting?
Tim
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 8 months
- Location: Hamburg, Germany
Re: network
tec wrote:
What do you mean about "scripting implementation". Are you suggesting that I could implement the UDP message sets for scripting?
Tim
Well, Celestia uses the very powerful scripting language called Lua that might well be able to handle also udp networking tasks (PERL can too, so why not Lua). We are thinking anyway about a network updating facility for satellite and asteroid ephemeris. So one might contemplate about are more general networking module to be implemented perhaps using Lua.
If we integrate new features into Celestia, it is always a good idea to do these as elegantly and /as general/ as possible, rather than just for a single "narrowband" application.
Bye Fridger