paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Paparazzi-devel] Tracking antenna


From: mark.griffin
Subject: RE: [Paparazzi-devel] Tracking antenna
Date: Fri, 30 Oct 2009 16:07:47 +0100

I modified the ant_track.c code in the paparazzi3/sw/ground_segment/cockpit folder to make it correctly estimate the azimuth and elevation angles based on the information contained in the GPS and NAVIGATION telemetry messages through the IVY bus (see attached file).
 
To use it, 
1. Open a terminal window and go to the "paparazzi3/sw/ground_segment/cockpit" folder.
2. Compile it with: make ant_track
3. Run it with: ./ant_track
4. A GUI should appear. Click on AUTO.
5. Launch an aircraft in paparazzi (use the simulator) and you will see the azimuth/elevation updated on the GUI.
 
The code could be easily modified to send the azimuth/elevation values through a USB serial port to a servo-based tracker.
 
Have fun.
Cheers, Mark
 
 


From: address@hidden [mailto:address@hidden On Behalf Of Roman Krashanitsa
Sent: Thursday, 29 October 2009 3:19 AM
To: address@hidden
Subject: Re: [Paparazzi-devel] Tracking antenna

I know, but its hard to give you any advice without seeing the actual code. For ex., here is my code for one of my xbee class transmit functions below. This is taken from the working code. I use ByteBuffer class like this:
 
 public void sendTX(byte[] toSend, int dest) throws IOException {
  int len=toSend.length+9;
  ByteBuffer buff=ByteBuffer.allocate(len);
  buff.put((byte)0x7E);
  buff.putShort((short)(len-4));
  buff.put((byte)0x01); // send RF data command
  buff.put((byte)0x0A); //frame id for future ACK
  if (dest==39)
   buff.putShort((short)0xA); //destination address
  else buff.putShort((short)dest); //destination address
  buff.put((byte)0x00); //options
  buff.put(toSend);
  add_checksum(buff.array());
  os.write(buff.array()); //write to output stream
 }
One more thing, in eclipse debug mode you can see all your data in hex and check if this data looks correct.
 
my 1c. :)
 
Roman
2009/10/28 Todd Sandercock <address@hidden>
Sweet, i have one day of uni left then i will clean up the code and somehow get it on svn. I don't really like the idea of putting java on the paparazzi svn but if you want it i can do it.

for the servo controller board that i was using you needed to send 0x80 to get it into one of the modes and a signed byte doesn't really do the job for that

Todd


From: Roman Krashanitsa <address@hidden> Sent: Thu, 29 October, 2009 3:51:51 AM

Subject: Re: [Paparazzi-devel] Tracking antenna

Hello Todd,
 
It would be nice if you could share your java project on svn. We could chip in and make some additions/suggestions.
As of myself, I did implement complete paparazzi core protocol for xbee and aerocomm on java, works fine, no errors or lockups. Overall, I don't see any problem with java signed byte type. You need to convert to int only if you have to compare to unsigned byte (or rather convert unsigned to signed if its a constant). Otherwise, use it as is.
 
I used standard Sun Serial API on windows and third-party drivers on Linux, but downloaded from sun as well.
 
Sincerely,
Roman

2009/10/27 Todd Sandercock <address@hidden>
Well i tried a few different api's until i got one to actually work on windows and linux. i can't remember which one i used. My computer that had all that stuff on it had an accident with some ati drivers last night so i have had to revert back to intrepid and with that i don't have .... long story short i can't open the eclipse workspace files at the moment to see what api i actually used.

The big issue with the java api was trying to send the "0x00". you think its sent it properly but nothing worked with the servo controller. so i plugged 2 ftdi cables into each other and worked out that every time that i sent a "0x00" it turned everything after it to garbage. If you have a fix that would be great!

The other thing with java is that there is no such unsigned variables. so when you are trying to send anything higher than 127 you have to use an int. DUMB!

anyway....

Todd

--- On Wed, 28/10/09, address@hidden <address@hidden> wrote:

From: address@hidden <address@hidden>
Subject: Re: [Paparazzi-devel] Tracking antenna Received: Wednesday, 28 October, 2009, 1:03 AM


On Mon, 26 Oct 2009 15:53:01 -0700 (PDT), Todd Sandercock
<address@hidden> wrote:
> Hey jesus and all
> That would be my video on youtube. All you need to get one working is one
> of
>
these http://www.sparkfun.com/commerce/product_info.php?products_id=8897 and
> a little programming skill. My software was written in java but
> unfortunately the java implementation of serial ports has caused me to
> ditch the software that i have written because of the stupid bugs that
java
> introduces.


Could you elaborate on that?
What implementation of the javacomm-API did you use?

Marcus


_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel


Get more done like never before with Yahoo!7 Mail. Learn more.

_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel




Get more done like never before with Yahoo!7 Mail. Learn more.

_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel


Attachment: ant_track.c
Description: ant_track.c


reply via email to

[Prev in Thread] Current Thread [Next in Thread]