Printable Version of Topic

Click here to view this topic in its original format

Unmanned Spaceflight.com _ Chit Chat _ Basic question about SPICE and using vadd_c

Posted by: ncc1701d Jul 5 2018, 05:55 PM

Hello,
In the documentation for cspice found here:

https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/vadd_c.html

It says:
"vout may overwrite either v1 or v2"
"can overwrite either v1 or v2"

my question: Under what circumstance would vout overwrite v1 or v2? Can someone explain this wording?

Those words about overwrite are not mentioned under FORTRANspice or IDLspice online documentation.
Is this a bug in Cspice or why is this mentioned here?
I ask because when using the vadd_c in my code I have got some unpredicatble results and wondering if this
"overwriting" is causing the probem or my confusion.
The simple example provided by the documentation works fine for me though in my code.
Ideas anyone?
thanks

Posted by: mcaplinger Jul 5 2018, 07:56 PM

QUOTE (ncc1701d @ Jul 5 2018, 09:55 AM) *
my question: Under what circumstance would vout overwrite v1 or v2? Can someone explain this wording?

If vout was the same variable as v1 or v2. All it's saying is that this is OK.

Adding two vectors shouldn't really be confusing.

Posted by: ncc1701d Jul 5 2018, 11:45 PM

QUOTE (mcaplinger @ Jul 5 2018, 07:56 PM) *
If vout was the same variable as v1 or v2. All it's saying is that this is OK.

Adding two vectors shouldn't really be confusing.


thanks. It isnt nor should it be.. Just checking.
my problems then are most likely coming from somewhere else in my code

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)