Like, right now (working in python) I’m working through some data and appending it to a list in the czml format before encoding it into a json file. The data works through a forloop of “sources” and what I’m doing right now is appending it to the list.
for source in sources:
d_czml.append(
{
'id': {source},
... # building data packet
}
)
# The sphere that's supposed to follow the packet data below:
d_czml.append(
{
"id": f"{source}_sphere",
"name": f"Sphere Around {source}",
"parent": f"{source}",
"position": {
"reference": f"{source}#position"
},
"ellipsoid": {
"radii": {
"cartesian": [100, 100, 100]
},
"material": {
"solidColor": {
"color": {
# "rgba": [0, 0, 255, 50] # Semi-transparent blue
"rgba": colour[i][:2] + [50]
}
}
},
"outline": True,
"outlineColor": {
# "rgba": [0, 0, 255, 200]
"rgba": colour[i][:2] + [200]
}
}
}
)
with open(data_dir / 'test_czml.czml', 'w') as f:
f.write(json.dumps(d_czml))
The datapacket section works perfectly (as shown in my OP) but this section that’s meant to add the sphere runs a julianDate error so it’s not working correctly somewhere.
I did try and add it in with the “billboard” or around there and it didn’t show the sphere.
Where the (formatted for readability) source position data looks something like:
"position": {
"interpolationAlgorithm": "LAGRANGE",
"interpolationDegree": 5,
"referenceFrame": "INERTIAL",
"cartesian": [
"2022-12-28T00:03:00Z", -4393036.524, -1978967.914, -5183191.302,
"2022-12-28T00:06:00Z", -3570742.247, -1244795.108, -5981621.194999999,
"2022-12-28T00:09:00Z", -2600203.0840000003, -489291.636, -6562897.401000001,
"2022-12-28T00:12:00Z", -1516309.833, 256866.49599999998, -6906091.258,
"2022-12-28T00:15:00Z", -358739.081, 964354.078, -6998806.908,
"2022-12-28T00:18:00Z", 829466.275, 1606315.0080000001, -6837589.348,
"2022-12-28T00:21:00Z", 2003449.1479999998, 2159355.638, -6428057.665,
"2022-12-28T00:24:00Z", 3118191.8260000004, 2604388.785, -5784752.687,
"2022-12-28T00:27:00Z", 4130217.504, 2927299.5409999997,
...,
],
}