double data types specified in sheets.

30 views
Skip to first unread message

eldon wong

unread,
Oct 24, 2022, 4:58:24 PM10/24/22
to ya...@googlegroups.com
Hi, 

I have telemetry in the form of ints, floats and doubles.

Yamcs version :  5.5.6

On the  dataTypes sheets, I've defined floats and doubles like this:

image.png
floating point values come are decoded without a problem but the double values don't
seem to be converted as expected, 

I tested this by exporting the double values as both two integer values as well as a single double value.

When exporting parameters from the web server telemetry->displays using the CSV export option, the following eng type values are displayed.

The values are close but not the same

Time,Seconds,Microseconds,Left_Timestamp,Left_O,Left_S,Right_O,Right_S
2022-10-21T20:43:02.047Z,1666384944,947969,1.6663849816070657E9,0.0,0.0,0.0,0.0
2022-10-21T20:43:02.148Z,1666384945,47969,1.6663849817069178E9,0.0,0.0,0.0,0.0
2022-10-21T20:43:02.247Z,1666384945,148015,1.666384981806795E9,0.0,0.0,0.0,0.0
2022-10-21T20:43:02.347Z,1666384945,247961,1.6663849819066792E9,0.0,0.0,0.0,0.0
2022-10-21T20:43:02.447Z,1666384945,347945,1.6663849820065932E9,0.0,0.0,0.0,0.0
2022-10-21T20:43:02.548Z,1666384945,447996,1.6663849821064506E9,0.0,0.0,0.0,0.0
2022-10-21T20:43:02.648Z,1666384945,548212,1.6663849822063255E9,0.0,0.0,0.0,0.0

shown in excel
Seconds Microseconds Left_Timestamp
1666384944 947969 1666384981.607060
1666384945 47969 1666384981.706910
1666384945 148015 1666384981.806790
1666384945 247961 1666384981.906670
1666384945 347945 1666384982.006590
1666384945 447996 1666384982.106450
1666384945 548212 1666384982.206320

there seems to be some sort of offset between the converted double value and the original

36.658775
36.658709
36.658645
36.658454
36.658108
36.658236
36.658154
36.658080
36.657968

Is there an easy way to export the RAW type as well?

Wondering if I am doing something wrong.

Thanks for your attention.


Nicolae Mihalache

unread,
Oct 24, 2022, 9:59:39 PM10/24/22
to ya...@googlegroups.com
Hello,

I don't understand from your email - which is the expected value and which is the value shown by Yamcs?

In the web interface, does the type corresponding to the 64 bit parameter appear as 64 bits? Can you post a screenshot please?

--
You received this message because you are subscribed to the Google Groups "yamcs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to yamcs+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/yamcs/CAJ2f_cK9pyFGJoFjAqRFx0uNWPCdhF5s8gDdYM9-L-DUfDH12A%40mail.gmail.com.

eldon wong

unread,
Oct 25, 2022, 9:12:57 AM10/25/22
to ya...@googlegroups.com
The expected value is shown below as two integer components :  seconds and microseconds

Seconds.jpg
microSeconds.jpg

The double value  = seconds + microseconds, it appears as a floating point value but value is slightly different.
doubleValue.jpg

Nicolae Mihalache

unread,
Oct 25, 2022, 9:24:41 AM10/25/22
to ya...@googlegroups.com
Ok, now I understand the problem. Can you please click on the "View in MDB" in the Left_Timestamp page?

The 36.5 delta is suspiciously close to the UTC - TAI difference of 37 seconds.

How are those parameters generated/computed?

eldon wong

unread,
Oct 25, 2022, 3:27:56 PM10/25/22
to ya...@googlegroups.com
 Hi Nicolae, 

image.png

As shown below, the timestamp, is generated at the line:

time = CFE_TIME_GetUTC();

then 

timeReport, which is defined as double, is assigned the seconds + the subseconds, value

This is assigned to both the left and right timestamp which are doubles as well. 

Seconds and Microseconds are integers 

Could it be that the Name of the parameter matters?  Does any wording of the parameter imply it will be treated as a time value.

image.png

Nicolae Mihalache

unread,
Oct 25, 2022, 3:41:49 PM10/25/22
to ya...@googlegroups.com
I don't think the name of the parameter matters if it's defined as integer, should be integer.

It appears to me that something is overwriting the data in the packet, or those parameters are not in the location you think they are.

Can you just do:
LOCOMOTION....MotorData.Seconds = 1000

and see what you get in telemetry?

That kind of thing should be visible with the packet viewer if you manage to run it.

eldon wong

unread,
Oct 26, 2022, 10:52:56 AM10/26/22
to ya...@googlegroups.com
the parameter that I am having trouble with in the double value.

1) Hard coded values before packing and send the data to YAMCS
image.png

The output I get should be just 1 as shown in the attached parameter_export ...timeShouldBe1.csv file, periodically the 1 becomes what appears to be a UTC timestamp value

2)  I was sending telemetry data to Yamcs at the rate of 10 Hz, once I reduced it to 1 Hz, the output data appeared as expected, THOUGH I did not test for a long time, still may revisit this

3)  I left the telemetry rate at 1 Hz and finally see cases, more often displaying the expected double value on the Telemetry -> display webpage within the YAMCS browser interface


image.png

However, when the data is exported as shown in parameter ... 19.csv, the values, most of the time do not match up

parameter_export_2022-10-26_09-29-05_timeShouldBe1.csv
parameter_export_2022-10-26_10-29-19.csv
Reply all
Reply to author
Forward
0 new messages